<p>Type of data contained in an input slot.</p> <p>Use these values to specify the type of data for a particular input element (see <strong>{{D3D11_INPUT_ELEMENT_DESC}}</strong>) of an input-layout object.</p> <dd> <p>Input data is per-vertex data.</p> </dd> <dd> <p>Input data is per-instance data.</p> </dd> <p>Determines the fill mode to use when rendering triangles.</p> <p>This enumeration is part of a rasterizer-state object description (see <strong>{{D3D11_RASTERIZER_DESC}}</strong>).</p> <dd> <p>Draw lines connecting the vertices. Adjacent vertices are not drawn.</p> </dd> <dd> <p>Fill the triangles formed by the vertices. Adjacent vertices are not drawn.</p> </dd> <p>Indicates triangles facing a particular direction are not drawn.</p> <p>This enumeration is part of a rasterizer-state object description (see <strong>{{D3D11_RASTERIZER_DESC}}</strong>).</p> <dd> <p>Always draw all triangles.</p> </dd> <dd> <p>Do not draw triangles that are front-facing.</p> </dd> <dd> <p>Do not draw triangles that are back-facing.</p> </dd> <p>Identifies the type of resource being used.</p> <p>This enumeration is used in <strong>{{ID3D11Resource::GetType}}</strong>. </p> <dd> <p>Resource is of unknown type.</p> </dd> <dd> <p>Resource is a buffer.</p> </dd> <dd> <p>Resource is a 1D texture.</p> </dd> <dd> <p>Resource is a 2D texture.</p> </dd> <dd> <p>Resource is a 3D texture.</p> </dd> <p>Specifies how to access a resource used in a depth-stencil view.</p> <p>This enumeration is used in <strong>{{D3D11_DEPTH_STENCIL_VIEW_DESC}}</strong> to create a depth-stencil view.</p> <dd> <p><em>{{D3D11_DSV_DIMENSION_UNKNOWN}}</em> is not a valid value for <strong>{{D3D11_DEPTH_STENCIL_VIEW_DESC}}</strong> and is not used.</p> </dd> <dd> <p>The resource will be accessed as a 1D texture.</p> </dd> <dd> <p>The resource will be accessed as an array of 1D textures.</p> </dd> <dd> <p>The resource will be accessed as a 2D texture.</p> </dd> <dd> <p>The resource will be accessed as an array of 2D textures.</p> </dd> <dd> <p>The resource will be accessed as a 2D texture with multisampling.</p> </dd> <dd> <p>The resource will be accessed as an array of 2D textures with multisampling.</p> </dd> <p>These flags identify the type of resource that will be viewed as a render target.</p> <p>This enumeration is used in <strong>{{D3D11_RENDER_TARGET_VIEW_DESC}}</strong> to create a render-target view.</p> <dd> <p>Do not use this value, as it will cause <strong>{{ID3D11Device::CreateRenderTargetView}}</strong> to fail.</p> </dd> <dd> <p>The resource will be accessed as a buffer.</p> </dd> <dd> <p>The resource will be accessed as a 1D texture.</p> </dd> <dd> <p>The resource will be accessed as an array of 1D textures.</p> </dd> <dd> <p>The resource will be accessed as a 2D texture.</p> </dd> <dd> <p>The resource will be accessed as an array of 2D textures.</p> </dd> <dd> <p>The resource will be accessed as a 2D texture with multisampling.</p> </dd> <dd> <p>The resource will be accessed as an array of 2D textures with multisampling.</p> </dd> <dd> <p>The resource will be accessed as a 3D texture.</p> </dd> <p>Unordered-access view options.</p> <p> This enumeration is used by a unordered access-view description (see <strong>{{D3D11_UNORDERED_ACCESS_VIEW_DESC}}</strong>). </p> <dd> <p>The view type is unknown.</p> </dd> <dd> <p>View the resource as a buffer.</p> </dd> <dd> <p>View the resource as a 1D texture.</p> </dd> <dd> <p>View the resource as a 1D texture array.</p> </dd> <dd> <p>View the resource as a 2D texture.</p> </dd> <dd> <p>View the resource as a 2D texture array.</p> </dd> <dd> <p>View the resource as a 3D texture array.</p> </dd> <p>Identifies expected resource use during rendering. The usage directly reflects whether a resource is accessible by the {{CPU}} and/or the graphics processing unit ({{GPU}}).</p> <p>An application identifies the way a resource is intended to be used (its usage) in a resource description. There are several structures for creating resources including: <strong>{{D3D11_TEXTURE1D_DESC}}</strong>, <strong>{{D3D11_TEXTURE2D_DESC}}</strong>, <strong>{{D3D11_TEXTURE3D_DESC}}</strong>, and <strong>{{D3D11_BUFFER_DESC}}</strong>.</p><table> <tr><td> <p>Differences between Direct3D 9 and Direct3D 10/11:</p> <p>In Direct3D 9, you specify the type of memory a resource should be created in at resource creation time (using {{D3DPOOL}}). It was an application's job to decide what memory pool would provide the best combination of functionality and performance.</p> <p>In Direct3D 10/11, an application no longer specifies what type of memory (the pool) to create a resource in. Instead, you specify the intended usage of the resource, and let the runtime (in concert with the driver and a memory manager) choose the type of memory that will achieve the best performance.</p> </td></tr> </table><p>?</p> <dd> <p>A resource that requires read and write access by the {{GPU}}. This is likely to be the most common usage choice.</p> </dd> <dd> <p>A resource that can only be read by the {{GPU}}. It cannot be written by the {{GPU}}, and cannot be accessed at all by the {{CPU}}. This type of resource must be initialized when it is created, since it cannot be changed after creation.</p> </dd> <dd> <p>A resource that is accessible by both the {{GPU}} (read only) and the {{CPU}} (write only). A dynamic resource is a good choice for a resource that will be updated by the {{CPU}} at least once per frame. To update a dynamic resource, use a <strong>Map</strong> method.</p> <p>For info about how to use dynamic resources, see How to: Use dynamic resources. </p> </dd> <dd> <p>A resource that supports data transfer (copy) from the {{GPU}} to the {{CPU}}.</p> </dd> <p>Identifies how to bind a resource to the pipeline.</p> <p>In general, binding flags can be combined using a logical {{OR}} (except the constant-buffer flag); however, you should use a single flag to allow the device to optimize the resource usage.</p><p>This enumeration is used by a:</p><ul> <li> <strong>Buffer description</strong> when creating a buffer.</li> <li>Texture description when creating a texture (see <strong>{{D3D11_TEXTURE1D_DESC}}</strong> or <strong>{{D3D11_TEXTURE2D_DESC}}</strong> or <strong>{{D3D11_TEXTURE3D_DESC}}</strong>).</li> </ul><p>A shader-resource buffer is {{NOT}} a constant buffer; rather, it is a texture or buffer resource that is bound to a shader, that contains texture or buffer data (it is not limited to a single element type in the buffer). A shader-resource buffer is created with the {{D3D11_BIND_SHADER_RESOURCE}} flag and is bound to the pipeline using one of these {{APIs:}} <strong>{{ID3D11DeviceContext::GSSetShaderResources}}</strong>, <strong>{{ID3D11DeviceContext::PSSetShaderResources}}</strong>, or <strong>{{ID3D11DeviceContext::VSSetShaderResources}}</strong>. Furthermore, a shader-resource buffer cannot use the <strong>{{D3D11_MAP_WRITE_NO_OVERWRITE}}</strong> flag.</p><strong>Note</strong>??The Direct3D 11.1 runtime, which is available starting with Windows?8, enables mapping dynamic constant buffers and shader resource views ({{SRVs}}) of dynamic buffers with <strong>{{D3D11_MAP_WRITE_NO_OVERWRITE}}</strong>. The Direct3D 11 and earlier runtimes limited mapping to vertex or index buffers. To determine if a Direct3D device supports these features, call <strong>{{ID3D11Device::CheckFeatureSupport}}</strong> with <strong>{{D3D11_FEATURE_D3D11_OPTIONS}}</strong>. <strong>CheckFeatureSupport</strong> fills members of a <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS}}</strong> structure with the device's features. The relevant members here are <strong>MapNoOverwriteOnDynamicConstantBuffer</strong> and <strong>MapNoOverwriteOnDynamicBufferSRV</strong>.? <dd> <p>Bind a buffer as a vertex buffer to the input-assembler stage.</p> </dd> <dd> <p>Bind a buffer as an index buffer to the input-assembler stage.</p> </dd> <dd> <p>Bind a buffer as a constant buffer to a shader stage; this flag may {{NOT}} be combined with any other bind flag.</p> </dd> <dd> <p>Bind a buffer or texture to a shader stage; this flag cannot be used with the <strong>{{D3D11_MAP_WRITE_NO_OVERWRITE}}</strong> flag.</p> <strong>Note</strong>??The Direct3D 11.1 runtime, which is available starting with Windows?8, enables mapping dynamic constant buffers and shader resource views ({{SRVs}}) of dynamic buffers with <strong>{{D3D11_MAP_WRITE_NO_OVERWRITE}}</strong>. The Direct3D 11 and earlier runtimes limited mapping to vertex or index buffers. To determine if a Direct3D device supports these features, call <strong>{{ID3D11Device::CheckFeatureSupport}}</strong> with <strong>{{D3D11_FEATURE_D3D11_OPTIONS}}</strong>. <strong>CheckFeatureSupport</strong> fills members of a <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS}}</strong> structure with the device's features. The relevant members here are <strong>MapNoOverwriteOnDynamicConstantBuffer</strong> and <strong>MapNoOverwriteOnDynamicBufferSRV</strong>. ? </dd> <dd> <p>Bind an output buffer for the stream-output stage.</p> </dd> <dd> <p>Bind a texture as a render target for the output-merger stage.</p> </dd> <dd> <p>Bind a texture as a depth-stencil target for the output-merger stage.</p> </dd> <dd> <p>Bind an unordered access resource.</p> </dd> <dd> <p>Set this flag to indicate that a 2D texture is used to receive output from the decoder {{API}}. The common way to create resources for a decoder output is by calling the <strong>{{ID3D11Device::CreateTexture2D}}</strong> method to create an array of 2D textures. However, you cannot use texture arrays that are created with this flag in calls to <strong>{{ID3D11Device::CreateShaderResourceView}}</strong>.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.1.</p> </dd> <dd> <p>Set this flag to indicate that a 2D texture is used to receive input from the video encoder {{API}}. The common way to create resources for a video encoder is by calling the <strong>{{ID3D11Device::CreateTexture2D}}</strong> method to create an array of 2D textures. However, you cannot use texture arrays that are created with this flag in calls to <strong>{{ID3D11Device::CreateShaderResourceView}}</strong>.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.1.</p> </dd> <p>Specifies the types of {{CPU}} access allowed for a resource.</p> <p>This enumeration is used in <strong>{{D3D11_BUFFER_DESC}}</strong>, <strong>{{D3D11_TEXTURE1D_DESC}}</strong>, <strong>{{D3D11_TEXTURE2D_DESC}}</strong>, <strong>{{D3D11_TEXTURE3D_DESC}}</strong>. </p><p>Applications may combine one or more of these flags with a logical {{OR}}. When possible, create resources with no {{CPU}} access flags, as this enables better resource optimization.</p><p>The <strong>{{D3D11_RESOURCE_MISC_FLAG}}</strong> cannot be used when creating resources with <strong>{{D3D11_CPU_ACCESS}}</strong> flags.</p> <dd> <p>The resource is to be mappable so that the {{CPU}} can change its contents. Resources created with this flag cannot be set as outputs of the pipeline and must be created with either dynamic or staging usage (see <strong>{{D3D11_USAGE}}</strong>).</p> </dd> <dd> <p>The resource is to be mappable so that the {{CPU}} can read its contents. Resources created with this flag cannot be set as either inputs or outputs to the pipeline and must be created with staging usage (see <strong>{{D3D11_USAGE}}</strong>).</p> </dd> <p>Identifies options for resources.</p> <p> This enumeration is used in <strong>{{D3D11_BUFFER_DESC}}</strong>, <strong>{{D3D11_TEXTURE1D_DESC}}</strong>, <strong>{{D3D11_TEXTURE2D_DESC}}</strong>, <strong>{{D3D11_TEXTURE3D_DESC}}</strong>. </p><p> These flags can be combined by bitwise {{OR}}. </p><p> The <strong>{{D3D11_RESOURCE_MISC_FLAG}}</strong> cannot be used when creating resources with <strong>{{D3D11_CPU_ACCESS}}</strong> flags. </p> <dd> <p> Enables {{MIP}} map generation by using <strong>{{ID3D11DeviceContext::GenerateMips}}</strong> on a texture resource. The resource must be created with the <strong>bind flags</strong> that specify that the resource is a render target and a shader resource. </p> </dd> <dd> <p> Enables resource data sharing between two or more Direct3D devices. The only resources that can be shared are 2D non-mipmapped textures. </p> <p><strong>{{D3D11_RESOURCE_MISC_SHARED}}</strong> and <strong>{{D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX}}</strong> are mutually exclusive. </p> <p><strong>{{WARP}}</strong> and <strong>{{REF}}</strong> devices do not support shared resources. If you try to create a resource with this flag on either a <strong>{{WARP}}</strong> or <strong>{{REF}}</strong> device, the create method will return an <strong>{{E_OUTOFMEMORY}}</strong> error code. </p> <strong>Note</strong>?? Starting with Windows?8, <strong>{{WARP}}</strong> devices fully support shared resources. ? <strong>Note</strong>?? Starting with Windows?8, we recommend that you enable resource data sharing between two or more Direct3D devices by using a combination of the <strong>{{D3D11_RESOURCE_MISC_SHARED_NTHANDLE}}</strong> and <strong>{{D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX}}</strong> flags instead. ? </dd> <dd> <p> Sets a resource to be a cube texture created from a Texture2DArray that contains 6 textures. </p> </dd> <dd> <p>Enables instancing of {{GPU}}-generated content.</p> </dd> <dd> <p> Enables a resource as a byte address buffer. </p> </dd> <dd> <p> Enables a resource as a structured buffer. </p> </dd> <dd> <p> Enables a resource with {{MIP}} map clamping for use with <strong>{{ID3D11DeviceContext::SetResourceMinLOD}}</strong>. </p> </dd> <dd> <p>Enables the resource to be synchronized by using the <strong>{{IDXGIKeyedMutex::AcquireSync}}</strong> and <strong>{{IDXGIKeyedMutex::ReleaseSync}}</strong> {{APIs}}. The following Direct3D?11 resource creation {{APIs}}, that take <strong>{{D3D11_RESOURCE_MISC_FLAG}}</strong> parameters, have been extended to support the new flag.</p> <ul> <li> <strong>{{ID3D11Device::CreateTexture1D}}</strong> </li> <li> <strong>{{ID3D11Device::CreateTexture2D}}</strong> </li> <li> <strong>{{ID3D11Device::CreateTexture3D}}</strong> </li> <li> <strong>{{ID3D11Device::CreateBuffer}}</strong> </li> </ul> <p>If you call any of these methods with the <strong>{{D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX}}</strong> flag set, the interface returned will support the <strong>{{IDXGIKeyedMutex}}</strong> interface. You can retrieve a reference to the <strong>{{IDXGIKeyedMutex}}</strong> interface from the resource by using <strong>{{IUnknown::QueryInterface}}</strong>. The <strong>{{IDXGIKeyedMutex}}</strong> interface implements the <strong>{{IDXGIKeyedMutex::AcquireSync}}</strong> and <strong>{{IDXGIKeyedMutex::ReleaseSync}}</strong> {{APIs}} to synchronize access to the surface. The device that creates the surface, and any other device that opens the surface by using <strong>OpenSharedResource</strong>, must call <strong>{{IDXGIKeyedMutex::AcquireSync}}</strong> before they issue any rendering commands to the surface. When those devices finish rendering, they must call <strong>{{IDXGIKeyedMutex::ReleaseSync}}</strong>. </p> <p><strong>{{D3D11_RESOURCE_MISC_SHARED}}</strong> and <strong>{{D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX}}</strong> are mutually exclusive. </p> <p><strong>{{WARP}}</strong> and <strong>{{REF}}</strong> devices do not support shared resources. If you try to create a resource with this flag on either a <strong>{{WARP}}</strong> or <strong>{{REF}}</strong> device, the create method will return an <strong>{{E_OUTOFMEMORY}}</strong> error code. </p> <strong>Note</strong>?? Starting with Windows?8, <strong>{{WARP}}</strong> devices fully support shared resources. ? </dd> <dd> <p> Enables a resource compatible with {{GDI}}. You must set the <strong>{{D3D11_RESOURCE_MISC_GDI_COMPATIBLE}}</strong> flag on surfaces that you use with {{GDI}}. Setting the <strong>{{D3D11_RESOURCE_MISC_GDI_COMPATIBLE}}</strong> flag allows {{GDI}} rendering on the surface via <strong>{{IDXGISurface1::GetDC}}</strong>. </p> <p>Consider the following programming tips for using {{D3D11_RESOURCE_MISC_GDI_COMPATIBLE}} when you create a texture or use that texture in a swap chain:</p> <ul> <li>{{D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX}} and {{D3D11_RESOURCE_MISC_GDI_COMPATIBLE}} are mutually exclusive. Therefore, do not use them together.</li> <li>{{D3D11_RESOURCE_MISC_RESOURCE_CLAMP}} and {{D3D11_RESOURCE_MISC_GDI_COMPATIBLE}} are mutually exclusive. Therefore, do not use them together.</li> <li> You must bind the texture as a render target for the output-merger stage. For example, set the {{D3D11_BIND_RENDER_TARGET}} flag in the <strong>BindFlags</strong> member of the <strong>{{D3D11_TEXTURE2D_DESC}}</strong> structure. </li> <li> You must set the maximum number of {{MIP}} map levels to 1. For example, set the <strong>MipLevels</strong> member of the <strong>{{D3D11_TEXTURE2D_DESC}}</strong> structure to 1. </li> <li> You must specify that the texture requires read and write access by the {{GPU}}. For example, set the <strong>Usage</strong> member of the <strong>{{D3D11_TEXTURE2D_DESC}}</strong> structure to {{D3D11_USAGE_DEFAULT}}. </li> <li> <p>You must set the texture format to one of the following types. </p> <ul> <li>{{DXGI_FORMAT_B8G8R8A8_UNORM}}</li> <li>{{DXGI_FORMAT_B8G8R8A8_TYPELESS}}</li> <li>{{DXGI_FORMAT_B8G8R8A8_UNORM_SRGB}}</li> </ul> For example, set the <strong>Format</strong> member of the <strong>{{D3D11_TEXTURE2D_DESC}}</strong> structure to one of these types. </li> <li> You cannot use {{D3D11_RESOURCE_MISC_GDI_COMPATIBLE}} with multisampling. Therefore, set the <strong>Count</strong> member of the <strong>{{DXGI_SAMPLE_DESC}}</strong> structure to 1. Then, set the <strong>SampleDesc</strong> member of the <strong>{{D3D11_TEXTURE2D_DESC}}</strong> structure to this <strong>{{DXGI_SAMPLE_DESC}}</strong> structure. </li> </ul> </dd> <dd> <p>Set this flag to enable the use of {{NT}} {{HANDLE}} values when you create a shared resource. By enabling this flag, you deprecate the use of existing {{HANDLE}} values.</p> <p> When you use this flag, you must combine it with the <strong>{{D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX}}</strong> flag by using a bitwise {{OR}} operation. The resulting value specifies a new shared resource type that directs the runtime to use {{NT}} {{HANDLE}} values for the shared resource. The runtime then must confirm that the shared resource works on all hardware at the specified feature level. </p> <p>Without this flag set, the runtime does not strictly validate shared resource parameters (that is, formats, flags, usage, and so on). When the runtime does not validate shared resource parameters, behavior of much of the Direct3D {{API}} might be undefined and might vary from driver to driver. </p> <p><strong>Direct3D 11 and earlier:??</strong>This value is not supported until Direct3D 11.1.</p> </dd> <dd> <p>Set this flag to indicate that the resource might contain protected content; therefore, the operating system should use the resource only when the driver and hardware support content protection. If the driver and hardware do not support content protection and you try to create a resource with this flag, the resource creation fails.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.1.</p> </dd> <dd> <p>Set this flag to indicate that the operating system restricts access to the shared surface. You can use this flag together with the {{D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE_DRIVER}} flag and only when you create a shared surface. The process that creates the shared resource can always open the shared resource.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.1.</p> </dd> <dd> <p>Set this flag to indicate that the driver restricts access to the shared surface. You can use this flag in conjunction with the {{D3D11_RESOURCE_MISC_RESTRICT_SHARED_RESOURCE}} flag and only when you create a shared surface. The process that creates the shared resource can always open the shared resource.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.1.</p> </dd> <dd> <p> Set this flag to indicate that the resource is guarded. Such a resource is returned by the <strong>{{IDCompositionSurface::BeginDraw}}</strong> (DirectComposition) and <strong>{{ISurfaceImageSourceNative::BeginDraw}}</strong> (Windows Runtime) {{APIs}}. For these {{APIs}}, you provide a region of interest ({{ROI}}) on a surface to update. This surface isn't compatible with multiple render targets ({{MRT}}).</p> <p>A guarded resource automatically restricts all writes to the region that is related to one of the preceding {{APIs}}. Additionally, the resource enforces access to the {{ROI}} with these restrictions:</p> <ul> <li> Copy operations from the resource by using <strong>{{ID3D11DeviceContext::CopyResource}}</strong> or <strong>{{ID3D11DeviceContext::CopySubresourceRegion}}</strong> are restricted to only copy from the {{ROI}}. </li> <li>When a guarded resource is set as a render target, it must be the only target.</li> </ul> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.1.</p> </dd> <dd> <p> Set this flag to indicate that the resource is a tile pool.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.2.</p> </dd> <dd> <p> Set this flag to indicate that the resource is a tiled resource.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.2.</p> </dd> <dd> <p>Set this flag to indicate that the resource should be created such that it will be protected by the hardware. Resource creation will fail if hardware content protection is not supported.</p> <p>This flag has the following restrictions:</p> <ul> <li> This flag cannot be used with the following <strong>{{D3D11_USAGE}}</strong> values:<ul> <li><strong>{{D3D11_USAGE_DYNAMIC}}</strong></li> <li><strong>{{D3D11_USAGE_STAGING}}</strong></li> </ul> </li> <li> This flag cannot be used with the following <strong>{{D3D11_BIND_FLAG}}</strong> values.<ul> <li><strong>{{D3D11_BIND_VERTEX_BUFFER}}</strong></li> <li><strong>{{D3D11_BIND_INDEX_BUFFER}}</strong></li> </ul> </li> <li>No {{CPU}} access flags can be specified.</li> </ul> <strong>Note</strong>??<p>Creating a texture using this flag does not automatically guarantee that hardware protection will be enabled for the underlying allocation. Some implementations require that the {{DRM}} components are first initialized prior to any guarantees of protection.</p> ? <p><strong>Note</strong>?? This enumeration value is supported starting with Windows?10. </p> </dd> <p>Identifies a resource to be accessed for reading and writing by the {{CPU}}. Applications may combine one or more of these flags.</p> <p>This enumeration is used in <strong>{{ID3D11DeviceContext::Map}}</strong>.</p><p>These remarks are divided into the following topics:</p><p> </p><ul> <li>{{Meaning}}</li> <li>{{Common}}</li> </ul> <dd> <p>Resource is mapped for reading. The resource must have been created with read access (see <strong>{{D3D11_CPU_ACCESS_READ}}</strong>).</p> </dd> <dd> <p>Resource is mapped for writing. The resource must have been created with write access (see <strong>{{D3D11_CPU_ACCESS_WRITE}}</strong>).</p> </dd> <dd> <p>Resource is mapped for reading and writing. The resource must have been created with read and write access (see <strong>{{D3D11_CPU_ACCESS_READ}} and {{D3D11_CPU_ACCESS_WRITE}}</strong>).</p> </dd> <dd> <p>Resource is mapped for writing; the previous contents of the resource will be undefined. The resource must have been created with write access and dynamic usage (See <strong>{{D3D11_CPU_ACCESS_WRITE}}</strong> and <strong>{{D3D11_USAGE_DYNAMIC}}</strong>).</p> </dd> <dd> <p>Resource is mapped for writing; the existing contents of the resource cannot be overwritten (see Remarks). This flag is only valid on vertex and index buffers. The resource must have been created with write access (see <strong>{{D3D11_CPU_ACCESS_WRITE}}</strong>). Cannot be used on a resource created with the <strong>{{D3D11_BIND_CONSTANT_BUFFER}}</strong> flag.</p> <strong>Note</strong>??The Direct3D 11.1 runtime, which is available starting with Windows?8, enables mapping dynamic constant buffers and shader resource views ({{SRVs}}) of dynamic buffers with <strong>{{D3D11_MAP_WRITE_NO_OVERWRITE}}</strong>. The Direct3D 11 and earlier runtimes limited mapping to vertex or index buffers. To determine if a Direct3D device supports these features, call <strong>{{ID3D11Device::CheckFeatureSupport}}</strong> with <strong>{{D3D11_FEATURE_D3D11_OPTIONS}}</strong>. <strong>CheckFeatureSupport</strong> fills members of a <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS}}</strong> structure with the device's features. The relevant members here are <strong>MapNoOverwriteOnDynamicConstantBuffer</strong> and <strong>MapNoOverwriteOnDynamicBufferSRV</strong>. ? </dd> <p>Specifies how the {{CPU}} should respond when an application calls the <strong>{{ID3D11DeviceContext::Map}}</strong> method on a resource that is being used by the {{GPU}}.</p> <p>This enumeration is used by <strong>{{ID3D11DeviceContext::Map}}</strong>.</p><p>{{D3D11_MAP_FLAG_DO_NOT_WAIT}} cannot be used with <strong>{{D3D11_MAP_WRITE_DISCARD}}</strong> or <strong>{{D3D11_MAP_WRITE_NOOVERWRITE}}</strong>.</p> <p>Option(s) for raising an error to a non-continuable exception.</p> <p>These flags are used by <strong>{{ID3D11Device::GetExceptionMode}}</strong> and <strong>{{ID3D11Device::SetExceptionMode}}</strong>. Use 0 to indicate no flags; multiple flags can be logically {{OR}}'ed together.</p> <dd> <p>Raise an internal driver error to a non-continuable exception.</p> </dd> <p> Specifies the parts of the depth stencil to clear. </p> <p> These flags are used when calling <strong>{{ID3D11DeviceContext::ClearDepthStencilView}}</strong>; the flags can be combined with a bitwise {{OR}}. </p> <dd> <p>Clear the depth buffer, using fast clear if possible, then place the resource in a compressed state.</p> </dd> <dd> <p>Clear the stencil buffer, using fast clear if possible, then place the resource in a compressed state.</p> </dd> <p>Comparison options.</p> <p>A comparison option determines whether how the runtime compares source (new) data against destination (existing) data before storing the new data. The comparison option is declared in a description before an object is created. The {{API}} allows you to set a comparison option for a depth-stencil buffer (see <strong>{{D3D11_DEPTH_STENCIL_DESC}}</strong>), depth-stencil operations (see <strong>{{D3D11_DEPTH_STENCILOP_DESC}}</strong>), or sampler state (see <strong>{{D3D11_SAMPLER_DESC}}</strong>).</p> <dd> <p>Never pass the comparison.</p> </dd> <dd> <p>If the source data is less than the destination data, the comparison passes.</p> </dd> <dd> <p>If the source data is equal to the destination data, the comparison passes.</p> </dd> <dd> <p>If the source data is less than or equal to the destination data, the comparison passes.</p> </dd> <dd> <p>If the source data is greater than the destination data, the comparison passes.</p> </dd> <dd> <p>If the source data is not equal to the destination data, the comparison passes.</p> </dd> <dd> <p>If the source data is greater than or equal to the destination data, the comparison passes.</p> </dd> <dd> <p>Always pass the comparison.</p> </dd> <p>Identify the portion of a depth-stencil buffer for writing depth data.</p> <dd> <p>Turn off writes to the depth-stencil buffer.</p> </dd> <dd> <p>Turn on writes to the depth-stencil buffer.</p> </dd> <p>The stencil operations that can be performed during depth-stencil testing.</p> <dd> <p>Keep the existing stencil data.</p> </dd> <dd> <p>Set the stencil data to 0.</p> </dd> <dd> <p>Set the stencil data to the reference value set by calling <strong>{{ID3D11DeviceContext::OMSetDepthStencilState}}</strong>.</p> </dd> <dd> <p>Increment the stencil value by 1, and clamp the result.</p> </dd> <dd> <p>Decrement the stencil value by 1, and clamp the result.</p> </dd> <dd> <p>Invert the stencil data.</p> </dd> <dd> <p>Increment the stencil value by 1, and wrap the result if necessary.</p> </dd> <dd> <p>Decrement the stencil value by 1, and wrap the result if necessary.</p> </dd> <p>Blend factors, which modulate values for the pixel shader and render target.</p> <p>Blend operations are specified in a <strong>blend description</strong>.</p> <dd> <p>The blend factor is (0, 0, 0, 0). No pre-blend operation.</p> </dd> <dd> <p>The blend factor is (1, 1, 1, 1). No pre-blend operation.</p> </dd> <dd> <p>The blend factor is (R?, G?, B?, A?), that is color data ({{RGB}}) from a pixel shader. No pre-blend operation.</p> </dd> <dd> <p>The blend factor is (1 - R?, 1 - G?, 1 - B?, 1 - A?), that is color data ({{RGB}}) from a pixel shader. The pre-blend operation inverts the data, generating 1 - {{RGB}}.</p> </dd> <dd> <p>The blend factor is (A?, A?, A?, A?), that is alpha data (A) from a pixel shader. No pre-blend operation.</p> </dd> <dd> <p>The blend factor is ( 1 - A?, 1 - A?, 1 - A?, 1 - A?), that is alpha data (A) from a pixel shader. The pre-blend operation inverts the data, generating 1 - A.</p> </dd> <dd> <p>The blend factor is (Ad Ad Ad Ad), that is alpha data from a render target. No pre-blend operation.</p> </dd> <dd> <p>The blend factor is (1 - Ad 1 - Ad 1 - Ad 1 - Ad), that is alpha data from a render target. The pre-blend operation inverts the data, generating 1 - A.</p> </dd> <dd> <p>The blend factor is (Rd, Gd, Bd, Ad), that is color data from a render target. No pre-blend operation.</p> </dd> <dd> <p>The blend factor is (1 - Rd, 1 - Gd, 1 - Bd, 1 - Ad), that is color data from a render target. The pre-blend operation inverts the data, generating 1 - {{RGB}}.</p> </dd> <dd> <p>The blend factor is (f, f, f, 1); where f = min(A?, 1 - Ad). The pre-blend operation clamps the data to 1 or less. </p> </dd> <dd> <p>The blend factor is the blend factor set with <strong>{{ID3D11DeviceContext::OMSetBlendState}}</strong>. No pre-blend operation.</p> </dd> <dd> <p>The blend factor is the blend factor set with <strong>{{ID3D11DeviceContext::OMSetBlendState}}</strong>. The pre-blend operation inverts the blend factor, generating 1 - blend_factor.</p> </dd> <dd> <p>The blend factor is data sources both as color data output by a pixel shader. There is no pre-blend operation. This blend factor supports dual-source color blending.</p> </dd> <dd> <p>The blend factor is data sources both as color data output by a pixel shader. The pre-blend operation inverts the data, generating 1 - {{RGB}}. This blend factor supports dual-source color blending.</p> </dd> <dd> <p>The blend factor is data sources as alpha data output by a pixel shader. There is no pre-blend operation. This blend factor supports dual-source color blending.</p> </dd> <dd> <p>The blend factor is data sources as alpha data output by a pixel shader. The pre-blend operation inverts the data, generating 1 - A. This blend factor supports dual-source color blending.</p> </dd> <p>{{RGB}} or alpha blending operation.</p> <p>The runtime implements {{RGB}} blending and alpha blending separately. Therefore, blend state requires separate blend operations for {{RGB}} data and alpha data. These blend operations are specified in a <strong>blend description</strong>. The two sources ?source 1 and source 2? are shown in the blending block diagram.</p><p>Blend state is used by the output-merger stage to determine how to blend together two {{RGB}} pixel values and two alpha values. The two {{RGB}} pixel values and two alpha values are the {{RGB}} pixel value and alpha value that the pixel shader outputs and the {{RGB}} pixel value and alpha value already in the output render target. The <strong>blend option</strong> controls the data source that the blending stage uses to modulate values for the pixel shader, render target, or both. The <strong>blend operation</strong> controls how the blending stage mathematically combines these modulated values.</p> <dd> <p>Add source 1 and source 2.</p> </dd> <dd> <p>Subtract source 1 from source 2.</p> </dd> <dd> <p>Subtract source 2 from source 1.</p> </dd> <dd> <p>Find the minimum of source 1 and source 2.</p> </dd> <dd> <p>Find the maximum of source 1 and source 2.</p> </dd> <p>Identify which components of each pixel of a render target are writable during blending.</p> <p>These flags can be combined with a bitwise {{OR}}.</p> <dd> <p>Allow data to be stored in the red component.</p> </dd> <dd> <p>Allow data to be stored in the green component.</p> </dd> <dd> <p>Allow data to be stored in the blue component.</p> </dd> <dd> <p>Allow data to be stored in the alpha component.</p> </dd> <dd> <p>Allow data to be stored in all components.</p> </dd> <p>The different faces of a cube texture.</p> <dd> <p>Positive X face.</p> </dd> <dd> <p>Negative X face.</p> </dd> <dd> <p>Positive Y face.</p> </dd> <dd> <p>Negative Y face.</p> </dd> <dd> <p>Positive Z face.</p> </dd> <dd> <p>Negative Z face.</p> </dd> <p>Identifies how to view a buffer resource.</p> <p>This enumeration is used by <strong>{{D3D11_BUFFEREX_SRV}}</strong> </p> <dd> <p>View the buffer as raw. For more info about raw viewing of buffers, see Raw Views of Buffers.</p> </dd> <p>Depth-stencil view options.</p> <p>This enumeration is used by <strong>{{D3D11_DEPTH_STENCIL_VIEW_DESC}}</strong>.</p><p>Limiting a depth-stencil buffer to read-only access allows more than one depth-stencil view to be bound to the pipeline simultaneously, since it is not possible to have a read/write conflicts between separate views.</p> <dd> <p>Indicates that depth values are read only.</p> </dd> <dd> <p>Indicates that stencil values are read only.</p> </dd> <p>Identifies unordered-access view options for a buffer resource.</p> <dd> <p>Resource contains raw, unstructured data. Requires the {{UAV}} format to be {{DXGI_FORMAT_R32_TYPELESS}}. For more info about raw viewing of buffers, see Raw Views of Buffers.</p> </dd> <dd> <p>Allow data to be appended to the end of the buffer. <strong>{{D3D11_BUFFER_UAV_FLAG_APPEND}}</strong> flag must also be used for any view that will be used as a AppendStructuredBuffer or a ConsumeStructuredBuffer. Requires the {{UAV}} format to be {{DXGI_FORMAT_UNKNOWN}}.</p> </dd> <dd> <p>Adds a counter to the unordered-access-view buffer. <strong>{{D3D11_BUFFER_UAV_FLAG_COUNTER}}</strong> can only be used on a {{UAV}} that is a {{RWStructuredBuffer}} and it enables the functionality needed for the <strong>IncrementCounter</strong> and <strong>DecrementCounter</strong> methods in {{HLSL}}. Requires the {{UAV}} format to be {{DXGI_FORMAT_UNKNOWN}}.</p> </dd> <p>Filtering options during texture sampling.</p> <strong>Note</strong>??If you use different filter types for min versus mag filter, undefined behavior occurs in certain cases where the choice between whether magnification or minification happens is ambiguous. To prevent this undefined behavior, use filter modes that use similar filter operations for both min and mag (or use anisotropic filtering, which avoids the issue as well).?<p>During texture sampling, one or more texels are read and combined (this is calling filtering) to produce a single value. Point sampling reads a single texel while linear sampling reads two texels (endpoints) and linearly interpolates a third value between the endpoints.</p><p>{{HLSL}} texture-sampling functions also support comparison filtering during texture sampling. Comparison filtering compares each sampled texel against a comparison value. The boolean result is blended the same way that normal texture filtering is blended.</p><p>You can use {{HLSL}} intrinsic texture-sampling functions that implement texture filtering only or companion functions that use texture filtering with comparison filtering.</p><table> <tr><th>Texture Sampling Function</th><th>Texture Sampling Function with Comparison Filtering</th></tr> <tr><td>sample</td><td>samplecmp or samplecmplevelzero</td></tr> </table><p>?</p><p>Comparison filters only work with textures that have the following {{DXGI}} formats: {{R32_FLOAT_X8X24_TYPELESS}}, {{R32_FLOAT}}, {{R24_UNORM_X8_TYPELESS}}, {{R16_UNORM}}.</p> <dd> <p>Use point sampling for minification, magnification, and mip-level sampling.</p> </dd> <dd> <p>Use point sampling for minification and magnification; use linear interpolation for mip-level sampling.</p> </dd> <dd> <p>Use point sampling for minification; use linear interpolation for magnification; use point sampling for mip-level sampling.</p> </dd> <dd> <p>Use point sampling for minification; use linear interpolation for magnification and mip-level sampling.</p> </dd> <dd> <p>Use linear interpolation for minification; use point sampling for magnification and mip-level sampling.</p> </dd> <dd> <p>Use linear interpolation for minification; use point sampling for magnification; use linear interpolation for mip-level sampling.</p> </dd> <dd> <p>Use linear interpolation for minification and magnification; use point sampling for mip-level sampling.</p> </dd> <dd> <p>Use linear interpolation for minification, magnification, and mip-level sampling.</p> </dd> <dd> <p>Use anisotropic interpolation for minification, magnification, and mip-level sampling.</p> </dd> <dd> <p>Use point sampling for minification, magnification, and mip-level sampling. Compare the result to the comparison value.</p> </dd> <dd> <p>Use point sampling for minification and magnification; use linear interpolation for mip-level sampling. Compare the result to the comparison value.</p> </dd> <dd> <p>Use point sampling for minification; use linear interpolation for magnification; use point sampling for mip-level sampling. Compare the result to the comparison value.</p> </dd> <dd> <p>Use point sampling for minification; use linear interpolation for magnification and mip-level sampling. Compare the result to the comparison value.</p> </dd> <dd> <p>Use linear interpolation for minification; use point sampling for magnification and mip-level sampling. Compare the result to the comparison value.</p> </dd> <dd> <p>Use linear interpolation for minification; use point sampling for magnification; use linear interpolation for mip-level sampling. Compare the result to the comparison value.</p> </dd> <dd> <p>Use linear interpolation for minification and magnification; use point sampling for mip-level sampling. Compare the result to the comparison value.</p> </dd> <dd> <p>Use linear interpolation for minification, magnification, and mip-level sampling. Compare the result to the comparison value.</p> </dd> <dd> <p>Use anisotropic interpolation for minification, magnification, and mip-level sampling. Compare the result to the comparison value.</p> </dd> <dd> <p>Fetch the same set of texels as {{D3D11_FILTER_MIN_MAG_MIP_POINT}} and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as {{D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR}} and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as {{D3D11_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT}} and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as {{D3D11_FILTER_MIN_POINT_MAG_MIP_LINEAR}} and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as {{D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT}} and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as {{D3D11_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR}} and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as {{D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT}} and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as {{D3D11_FILTER_MIN_MAG_MIP_LINEAR}} and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as {{D3D11_FILTER_ANISOTROPIC}} and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as {{D3D11_FILTER_MIN_MAG_MIP_POINT}} and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as {{D3D11_FILTER_MIN_MAG_POINT_MIP_LINEAR}} and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as {{D3D11_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT}} and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as {{D3D11_FILTER_MIN_POINT_MAG_MIP_LINEAR}} and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as {{D3D11_FILTER_MIN_LINEAR_MAG_MIP_POINT}} and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as {{D3D11_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR}} and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as {{D3D11_FILTER_MIN_MAG_LINEAR_MIP_POINT}} and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as {{D3D11_FILTER_MIN_MAG_MIP_LINEAR}} and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as {{D3D11_FILTER_ANISOTROPIC}} and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <p>Types of magnification or minification sampler filters.</p> <dd> <p>Point filtering used as a texture magnification or minification filter. The texel with coordinates nearest to the desired pixel value is used. The texture filter to be used between mipmap levels is nearest-point mipmap filtering. The rasterizer uses the color from the texel of the nearest mipmap texture. </p> </dd> <dd> <p>Bilinear interpolation filtering used as a texture magnification or minification filter. A weighted average of a 2 x 2 area of texels surrounding the desired pixel is used. The texture filter to use between mipmap levels is trilinear mipmap interpolation. The rasterizer linearly interpolates pixel color, using the texels of the two nearest mipmap textures. </p> </dd> <p> Specifies the type of sampler filter reduction. </p> <p> This enum is used by the <strong>{{D3D11_SAMPLER_DESC}}</strong> structure. </p> <dd> <p> Indicates standard (default) filter reduction. </p> </dd> <dd> <p> Indicates a comparison filter reduction. </p> </dd> <dd> <p> Indicates minimum filter reduction. </p> </dd> <dd> <p> Indicates maximum filter reduction. </p> </dd> <p>Identify a technique for resolving texture coordinates that are outside of the boundaries of a texture.</p> <dd> <p>Tile the texture at every (u,v) integer junction. For example, for u values between 0 and 3, the texture is repeated three times.</p> </dd> <dd> <p>Flip the texture at every (u,v) integer junction. For u values between 0 and 1, for example, the texture is addressed normally; between 1 and 2, the texture is flipped (mirrored); between 2 and 3, the texture is normal again; and so on. </p> </dd> <dd> <p>Texture coordinates outside the range [0.0, 1.0] are set to the texture color at 0.0 or 1.0, respectively.</p> </dd> <dd> <p>Texture coordinates outside the range [0.0, 1.0] are set to the border color specified in <strong>{{D3D11_SAMPLER_DESC}}</strong> or {{HLSL}} code.</p> </dd> <dd> <p>Similar to {{D3D11_TEXTURE_ADDRESS_MIRROR}} and {{D3D11_TEXTURE_ADDRESS_CLAMP}}. Takes the absolute value of the texture coordinate (thus, mirroring around 0), and then clamps to the maximum value.</p> </dd> <p>Which resources are supported for a given format and given device (see <strong>{{ID3D11Device::CheckFormatSupport}}</strong> and <strong>{{ID3D11Device::CheckFeatureSupport}}</strong>).</p> <p> Unordered resource support options for a compute shader resource (see <strong>{{ID3D11Device::CheckFeatureSupport}}</strong>). </p> <p>Optional flags that control the behavior of <strong>{{ID3D11DeviceContext::GetData}}</strong>.</p> <p>Query types.</p> <p> Create a query with <strong>{{ID3D11Device::CreateQuery}}</strong>. </p> <dd> <p> Determines whether or not the {{GPU}} is finished processing commands. When the {{GPU}} is finished processing commands <strong>{{ID3D11DeviceContext::GetData}}</strong> will return {{S_OK}}, and pData will point to a {{BOOL}} with a value of <strong>{{TRUE}}</strong>. When using this type of query, <strong>{{ID3D11DeviceContext::Begin}}</strong> is disabled. </p> </dd> <dd> <p> Get the number of samples that passed the depth and stencil tests in between <strong>{{ID3D11DeviceContext::Begin}}</strong> and <strong>{{ID3D11DeviceContext::End}}</strong>. <strong>{{ID3D11DeviceContext::GetData}}</strong> returns a {{UINT64}}. If a depth or stencil test is disabled, then each of those tests will be counted as a pass. </p> </dd> <dd> <p> Get a timestamp value where <strong>{{ID3D11DeviceContext::GetData}}</strong> returns a {{UINT64}}. This kind of query is only useful if two timestamp queries are done in the middle of a {{D3D11_QUERY_TIMESTAMP_DISJOINT}} query. The difference of two timestamps can be used to determine how many ticks have elapsed, and the {{D3D11_QUERY_TIMESTAMP_DISJOINT}} query will determine if that difference is a reliable value and also has a value that shows how to convert the number of ticks into seconds. See <strong>{{D3D11_QUERY_DATA_TIMESTAMP_DISJOINT}}</strong>. When using this type of query, <strong>{{ID3D11DeviceContext::Begin}}</strong> is disabled. </p> </dd> <dd> <p> Determines whether or not a {{D3D11_QUERY_TIMESTAMP}} is returning reliable values, and also gives the frequency of the processor enabling you to convert the number of elapsed ticks into seconds. <strong>{{ID3D11DeviceContext::GetData}}</strong> will return a <strong>{{D3D11_QUERY_DATA_TIMESTAMP_DISJOINT}}</strong>. This type of query should only be invoked once per frame or less. </p> </dd> <dd> <p> Get pipeline statistics, such as the number of pixel shader invocations in between <strong>{{ID3D11DeviceContext::Begin}}</strong> and <strong>{{ID3D11DeviceContext::End}}</strong>. <strong>{{ID3D11DeviceContext::GetData}}</strong> will return a <strong>{{D3D11_QUERY_DATA_PIPELINE_STATISTICS}}</strong>. </p> </dd> <dd> <p> Similar to {{D3D11_QUERY_OCCLUSION}}, except <strong>{{ID3D11DeviceContext::GetData}}</strong> returns a {{BOOL}} indicating whether or not any samples passed the depth and stencil tests - <strong>{{TRUE}}</strong> meaning at least one passed, <strong>{{FALSE}}</strong> meaning none passed. </p> </dd> <dd> <p> Get streaming output statistics, such as the number of primitives streamed out in between <strong>{{ID3D11DeviceContext::Begin}}</strong> and <strong>{{ID3D11DeviceContext::End}}</strong>. <strong>{{ID3D11DeviceContext::GetData}}</strong> will return a <strong>{{D3D11_QUERY_DATA_SO_STATISTICS}}</strong> structure. </p> </dd> <dd> <p> Determines whether or not any of the streaming output buffers overflowed in between <strong>{{ID3D11DeviceContext::Begin}}</strong> and <strong>{{ID3D11DeviceContext::End}}</strong>. <strong>{{ID3D11DeviceContext::GetData}}</strong> returns a {{BOOL}} - <strong>{{TRUE}}</strong> meaning there was an overflow, <strong>{{FALSE}}</strong> meaning there was not an overflow. If streaming output writes to multiple buffers, and one of the buffers overflows, then it will stop writing to all the output buffers. When an overflow is detected by Direct3D it is prevented from happening - no memory is corrupted. This predication may be used in conjunction with an {{SO_STATISTICS}} query so that when an overflow occurs the {{SO_STATISTIC}} query will let the application know how much memory was needed to prevent an overflow. </p> </dd> <dd> <p> Get streaming output statistics for stream 0, such as the number of primitives streamed out in between <strong>{{ID3D11DeviceContext::Begin}}</strong> and <strong>{{ID3D11DeviceContext::End}}</strong>. <strong>{{ID3D11DeviceContext::GetData}}</strong> will return a <strong>{{D3D11_QUERY_DATA_SO_STATISTICS}}</strong> structure. </p> </dd> <dd> <p> Determines whether or not the stream 0 output buffers overflowed in between <strong>{{ID3D11DeviceContext::Begin}}</strong> and <strong>{{ID3D11DeviceContext::End}}</strong>. <strong>{{ID3D11DeviceContext::GetData}}</strong> returns a {{BOOL}} - <strong>{{TRUE}}</strong> meaning there was an overflow, <strong>{{FALSE}}</strong> meaning there was not an overflow. If streaming output writes to multiple buffers, and one of the buffers overflows, then it will stop writing to all the output buffers. When an overflow is detected by Direct3D it is prevented from happening - no memory is corrupted. This predication may be used in conjunction with an {{SO_STATISTICS}} query so that when an overflow occurs the {{SO_STATISTIC}} query will let the application know how much memory was needed to prevent an overflow. </p> </dd> <dd> <p> Get streaming output statistics for stream 1, such as the number of primitives streamed out in between <strong>{{ID3D11DeviceContext::Begin}}</strong> and <strong>{{ID3D11DeviceContext::End}}</strong>. <strong>{{ID3D11DeviceContext::GetData}}</strong> will return a <strong>{{D3D11_QUERY_DATA_SO_STATISTICS}}</strong> structure. </p> </dd> <dd> <p> Determines whether or not the stream 1 output buffers overflowed in between <strong>{{ID3D11DeviceContext::Begin}}</strong> and <strong>{{ID3D11DeviceContext::End}}</strong>. <strong>{{ID3D11DeviceContext::GetData}}</strong> returns a {{BOOL}} - <strong>{{TRUE}}</strong> meaning there was an overflow, <strong>{{FALSE}}</strong> meaning there was not an overflow. If streaming output writes to multiple buffers, and one of the buffers overflows, then it will stop writing to all the output buffers. When an overflow is detected by Direct3D it is prevented from happening - no memory is corrupted. This predication may be used in conjunction with an {{SO_STATISTICS}} query so that when an overflow occurs the {{SO_STATISTIC}} query will let the application know how much memory was needed to prevent an overflow. </p> </dd> <dd> <p> Get streaming output statistics for stream 2, such as the number of primitives streamed out in between <strong>{{ID3D11DeviceContext::Begin}}</strong> and <strong>{{ID3D11DeviceContext::End}}</strong>. <strong>{{ID3D11DeviceContext::GetData}}</strong> will return a <strong>{{D3D11_QUERY_DATA_SO_STATISTICS}}</strong> structure. </p> </dd> <dd> <p> Determines whether or not the stream 2 output buffers overflowed in between <strong>{{ID3D11DeviceContext::Begin}}</strong> and <strong>{{ID3D11DeviceContext::End}}</strong>. <strong>{{ID3D11DeviceContext::GetData}}</strong> returns a {{BOOL}} - <strong>{{TRUE}}</strong> meaning there was an overflow, <strong>{{FALSE}}</strong> meaning there was not an overflow. If streaming output writes to multiple buffers, and one of the buffers overflows, then it will stop writing to all the output buffers. When an overflow is detected by Direct3D it is prevented from happening - no memory is corrupted. This predication may be used in conjunction with an {{SO_STATISTICS}} query so that when an overflow occurs the {{SO_STATISTIC}} query will let the application know how much memory was needed to prevent an overflow. </p> </dd> <dd> <p> Get streaming output statistics for stream 3, such as the number of primitives streamed out in between <strong>{{ID3D11DeviceContext::Begin}}</strong> and <strong>{{ID3D11DeviceContext::End}}</strong>. <strong>{{ID3D11DeviceContext::GetData}}</strong> will return a <strong>{{D3D11_QUERY_DATA_SO_STATISTICS}}</strong> structure. </p> </dd> <dd> <p> Determines whether or not the stream 3 output buffers overflowed in between <strong>{{ID3D11DeviceContext::Begin}}</strong> and <strong>{{ID3D11DeviceContext::End}}</strong>. <strong>{{ID3D11DeviceContext::GetData}}</strong> returns a {{BOOL}} - <strong>{{TRUE}}</strong> meaning there was an overflow, <strong>{{FALSE}}</strong> meaning there was not an overflow. If streaming output writes to multiple buffers, and one of the buffers overflows, then it will stop writing to all the output buffers. When an overflow is detected by Direct3D it is prevented from happening - no memory is corrupted. This predication may be used in conjunction with an {{SO_STATISTICS}} query so that when an overflow occurs the {{SO_STATISTIC}} query will let the application know how much memory was needed to prevent an overflow. </p> </dd> <p>Flags that describe miscellaneous query behavior.</p> <p>This flag is part of a query description (see <strong>{{D3D11_QUERY_DESC}}</strong>).</p> <dd> <p>Tell the hardware that if it is not yet sure if something is hidden or not to draw it anyway. This is only used with an occlusion predicate. Predication data cannot be returned to your application via <strong>{{ID3D11DeviceContext::GetData}}</strong> when using this flag.</p> </dd> <p>Options for performance counters.</p> <p>Independent hardware vendors may define their own set of performance counters for their devices, by giving the enumeration value a number that is greater than the value for {{D3D11_COUNTER_DEVICE_DEPENDENT_0}}.</p><p>This enumeration is used by <strong>{{D3D11_COUNTER_DESC}}</strong> and <strong>{{D3D11_COUNTER_INFO}}</strong>.</p> <dd> <p>Define a performance counter that is dependent on the hardware device.</p> </dd> <p>Data type of a performance counter.</p> <p>These flags are an output parameter in <strong>{{ID3D11Device::CheckCounter}}</strong>.</p> <dd> <p>32-bit floating point.</p> </dd> <dd> <p>16-bit unsigned integer.</p> </dd> <dd> <p>32-bit unsigned integer.</p> </dd> <dd> <p>64-bit unsigned integer.</p> </dd> <p>Specifies a multi-sample pattern type.</p> <p>An app calls <strong>{{ID3D11Device::CheckMultisampleQualityLevels}}</strong> to get the number of quality levels available during multisampling. A 0 quality level means the hardware does not support multisampling for the particular format. If the number of quality levels is greater than 0 and the hardware supports the fixed sample patterns for the sample count, the app can request the fixed patterns by specifying quality level as either <strong>{{D3D11_STANDARD_MULTISAMPLE_PATTERN}}</strong> or <strong>{{D3D11_CENTER_MULTISAMPLE_PATTERN}}</strong>. The app can call <strong>{{ID3D11Device::CheckFormatSupport}}</strong> to check for support of the standard fixed patterns. If the hardware only supports the fixed patterns but no additional vendor-specific patterns, the runtime can report the number of quality levels as 1, and the hardware can pretend 0 quality level behaves the same as quality level equal to {{D3D11_STANDARD_MULTISAMPLE_PATTERN}}.</p><p>The runtime defines the following standard sample patterns for 1(trivial), 2, 4, 8, and 16 sample counts. Hardware must support 1, 4, and 8 sample counts. Hardware vendors can expose more sample counts beyond these. However, if vendors support 2, 4(required), 8(required), or 16, they must also support the corresponding standard pattern or center pattern for each of those sample counts.</p><p></p><p></p><p></p> <dd> <p>Pre-defined multi-sample patterns required for Direct3D?11 and Direct3D?10.1 hardware.</p> </dd> <dd> <p>Pattern where all of the samples are located at the pixel center.</p> </dd> <p>Device context options.</p> <p>This enumeration is used by <strong>{{ID3D11DeviceContext::GetType}}</strong>.</p> <dd> <p>The device context is an immediate context.</p> </dd> <dd> <p>The device context is a deferred context.</p> </dd> <p>Direct3D 11 feature options.</p> <p> This enumeration is used when querying a driver about support for these features by calling <strong>{{ID3D11Device::CheckFeatureSupport}}</strong>. Each value in this enumeration has a corresponding data structure that is required to be passed to the <em>pFeatureSupportData</em> parameter of <strong>{{ID3D11Device::CheckFeatureSupport}}</strong>. </p> <dd> <p> The driver supports multithreading. To see an example of testing a driver for multithread support, see How To: Check for Driver Support. Refer to <strong>{{D3D11_FEATURE_DATA_THREADING}}</strong>.</p> </dd> <dd> <p>Supports the use of the double-precision shaders in {{HLSL}}. Refer to <strong>{{D3D11_FEATURE_DATA_DOUBLES}}</strong>.</p> </dd> <dd> <p> Supports the formats in <strong>{{D3D11_FORMAT_SUPPORT}}</strong>. Refer to <strong>{{D3D11_FEATURE_DATA_FORMAT_SUPPORT}}</strong>.</p> </dd> <dd> <p> Supports the formats in <strong>{{D3D11_FORMAT_SUPPORT2}}</strong>. Refer to <strong>{{D3D11_FEATURE_DATA_FORMAT_SUPPORT2}}</strong>.</p> </dd> <dd> <p>Supports compute shaders and raw and structured buffers. Refer to <strong>{{D3D11_FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS}}</strong>.</p> </dd> <dd> <p>Supports Direct3D 11.1 feature options. Refer to <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS}}</strong>.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.1.</p> </dd> <dd> <p>Supports specific adapter architecture. Refer to <strong>{{D3D11_FEATURE_DATA_ARCHITECTURE_INFO}}</strong>.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.1.</p> </dd> <dd> <p> Supports Direct3D?9 feature options. Refer to <strong>{{D3D11_FEATURE_DATA_D3D9_OPTIONS}}</strong>.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.1.</p> </dd> <dd> <p> Supports minimum precision of shaders. For more info about {{HLSL}} minimum precision, see using {{HLSL}} minimum precision. Refer to <strong>{{D3D11_FEATURE_DATA_SHADER_MIN_PRECISION_SUPPORT}}</strong>.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.1.</p> </dd> <dd> <p> Supports Direct3D?9 shadowing feature. Refer to <strong>{{D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT}}</strong>.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.1.</p> </dd> <dd> <p>Supports Direct3D 11.2 feature options. Refer to <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong>.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.2.</p> </dd> <dd> <p>Supports Direct3D 11.2 instancing options. Refer to <strong>{{D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT}}</strong>.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.2.</p> </dd> <dd> <p>Supports Direct3D 11.2 marker options. Refer to <strong>{{D3D11_FEATURE_DATA_MARKER_SUPPORT}}</strong>.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.2.</p> </dd> <dd> <p> Supports Direct3D?9 feature options, which includes the Direct3D?9 shadowing feature and instancing support. Refer to <strong>{{D3D11_FEATURE_DATA_D3D9_OPTIONS1}}</strong>.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.2.</p> </dd> <dd> <p> Supports Direct3D 11.3 conservative rasterization feature options. Refer to <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS2}}</strong>.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.3.</p> </dd> <dd> <p> Supports Direct3D 11.4 conservative rasterization feature options. Refer to <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS3}}</strong>.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.4.</p> </dd> <dd> <p> Supports {{GPU}} virtual addresses. Refer to <strong>{{D3D11_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT}}</strong>.</p> </dd> <dd> <p> Supports a single boolean for {{NV12}} shared textures. Refer to <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS4}}</strong>.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.4.</p> </dd> <strong>Note</strong>??This enumeration is supported by the Direct3D 11.1 runtime, which is available on Windows?8 and later operating systems.?<p>Values that specify minimum precision levels at shader stages.</p> <dd> <p>Minimum precision level is 10-bit.</p> </dd> <dd> <p>Minimum precision level is 16-bit.</p> </dd> <p>Indicates the tier level at which tiled resources are supported.</p> <dd> <p>Tiled resources are not supported.</p> </dd> <dd> <p> Tier_1 tiled resources are supported.</p> <p> The device supports calls to <strong>CreateTexture2D</strong> and so on with the <strong>{{D3D11_RESOURCE_MISC_TILED}}</strong> flag. </p> <p> The device supports calls to <strong>CreateBuffer</strong> with the <strong>{{D3D11_RESOURCE_MISC_TILE_POOL}}</strong> flag. </p> <p> If you access tiles (read or write) that are <strong>{{NULL}}</strong>-mapped, you get undefined behavior, which includes device-removed. Apps can map all tiles to a single "default" tile to avoid this condition. </p> </dd> <dd> <p> Tier_2 tiled resources are supported. </p> <p> Superset of Tier_1 functionality, which includes this additional support: </p> <ul> <li> On Tier_1, if the size of a texture mipmap level is an integer multiple of the standard tile shape for its format, it is guaranteed to be nonpacked. On Tier_2, this guarantee is expanded to include mipmap levels whose size is at least one standard tile shape. For more info, see <strong>{{D3D11_PACKED_MIP_DESC}}</strong>. </li> <li> Shader instructions are available for clamping level-of-detail ({{LOD}}) and for obtaining status about the shader operation. For info about one of these shader instructions, see <strong>Sample(S,float,int,float,uint)</strong>. </li> <li> Reading from <strong>{{NULL}}</strong>-mapped tiles treat that sampled value as zero. Writes to <strong>{{NULL}}</strong>-mapped tiles are discarded. </li> </ul> </dd> <dd> <p> Tier_3 tiled resources are supported. </p> <p> Superset of Tier_2 functionality, Tier 3 is essentially Tier 2 but with the additional support of Texture3D for Tiled Resources.</p> </dd> <p>Specifies if the hardware and driver support conservative rasterization and at what tier level.</p> <dd> <p>Conservative rasterization isn't supported.</p> </dd> <dd> <p>Tier_1 conservative rasterization is supported.</p> </dd> <dd> <p>Tier_2 conservative rasterization is supported.</p> </dd> <dd> <p>Tier_3 conservative rasterization is supported.</p> </dd> <p>Describes the level of support for shader caching in the current graphics driver.</p> <p>This enum is used by the <strong>{{D3D_FEATURE_DATA_SHADER_CACHE}}</strong> structure.</p> <dd> <p>Indicates that the driver does not support shader caching.</p> </dd> <dd> <p>Indicates that the driver supports an {{OS}}-managed shader cache that stores compiled shaders in memory during the current run of the application.</p> </dd> <dd> <p>Indicates that the driver supports an {{OS}}-managed shader cache that stores compiled shaders on disk to accelerate future runs of the application.</p> </dd> <p>Specifies a type of compressed buffer for decoding.</p> <dd> <p>Picture decoding parameter buffer. </p> </dd> <dd> <p>Macroblock control command buffer. </p> </dd> <dd> <p>Residual difference block data buffer. </p> </dd> <dd> <p>Deblocking filter control command buffer. </p> </dd> <dd> <p>Inverse quantization matrix buffer. </p> </dd> <dd> <p>Slice-control buffer. </p> </dd> <dd> <p>Bitstream data buffer. </p> </dd> <dd> <p>Motion vector buffer. </p> </dd> <dd> <p>Film grain synthesis data buffer. </p> </dd> <p>Specifies how a video format can be used for video processing.</p> <dd> <p>The format can be used as the input to the video processor.</p> </dd> <dd> <p>The format can be used as the output from the video processor.</p> </dd> <p>Defines video processing capabilities for a Microsoft Direct3D?11 video processor.</p> <dd> <p>The video processor can blend video content in linear color space. Most video content is gamma corrected, resulting in nonlinear values. This capability flag means that the video processor converts colors to linear space before blending, which produces better results.</p> </dd> <dd> <p>The video processor supports the xvYCC color space for {{YCbCr}} data. </p> </dd> <dd> <p>The video processor can perform range conversion when the input and output are both {{RGB}} but use different color ranges (0-255 or 16-235, for 8-bit {{RGB}}). </p> </dd> <dd> <p>The video processor can apply a matrix conversion to {{YCbCr}} values when the input and output are both {{YCbCr}}. For example, the driver can convert colors from {{BT}}.601 to {{BT}}.709. </p> </dd> <dd> <p>The video processor supports {{YUV}} nominal range . </p> <p>Supported in Windows?8.1 and later.</p> </dd> <p>Defines features that a Microsoft Direct3D?11 video processor can support. </p> <dd> <p>The video processor can set alpha values on the output pixels. For more information, see <strong>{{ID3D11VideoContext::VideoProcessorSetOutputAlphaFillMode}}</strong>.</p> </dd> <dd> <p>The video processor can downsample the video output. For more information, see <strong>{{ID3D11VideoContext::VideoProcessorSetOutputConstriction}}</strong>.</p> </dd> <dd> <p>The video processor can perform luma keying. For more information, see <strong>{{ID3D11VideoContext::VideoProcessorSetStreamLumaKey}}</strong>.</p> </dd> <dd> <p>The video processor can apply alpha values from color palette entries. </p> </dd> <dd> <p>The driver does not support full video processing capabilities. If this capability flag is set, the video processor has the following limitations:</p> <ul> <li>A maximum of two streams are supported:<ul> <li>The first stream must be either {{NV12}} or {{YUY2}}.</li> <li>The second stream must be {{AYUV}}, {{AI44}}, or {{IA44}}.</li> </ul> </li> <li>Image adjustment (proc amp) controls are applied to the entire video processing blit, rather than per stream.</li> <li>Support for per-stream planar alpha is not reliable. (Per-pixel alpha is supported, however.)</li> </ul> </dd> <dd> <p>The video processor can support 3D stereo video. For more information, see <strong>{{ID3D11VideoContext::VideoProcessorSetStreamStereoFormat}}</strong>.</p> <p>All drivers setting this caps must support the following stereo formats: <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_HORIZONTAL}}</strong>, <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_VERTICAL}}</strong>, and <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_SEPARATE}}</strong>.</p> </dd> <dd> <p>The driver can rotate the input data either 90, 180, or 270 degrees clockwise as part of the video processing operation.</p> </dd> <dd> <p>The driver supports the <strong>VideoProcessorSetStreamAlpha</strong> call.</p> </dd> <dd> <p>The driver supports the <strong>VideoProcessorSetStreamPixelAspectRatio</strong> call.</p> </dd> <p>Defines image filter capabilities for a Microsoft Direct3D?11 video processor.</p> <p>These capability flags indicate support for the image filters defined by the <strong>{{D3D11_VIDEO_PROCESSOR_FILTER}}</strong> enumeration. To apply a particular filter, call the <strong>{{ID3D11VideoContext::VideoProcessorSetStreamFilter}}</strong> method.</p> <dd> <p>The video processor can adjust the brightness level. </p> </dd> <dd> <p>The video processor can adjust the contrast level. </p> </dd> <dd> <p>The video processor can adjust hue. </p> </dd> <dd> <p>The video processor can adjust the saturation level. </p> </dd> <dd> <p>The video processor can perform noise reduction. </p> </dd> <dd> <p>The video processor can perform edge enhancement. </p> </dd> <dd> <p>The video processor can perform anamorphic scaling. Anamorphic scaling can be used to stretch 4:3 content to a widescreen 16:9 aspect ratio. </p> </dd> <dd> <p>For stereo 3D video, the video processor can adjust the offset between the left and right views, allowing the user to reduce potential eye strain.</p> </dd> <p>Defines capabilities related to input formats for a Microsoft Direct3D?11 video processor.</p> <p>These flags define video processing capabilities that usually are not needed, and that video devices are therefore not required to support.</p><p> The first three flags relate to {{RGB}} support for functions that are normally applied to {{YCbCr}} video: deinterlacing, color adjustment, and luma keying. A device that supports these functions for {{YCbCr}} is not required to support them for {{RGB}} input. Supporting {{RGB}} input for these functions is an additional capability, reflected by these constants. Note that the driver might convert the input to another color space, perform the indicated function, and then convert the result back to {{RGB}}. </p><p>Similarly, a device that supports deinterlacing is not required to support deinterlacing of palettized formats. This capability is indicated by the <strong>{{D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_PALETTE_INTERLACED}}</strong> flag.</p> <dd> <p>The video processor can deinterlace an input stream that contains interlaced {{RGB}} video. </p> </dd> <dd> <p>The video processor can perform color adjustment on {{RGB}} video.</p> </dd> <dd> <p>The video processor can perform luma keying on {{RGB}} video.</p> </dd> <dd> <p>The video processor can deinterlace input streams with palettized color formats.</p> </dd> <p>Specifies the automatic image processing capabilities of the video processor.</p> <dd> <p>Denoise.</p> </dd> <dd> <p>Deringing.</p> </dd> <dd> <p>Edge enhancement.</p> </dd> <dd> <p>Color correction.</p> </dd> <dd> <p>Flesh-tone mapping.</p> </dd> <dd> <p>Image stabilization.</p> </dd> <dd> <p>Enhanced image resolution.</p> </dd> <dd> <p>Anamorphic scaling.</p> </dd> <p>Defines stereo 3D capabilities for a Microsoft Direct3D?11 video processor.</p> <dd> <p>The video processor supports the <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET}}</strong> format.</p> </dd> <dd> <p>The video processor supports the <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_ROW_INTERLEAVED}}</strong> format.</p> </dd> <dd> <p>The video processor supports the <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_COLUMN_INTERLEAVED}}</strong> format.</p> </dd> <dd> <p>The video processor supports the <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_CHECKERBOARD}}</strong> format.</p> </dd> <dd> <p>The video processor can flip one or both views. For more information, see <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE}}</strong>.</p> </dd> <p>Specifies video processing capabilities that relate to deinterlacing, inverse telecine ({{IVTC}}), and frame-rate conversion.</p> <dd> <p>The video processor can perform blend deinterlacing. </p> <p>In blend deinterlacing, the two fields from an interlaced frame are blended into a single progressive frame. A video processor uses blend deinterlacing when it deinterlaces at half rate, as when converting 60i to 30p. Blend deinterlacing does not require reference frames.</p> </dd> <dd> <p>The video processor can perform bob deinterlacing.</p> <p>In bob deinterlacing, missing field lines are interpolated from the lines above and below. Bob deinterlacing does not require reference frames.</p> </dd> <dd> <p>The video processor can perform adaptive deinterlacing.</p> <p>Adaptive deinterlacing uses spatial or temporal interpolation, and switches between the two on a field-by-field basis, depending on the amount of motion. If the video processor does not receive enough reference frames to perform adaptive deinterlacing, it falls back to bob deinterlacing.</p> </dd> <dd> <p>The video processor can perform motion-compensated deinterlacing. </p> <p>Motion-compensated deinterlacing uses motion vectors to recreate missing lines. If the video processor does not receive enough reference frames to perform motion-compensated deinterlacing, it falls back to bob deinterlacing. </p> </dd> <dd> <p>The video processor can perform inverse telecine ({{IVTC}}). </p> <p>If the video processor supports this capability, the <strong>{{ITelecineCaps}}</strong> member of the <strong>{{D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS}}</strong> structure specifies which {{IVTC}} modes are supported. </p> </dd> <dd> <p>The video processor can convert the frame rate by interpolating frames. </p> </dd> <p>Specifies the inverse telecine ({{IVTC}}) capabilities of a video processor. </p> <dd> <p>The video processor can reverse 3:2 pulldown.</p> </dd> <dd> <p>The video processor can reverse 2:2 pulldown.</p> </dd> <dd> <p>The video processor can reverse 2:2:2:4 pulldown.</p> </dd> <dd> <p>The video processor can reverse 2:3:3:2 pulldown.</p> </dd> <dd> <p>The video processor can reverse 3:2:3:2:2 pulldown.</p> </dd> <dd> <p>The video processor can reverse 5:5 pulldown.</p> </dd> <dd> <p>The video processor can reverse 6:4 pulldown.</p> </dd> <dd> <p>The video processor can reverse 8:7 pulldown.</p> </dd> <dd> <p>The video processor can reverse 2:2:2:2:2:2:2:2:2:2:2:3 pulldown.</p> </dd> <dd> <p>The video processor can reverse other telecine modes not listed here.</p> </dd> <p>Contains flags that describe content-protection capabilities.</p> <dd> <p>The content protection is implemented in software by the driver.</p> </dd> <dd> <p>The content protection is implemented in hardware by the {{GPU}}. </p> </dd> <dd> <p>Content protection is always applied to a protected surface, regardless of whether the application explicitly enables protection.</p> </dd> <dd> <p>The driver can use partially encrypted buffers. If this capability is not present, the entire buffer must be either encrypted or clear.</p> </dd> <dd> <p>The driver can encrypt data using a separate content key that is encrypted using the session key.</p> </dd> <dd> <p>The driver can refresh the session key without renegotiating the key.</p> </dd> <dd> <p>The driver can read back encrypted data from a protected surface. For more information, see <strong>{{ID3D11VideoContext::EncryptionBlt}}</strong>.</p> </dd> <dd> <p>The driver requires a separate key to read encrypted data from a protected surface.</p> </dd> <dd> <p>If the encryption type is <strong>{{D3DCRYPTOTYPE_AES128_CTR}}</strong>, the application must use a sequential count in the <strong>{{D3D11_AES_CTR_IV}}</strong> structure.</p> </dd> <dd> <p>The driver supports encrypted slice data, but does not support any other encrypted data in the compressed buffer. The caller should not encrypt any data within the buffer other than the slice data.</p> <strong>Note</strong>??The driver should only report this flag for the specific profiles that have this limitation. ? </dd> <dd> <p>The driver can copy encrypted data from one resource to another, decrypting the data as part of the process.</p> </dd> <dd> <p>The hardware supports the protection of specific resources. This means that:</p> <ul> <li>The contents of a protected allocation can never be read by the {{CPU}}.</li> <li>The hardware can ensure a protected resource cannot be copied to an unprotected resource.</li> </ul> <p><strong>Note</strong>??This enumeration value is supported starting with Windows?10.</p> </dd> <dd> <p>Physical pages of a protected resource can be evicted and potentially paged to disk in low memory conditions without losing the contents of the resource when paged back in. </p> <p><strong>Note</strong>??This enumeration value is supported starting with Windows?10.</p> </dd> <dd> <p>The hardware supports an automatic teardown mechanism that could trigger hardware keys or protected content to become lost in some conditions. The application can register to be notified when these events occur.</p> <p><strong>Note</strong>??This enumeration value is supported starting with Windows?10.</p> </dd> <dd> <p>The secure environment is tightly coupled with the {{GPU}} and an <strong>{{ID3D11CryptoSession}}</strong> should be used for communication between the user mode {{DRM}} component and the secure execution environment.</p> <p><strong>Note</strong>??This enumeration value is supported starting with Windows?10.</p> </dd> <p>Identifies a video processor filter.</p> <dd> <p>Brightness filter.</p> </dd> <dd> <p>Contrast filter.</p> </dd> <dd> <p>Hue filter.</p> </dd> <dd> <p>Saturation filter.</p> </dd> <dd> <p>Noise reduction filter.</p> </dd> <dd> <p>Edge enhancement filter.</p> </dd> <dd> <p>Anamorphic scaling filter.</p> </dd> <dd> <p>Stereo adjustment filter. When stereo 3D video is enabled, this filter adjusts the offset between the left and right views, allowing the user to reduce potential eye strain. </p> <p>The filter value indicates the amount by which the left and right views are adjusted. A positive value shifts the images away from each other: the left image toward the left, and the right image toward the right. A negative value shifts the images in the opposite directions, closer to each other.</p> </dd> <p>Describes how a video stream is interlaced.</p> <dd> <p>Frames are progressive.</p> </dd> <dd> <p>Frames are interlaced. The top field of each frame is displayed first. </p> </dd> <dd> <p>Frame are interlaced. The bottom field of each frame is displayed first.</p> </dd> <p>Specifies the intended use for a video processor.</p> <dd> <p>Normal video playback. The graphics driver should expose a set of capabilities that are appropriate for real-time video playback. </p> </dd> <dd> <p>Optimal speed. The graphics driver should expose a minimal set of capabilities that are optimized for performance. </p> <p>Use this setting if you want better performance and can accept some reduction in video quality. For example, you might use this setting in power-saving mode or to play video thumbnails. </p> </dd> <dd> <p>Optimal quality. The grahics driver should expose its maximum set of capabilities.</p> <p>Specify this setting to get the best video quality possible. It is appropriate for tasks such as video editing, when quality is more important than speed. It is not appropriate for real-time playback. </p> </dd> <p>Specifies values for the luminance range of {{YUV}} data.</p> <dd> <p>Driver defaults are used, which should be Studio luminance range [16-235],</p> </dd> <dd> <p>Studio luminance range [16-235]</p> </dd> <dd> <p>Full luminance range [0-255]</p> </dd> <p>Specifies the alpha fill mode for video processing.</p> <dd> <p>Alpha values inside the target rectangle are set to opaque. </p> </dd> <dd> <p>Alpha values inside the target rectangle are set to the alpha value specified in the background color. To set the background color, call the <strong>{{ID3D11VideoContext::VideoProcessorSetOutputBackgroundColor}}</strong> method.</p> </dd> <dd> <p>Existing alpha values remain unchanged in the output surface.</p> </dd> <dd> <p>Alpha values are taken from an input stream, scaled, and copied to the corresponding destination rectangle for that stream. The input stream is specified in the <em>StreamIndex</em> parameter of the <strong>{{ID3D11VideoContext::VideoProcessorSetOutputAlphaFillMode}}</strong> method. </p> <p>If the input stream does not have alpha data, the video processor sets the alpha values in the target rectangle to opaque. If the input stream is disabled or the source rectangle is empty, the alpha values in the target rectangle are not modified.</p> </dd> <p>Specifies the rate at which the video processor produces output frames from an input stream.</p> <dd> <p>The output is the normal frame rate. </p> </dd> <dd> <p>The output is half the frame rate. </p> </dd> <dd> <p>The output is a custom frame rate.</p> </dd> <p>Specifies the layout in memory of a stereo 3D video frame.</p> <p>This enumeration designates the two stereo views as "frame 0" and "frame 1". The <em>LeftViewFrame0</em> parameter of the <strong>VideoProcessorSetStreamStereoFormat</strong> method specifies which view is the left view, and which is the right view.</p><p>For packed formats, if the source rectangle clips part of the surface, the driver interprets the rectangle in logical coordinates relative to the stereo view, rather than absolute pixel coordinates. The result is that frame 0 and frame 1 are clipped proportionately.</p><p>To query whether the device supports stereo 3D video, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check for the <strong>{{D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_STEREO}}</strong> flag in the <strong>FeatureCaps</strong> member of the <strong>{{D3D11_VIDEO_PROCESSOR_CAPS}}</strong> structure. If this capability flag is present, it means that the driver supports all of the stereo formats that are not listed as optional. To find out which optional formats are supported, call <strong>GetVideoProcessorCaps</strong> and check the <strong>StereoCaps</strong> member of the structure.</p> <dd> <p>The sample does not contain stereo data. If the stereo format is not specified, this value is the default.</p> </dd> <dd> <p>Frame 0 and frame 1 are packed side-by-side, as shown in the following diagram.</p> <p></p> <p>All drivers that support stereo video must support this format.</p> </dd> <dd> <p>Frame 0 and frame 1 are packed top-to-bottom, as shown in the following diagram.</p> <p></p> <p>All drivers that support stereo video must support this format.</p> </dd> <dd> <p>Frame 0 and frame 1 are placed in separate resources or in separate texture array elements within the same resource.</p> <p>All drivers that support stereo video must support this format.</p> </dd> <dd> <p>The sample contains non-stereo data. However, the driver should create a left/right output of this sample using a specified offset. The offset is specified in the <em>MonoOffset</em> parameter of the <strong>{{ID3D11VideoContext::VideoProcessorSetStreamStereoFormat}}</strong> method. </p> <p>This format is primarily intended for subtitles and other subpicture data, where the entire sample is presented on the same plane.</p> <p>Support for this stereo format is optional.</p> </dd> <dd> <p>Frame 0 and frame 1 are packed into interleaved rows, as shown in the following diagram.</p> <p></p> <p>Support for this stereo format is optional.</p> </dd> <dd> <p>Frame 0 and frame 1 are packed into interleaved columns, as shown in the following diagram.</p> <p></p> <p>Support for this stereo format is optional.</p> </dd> <dd> <p>Frame 0 and frame 1 are packed in a checkerboard format, as shown in the following diagram.</p> <p></p> <p>Support for this stereo format is optional.</p> </dd> <p>For stereo 3D video, specifies whether the data in frame 0 or frame 1 is flipped, either horizontally or vertically. </p> <dd> <p>Neither frame is flipped.</p> </dd> <dd> <p>The data in frame 0 is flipped.</p> </dd> <dd> <p>The data in frame 1 is flipped.</p> </dd> <p>Specifies the video rotation states.</p> <dd> <p>The video is not rotated.</p> </dd> <dd> <p>The video is rotated 90 degrees clockwise.</p> </dd> <dd> <p>The video is rotated 180 degrees clockwise.</p> </dd> <dd> <p>The video is rotated 270 degrees clockwise.</p> </dd> <p>Specifies the type of Microsoft Direct3D authenticated channel. </p> <dd> <p>Direct3D?11 channel. This channel provides communication with the Direct3D runtime. </p> </dd> <dd> <p>Software driver channel. This channel provides communication with a driver that implements content protection mechanisms in software.</p> </dd> <dd> <p>Hardware driver channel. This channel provides communication with a driver that implements content protection mechanisms in the {{GPU}} hardware. </p> </dd> <p>Specifies the type of process that is identified in the <strong>{{D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_OUTPUT}}</strong> structure.</p> <p>Specifies the type of I/O bus that is used by the graphics adapter.</p> <dd> <p>Indicates a type of bus other than the types listed here. </p> </dd> <dd> <p>{{PCI}} bus. </p> </dd> <dd> <p>{{PCI}}-X bus. </p> </dd> <dd> <p>{{PCI}} Express bus. </p> </dd> <dd> <p>Accelerated Graphics Port ({{AGP}}) bus. </p> </dd> <dd> <p>The implementation for the graphics adapter is in a motherboard chipset's north bridge. This flag implies that data never goes over an expansion bus (such as {{PCI}} or {{AGP}}) when it is transferred from main memory to the graphics adapter.</p> </dd> <dd> <p>Indicates that the graphics adapter is connected to a motherboard chipset's north bridge by tracks on the motherboard, and all of the graphics adapter's chips are soldered to the motherboard. This flag implies that data never goes over an expansion bus (such as {{PCI}} or {{AGP}}) when it is transferred from main memory to the graphics adapter.</p> </dd> <dd> <p>The graphics adapter is connected to a motherboard chipset's north bridge by tracks on the motherboard, and all of the graphics adapter's chips are connected through sockets to the motherboard. </p> </dd> <dd> <p>The graphics adapter is connected to the motherboard through a daughterboard connector. </p> </dd> <dd> <p>The graphics adapter is connected to the motherboard through a daughterboard connector, and the graphics adapter is inside an enclosure that is not user accessible. </p> </dd> <dd> <p>One of the <strong>{{D3D11_BUS_IMPL_MODIFIER_Xxx}}</strong> flags is set. </p> </dd> <p>Specifies how to access a resource that is used in a video decoding output view.</p> <p>This enumeration is used with the <strong>{{D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC}}</strong> structure.</p> <dd> <p>Not a valid value.</p> </dd> <dd> <p>The resource will be accessed as a 2D texture. </p> </dd> <p>Specifies how to access a resource that is used in a video processor input view.</p> <p>This enumeration is used with the <strong>{{D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC}}</strong> structure.</p> <dd> <p>Not a valid value.</p> </dd> <dd> <p>The resource will be accessed as a 2D texture.</p> </dd> <p>Specifies how to access a resource that is used in a video processor output view.</p> <p>This enumeration is used with the <strong>{{D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC}}</strong> structure.</p> <dd> <p>Not a valid value.</p> </dd> <dd> <p>The resource will be accessed as a 2D texture.</p> </dd> <dd> <p>The resource will be accessed as an array of 2D textures.</p> </dd> <p>Describes parameters that are used to create a device.</p> <p>Device creation flags are used by <strong>{{D3D11CreateDevice}}</strong> and <strong>{{D3D11CreateDeviceAndSwapChain}}</strong>.</p><p>An application might dynamically create (and destroy) threads to improve performance especially on a machine with multiple {{CPU}} cores. There may be cases, however, when an application needs to prevent extra threads from being created. This can happen when you want to simplify debugging, profile code or develop a tool for instance. For these cases, use <strong>{{D3D11_CREATE_DEVICE_PREVENT_INTERNAL_THREADING_OPTIMIZATIONS}}</strong> to request that the runtime and video driver not create any additional threads that might interfere with the application.</p> <dd> <p>Use this flag if your application will only call methods of Direct3D?11 interfaces from a single thread. By default, the <strong>{{ID3D11Device}}</strong> object is thread-safe. By using this flag, you can increase performance. However, if you use this flag and your application calls methods of Direct3D?11 interfaces from multiple threads, undefined behavior might result.</p> </dd> <dd> <p>Creates a device that supports the debug layer. </p> <p>To use this flag, you must have {{D3D11}}*{{SDKLayers}}.dll installed; otherwise, device creation fails. To get {{D3D11_1SDKLayers}}.dll, install the {{SDK}} for Windows?8.</p> </dd> <dd> <strong>Note</strong>??This flag is not supported in Direct3D?11. ? </dd> <dd> <p>Prevents multiple threads from being created. When this flag is used with a Windows Advanced Rasterization Platform ({{WARP}}) device, no additional threads will be created by {{WARP}} and all rasterization will occur on the calling thread. This flag is not recommended for general use. See remarks.</p> </dd> <dd> <p>Creates a device that supports {{BGRA}} formats (<strong>{{DXGI_FORMAT_B8G8R8A8_UNORM}}</strong> and <strong>{{DXGI_FORMAT_B8G8R8A8_UNORM_SRGB}}</strong>). All 10level9 and higher hardware with {{WDDM}} 1.1+ drivers support {{BGRA}} formats. </p> <strong>Note</strong>??Required for Direct2D interoperability with Direct3D resources. ? </dd> <dd> <p>Causes the device and driver to keep information that you can use for shader debugging. The exact impact from this flag will vary from driver to driver. </p> <p>To use this flag, you must have {{D3D11_1SDKLayers}}.dll installed; otherwise, device creation fails. The created device supports the debug layer. To get {{D3D11_1SDKLayers}}.dll, install the {{SDK}} for Windows?8.</p> <p>If you use this flag and the current driver does not support shader debugging, device creation fails. Shader debugging requires a driver that is implemented to the {{WDDM}} for Windows?8 ({{WDDM}} 1.2).</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.1.</p> </dd> <dd> <p>Causes the Direct3D runtime to ignore registry settings that turn on the debug layer. You can turn on the debug layer by using the DirectX Control Panel that was included as part of the DirectX {{SDK}}. We shipped the last version of the DirectX {{SDK}} in June 2010; you can download it from the Microsoft Download Center. You can set this flag in your app, typically in release builds only, to prevent end users from using the DirectX Control Panel to monitor how the app uses Direct3D.</p> <strong>Note</strong>??You can also set this flag in your app to prevent Direct3D debugging tools, such as Visual Studio Ultimate?2012, from hooking your app. ? <p><strong>Windows?8.1:??</strong>This flag doesn't prevent Visual Studio?2013 and later running on Windows?8.1 and later from hooking your app; instead use <strong>{{ID3D11DeviceContext2::IsAnnotationEnabled}}</strong>. This flag still prevents Visual Studio?2013 and later running on Windows?8 and earlier from hooking your app. </p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.1.</p> </dd> <dd> <p>Use this flag if the device will produce {{GPU}} workloads that take more than two seconds to complete, and you want the operating system to allow them to successfully finish. If this flag is not set, the operating system performs timeout detection and recovery when it detects a {{GPU}} packet that took more than two seconds to execute. If this flag is set, the operating system allows such a long running packet to execute without resetting the {{GPU}}. We recommend not to set this flag if your device needs to be highly responsive so that the operating system can detect and recover from {{GPU}} timeouts. We recommend to set this flag if your device needs to perform time consuming background tasks such as compute, image recognition, and video encoding to allow such tasks to successfully finish.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.1.</p> </dd> <dd> <p>Forces the creation of the Direct3D device to fail if the display driver is not implemented to the {{WDDM}} for Windows?8 ({{WDDM}} 1.2). When the display driver is not implemented to {{WDDM}} 1.2, only a Direct3D device that is created with feature level 9.1, 9.2, or 9.3 supports video; therefore, if this flag is set, the runtime creates the Direct3D device only for feature level 9.1, 9.2, or 9.3. We recommend not to specify this flag for applications that want to favor Direct3D capability over video. If feature level 10 and higher is available, the runtime will use that feature level regardless of video support.</p> <p>If this flag is set, device creation on the Basic Render Device ({{BRD}}) will succeed regardless of the {{BRD}}'s missing support for video decode. This is because the Media Foundation video stack operates in software mode on {{BRD}}. In this situation, if you force the video stack to create the Direct3D device twice (create the device once with this flag, next discover {{BRD}}, then again create the device without the flag), you actually degrade performance.</p> <p>If you attempt to create a Direct3D device with driver type <strong>{{D3D_DRIVER_TYPE_NULL}}</strong>, <strong>{{D3D_DRIVER_TYPE_REFERENCE}}</strong>, or <strong>{{D3D_DRIVER_TYPE_SOFTWARE}}</strong>, device creation fails at any feature level because none of the associated drivers provide video capability. If you attempt to create a Direct3D device with driver type <strong>{{D3D_DRIVER_TYPE_WARP}}</strong>, device creation succeeds to allow software fallback for video.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.1.</p> </dd> <p>A description of a single element for the input-assembler stage.</p> <p>An input-layout object contains an array of structures, each structure defines one element being read from an input slot. Create an input-layout object by calling <strong>{{ID3D11Device::CreateInputLayout}}</strong>. For an example, see the "Create the Input-Layout Object" subtopic under the Getting Started with the Input-Assembler Stage topic.</p> <dd> <p>The {{HLSL}} semantic associated with this element in a shader input-signature.</p> </dd> <dd> <p>The semantic index for the element. A semantic index modifies a semantic, with an integer index number. A semantic index is only needed in a case where there is more than one element with the same semantic. For example, a 4x4 matrix would have four components each with the semantic name </p> <pre>matrix</pre> <p>, however each of the four component would have different semantic indices (0, 1, 2, and 3).</p> </dd> <dd> <p>The data type of the element data. See <strong>{{DXGI_FORMAT}}</strong>.</p> </dd> <dd> <p>An integer value that identifies the input-assembler (see input slot). Valid values are between 0 and 15, defined in {{D3D11}}.h.</p> </dd> <dd> <p>Optional. Offset (in bytes) between each element. Use {{D3D11_APPEND_ALIGNED_ELEMENT}} for convenience to define the current element directly after the previous one, including any packing if necessary.</p> </dd> <dd> <p>Identifies the input data class for a single input slot (see <strong>{{D3D11_INPUT_CLASSIFICATION}}</strong>).</p> </dd> <dd> <p>The number of instances to draw using the same per-instance data before advancing in the buffer by one element. This value must be 0 for an element that contains per-vertex data (the slot class is set to {{D3D11_INPUT_PER_VERTEX_DATA}}).</p> </dd> <p>Description of a vertex element in a vertex buffer in an output slot.</p> <dd> <p>Zero-based, stream number.</p> </dd> <dd> <p>Type of output element; possible values include: <strong>"{{POSITION}}"</strong>, <strong>"{{NORMAL}}"</strong>, or <strong>"{{TEXCOORD0}}"</strong>. Note that if <em>SemanticName</em> is <strong>{{NULL}}</strong> then <em>ComponentCount</em> can be greater than 4 and the described entry will be a gap in the stream out where no data will be written. </p> </dd> <dd> <p>Output element's zero-based index. Should be used if, for example, you have more than one texture coordinate stored in each vertex.</p> </dd> <dd> <p>Which component of the entry to begin writing out to. Valid values are 0 to 3. For example, if you only wish to output to the y and z components of a position, then StartComponent should be 1 and ComponentCount should be 2.</p> </dd> <dd> <p>The number of components of the entry to write out to. Valid values are 1 to 4. For example, if you only wish to output to the y and z components of a position, then StartComponent should be 1 and ComponentCount should be 2. Note that if <em>SemanticName</em> is <strong>{{NULL}}</strong> then <em>ComponentCount</em> can be greater than 4 and the described entry will be a gap in the stream out where no data will be written.</p> </dd> <dd> <p>The associated stream output buffer that is bound to the pipeline (see <strong>{{ID3D11DeviceContext::SOSetTargets}}</strong>). The valid range for <em>OutputSlot</em> is 0 to 3.</p> </dd> <p>Defines the dimensions of a viewport.</p> <p>In all cases, <strong>Width</strong> and <strong>Height</strong> must be &gt;= 0 and <strong>TopLeftX</strong> + <strong>Width</strong> and <strong>TopLeftY</strong> + <strong>Height</strong> must be &lt;= {{D3D11_VIEWPORT_BOUNDS_MAX}}.</p><table> <tr><td> <p>Viewport Sizes and Feature Level Support Differences between Direct3D 11 and Direct3D 10:</p> <p>The range for the minimum and maximum viewport size is dependent on the feature level defined by <strong>{{D3D_FEATURE_LEVEL}}</strong>.</p> <ul> <li>Direct3D 11 supports fractional viewports; the parameter types are floating-point numbers. The feature level, {{D3D_FEATURE_LEVEL_11_0}}, supports ({{D3D11_VIEWPORT_BOUNDS_MIN}}, {{D3D11_VIEWPORT_BOUNDS_MAX}}) values between (-32768, 32,767).</li> <li>Direct3D 10 does not support fractional viewports. The feature levels, {{D3D_FEATURE_LEVEL_10_1}} (or below), supports ({{D3D10_VIEWPORT_BOUNDS_MIN}}, {{D3D10_VIEWPORT_BOUNDS_MAX}}) values between (-16384, 16383).</li> </ul> </td></tr> </table><p>?</p><strong>Note</strong>??Even though you specify float values to the members of the <strong>{{D3D11_VIEWPORT}}</strong> structure for the <em>pViewports</em> array in a call to <strong>{{ID3D11DeviceContext::RSSetViewports}}</strong> for feature levels 9_x, <strong>{{RSSetViewports}}</strong> uses {{DWORDs}} internally. Because of this behavior, when you use a negative top left corner for the viewport, the call to <strong>{{RSSetViewports}}</strong> for feature levels 9_x fails. This failure occurs because <strong>{{RSSetViewports}}</strong> for 9_x casts the floating point values into unsigned integers without validation, which results in integer overflow.? <dd> <p>X position of the left hand side of the viewport. Ranges between {{D3D11_VIEWPORT_BOUNDS_MIN}} and {{D3D11_VIEWPORT_BOUNDS_MAX}}.</p> </dd> <dd> <p>Y position of the top of the viewport. Ranges between {{D3D11_VIEWPORT_BOUNDS_MIN}} and {{D3D11_VIEWPORT_BOUNDS_MAX}}.</p> </dd> <dd> <p>Width of the viewport.</p> </dd> <dd> <p>Height of the viewport.</p> </dd> <dd> <p>Minimum depth of the viewport. Ranges between 0 and 1.</p> </dd> <dd> <p>Maximum depth of the viewport. Ranges between 0 and 1.</p> </dd> <p> Arguments for draw instanced indirect. </p> <p> The members of this structure serve the same purpose as the parameters of <strong>{{ID3D11DeviceContext::DrawInstanced}}</strong>. </p> <dd> <p> The number of vertices to draw. </p> </dd> <dd> <p> The number of instances to draw. </p> </dd> <dd> <p> The index of the first vertex. </p> </dd> <dd> <p> A value added to each index before reading per-instance data from a vertex buffer. </p> </dd> <p> Arguments for draw indexed instanced indirect. </p> <p> The members of this structure serve the same purpose as the parameters of <strong>{{ID3D11DeviceContext::DrawIndexedInstanced}}</strong>. </p> <dd> <p> The number of indices read from the index buffer for each instance. </p> </dd> <dd> <p> The number of instances to draw. </p> </dd> <dd> <p> The location of the first index read by the {{GPU}} from the index buffer. </p> </dd> <dd> <p> A value added to each index before reading a vertex from the vertex buffer. </p> </dd> <dd> <p> A value added to each index before reading per-instance data from a vertex buffer. </p> </dd> <p>Defines a 3D box.</p> <p>The following diagram shows a 3D box, where the origin is the left, front, top corner.</p><p></p><p>The values for <strong>right</strong>, <strong>bottom</strong>, and <strong>back</strong> are each one pixel past the end of the pixels that are included in the box region. That is, the values for <strong>left</strong>, <strong>top</strong>, and <strong>front</strong> are included in the box region while the values for right, bottom, and back are excluded from the box region. For example, for a box that is one pixel wide, (right - left) == 1; the box region includes the left pixel but not the right pixel.</p><p>Coordinates of a box are in bytes for buffers and in texels for textures.</p> <dd> <p>The x position of the left hand side of the box.</p> </dd> <dd> <p>The y position of the top of the box.</p> </dd> <dd> <p>The z position of the front of the box.</p> </dd> <dd> <p>The x position of the right hand side of the box.</p> </dd> <dd> <p>The y position of the bottom of the box.</p> </dd> <dd> <p>The z position of the back of the box.</p> </dd> <p>Stencil operations that can be performed based on the results of stencil test.</p> <p>All stencil operations are specified as a <strong>{{D3D11_STENCIL_OP}}</strong>. The stencil operation can be set differently based on the outcome of the stencil test (which is referred to as <strong>StencilFunc</strong> in the stencil test portion of depth-stencil testing.</p><p>This structure is a member of a <strong>depth-stencil description</strong>. </p> <dd> <p>The stencil operation to perform when stencil testing fails.</p> </dd> <dd> <p>The stencil operation to perform when stencil testing passes and depth testing fails.</p> </dd> <dd> <p>The stencil operation to perform when stencil testing and depth testing both pass.</p> </dd> <dd> <p>A function that compares stencil data against existing stencil data. The function options are listed in <strong>{{D3D11_COMPARISON_FUNC}}</strong>.</p> </dd> <p>Describes depth-stencil state.</p> <p>Pass a reference to <strong>{{D3D11_DEPTH_STENCIL_DESC}}</strong> to the <strong>{{ID3D11Device::CreateDepthStencilState}}</strong> method to create the depth-stencil state object.</p><p>Depth-stencil state controls how depth-stencil testing is performed by the output-merger stage.</p><p>The following table shows the default values of depth-stencil states.</p><table> <tr><th>State</th><th>Default Value</th></tr> <tr><td>DepthEnable</td><td>{{TRUE}}</td></tr> <tr><td>DepthWriteMask</td><td>{{D3D11_DEPTH_WRITE_MASK_ALL}}</td></tr> <tr><td>DepthFunc</td><td>{{D3D11_COMPARISON_LESS}}</td></tr> <tr><td>StencilEnable</td><td>{{FALSE}}</td></tr> <tr><td>StencilReadMask</td><td>{{D3D11_DEFAULT_STENCIL_READ_MASK}}</td></tr> <tr><td>StencilWriteMask</td><td>{{D3D11_DEFAULT_STENCIL_WRITE_MASK}}</td></tr> <tr><td> <p>FrontFace.StencilFunc</p> <p>and</p> <p>BackFace.StencilFunc</p> </td><td>{{D3D11_COMPARISON_ALWAYS}}</td></tr> <tr><td> <p>FrontFace.StencilDepthFailOp</p> <p>and</p> <p>BackFace.StencilDepthFailOp</p> </td><td>{{D3D11_STENCIL_OP_KEEP}}</td></tr> <tr><td> <p>FrontFace.StencilPassOp</p> <p>and</p> <p>BackFace.StencilPassOp</p> </td><td>{{D3D11_STENCIL_OP_KEEP}}</td></tr> <tr><td> <p>FrontFace.StencilFailOp</p> <p>and</p> <p>BackFace.StencilFailOp</p> </td><td>{{D3D11_STENCIL_OP_KEEP}}</td></tr> </table><p>?</p><p>The formats that support stenciling are {{DXGI_FORMAT_D24_UNORM_S8_UINT}} and {{DXGI_FORMAT_D32_FLOAT_S8X24_UINT}}.</p> <dd> <p>Enable depth testing.</p> </dd> <dd> <p>Identify a portion of the depth-stencil buffer that can be modified by depth data (see <strong>{{D3D11_DEPTH_WRITE_MASK}}</strong>).</p> </dd> <dd> <p>A function that compares depth data against existing depth data. The function options are listed in <strong>{{D3D11_COMPARISON_FUNC}}</strong>.</p> </dd> <dd> <p>Enable stencil testing.</p> </dd> <dd> <p>Identify a portion of the depth-stencil buffer for reading stencil data.</p> </dd> <dd> <p>Identify a portion of the depth-stencil buffer for writing stencil data.</p> </dd> <dd> <p>Identify how to use the results of the depth test and the stencil test for pixels whose surface normal is facing towards the camera (see <strong>{{D3D11_DEPTH_STENCILOP_DESC}}</strong>).</p> </dd> <dd> <p>Identify how to use the results of the depth test and the stencil test for pixels whose surface normal is facing away from the camera (see <strong>{{D3D11_DEPTH_STENCILOP_DESC}}</strong>).</p> </dd> <p>Describes the blend state for a render target.</p> <p>You specify an array of <strong>{{D3D11_RENDER_TARGET_BLEND_DESC}}</strong> structures in the <strong>RenderTarget</strong> member of the <strong>{{D3D11_BLEND_DESC}}</strong> structure to describe the blend states for render targets; you can bind up to eight render targets to the output-merger stage at one time.</p><p>For info about how blending is done, see the output-merger stage.</p><p>Here are the default values for blend state.</p><table> <tr><th>State</th><th>Default Value</th></tr> <tr><td>BlendEnable</td><td>{{FALSE}}</td></tr> <tr><td>SrcBlend</td><td>{{D3D11_BLEND_ONE}}</td></tr> <tr><td>DestBlend</td><td>{{D3D11_BLEND_ZERO}}</td></tr> <tr><td>BlendOp</td><td>{{D3D11_BLEND_OP_ADD}}</td></tr> <tr><td>SrcBlendAlpha</td><td>{{D3D11_BLEND_ONE}}</td></tr> <tr><td>DestBlendAlpha</td><td>{{D3D11_BLEND_ZERO}}</td></tr> <tr><td>BlendOpAlpha</td><td>{{D3D11_BLEND_OP_ADD}}</td></tr> <tr><td>RenderTargetWriteMask</td><td>{{D3D11_COLOR_WRITE_ENABLE_ALL}}</td></tr> </table><p>?</p> <dd> <p>Enable (or disable) blending.</p> </dd> <dd> <p>This <strong>blend option</strong> specifies the operation to perform on the {{RGB}} value that the pixel shader outputs. The <strong>BlendOp</strong> member defines how to combine the <strong>SrcBlend</strong> and <strong>DestBlend</strong> operations.</p> </dd> <dd> <p>This <strong>blend option</strong> specifies the operation to perform on the current {{RGB}} value in the render target. The <strong>BlendOp</strong> member defines how to combine the <strong>SrcBlend</strong> and <strong>DestBlend</strong> operations.</p> </dd> <dd> <p>This <strong>blend operation</strong> defines how to combine the <strong>SrcBlend</strong> and <strong>DestBlend</strong> operations.</p> </dd> <dd> <p>This <strong>blend option</strong> specifies the operation to perform on the alpha value that the pixel shader outputs. Blend options that end in _COLOR are not allowed. The <strong>BlendOpAlpha</strong> member defines how to combine the <strong>SrcBlendAlpha</strong> and <strong>DestBlendAlpha</strong> operations.</p> </dd> <dd> <p>This <strong>blend option</strong> specifies the operation to perform on the current alpha value in the render target. Blend options that end in _COLOR are not allowed. The <strong>BlendOpAlpha</strong> member defines how to combine the <strong>SrcBlendAlpha</strong> and <strong>DestBlendAlpha</strong> operations.</p> </dd> <dd> <p>This <strong>blend operation</strong> defines how to combine the <strong>SrcBlendAlpha</strong> and <strong>DestBlendAlpha</strong> operations.</p> </dd> <dd> <p>A write mask.</p> </dd> <p> Describes the blend state that you use in a call to <strong>{{ID3D11Device::CreateBlendState}}</strong> to create a blend-state object. </p> <p>Here are the default values for blend state.</p><table> <tr><th>State</th><th>Default Value</th></tr> <tr><td>AlphaToCoverageEnable</td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>IndependentBlendEnable</td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>RenderTarget[0].BlendEnable</td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>RenderTarget[0].SrcBlend</td><td>{{D3D11_BLEND_ONE}}</td></tr> <tr><td>RenderTarget[0].DestBlend</td><td>{{D3D11_BLEND_ZERO}}</td></tr> <tr><td>RenderTarget[0].BlendOp</td><td>{{D3D11_BLEND_OP_ADD}}</td></tr> <tr><td>RenderTarget[0].SrcBlendAlpha</td><td>{{D3D11_BLEND_ONE}}</td></tr> <tr><td>RenderTarget[0].DestBlendAlpha</td><td>{{D3D11_BLEND_ZERO}}</td></tr> <tr><td>RenderTarget[0].BlendOpAlpha</td><td>{{D3D11_BLEND_OP_ADD}}</td></tr> <tr><td>RenderTarget[0].RenderTargetWriteMask</td><td>{{D3D11_COLOR_WRITE_ENABLE_ALL}}</td></tr> </table><p>?</p><strong>Note</strong>??<strong>{{D3D11_BLEND_DESC}}</strong> is identical to <strong>{{D3D10_BLEND_DESC1}}</strong>.?<p> If the driver type is set to <strong>{{D3D_DRIVER_TYPE_HARDWARE}}</strong>, the feature level is set to less than or equal to <strong>{{D3D_FEATURE_LEVEL_9_3}}</strong>, and the pixel format of the render target is set to <strong>{{DXGI_FORMAT_R8G8B8A8_UNORM_SRGB}}</strong>, <strong>{{DXGI_FORMAT_B8G8R8A8_UNORM_SRGB}}</strong>, or <strong>{{DXGI_FORMAT_B8G8R8X8_UNORM_SRGB}}</strong>, the display device performs the blend in standard {{RGB}} (sRGB) space and not in linear space. However, if the feature level is set to greater than <strong>{{D3D_FEATURE_LEVEL_9_3}}</strong>, the display device performs the blend in linear space, which is ideal. </p> <p>Describes rasterizer state.</p> <p>Rasterizer state defines the behavior of the rasterizer stage. To create a rasterizer-state object, call <strong>{{ID3D11Device::CreateRasterizerState}}</strong>. To set rasterizer state, call <strong>{{ID3D11DeviceContext::RSSetState}}</strong>.</p><p>If you do not specify some rasterizer state, the Direct3D runtime uses the following default values for rasterizer state.</p><table> <tr><th>State</th><th>Default Value</th></tr> <tr><td><strong>FillMode</strong></td><td>Solid</td></tr> <tr><td><strong>CullMode</strong></td><td>Back</td></tr> <tr><td><strong>FrontCounterClockwise</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td><strong>DepthBias</strong></td><td>0</td></tr> <tr><td><strong>SlopeScaledDepthBias</strong></td><td>0.0f</td></tr> <tr><td><strong>DepthBiasClamp</strong></td><td>0.0f</td></tr> <tr><td><strong>DepthClipEnable</strong></td><td><strong>{{TRUE}}</strong></td></tr> <tr><td><strong>ScissorEnable</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td><strong>MultisampleEnable</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td><strong>AntialiasedLineEnable</strong></td><td><strong>{{FALSE}}</strong></td></tr> </table><p>?</p><strong>Note</strong>??For feature levels 9.1, 9.2, 9.3, and 10.0, if you set <strong>MultisampleEnable</strong> to <strong>{{FALSE}}</strong>, the runtime renders all points, lines, and triangles without anti-aliasing even for render targets with a sample count greater than 1. For feature levels 10.1 and higher, the setting of <strong>MultisampleEnable</strong> has no effect on points and triangles with regard to {{MSAA}} and impacts only the selection of the line-rendering algorithm as shown in this table:?<p> </p><table> <tr><th>Line-rendering algorithm</th><th><strong>MultisampleEnable</strong></th><th><strong>AntialiasedLineEnable</strong></th></tr> <tr><td>Aliased</td><td><strong>{{FALSE}}</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>Alpha antialiased</td><td><strong>{{FALSE}}</strong></td><td><strong>{{TRUE}}</strong></td></tr> <tr><td>Quadrilateral</td><td><strong>{{TRUE}}</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>Quadrilateral</td><td><strong>{{TRUE}}</strong></td><td><strong>{{TRUE}}</strong></td></tr> </table><p>?</p><p>The settings of the <strong>MultisampleEnable</strong> and <strong>AntialiasedLineEnable</strong> members apply only to multisample antialiasing ({{MSAA}}) render targets (that is, render targets with sample counts greater than 1). Because of the differences in feature-level behavior and as long as you aren?t performing any line drawing or don?t mind that lines render as quadrilaterals, we recommend that you always set <strong>MultisampleEnable</strong> to <strong>{{TRUE}}</strong> whenever you render on {{MSAA}} render targets.</p> <dd> <p>Determines the fill mode to use when rendering (see <strong>{{D3D11_FILL_MODE}}</strong>).</p> </dd> <dd> <p>Indicates triangles facing the specified direction are not drawn (see <strong>{{D3D11_CULL_MODE}}</strong>).</p> </dd> <dd> <p>Determines if a triangle is front- or back-facing. If this parameter is <strong>{{TRUE}}</strong>, a triangle will be considered front-facing if its vertices are counter-clockwise on the render target and considered back-facing if they are clockwise. If this parameter is <strong>{{FALSE}}</strong>, the opposite is true.</p> </dd> <dd> <p>Depth value added to a given pixel. For info about depth bias, see Depth Bias.</p> </dd> <dd> <p>Maximum depth bias of a pixel. For info about depth bias, see Depth Bias.</p> </dd> <dd> <p>Scalar on a given pixel's slope. For info about depth bias, see Depth Bias.</p> </dd> <dd> <p>Enable clipping based on distance.</p> <p>The hardware always performs x and y clipping of rasterized coordinates. When <strong>DepthClipEnable</strong> is set to the default?<strong>{{TRUE}}</strong>, the hardware also clips the z value (that is, the hardware performs the last step of the following algorithm). </p> <code> 0 &lt; w -w &lt;= x &lt;= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden) -w &lt;= y &lt;= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden) 0 &lt;= z &lt;= w </code> <p>When you set <strong>DepthClipEnable</strong> to <strong>{{FALSE}}</strong>, the hardware skips the z clipping (that is, the last step in the preceding algorithm). However, the hardware still performs the "0 &lt; w" clipping. When z clipping is disabled, improper depth ordering at the pixel level might result. However, when z clipping is disabled, stencil shadow implementations are simplified. In other words, you can avoid complex special-case handling for geometry that goes beyond the back clipping plane. </p> </dd> <dd> <p>Enable scissor-rectangle culling. All pixels outside an active scissor rectangle are culled.</p> </dd> <dd> <p>Specifies whether to use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing ({{MSAA}}) render targets. Set to <strong>{{TRUE}}</strong> to use the quadrilateral line anti-aliasing algorithm and to <strong>{{FALSE}}</strong> to use the alpha line anti-aliasing algorithm. For more info about this member, see Remarks.</p> </dd> <dd> <p>Specifies whether to enable line antialiasing; only applies if doing line drawing and <strong>MultisampleEnable</strong> is <strong>{{FALSE}}</strong>. For more info about this member, see Remarks.</p> </dd> <p>Specifies data for initializing a subresource.</p> <p>This structure is used in calls to create buffers (<strong>{{ID3D11Device::CreateBuffer}}</strong>) and textures (<strong>{{ID3D11Device::CreateTexture1D}}</strong>, <strong>{{ID3D11Device::CreateTexture2D}}</strong>, and <strong>{{ID3D11Device::CreateTexture3D}}</strong>). If the resource you create does not require a system-memory pitch or a system-memory-slice pitch, you can use those members to pass size information, which might help you when you debug a problem with creating a resource.</p><p>A subresource is a single mipmap-level surface. You can pass an array of subresources to one of the preceding methods to create the resource. A subresource can be 1D, 2D, or 3D. How you set the members of <strong>{{D3D11_SUBRESOURCE_DATA}}</strong> depend on whether the subresource is 1D, 2D, or 3D.</p><p></p><dl> <dt>1D</dt> <dd> <p>You set <strong>SysMemPitch</strong> to the length of the 1D surface in bytes. <strong>pSysMem</strong> points to the start of the 1D surface. You don't need to set <strong>SysMemSlicePitch</strong>. To access a specific pixel, you use: </p> <pre>(const char*)pSysMem + (x * BytesPerPixel)</pre> </dd> <dt>2D</dt> <dd> <p>You set <strong>SysMemPitch</strong> to the distance between any two adjacent pixels on different lines. You set <strong>SysMemSlicePitch</strong> to the size of the entire 2D surface in bytes. To access a specific pixel, you use: </p> <pre>(const char*)pSysMem + SysMemPitch*y + (x * BytesPerPixel)</pre> </dd> <dt>3D</dt> <dd> <p>You set <strong>SysMemPitch</strong> to the distance between any two adjacent pixels on different lines. You set <strong>SysMemSlicePitch</strong> to the distance between any two adjacent 2D slices of the 3D surface. To access a specific pixel, you use: </p> <pre>(const char*)pSysMem + SysMemSlicePitch*d + SysMemPitch*y + (x * BytesPerPixel)</pre> </dd> </dl><p>The x, y, and d values are 0-based indices and <strong>BytesPerPixel</strong> depends on the pixel format. For mipmapped 3D surfaces, the number of depth slices in each level is half the number of the previous level (minimum 1) and rounded down if dividing by two results in a non-whole number.</p><strong>Note</strong>??An application must not rely on <strong>SysMemPitch</strong> being exactly equal to the number of texels in a line times the size of a texel. In some cases, <strong>SysMemPitch</strong> will include padding to skip past additional data in a line. This could be padding for alignment or the texture could be a subsection of a larger texture. For example, the <strong>{{D3D11_SUBRESOURCE_DATA}}</strong> structure could represent a 32 by 32 subsection of a 128 by 128 texture. The value for <strong>SysMemSlicePitch</strong> will reflect any padding included in <strong>SysMemPitch</strong>.? <dd> <p>Pointer to the initialization data.</p> </dd> <dd> <p>The distance (in bytes) from the beginning of one line of a texture to the next line. System-memory pitch is used only for 2D and 3D texture data as it is has no meaning for the other resource types. Specify the distance from the first pixel of one 2D slice of a 3D texture to the first pixel of the next 2D slice in that texture in the <strong>SysMemSlicePitch</strong> member.</p> </dd> <dd> <p>The distance (in bytes) from the beginning of one depth level to the next. System-memory-slice pitch is only used for 3D texture data as it has no meaning for the other resource types.</p> </dd> <p>Provides access to subresource data.</p> <p>This structure is used in a call to <strong>{{ID3D11DeviceContext::Map}}</strong>.</p><p>The values in these members tell you how much data you can view:</p><ul> <li><strong>pData</strong> points to row 0 and depth slice 0.</li> <li><strong>RowPitch</strong> contains the value that the runtime adds to <strong>pData</strong> to move from row to row, where each row contains multiple pixels.</li> <li><strong>DepthPitch</strong> contains the value that the runtime adds to <strong>pData</strong> to move from depth slice to depth slice, where each depth slice contains multiple rows.</li> </ul><p>When <strong>RowPitch</strong> and <strong>DepthPitch</strong> are not appropriate for the resource type, the runtime might set their values to 0. So, don't use these values for anything other than iterating over rows and depth. Here are some examples:</p><ul> <li>For <strong>Buffer</strong> and <strong>Texture1D</strong>, the runtime assigns values that aren't 0 to <strong>RowPitch</strong> and <strong>DepthPitch</strong>. For example, if a <strong>Buffer</strong> contains 8 bytes, the runtime assigns values to <strong>RowPitch</strong> and <strong>DepthPitch</strong> that are greater than or equal to 8.</li> <li>For <strong>Texture2D</strong>, the runtime still assigns a value that isn't 0 to <strong>DepthPitch</strong>, assuming that the field isn't used.</li> </ul><strong>Note</strong>?? The runtime might assign values to <strong>RowPitch</strong> and <strong>DepthPitch</strong> that are larger than anticipated because there might be padding between rows and depth.? <dd> <p>Pointer to the data. When <strong>{{ID3D11DeviceContext::Map}}</strong> provides the reference, the runtime ensures that the reference has a specific alignment, depending on the following feature levels:</p> <ul> <li>For <strong>{{D3D_FEATURE_LEVEL_10_0}}</strong> and higher, the reference is aligned to 16 bytes.</li> <li>For lower than <strong>{{D3D_FEATURE_LEVEL_10_0}}</strong>, the reference is aligned to 4 bytes.</li> </ul> </dd> <dd> <p>The row pitch, or width, or physical size (in bytes) of the data.</p> </dd> <dd> <p>The depth pitch, or width, or physical size (in bytes)of the data.</p> </dd> <p>Describes a buffer resource.</p> <p>This structure is used by <strong>{{ID3D11Device::CreateBuffer}}</strong> to create buffer resources.</p><p>In addition to this structure, you can also use the <strong>{{CD3D11_BUFFER_DESC}}</strong> derived structure, which is defined in {{D3D11}}.h and behaves like an inherited class, to help create a buffer description.</p><p>If the bind flag is <strong>{{D3D11_BIND_CONSTANT_BUFFER}}</strong>, you must set the <strong>ByteWidth</strong> value in multiples of 16, and less than or equal to <strong>{{D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT}}</strong>.</p> <dd> <p>Size of the buffer in bytes.</p> </dd> <dd> <p>Identify how the buffer is expected to be read from and written to. Frequency of update is a key factor. The most common value is typically {{D3D11_USAGE_DEFAULT}}; see <strong>{{D3D11_USAGE}}</strong> for all possible values.</p> </dd> <dd> <p>Identify how the buffer will be bound to the pipeline. Flags (see <strong>{{D3D11_BIND_FLAG}}</strong>) can be combined with a logical {{OR}}.</p> </dd> <dd> <p>{{CPU}} access flags (see <strong>{{D3D11_CPU_ACCESS_FLAG}}</strong>) or 0 if no {{CPU}} access is necessary. Flags can be combined with a logical {{OR}}.</p> </dd> <dd> <p>Miscellaneous flags (see <strong>{{D3D11_RESOURCE_MISC_FLAG}}</strong>) or 0 if unused. Flags can be combined with a logical {{OR}}.</p> </dd> <dd> <p>The size of each element in the buffer structure (in bytes) when the buffer represents a structured buffer. For more info about structured buffers, see Structured Buffer.</p> <p>The size value in <strong>StructureByteStride</strong> must match the size of the format that you use for views of the buffer. For example, if you use a shader resource view ({{SRV}}) to read a buffer in a pixel shader, the {{SRV}} format size must match the size value in <strong>StructureByteStride</strong>.</p> </dd> <p>Describes a 1D texture.</p> <p>This structure is used in a call to <strong>{{ID3D11Device::CreateTexture1D}}</strong>.</p><p>In addition to this structure, you can also use the <strong>{{CD3D11_TEXTURE1D_DESC}}</strong> derived structure, which is defined in {{D3D11}}.h and behaves like an inherited class, to help create a texture description.</p><p>The texture size range is determined by the feature level at which you create the device and not the Microsoft Direct3D interface version. For example, if you use Microsoft Direct3D?10 hardware at feature level 10 (<strong>{{D3D_FEATURE_LEVEL_10_0}}</strong>) and call <strong>{{D3D11CreateDevice}}</strong> to create an <strong>{{ID3D11Device}}</strong>, you must constrain the maximum texture size to {{D3D10_REQ_TEXTURE1D_U_DIMENSION}} (8192) when you create your 1D texture.</p> <dd> <p>Texture width (in texels). The range is from 1 to {{D3D11_REQ_TEXTURE1D_U_DIMENSION}} (16384). However, the range is actually constrained by the feature level at which you create the rendering device. For more information about restrictions, see Remarks.</p> </dd> <dd> <p>The maximum number of mipmap levels in the texture. See the remarks in <strong>{{D3D11_TEX1D_SRV}}</strong>. Use 1 for a multisampled texture; or 0 to generate a full set of subtextures.</p> </dd> <dd> <p>Number of textures in the array. The range is from 1 to {{D3D11_REQ_TEXTURE1D_ARRAY_AXIS_DIMENSION}} (2048). However, the range is actually constrained by the feature level at which you create the rendering device. For more information about restrictions, see Remarks.</p> </dd> <dd> <p>Texture format (see <strong>{{DXGI_FORMAT}}</strong>).</p> </dd> <dd> <p>Value that identifies how the texture is to be read from and written to. The most common value is {{D3D11_USAGE_DEFAULT}}; see <strong>{{D3D11_USAGE}}</strong> for all possible values.</p> </dd> <dd> <p>Flags (see <strong>{{D3D11_BIND_FLAG}}</strong>) for binding to pipeline stages. The flags can be combined by a logical {{OR}}. For a 1D texture, the allowable values are: {{D3D11_BIND_SHADER_RESOURCE}}, {{D3D11_BIND_RENDER_TARGET}} and {{D3D11_BIND_DEPTH_STENCIL}}.</p> </dd> <dd> <p>Flags (see <strong>{{D3D11_CPU_ACCESS_FLAG}}</strong>) to specify the types of {{CPU}} access allowed. Use 0 if {{CPU}} access is not required. These flags can be combined with a logical {{OR}}.</p> </dd> <dd> <p>Flags (see <strong>{{D3D11_RESOURCE_MISC_FLAG}}</strong>) that identify other, less common resource options. Use 0 if none of these flags apply. These flags can be combined with a logical {{OR}}.</p> </dd> <p>Describes a 2D texture.</p> <p>This structure is used in a call to <strong>{{ID3D11Device::CreateTexture2D}}</strong>.</p><p>In addition to this structure, you can also use the <strong>{{CD3D11_TEXTURE2D_DESC}}</strong> derived structure, which is defined in {{D3D11}}.h and behaves like an inherited class, to help create a texture description.</p><p>The device places some size restrictions (must be multiples of a minimum size) for a subsampled, block compressed, or bit-format resource.</p><p>The texture size range is determined by the feature level at which you create the device and not the Microsoft Direct3D interface version. For example, if you use Microsoft Direct3D?10 hardware at feature level 10 (<strong>{{D3D_FEATURE_LEVEL_10_0}}</strong>) and call <strong>{{D3D11CreateDevice}}</strong> to create an <strong>{{ID3D11Device}}</strong>, you must constrain the maximum texture size to {{D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION}} (8192) when you create your 2D texture.</p> <dd> <p>Texture width (in texels). The range is from 1 to {{D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION}} (16384). For a texture cube-map, the range is from 1 to {{D3D11_REQ_TEXTURECUBE_DIMENSION}} (16384). However, the range is actually constrained by the feature level at which you create the rendering device. For more information about restrictions, see Remarks.</p> </dd> <dd> <p>Texture height (in texels). The range is from 1 to {{D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION}} (16384). For a texture cube-map, the range is from 1 to {{D3D11_REQ_TEXTURECUBE_DIMENSION}} (16384). However, the range is actually constrained by the feature level at which you create the rendering device. For more information about restrictions, see Remarks.</p> </dd> <dd> <p>The maximum number of mipmap levels in the texture. See the remarks in <strong>{{D3D11_TEX1D_SRV}}</strong>. Use 1 for a multisampled texture; or 0 to generate a full set of subtextures.</p> </dd> <dd> <p>Number of textures in the texture array. The range is from 1 to {{D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION}} (2048). For a texture cube-map, this value is a multiple of 6 (that is, 6 times the value in the <strong>NumCubes</strong> member of <strong>{{D3D11_TEXCUBE_ARRAY_SRV}}</strong>), and the range is from 6 to 2046. The range is actually constrained by the feature level at which you create the rendering device. For more information about restrictions, see Remarks.</p> </dd> <dd> <p>Texture format (see <strong>{{DXGI_FORMAT}}</strong>).</p> </dd> <dd> <p>Structure that specifies multisampling parameters for the texture. See <strong>{{DXGI_SAMPLE_DESC}}</strong>.</p> </dd> <dd> <p>Value that identifies how the texture is to be read from and written to. The most common value is {{D3D11_USAGE_DEFAULT}}; see <strong>{{D3D11_USAGE}}</strong> for all possible values.</p> </dd> <dd> <p>Flags (see <strong>{{D3D11_BIND_FLAG}}</strong>) for binding to pipeline stages. The flags can be combined by a logical {{OR}}.</p> </dd> <dd> <p>Flags (see <strong>{{D3D11_CPU_ACCESS_FLAG}}</strong>) to specify the types of {{CPU}} access allowed. Use 0 if {{CPU}} access is not required. These flags can be combined with a logical {{OR}}.</p> </dd> <dd> <p>Flags (see <strong>{{D3D11_RESOURCE_MISC_FLAG}}</strong>) that identify other, less common resource options. Use 0 if none of these flags apply. These flags can be combined by using a logical {{OR}}. For a texture cube-map, set the <strong>{{D3D11_RESOURCE_MISC_TEXTURECUBE}}</strong> flag. Cube-map arrays (that is, <strong>ArraySize</strong> &gt; 6) require feature level <strong>{{D3D_FEATURE_LEVEL_10_1}}</strong> or higher.</p> </dd> <p>Describes a 3D texture.</p> <p>This structure is used in a call to <strong>{{ID3D11Device::CreateTexture3D}}</strong>.</p><p>In addition to this structure, you can also use the <strong>{{CD3D11_TEXTURE3D_DESC}}</strong> derived structure, which is defined in {{D3D11}}.h and behaves like an inherited class, to help create a texture description.</p><p>The device restricts the size of subsampled, block compressed, and bit format resources to be multiples of sizes specific to each format.</p><p>The texture size range is determined by the feature level at which you create the device and not the Microsoft Direct3D interface version. For example, if you use Microsoft Direct3D?10 hardware at feature level 10 (<strong>{{D3D_FEATURE_LEVEL_10_0}}</strong>) and call <strong>{{D3D11CreateDevice}}</strong> to create an <strong>{{ID3D11Device}}</strong>, you must constrain the maximum texture size to {{D3D10_REQ_TEXTURE3D_U_V_OR_W_DIMENSION}} (2048) when you create your 3D texture.</p> <dd> <p>Texture width (in texels). The range is from 1 to {{D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION}} (2048). However, the range is actually constrained by the feature level at which you create the rendering device. For more information about restrictions, see Remarks.</p> </dd> <dd> <p>Texture height (in texels). The range is from 1 to {{D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION}} (2048). However, the range is actually constrained by the feature level at which you create the rendering device. For more information about restrictions, see Remarks.</p> </dd> <dd> <p>Texture depth (in texels). The range is from 1 to {{D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION}} (2048). However, the range is actually constrained by the feature level at which you create the rendering device. For more information about restrictions, see Remarks.</p> </dd> <dd> <p>The maximum number of mipmap levels in the texture. See the remarks in <strong>{{D3D11_TEX1D_SRV}}</strong>. Use 1 for a multisampled texture; or 0 to generate a full set of subtextures.</p> </dd> <dd> <p>Texture format (see <strong>{{DXGI_FORMAT}}</strong>).</p> </dd> <dd> <p>Value that identifies how the texture is to be read from and written to. The most common value is {{D3D11_USAGE_DEFAULT}}; see <strong>{{D3D11_USAGE}}</strong> for all possible values.</p> </dd> <dd> <p>Flags (see <strong>{{D3D11_BIND_FLAG}}</strong>) for binding to pipeline stages. The flags can be combined by a logical {{OR}}.</p> </dd> <dd> <p>Flags (see <strong>{{D3D11_CPU_ACCESS_FLAG}}</strong>) to specify the types of {{CPU}} access allowed. Use 0 if {{CPU}} access is not required. These flags can be combined with a logical {{OR}}.</p> </dd> <dd> <p>Flags (see <strong>{{D3D11_RESOURCE_MISC_FLAG}}</strong>) that identify other, less common resource options. Use 0 if none of these flags apply. These flags can be combined with a logical {{OR}}.</p> </dd> <p>Specifies the elements in a buffer resource to use in a shader-resource view.</p> <p> The <strong>{{D3D11_BUFFER_SRV}}</strong> structure is a member of the <strong>{{D3D11_SHADER_RESOURCE_VIEW_DESC}}</strong> structure, which represents a shader-resource view description. You can create a shader-resource view by calling the <strong>{{ID3D11Device::CreateShaderResourceView}}</strong> method. </p> <dd> <p> Number of bytes between the beginning of the buffer and the first element to access. </p> </dd> <dd> <p> The offset of the first element in the view to access, relative to element 0. </p> </dd> <dd> <p> The total number of elements in the view. </p> </dd> <dd> <p> The width of each element (in bytes). This can be determined from the format stored in the shader-resource-view description. </p> </dd> <p>Describes the elements in a raw buffer resource to use in a shader-resource view.</p> <p>This structure is used by <strong>{{D3D11_SHADER_RESOURCE_VIEW_DESC}}</strong> to create a raw view of a buffer.</p> <dd> <p>The index of the first element to be accessed by the view.</p> </dd> <dd> <p>The number of elements in the resource.</p> </dd> <dd> <p>A <strong>{{D3D11_BUFFEREX_SRV_FLAG}}</strong>-typed value that identifies view options for the buffer. Currently, the only option is to identify a raw view of the buffer. For more info about raw viewing of buffers, see Raw Views of Buffers.</p> </dd> <p>Specifies the subresource from a 1D texture to use in a shader-resource view.</p> <p>This structure is one member of a shader-resource-view description (see <strong>{{D3D11_SHADER_RESOURCE_VIEW_DESC}}</strong>).</p><p>As an example, assuming <strong>MostDetailedMip</strong> = 6 and <strong>MipLevels</strong> = 2, the view will have access to 2 mipmap levels, 6 and 7, of the original texture for which <strong>{{ID3D11Device::CreateShaderResourceView}}</strong> creates the view. In this situation, <strong>MostDetailedMip</strong> is greater than the <strong>MipLevels</strong> in the view. However, <strong>MostDetailedMip</strong> is not greater than the <strong>MipLevels</strong> in the original resource.</p> <dd> <p>Index of the most detailed mipmap level to use; this number is between 0 and <strong>MipLevels</strong> (from the original Texture1D for which <strong>{{ID3D11Device::CreateShaderResourceView}}</strong> creates a view) -1.</p> </dd> <dd> <p>The maximum number of mipmap levels for the view of the texture. See the remarks.</p> <p>Set to -1 to indicate all the mipmap levels from <strong>MostDetailedMip</strong> on down to least detailed.</p> </dd> <p>Specifies the subresources from an array of 1D textures to use in a shader-resource view.</p> <p>This structure is one member of a shader-resource-view description (see <strong>{{D3D11_SHADER_RESOURCE_VIEW_DESC}}</strong>).</p> <dd> <p>Index of the most detailed mipmap level to use; this number is between 0 and <strong>MipLevels</strong> (from the original Texture1D for which <strong>{{ID3D11Device::CreateShaderResourceView}}</strong> creates a view) -1.</p> </dd> <dd> <p>The maximum number of mipmap levels for the view of the texture. See the remarks in <strong>{{D3D11_TEX1D_SRV}}</strong>.</p> <p>Set to -1 to indicate all the mipmap levels from <strong>MostDetailedMip</strong> on down to least detailed.</p> </dd> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p>Number of textures in the array.</p> </dd> <p>Specifies the subresource from a 2D texture to use in a shader-resource view.</p> <p>This structure is one member of a shader-resource-view description (see <strong>{{D3D11_SHADER_RESOURCE_VIEW_DESC}}</strong>).</p> <dd> <p>Index of the most detailed mipmap level to use; this number is between 0 and <strong>MipLevels</strong> (from the original Texture2D for which <strong>{{ID3D11Device::CreateShaderResourceView}}</strong> creates a view) -1.</p> </dd> <dd> <p>The maximum number of mipmap levels for the view of the texture. See the remarks in <strong>{{D3D11_TEX1D_SRV}}</strong>.</p> <p>Set to -1 to indicate all the mipmap levels from <strong>MostDetailedMip</strong> on down to least detailed.</p> </dd> <p>Specifies the subresources from an array of 2D textures to use in a shader-resource view.</p> <p>This structure is one member of a shader-resource-view description (see <strong>{{D3D11_SHADER_RESOURCE_VIEW_DESC}}</strong>).</p> <dd> <p>Index of the most detailed mipmap level to use; this number is between 0 and <strong>MipLevels</strong> (from the original Texture2D for which <strong>{{ID3D11Device::CreateShaderResourceView}}</strong> creates a view) -1.</p> </dd> <dd> <p>The maximum number of mipmap levels for the view of the texture. See the remarks in <strong>{{D3D11_TEX1D_SRV}}</strong>.</p> <p>Set to -1 to indicate all the mipmap levels from <strong>MostDetailedMip</strong> on down to least detailed.</p> </dd> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p>Number of textures in the array.</p> </dd> <p>Specifies the subresources from a 3D texture to use in a shader-resource view.</p> <p>This structure is one member of a shader-resource-view description (see <strong>{{D3D11_SHADER_RESOURCE_VIEW_DESC}}</strong>).</p> <dd> <p>Index of the most detailed mipmap level to use; this number is between 0 and <strong>MipLevels</strong> (from the original Texture3D for which <strong>{{ID3D11Device::CreateShaderResourceView}}</strong> creates a view) -1.</p> </dd> <dd> <p>The maximum number of mipmap levels for the view of the texture. See the remarks in <strong>{{D3D11_TEX1D_SRV}}</strong>.</p> <p>Set to -1 to indicate all the mipmap levels from <strong>MostDetailedMip</strong> on down to least detailed.</p> </dd> <p>Specifies the subresource from a cube texture to use in a shader-resource view.</p> <p>This structure is one member of a shader-resource-view description (see <strong>{{D3D11_SHADER_RESOURCE_VIEW_DESC}}</strong>).</p> <dd> <p>Index of the most detailed mipmap level to use; this number is between 0 and <strong>MipLevels</strong> (from the original TextureCube for which <strong>{{ID3D11Device::CreateShaderResourceView}}</strong> creates a view) -1.</p> </dd> <dd> <p>The maximum number of mipmap levels for the view of the texture. See the remarks in <strong>{{D3D11_TEX1D_SRV}}</strong>.</p> <p>Set to -1 to indicate all the mipmap levels from <strong>MostDetailedMip</strong> on down to least detailed.</p> </dd> <p>Specifies the subresources from an array of cube textures to use in a shader-resource view.</p> <p>This structure is one member of a shader-resource-view description (see <strong>{{D3D11_SHADER_RESOURCE_VIEW_DESC}}</strong>).</p> <dd> <p>Index of the most detailed mipmap level to use; this number is between 0 and <strong>MipLevels</strong> (from the original TextureCube for which <strong>{{ID3D11Device::CreateShaderResourceView}}</strong> creates a view) -1.</p> </dd> <dd> <p>The maximum number of mipmap levels for the view of the texture. See the remarks in <strong>{{D3D11_TEX1D_SRV}}</strong>.</p> <p>Set to -1 to indicate all the mipmap levels from <strong>MostDetailedMip</strong> on down to least detailed.</p> </dd> <dd> <p>Index of the first 2D texture to use.</p> </dd> <dd> <p>Number of cube textures in the array.</p> </dd> <p>Specifies the subresources from a multisampled 2D texture to use in a shader-resource view.</p> <p>Since a multisampled 2D texture contains a single subresource, there is actually nothing to specify in {{D3D11_TEX2DMS_RTV}}. Consequently, <strong>UnusedField_NothingToDefine</strong> is included so that this structure will compile in C.</p> <dd> <p>Integer of any value. See remarks.</p> </dd> <p>Specifies the subresources from an array of multisampled 2D textures to use in a shader-resource view.</p> <p>This structure is one member of a shader-resource-view description (see <strong>{{D3D11_SHADER_RESOURCE_VIEW_DESC}}</strong>).</p> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p>Number of textures to use.</p> </dd> <p>Describes a shader-resource view.</p> <p>A view is a format-specific way to look at the data in a resource. The view determines what data to look at, and how it is cast when read.</p><p>When viewing a resource, the resource-view description must specify a typed format, that is compatible with the resource format. So that means that you cannot create a resource-view description using any format with _TYPELESS in the name. You can however view a typeless resource by specifying a typed format for the view. For example, a {{DXGI_FORMAT_R32G32B32_TYPELESS}} resource can be viewed with one of these typed formats: {{DXGI_FORMAT_R32G32B32_FLOAT}}, {{DXGI_FORMAT_R32G32B32_UINT}}, and {{DXGI_FORMAT_R32G32B32_SINT}}, since these typed formats are compatible with the typeless resource.</p><p>Create a shader-resource-view description by calling <strong>{{ID3D11Device::CreateShaderResourceView}}</strong>. To view a shader-resource-view description, call <strong>{{ID3D11ShaderResourceView::GetDesc}}</strong>.</p> <dd> <p>A <strong>{{DXGI_FORMAT}}</strong> specifying the viewing format. See remarks.</p> </dd> <dd> <p>The resource type of the view. See <strong>{{D3D11_SRV_DIMENSION}}</strong>. This should be the same as the resource type of the underlying resource. This parameter also determines which _SRV to use in the union below.</p> </dd> <dd> <p>View the resource as a buffer using information from a shader-resource view (see <strong>{{D3D11_BUFFER_SRV}}</strong>).</p> </dd> <dd> <p>View the resource as a 1D texture using information from a shader-resource view (see <strong>{{D3D11_TEX1D_SRV}}</strong>).</p> </dd> <dd> <p>View the resource as a 1D-texture array using information from a shader-resource view (see <strong>{{D3D11_TEX1D_ARRAY_SRV}}</strong>).</p> </dd> <dd> <p>View the resource as a 2D-texture using information from a shader-resource view (see <strong>{{D3D11_TEX2D_SRV}}</strong>).</p> </dd> <dd> <p>View the resource as a 2D-texture array using information from a shader-resource view (see <strong>{{D3D11_TEX2D_ARRAY_SRV}}</strong>).</p> </dd> <dd> <p>View the resource as a 2D-multisampled texture using information from a shader-resource view (see <strong>{{D3D11_TEX2DMS_SRV}}</strong>).</p> </dd> <dd> <p>View the resource as a 2D-multisampled-texture array using information from a shader-resource view (see <strong>{{D3D11_TEX2DMS_ARRAY_SRV}}</strong>).</p> </dd> <dd> <p>View the resource as a 3D texture using information from a shader-resource view (see <strong>{{D3D11_TEX3D_SRV}}</strong>).</p> </dd> <dd> <p>View the resource as a 3D-cube texture using information from a shader-resource view (see <strong>{{D3D11_TEXCUBE_SRV}}</strong>).</p> </dd> <dd> <p>View the resource as a 3D-cube-texture array using information from a shader-resource view (see <strong>{{D3D11_TEXCUBE_ARRAY_SRV}}</strong>).</p> </dd> <dd> <p>View the resource as a raw buffer using information from a shader-resource view (see <strong>{{D3D11_BUFFEREX_SRV}}</strong>). For more info about raw viewing of buffers, see Raw Views of Buffers.</p> </dd> <p>Specifies the elements in a buffer resource to use in a render-target view.</p> <p> A render-target view is a member of a render-target-view description (see <strong>{{D3D11_RENDER_TARGET_VIEW_DESC}}</strong>). Create a render-target view by calling <strong>{{ID3D11Device::CreateRenderTargetView}}</strong>. </p> <dd> <p> Number of bytes between the beginning of the buffer and the first element to access. </p> </dd> <dd> <p> The offset of the first element in the view to access, relative to element 0. </p> </dd> <dd> <p> The total number of elements in the view. </p> </dd> <dd> <p> The width of each element (in bytes). This can be determined from the format stored in the render-target-view description. </p> </dd> <p>Specifies the subresource from a 1D texture to use in a render-target view.</p> <p>This structure is one member of a render-target-view description (see <strong>{{D3D11_RENDER_TARGET_VIEW_DESC}}</strong>).</p> <dd> <p>The index of the mipmap level to use mip slice.</p> </dd> <p>Specifies the subresources from an array of 1D textures to use in a render-target view.</p> <p>This structure is one member of a render-target-view description (see <strong>{{D3D11_RENDER_TARGET_VIEW_DESC}}</strong>).</p> <dd> <p>The index of the mipmap level to use mip slice.</p> </dd> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p>Number of textures to use.</p> </dd> <p>Specifies the subresource from a 2D texture to use in a render-target view.</p> <p>This structure is one member of a render-target-view description (see <strong>{{D3D11_RENDER_TARGET_VIEW_DESC}}</strong>).</p> <dd> <p>The index of the mipmap level to use mip slice.</p> </dd> <p>Specifies the subresource from a multisampled 2D texture to use in a render-target view.</p> <p>Since a multisampled 2D texture contains a single subresource, there is actually nothing to specify in {{D3D11_TEX2DMS_RTV}}. Consequently, <strong>UnusedField_NothingToDefine</strong> is included so that this structure will compile in C.</p> <dd> <p>Integer of any value. See remarks.</p> </dd> <p>Specifies the subresources from an array of 2D textures to use in a render-target view.</p> <p>This structure is one member of a render-target-view description (see <strong>{{D3D11_RENDER_TARGET_VIEW_DESC}}</strong>).</p> <dd> <p>The index of the mipmap level to use mip slice.</p> </dd> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p>Number of textures in the array to use in the render target view, starting from <strong>FirstArraySlice</strong>.</p> </dd> <p>Specifies the subresources from a an array of multisampled 2D textures to use in a render-target view.</p> <p>This structure is one member of a render-target-view description (see <strong>{{D3D11_RENDER_TARGET_VIEW_DESC}}</strong>).</p> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p>Number of textures to use.</p> </dd> <p>Specifies the subresources from a 3D texture to use in a render-target view.</p> <p>This structure is one member of a render target view. See <strong>{{D3D11_RENDER_TARGET_VIEW_DESC}}</strong>.</p> <dd> <p>The index of the mipmap level to use mip slice.</p> </dd> <dd> <p>First depth level to use.</p> </dd> <dd> <p>Number of depth levels to use in the render-target view, starting from <strong>FirstWSlice</strong>. A value of -1 indicates all of the slices along the w axis, starting from <strong>FirstWSlice</strong>.</p> </dd> <p>Specifies the subresources from a resource that are accessible using a render-target view.</p> <p>A render-target-view description is passed into <strong>{{ID3D11Device::CreateRenderTargetView}}</strong> to create a render target.</p><p>A render-target-view cannot use the following formats:</p><ul> <li>Any typeless format.</li> <li>{{DXGI_FORMAT_R32G32B32}} if the view will be used to bind a buffer (vertex, index, constant, or stream-output).</li> </ul><p>If the format is set to {{DXGI_FORMAT_UNKNOWN}}, then the format of the resource that the view binds to the pipeline will be used.</p> <dd> <p>The data format (see <strong>{{DXGI_FORMAT}}</strong>).</p> </dd> <dd> <p>The resource type (see <strong>{{D3D11_RTV_DIMENSION}}</strong>), which specifies how the render-target resource will be accessed.</p> </dd> <dd> <p>Specifies which buffer elements can be accessed (see <strong>{{D3D11_BUFFER_RTV}}</strong>).</p> </dd> <dd> <p>Specifies the subresources in a 1D texture that can be accessed (see <strong>{{D3D11_TEX1D_RTV}}</strong>).</p> </dd> <dd> <p>Specifies the subresources in a 1D texture array that can be accessed (see <strong>{{D3D11_TEX1D_ARRAY_RTV}}</strong>).</p> </dd> <dd> <p>Specifies the subresources in a 2D texture that can be accessed (see <strong>{{D3D11_TEX2D_RTV}}</strong>).</p> </dd> <dd> <p>Specifies the subresources in a 2D texture array that can be accessed (see <strong>{{D3D11_TEX2D_ARRAY_RTV}}</strong>).</p> </dd> <dd> <p>Specifies a single subresource because a multisampled 2D texture only contains one subresource (see <strong>{{D3D11_TEX2DMS_RTV}}</strong>).</p> </dd> <dd> <p>Specifies the subresources in a multisampled 2D texture array that can be accessed (see <strong>{{D3D11_TEX2DMS_ARRAY_RTV}}</strong>).</p> </dd> <dd> <p>Specifies subresources in a 3D texture that can be accessed (see <strong>{{D3D11_TEX3D_RTV}}</strong>).</p> </dd> <p>Specifies the subresource from a 1D texture that is accessible to a depth-stencil view.</p> <p>This structure is one member of a depth-stencil-view description (see <strong>{{D3D11_DEPTH_STENCIL_VIEW_DESC}}</strong>).</p> <dd> <p>The index of the first mipmap level to use.</p> </dd> <p>Specifies the subresources from an array of 1D textures to use in a depth-stencil view.</p> <p>This structure is one member of a depth-stencil-view description (see <strong>{{D3D11_DEPTH_STENCIL_VIEW_DESC}}</strong>).</p> <dd> <p>The index of the first mipmap level to use.</p> </dd> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p>Number of textures to use.</p> </dd> <p>Specifies the subresource from a 2D texture that is accessible to a depth-stencil view.</p> <p>This structure is one member of a depth-stencil-view description (see <strong>{{D3D11_DEPTH_STENCIL_VIEW_DESC}}</strong>).</p> <dd> <p>The index of the first mipmap level to use.</p> </dd> <p>Specifies the subresources from an array 2D textures that are accessible to a depth-stencil view.</p> <p>This structure is one member of a depth-stencil-view description (see <strong>{{D3D11_DEPTH_STENCIL_VIEW_DESC}}</strong>).</p> <dd> <p>The index of the first mipmap level to use.</p> </dd> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p>Number of textures to use.</p> </dd> <p>Specifies the subresource from a multisampled 2D texture that is accessible to a depth-stencil view.</p> <p>Because a multisampled 2D texture contains a single subtexture, there is nothing to specify; this unused member is included so that this structure will compile in C.</p> <dd> <p>Unused.</p> </dd> <p>Specifies the subresources from an array of multisampled 2D textures for a depth-stencil view.</p> <p>This structure is one member of a depth-stencil-view description (see <strong>{{D3D11_DEPTH_STENCIL_VIEW_DESC}}</strong>).</p> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p>Number of textures to use.</p> </dd> <p>Specifies the subresources of a texture that are accessible from a depth-stencil view.</p> <p>These are valid formats for a depth-stencil view:</p><ul> <li>{{DXGI_FORMAT_D16_UNORM}}</li> <li>{{DXGI_FORMAT_D24_UNORM_S8_UINT}}</li> <li>{{DXGI_FORMAT_D32_FLOAT}}</li> <li>{{DXGI_FORMAT_D32_FLOAT_S8X24_UINT}}</li> <li>{{DXGI_FORMAT_UNKNOWN}}</li> </ul><p>A depth-stencil view cannot use a typeless format. If the format chosen is {{DXGI_FORMAT_UNKNOWN}}, then the format of the parent resource is used.</p><p>A depth-stencil-view description is needed when calling <strong>{{ID3D11Device::CreateDepthStencilView}}</strong>.</p> <dd> <p>Resource data format (see <strong>{{DXGI_FORMAT}}</strong>). See remarks for allowable formats.</p> </dd> <dd> <p>Type of resource (see <strong>{{D3D11_DSV_DIMENSION}}</strong>). Specifies how a depth-stencil resource will be accessed; the value is stored in the union in this structure.</p> </dd> <dd> <p>A value that describes whether the texture is read only. Pass 0 to specify that it is not read only; otherwise, pass one of the members of the <strong>{{D3D11_DSV_FLAG}}</strong> enumerated type.</p> </dd> <dd> <p>Specifies a 1D texture subresource (see <strong>{{D3D11_TEX1D_DSV}}</strong>).</p> </dd> <dd> <p>Specifies an array of 1D texture subresources (see <strong>{{D3D11_TEX1D_ARRAY_DSV}}</strong>).</p> </dd> <dd> <p>Specifies a 2D texture subresource (see <strong>{{D3D11_TEX2D_DSV}}</strong>).</p> </dd> <dd> <p>Specifies an array of 2D texture subresources (see <strong>{{D3D11_TEX2D_ARRAY_DSV}}</strong>).</p> </dd> <dd> <p>Specifies a multisampled 2D texture (see <strong>{{D3D11_TEX2DMS_DSV}}</strong>).</p> </dd> <dd> <p>Specifies an array of multisampled 2D textures (see <strong>{{D3D11_TEX2DMS_ARRAY_DSV}}</strong>).</p> </dd> <p>Describes the elements in a buffer to use in a unordered-access view.</p> <p>This structure is used by a <strong>{{D3D11_UNORDERED_ACCESS_VIEW_DESC}}</strong>.</p> <dd> <p>The zero-based index of the first element to be accessed.</p> </dd> <dd> <p>The number of elements in the resource. For structured buffers, this is the number of structures in the buffer.</p> </dd> <dd> <p>View options for the resource (see <strong>{{D3D11_BUFFER_UAV_FLAG}}</strong>).</p> </dd> <p>Describes a unordered-access 1D texture resource.</p> <p>This structure is used by a <strong>{{D3D11_UNORDERED_ACCESS_VIEW_DESC}}</strong>.</p> <dd> <p>The mipmap slice index.</p> </dd> <p>Describes an array of unordered-access 1D texture resources.</p> <p>This structure is used by a <strong>{{D3D11_UNORDERED_ACCESS_VIEW_DESC}}</strong>.</p> <dd> <p>The mipmap slice index.</p> </dd> <dd> <p>The zero-based index of the first array slice to be accessed.</p> </dd> <dd> <p>The number of slices in the array.</p> </dd> <p>Describes a unordered-access 2D texture resource.</p> <p>This structure is used by a <strong>{{D3D11_UNORDERED_ACCESS_VIEW_DESC}}</strong>.</p> <dd> <p>The mipmap slice index.</p> </dd> <p>Describes an array of unordered-access 2D texture resources.</p> <p>This structure is used by a <strong>{{D3D11_UNORDERED_ACCESS_VIEW_DESC}}</strong>.</p> <dd> <p>The mipmap slice index.</p> </dd> <dd> <p>The zero-based index of the first array slice to be accessed.</p> </dd> <dd> <p>The number of slices in the array.</p> </dd> <p>Describes a unordered-access 3D texture resource.</p> <p>This structure is used by a <strong>{{D3D11_UNORDERED_ACCESS_VIEW_DESC}}</strong>.</p> <dd> <p>The mipmap slice index.</p> </dd> <dd> <p>The zero-based index of the first depth slice to be accessed.</p> </dd> <dd> <p>The number of depth slices.</p> </dd> <p>Specifies the subresources from a resource that are accessible using an unordered-access view.</p> <p>An unordered-access-view description is passed into <strong>{{ID3D11Device::CreateUnorderedAccessView}}</strong> to create a view.</p> <dd> <p>The data format (see <strong>{{DXGI_FORMAT}}</strong>).</p> </dd> <dd> <p>The resource type (see <strong>{{D3D11_UAV_DIMENSION}}</strong>), which specifies how the resource will be accessed.</p> </dd> <dd> <p>Specifies which buffer elements can be accessed (see <strong>{{D3D11_BUFFER_UAV}}</strong>).</p> </dd> <dd> <p>Specifies the subresources in a 1D texture that can be accessed (see <strong>{{D3D11_TEX1D_UAV}}</strong>).</p> </dd> <dd> <p>Specifies the subresources in a 1D texture array that can be accessed (see <strong>{{D3D11_TEX1D_ARRAY_UAV}}</strong>).</p> </dd> <dd> <p>Specifies the subresources in a 2D texture that can be accessed (see <strong>{{D3D11_TEX2D_UAV}}</strong>).</p> </dd> <dd> <p>Specifies the subresources in a 2D texture array that can be accessed (see <strong>{{D3D11_TEX2D_ARRAY_UAV}}</strong>).</p> </dd> <dd> <p>Specifies subresources in a 3D texture that can be accessed (see <strong>{{D3D11_TEX3D_UAV}}</strong>).</p> </dd> <p>Describes a sampler state.</p> <p>These are the default values for sampler state.</p><table> <tr><th>State</th><th>Default Value</th></tr> <tr><td>Filter</td><td>{{D3D11_FILTER_MIN_MAG_MIP_LINEAR}}</td></tr> <tr><td>AddressU</td><td>{{D3D11_TEXTURE_ADDRESS_CLAMP}}</td></tr> <tr><td>AddressV</td><td>{{D3D11_TEXTURE_ADDRESS_CLAMP}}</td></tr> <tr><td>AddressW</td><td>{{D3D11_TEXTURE_ADDRESS_CLAMP}}</td></tr> <tr><td>MinLOD</td><td>-3.402823466e+38F (-{{FLT_MAX}})</td></tr> <tr><td>MaxLOD</td><td>3.402823466e+38F ({{FLT_MAX}})</td></tr> <tr><td>MipMapLODBias</td><td>0.0f</td></tr> <tr><td>MaxAnisotropy</td><td>1</td></tr> <tr><td>ComparisonFunc</td><td>{{D3D11_COMPARISON_NEVER}}</td></tr> <tr><td>BorderColor</td><td>float4(1.0f,1.0f,1.0f,1.0f)</td></tr> <tr><td>Texture</td><td>N/A</td></tr> </table><p>?</p> <dd> <p> Filtering method to use when sampling a texture (see <strong>{{D3D11_FILTER}}</strong>). </p> </dd> <dd> <p> Method to use for resolving a u texture coordinate that is outside the 0 to 1 range (see <strong>{{D3D11_TEXTURE_ADDRESS_MODE}}</strong>). </p> </dd> <dd> <p>Method to use for resolving a v texture coordinate that is outside the 0 to 1 range.</p> </dd> <dd> <p>Method to use for resolving a w texture coordinate that is outside the 0 to 1 range.</p> </dd> <dd> <p>Offset from the calculated mipmap level. For example, if Direct3D calculates that a texture should be sampled at mipmap level 3 and MipLODBias is 2, then the texture will be sampled at mipmap level 5.</p> </dd> <dd> <p>Clamping value used if {{D3D11_FILTER_ANISOTROPIC}} or {{D3D11_FILTER_COMPARISON_ANISOTROPIC}} is specified in Filter. Valid values are between 1 and 16.</p> </dd> <dd> <p> A function that compares sampled data against existing sampled data. The function options are listed in <strong>{{D3D11_COMPARISON_FUNC}}</strong>. </p> </dd> <dd> <p>Border color to use if {{D3D11_TEXTURE_ADDRESS_BORDER}} is specified for AddressU, AddressV, or AddressW. Range must be between 0.0 and 1.0 inclusive.</p> </dd> <dd> <p>Lower end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed.</p> </dd> <dd> <p>Upper end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed. This value must be greater than or equal to MinLOD. To have no upper limit on {{LOD}} set this to a large value such as {{D3D11_FLOAT32_MAX}}.</p> </dd> <p>Describes a query.</p> <dd> <p>Type of query (see <strong>{{D3D11_QUERY}}</strong>).</p> </dd> <dd> <p>Miscellaneous flags (see <strong>{{D3D11_QUERY_MISC_FLAG}}</strong>).</p> </dd> <p>Query information about the reliability of a timestamp query.</p> <p>For a list of query types see <strong>{{D3D11_QUERY}}</strong>.</p> <dd> <p>How frequently the {{GPU}} counter increments in Hz.</p> </dd> <dd> <p>If this is <strong>{{TRUE}}</strong>, something occurred in between the query's <strong>{{ID3D11DeviceContext::Begin}}</strong> and <strong>{{ID3D11DeviceContext::End}}</strong> calls that caused the timestamp counter to become discontinuous or disjoint, such as unplugging the {{AC}} cord on a laptop, overheating, or throttling up/down due to laptop savings events. The timestamp returned by <strong>{{ID3D11DeviceContext::GetData}}</strong> for a timestamp query is only reliable if <strong>Disjoint</strong> is <strong>{{FALSE}}</strong>.</p> </dd> <p>Query information about graphics-pipeline activity in between calls to <strong>{{ID3D11DeviceContext::Begin}}</strong> and <strong>{{ID3D11DeviceContext::End}}</strong>.</p> <p>Query information about the amount of data streamed out to the stream-output buffers in between <strong>{{ID3D11DeviceContext::Begin}}</strong> and <strong>{{ID3D11DeviceContext::End}}</strong>.</p> <p>Describes a counter.</p> <p>This structure is used by <strong>{{ID3D11Counter::GetDesc}}</strong>, <strong>{{ID3D11Device::CheckCounter}}</strong> and <strong>{{ID3D11Device::CreateCounter}}</strong>.</p> <dd> <p>Type of counter (see <strong>{{D3D11_COUNTER}}</strong>).</p> </dd> <dd> <p>Reserved.</p> </dd> <p>Information about the video card's performance counter capabilities.</p> <p>This structure is returned by <strong>{{ID3D11Device::CheckCounterInfo}}</strong>.</p> <dd> <p>Largest device-dependent counter {{ID}} that the device supports. If none are supported, this value will be 0. Otherwise it will be greater than or equal to {{D3D11_COUNTER_DEVICE_DEPENDENT_0}}. See <strong>{{D3D11_COUNTER}}</strong>.</p> </dd> <dd> <p>Number of counters that can be simultaneously supported.</p> </dd> <dd> <p>Number of detectable parallel units that the counter is able to discern. Values are 1 ~ 4. Use NumDetectableParallelUnits to interpret the values of the {{VERTEX_PROCESSING}}, {{GEOMETRY_PROCESSING}}, {{PIXEL_PROCESSING}}, and {{OTHER_GPU_PROCESSING}} counters. </p> </dd> <p>Describes an {{HLSL}} class instance.</p> <p>The {{D3D11_CLASS_INSTANCE_DESC}} structure is returned by the <strong>{{ID3D11ClassInstance::GetDesc}}</strong> method.</p><p>The members of this structure except <strong>InstanceIndex</strong> are valid (non default values) if they describe a class instance aquired using <strong>{{ID3D11ClassLinkage::CreateClassInstance}}</strong>. The <strong>InstanceIndex</strong> member is only valid when the class instance is aquired using <strong>{{ID3D11ClassLinkage::GetClassInstance}}</strong>.</p> <dd> <p>The instance {{ID}} of an {{HLSL}} class; the default value is 0.</p> </dd> <dd> <p>The instance index of an {{HLSL}} class; the default value is 0.</p> </dd> <dd> <p>The type {{ID}} of an {{HLSL}} class; the default value is 0.</p> </dd> <dd> <p>Describes the constant buffer associated with an {{HLSL}} class; the default value is 0.</p> </dd> <dd> <p>The base constant buffer offset associated with an {{HLSL}} class; the default value is 0.</p> </dd> <dd> <p>The base texture associated with an {{HLSL}} class; the default value is 127.</p> </dd> <dd> <p>The base sampler associated with an {{HLSL}} class; the default value is 15.</p> </dd> <dd> <p>True if the class was created; the default value is false.</p> </dd> <p>Describes the multi-threading features that are supported by the current graphics driver.</p> <p>Use the {{D3D11_FEATURE_DATA_THREADING}} structure with the <strong>{{ID3D11Device::CheckFeatureSupport}}</strong> method to determine multi-threading support.</p> <dd> <p><strong>{{TRUE}}</strong> means resources can be created concurrently on multiple threads while drawing; <strong>{{FALSE}}</strong> means that the presence of coarse synchronization will prevent concurrency.</p> </dd> <dd> <p><strong>{{TRUE}}</strong> means command lists are supported by the current driver; <strong>{{FALSE}}</strong> means that the {{API}} will emulate deferred contexts and command lists with software.</p> </dd> <p>Describes double data type support in the current graphics driver.</p> <p>If the runtime sets <strong>DoublePrecisionFloatShaderOps</strong> to <strong>{{TRUE}}</strong>, the hardware and driver support the following Shader Model 5 instructions:</p><ul> <li> dadd </li> <li> dmax </li> <li> dmin </li> <li> dmul </li> <li> deq </li> <li> dge </li> <li> dlt </li> <li> dne </li> <li> dmov </li> <li> dmovc </li> <li> dtof </li> <li> ftod </li> </ul><strong>Note</strong>??If <strong>DoublePrecisionFloatShaderOps</strong> is <strong>{{TRUE}}</strong>, the hardware and driver do not necessarily support double-precision division.? <dd> <p>Specifies whether double types are allowed. If <strong>{{TRUE}}</strong>, double types are allowed; otherwise <strong>{{FALSE}}</strong>. The runtime must set <strong>DoublePrecisionFloatShaderOps</strong> to <strong>{{TRUE}}</strong> in order for you to use any {{HLSL}} shader that is compiled with a double type.</p> </dd> <p>Describes which resources are supported by the current graphics driver for a given format.</p> <dd> <p> <strong>{{DXGI_FORMAT}}</strong> to return information on.</p> </dd> <dd> <p>Combination of <strong>{{D3D11_FORMAT_SUPPORT}}</strong> flags indicating which resources are supported.</p> </dd> <p>Describes which unordered resource options are supported by the current graphics driver for a given format.</p> <dd> <p> <strong>{{DXGI_FORMAT}}</strong> to return information on.</p> </dd> <dd> <p>Combination of <strong>{{D3D11_FORMAT_SUPPORT2}}</strong> flags indicating which unordered resource options are supported.</p> </dd> <p>Describes compute shader and raw and structured buffer support in the current graphics driver.</p> <p>Direct3D 11 devices ({{D3D_FEATURE_LEVEL_11_0}}) are required to support Compute Shader model 5.0. Direct3D 10.x devices ({{D3D_FEATURE_LEVEL_10_0}}, {{D3D_FEATURE_LEVEL_10_1}}) can optionally support Compute Shader model 4.0 or 4.1.</p> <dd> <p><strong>{{TRUE}}</strong> if compute shaders and raw and structured buffers are supported; otherwise <strong>{{FALSE}}</strong>.</p> </dd> <strong>Note</strong>??This structure is supported by the Direct3D 11.1 runtime, which is available on Windows?8 and later operating systems.?<p>Describes Direct3D 11.1 feature options in the current graphics driver.</p> <p>If a Microsoft Direct3D device supports feature level 11.1 (<strong>{{D3D_FEATURE_LEVEL_11_1}}</strong>), when you call <strong>{{ID3D11Device::CheckFeatureSupport}}</strong> with <strong>{{D3D11_FEATURE_D3D11_OPTIONS}}</strong>, <strong>CheckFeatureSupport</strong> returns a reference to <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS}}</strong> with all member set to <strong>{{TRUE}}</strong> except the <strong>{{SAD4ShaderInstructions}}</strong> and <strong>ExtendedDoublesShaderInstructions</strong> members, which are optionally supported by the hardware and driver and therefore can be <strong>{{TRUE}}</strong> or <strong>{{FALSE}}</strong>.</p><p>Feature level 11.1 provides the following additional features:</p><ul> <li>{{UAVs}} at every shader stage with 64 {{UAV}} bind slots instead of 8.</li> <li>Target-independent rasterization, which enables you to set the <strong>ForcedSampleCount</strong> member of <strong>{{D3D11_RASTERIZER_DESC1}}</strong> to 1, 4, 8, or 16 and to render to {{RTVs}} with a single sample.</li> <li>{{UAV}}-only rendering with the <strong>ForcedSampleCount</strong> member of <strong>{{D3D11_RASTERIZER_DESC1}}</strong> set to up to 16 (only up to 8 for feature level 11).</li> </ul><p>The runtime always sets the following groupings of members identically. That is, all the values in a grouping are <strong>{{TRUE}}</strong> or <strong>{{FALSE}}</strong> together:</p><ul> <li><strong>DiscardAPIsSeenByDriver</strong> and <strong>FlagsForUpdateAndCopySeenByDriver</strong></li> <li><strong>ClearView</strong>, <strong>CopyWithOverlap</strong>, <strong>ConstantBufferPartialUpdate</strong>, <strong>ConstantBufferOffsetting</strong>, and <strong>MapNoOverwriteOnDynamicConstantBuffer</strong></li> <li><strong>MapNoOverwriteOnDynamicBufferSRV</strong> and <strong>MultisampleRTVWithForcedSampleCountOne</strong></li> </ul> <dd> <p>Specifies whether logic operations are available in blend state. The runtime sets this member to <strong>{{TRUE}}</strong> if logic operations are available in blend state and <strong>{{FALSE}}</strong> otherwise. This member is <strong>{{FALSE}}</strong> for feature level 9.1, 9.2, and 9.3. This member is optional for feature level 10, 10.1, and 11. This member is <strong>{{TRUE}}</strong> for feature level 11.1.</p> </dd> <dd> <p>Specifies whether the driver can render with no render target views ({{RTVs}}) or depth stencil views ({{DSVs}}), and only unordered access views ({{UAVs}}) bound. The runtime sets this member to <strong>{{TRUE}}</strong> if the driver can render with no {{RTVs}} or {{DSVs}} and only {{UAVs}} bound and <strong>{{FALSE}}</strong> otherwise. If <strong>{{TRUE}}</strong>, you can set the <strong>ForcedSampleCount</strong> member of <strong>{{D3D11_RASTERIZER_DESC1}}</strong> to 1, 4, or 8 when you render with no {{RTVs}} or {{DSV}} and only {{UAVs}} bound. For feature level 11.1, this member is always <strong>{{TRUE}}</strong> and you can also set <strong>ForcedSampleCount</strong> to 16 in addition to 1, 4, or 8. The default value of <strong>ForcedSampleCount</strong> is 0, which means the same as if the value is set to 1. You can always set <strong>ForcedSampleCount</strong> to 0 or 1 for {{UAV}}-only rendering independently of how this member is set.</p> </dd> <dd> <p>Specifies whether the driver supports the <strong>{{ID3D11DeviceContext1::DiscardView}}</strong> and <strong>{{ID3D11DeviceContext1::DiscardResource}}</strong> methods. The runtime sets this member to <strong>{{TRUE}}</strong> if the driver supports these methods and <strong>{{FALSE}}</strong> otherwise. How this member is set does not indicate whether the driver actually uses these methods; that is, the driver might ignore these methods if they are not useful to the hardware. If <strong>{{FALSE}}</strong>, the runtime does not expose these methods to the driver because the driver does not support them. You can monitor this member during development to rule out legacy drivers on hardware where these methods might have otherwise been beneficial. You are not required to write separate code paths based on whether this member is <strong>{{TRUE}}</strong> or <strong>{{FALSE}}</strong>; you can call these methods whenever applicable.</p> </dd> <dd> <p>Specifies whether the driver supports new semantics for copy and update that are exposed by the <strong>{{ID3D11DeviceContext1::CopySubresourceRegion1}}</strong> and <strong>{{ID3D11DeviceContext1::UpdateSubresource1}}</strong> methods. The runtime sets this member to <strong>{{TRUE}}</strong> if the driver supports new semantics for copy and update. The runtime sets this member to <strong>{{FALSE}}</strong> only for legacy drivers. The runtime handles this member similarly to the <strong>DiscardAPIsSeenByDriver</strong> member.</p> </dd> <dd> <p>Specifies whether the driver supports the <strong>{{ID3D11DeviceContext1::ClearView}}</strong> method. The runtime sets this member to <strong>{{TRUE}}</strong> if the driver supports this method and <strong>{{FALSE}}</strong> otherwise. If <strong>{{FALSE}}</strong>, the runtime does not expose this method to the driver because the driver does not support it. </p> <strong>Note</strong>??For feature level 9.1, 9.2, and 9.3, this member is always <strong>{{TRUE}}</strong> because the option is emulated by the runtime. ? </dd> <dd> <p>Specifies whether you can call <strong>{{ID3D11DeviceContext1::CopySubresourceRegion1}}</strong> with overlapping source and destination rectangles. The runtime sets this member to <strong>{{TRUE}}</strong> if you can call <strong>CopySubresourceRegion1</strong> with overlapping source and destination rectangles and <strong>{{FALSE}}</strong> otherwise. If <strong>{{FALSE}}</strong>, the runtime does not expose this method to the driver because the driver does not support it. </p> <strong>Note</strong>??For feature level 9.1, 9.2, and 9.3, this member is always <strong>{{TRUE}}</strong> because drivers already support the option for these feature levels. ? </dd> <dd> <p>Specifies whether the driver supports partial updates of constant buffers. The runtime sets this member to <strong>{{TRUE}}</strong> if the driver supports partial updates of constant buffers and <strong>{{FALSE}}</strong> otherwise. If <strong>{{FALSE}}</strong>, the runtime does not expose this operation to the driver because the driver does not support it. </p> <strong>Note</strong>??For feature level 9.1, 9.2, and 9.3, this member is always <strong>{{TRUE}}</strong> because the option is emulated by the runtime. ? </dd> <dd> <p>Specifies whether the driver supports new semantics for setting offsets in constant buffers for a shader. The runtime sets this member to <strong>{{TRUE}}</strong> if the driver supports allowing you to specify offsets when you call new methods like the <strong>{{ID3D11DeviceContext1::VSSetConstantBuffers1}}</strong> method and <strong>{{FALSE}}</strong> otherwise. If <strong>{{FALSE}}</strong>, the runtime does not expose this operation to the driver because the driver does not support it. </p> <strong>Note</strong>??For feature level 9.1, 9.2, and 9.3, this member is always <strong>{{TRUE}}</strong> because the option is emulated by the runtime. ? </dd> <dd> <p>Specifies whether you can call <strong>{{ID3D11DeviceContext::Map}}</strong> with <strong>{{D3D11_MAP_WRITE_NO_OVERWRITE}}</strong> on a dynamic constant buffer (that is, whether the driver supports this operation). The runtime sets this member to <strong>{{TRUE}}</strong> if the driver supports this operation and <strong>{{FALSE}}</strong> otherwise. If <strong>{{FALSE}}</strong>, the runtime fails this method because the driver does not support the operation. </p> <strong>Note</strong>??For feature level 9.1, 9.2, and 9.3, this member is always <strong>{{TRUE}}</strong> because the option is emulated by the runtime. ? </dd> <dd> <p>Specifies whether you can call <strong>{{ID3D11DeviceContext::Map}}</strong> with <strong>{{D3D11_MAP_WRITE_NO_OVERWRITE}}</strong> on a dynamic buffer {{SRV}} (that is, whether the driver supports this operation). The runtime sets this member to <strong>{{TRUE}}</strong> if the driver supports this operation and <strong>{{FALSE}}</strong> otherwise. If <strong>{{FALSE}}</strong>, the runtime fails this method because the driver does not support the operation.</p> </dd> <dd> <p>Specifies whether the driver supports multisample rendering when you render with {{RTVs}} bound. If <strong>{{TRUE}}</strong>, you can set the <strong>ForcedSampleCount</strong> member of <strong>{{D3D11_RASTERIZER_DESC1}}</strong> to 1 with a multisample {{RTV}} bound. The driver can support this option on feature level 10 and higher. If <strong>{{FALSE}}</strong>, the rasterizer-state creation will fail because the driver is legacy or the feature level is too low.</p> </dd> <dd> <p>Specifies whether the hardware and driver support the <strong>msad4</strong> intrinsic function in shaders. The runtime sets this member to <strong>{{TRUE}}</strong> if the hardware and driver support calls to <strong>msad4</strong> intrinsic functions in shaders. If <strong>{{FALSE}}</strong>, the driver is legacy or the hardware does not support the option; the runtime will fail shader creation for shaders that use <strong>msad4</strong>.</p> </dd> <dd> <p>Specifies whether the hardware and driver support the <strong>fma</strong> intrinsic function and other extended doubles instructions (<strong>{{DDIV}}</strong> and <strong>{{DRCP}}</strong>) in shaders. The <strong>fma</strong> intrinsic function emits an extended doubles <strong>{{DFMA}}</strong> instruction. The runtime sets this member to <strong>{{TRUE}}</strong> if the hardware and driver support extended doubles instructions in shaders (shader model 5 and higher). Support of this option implies support of basic double-precision shader instructions as well. You can use the <strong>{{D3D11_FEATURE_DOUBLES}}</strong> value to query for support of double-precision shaders. If <strong>{{FALSE}}</strong>, the hardware and driver do not support the option; the runtime will fail shader creation for shaders that use extended doubles instructions.</p> </dd> <dd> <p>Specifies whether the hardware and driver support sharing a greater variety of Texture2D resource types and formats. The runtime sets this member to <strong>{{TRUE}}</strong> if the hardware and driver support extended Texture2D resource sharing.</p> </dd> <strong>Note</strong>??This structure is supported by the Direct3D 11.1 runtime, which is available on Windows?8 and later operating systems.?<p>Describes information about Direct3D 11.1 adapter architecture.</p> <dd> <p>Specifies whether a rendering device batches rendering commands and performs multipass rendering into tiles or bins over a render area. Certain {{API}} usage patterns that are fine for TileBasedDefferredRenderers ({{TBDRs}}) can perform worse on non-{{TBDRs}} and vice versa. Applications that are careful about rendering can be friendly to both {{TBDR}} and non-{{TBDR}} architectures. <strong>{{TRUE}}</strong> if the rendering device batches rendering commands and <strong>{{FALSE}}</strong> otherwise. </p> </dd> <strong>Note</strong>??This structure is supported by the Direct3D 11.1 runtime, which is available on Windows?8 and later operating systems.?<p>Describes Direct3D 9 feature options in the current graphics driver.</p> <dd> <p>Specifies whether the driver supports the nonpowers-of-2-unconditionally feature. For more information about this feature, see feature level. The runtime sets this member to <strong>{{TRUE}}</strong> for hardware at Direct3D 10 and higher feature levels. For hardware at Direct3D 9.3 and lower feature levels, the runtime sets this member to <strong>{{FALSE}}</strong> if the hardware and driver support the powers-of-2 (2D textures must have widths and heights specified as powers of two) feature or the nonpowers-of-2-conditionally feature. For more information about this feature, see feature level.</p> </dd> <strong>Note</strong>??This structure is supported by the Direct3D 11.1 runtime, which is available on Windows?8 and later operating systems.?<p>Describes Direct3D?9 shadow support in the current graphics driver. </p> <p>Shadows are an important element in realistic 3D scenes. You can use the shadow buffer technique to render shadows. The basic principle of the technique is to use a depth buffer to store the scene depth info from the perspective of the light source, and then compare each point rendered in the scene with that buffer to determine if it is in shadow.</p><p>To render objects into the scene with shadows on them, you create <strong>sampler state objects</strong> with comparison filtering set and the comparison mode (ComparisonFunc) to LessEqual. You can also set BorderColor addressing on this depth sampler, even though BorderColor isn't typically allowed on feature levels 9.1 and 9.2. By using the border color and picking 0.0 or 1.0 as the border color value, you can control whether the regions off the edge of the shadow map appear to be always in shadow or never in shadow respectively. You can control the shadow filter quality by the Mag and Min filter settings in the comparison sampler. Point sampling will produce shadows with non-anti-aliased edges. Linear filter sampler settings will result in higher quality shadow edges, but might affect performance on some power-optimized devices.</p><strong>Note</strong>??If you use a separate setting for Mag versus Min filter options, you produce an undefined result. Anisotropic filtering is not supported. The Mip filter choice is not relevant because feature level 9.x does not allow mipmapped depth buffers.?<strong>Note</strong>??On feature level 9.x, you can't compile a shader with the <strong>SampleCmp</strong> and <strong>SampleCmpLevelZero</strong> intrinsic functions by using older versions of the compiler. For example, you can't use the fxc.exe compiler that ships with the DirectX {{SDK}} or use the <strong>{{D3DCompile}}**</strong> functions (like <strong>{{D3DCompileFromFile}}</strong>) that are implemented in {{D3DCompiler_43}}.dll and earlier. These intrinsic functions on feature level 9.x are only supported in the fxc.exe compiler that ships with the Windows?8 {{SDK}} and later and with the <strong>{{D3DCompile}}**</strong> functions that are implemented in {{D3DCompiler_44}}.dll and later. But these intrinsic functions are present in shader models for feature levels higher than 9.x.? <dd> <p>Specifies whether the driver supports the shadowing feature with the comparison-filtering mode set to less than or equal to. The runtime sets this member to <strong>{{TRUE}}</strong> for hardware at Direct3D 10 and higher feature levels. For hardware at Direct3D 9.3 and lower feature levels, the runtime sets this member to <strong>{{TRUE}}</strong> only if the hardware and driver support the shadowing feature; otherwise <strong>{{FALSE}}</strong>. </p> </dd> <strong>Note</strong>??This structure is supported by the Direct3D 11.1 runtime, which is available on Windows?8 and later operating systems.?<p>Describes precision support options for shaders in the current graphics driver.</p> <p>For hardware at Direct3D 10 and higher feature levels, the runtime sets both members identically. For hardware at Direct3D 9.3 and lower feature levels, the runtime can set a lower precision support in the <strong>PixelShaderMinPrecision</strong> member than the <strong>AllOtherShaderStagesMinPrecision</strong> member; for 9.3 and lower, all other shader stages represent only the vertex shader.</p><p>For more info about {{HLSL}} minimum precision, see using {{HLSL}} minimum precision.</p> <dd> <p>A combination of <strong>{{D3D11_SHADER_MIN_PRECISION_SUPPORT}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies minimum precision levels that the driver supports for the pixel shader. A value of zero indicates that the driver supports only full 32-bit precision for the pixel shader.</p> </dd> <dd> <p>A combination of <strong>{{D3D11_SHADER_MIN_PRECISION_SUPPORT}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies minimum precision levels that the driver supports for all other shader stages. A value of zero indicates that the driver supports only full 32-bit precision for all other shader stages.</p> </dd> <strong>Note</strong>?? This structure is supported by the Direct3D 11.2 runtime, which is available on Windows?8.1 and later operating systems.?<p>Describes Direct3D 11.2 feature options in the current graphics driver.</p> <p> If the Direct3D {{API}} is the Direct3D 11.2 runtime and can support 11.2 features, <strong>{{ID3D11Device::CheckFeatureSupport}}</strong> for <strong>{{D3D11_FEATURE_D3D11_OPTIONS1}}</strong> will return a {{SUCCESS}} code when valid parameters are passed. The members of <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> will be set appropriately based on the system's graphics hardware and graphics driver. </p> <dd> <p> Specifies whether the hardware and driver support tiled resources. The runtime sets this member to a <strong>{{D3D11_TILED_RESOURCES_TIER}}</strong>-typed value that indicates if the hardware and driver support tiled resources and at what tier level. </p> </dd> <dd> <p> Specifies whether the hardware and driver support the filtering options (<strong>{{D3D11_FILTER}}</strong>) of comparing the result to the minimum or maximum value during texture sampling. The runtime sets this member to <strong>{{TRUE}}</strong> if the hardware and driver support these filtering options. </p> </dd> <dd> <p> Specifies whether the hardware and driver also support the <strong>{{ID3D11DeviceContext1::ClearView}}</strong> method on depth formats. For info about valid depth formats, see <strong>{{D3D11_DEPTH_STENCIL_VIEW_DESC}}</strong>. </p> </dd> <dd> <p> Specifies support for creating <strong>{{ID3D11Buffer}}</strong> resources that can be passed to the <strong>{{ID3D11DeviceContext::Map}}</strong> and <strong>{{ID3D11DeviceContext::Unmap}}</strong> methods. This means that the <strong>{{CPUAccessFlags}}</strong> member of the <strong>{{D3D11_BUFFER_DESC}}</strong> structure may be set with the desired <strong>{{D3D11_CPU_ACCESS_FLAG}}</strong> elements when the <strong>Usage</strong> member of <strong>{{D3D11_BUFFER_DESC}}</strong> is set to <strong>{{D3D11_USAGE_DEFAULT}}</strong>. The runtime sets this member to <strong>{{TRUE}}</strong> if the hardware is capable of at least <strong>{{D3D_FEATURE_LEVEL_11_0}}</strong> and the graphics device driver supports mappable default buffers. </p> </dd> <strong>Note</strong>?? This structure is supported by the Direct3D 11.2 runtime, which is available on Windows?8.1 and later operating systems.?<p>Describes whether simple instancing is supported.</p> <p> If the Direct3D {{API}} is the Direct3D 11.2 runtime and can support 11.2 features, <strong>{{ID3D11Device::CheckFeatureSupport}}</strong> for <strong>{{D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT}}</strong> will return a {{SUCCESS}} code when valid parameters are passed. The <strong>SimpleInstancingSupported</strong> member of <strong>{{D3D11_FEATURE_DATA_D3D9_SIMPLE_INSTANCING_SUPPORT}}</strong> will be set to <strong>{{TRUE}}</strong> or <strong>{{FALSE}}</strong>. </p><p> Simple instancing means that instancing is supported with the caveat that the <strong>InstanceDataStepRate</strong> member of the <strong>{{D3D11_INPUT_ELEMENT_DESC}}</strong> structure must be equal to 1. This does not change the full instancing support provided by hardware at feature level 9.3 and above, and is meant to expose the instancing support that may be available on feature level 9.2 and 9.1 hardware. </p> <dd> <p> Specifies whether the hardware and driver support simple instancing. The runtime sets this member to <strong>{{TRUE}}</strong> if the hardware and driver support simple instancing. </p> </dd> <strong>Note</strong>??This structure is supported by the Direct3D 11.2 runtime, which is available on Windows?8.1 and later operating systems.?<p>Describes whether a {{GPU}} profiling technique is supported.</p> <p>If the Direct3D {{API}} is the Direct3D 11.2 runtime and can support 11.2 features, <strong>{{ID3D11Device::CheckFeatureSupport}}</strong> for <strong>{{D3D11_FEATURE_MARKER_SUPPORT}}</strong> will return a {{SUCCESS}} code when valid parameters are passed. The <strong>Profile</strong> member of <strong>{{D3D11_FEATURE_DATA_MARKER_SUPPORT}}</strong> will be set to <strong>{{TRUE}}</strong> or <strong>{{FALSE}}</strong>.</p> <dd> <p>Specifies whether the hardware and driver support a {{GPU}} profiling technique that can be used with development tools. The runtime sets this member to <strong>{{TRUE}}</strong> if the hardware and driver support data marking.</p> </dd> <strong>Note</strong>??This structure is supported by the Direct3D 11.2 runtime, which is available on Windows?8.1 and later operating systems.?<p>Describes Direct3D 9 feature options in the current graphics driver.</p> <p>You can use the <strong>{{D3D11_FEATURE_D3D9_OPTIONS1}}</strong> enumeration value with <strong>{{ID3D11Device::CheckFeatureSupport}}</strong> to query a driver about support for Direct3D 9 feature options rather than making multiple calls to <strong>{{ID3D11Device::CheckFeatureSupport}}</strong> by using <strong>{{D3D11_FEATURE_D3D9_OPTIONS}}</strong>, <strong>{{D3D11_FEATURE_D3D9_SHADOW_SUPPORT}}</strong>, and <strong>{{D3D11_FEATURE_D3D9_SIMPLE_INSTANCING_SUPPORT}}</strong>, which provide identical info about supported Direct3D 9 feature options.</p> <dd> <p>Specifies whether the driver supports the nonpowers-of-2-unconditionally feature. For more info about this feature, see feature level. The runtime sets this member to <strong>{{TRUE}}</strong> for hardware at Direct3D 10 and higher feature levels. For hardware at Direct3D 9.3 and lower feature levels, the runtime sets this member to <strong>{{FALSE}}</strong> if the hardware and driver support the powers-of-2 (2D textures must have widths and heights specified as powers of two) feature or the nonpowers-of-2-conditionally feature. </p> </dd> <dd> <p>Specifies whether the driver supports the shadowing feature with the comparison-filtering mode set to less than or equal to. The runtime sets this member to <strong>{{TRUE}}</strong> for hardware at Direct3D 10 and higher feature levels. For hardware at Direct3D 9.3 and lower feature levels, the runtime sets this member to <strong>{{TRUE}}</strong> only if the hardware and driver support the shadowing feature; otherwise <strong>{{FALSE}}</strong>. </p> </dd> <dd> <p>Specifies whether the hardware and driver support simple instancing. The runtime sets this member to <strong>{{TRUE}}</strong> if the hardware and driver support simple instancing.</p> </dd> <dd> <p>Specifies whether the hardware and driver support setting a single face of a <strong>TextureCube</strong> as a render target while the depth stencil surface that is bound alongside can be a <strong>Texture2D</strong> (as opposed to <strong>TextureCube</strong>). The runtime sets this member to <strong>{{TRUE}}</strong> if the hardware and driver support this feature; otherwise <strong>{{FALSE}}</strong>.</p> <p>If the hardware and driver don't support this feature, the app must match the render target surface type with the depth stencil surface type. Because hardware at Direct3D 9.3 and lower feature levels doesn't allow <strong>TextureCube</strong> depth surfaces, the only way to render a scene into a <strong>TextureCube</strong> while having depth buffering enabled is to render each <strong>TextureCube</strong> face separately to a <strong>Texture2D</strong> render target first (because that can be matched with a <strong>Texture2D</strong> depth), and then copy the results into the <strong>TextureCube</strong>. If the hardware and driver support this feature, the app can just render to the <strong>TextureCube</strong> faces directly while getting depth buffering out of a <strong>Texture2D</strong> depth buffer.</p> <p>You only need to query this feature from hardware at Direct3D 9.3 and lower feature levels because hardware at Direct3D 10.0 and higher feature levels allow <strong>TextureCube</strong> depth surfaces.</p> </dd> <p>Describes Direct3D 11.3 feature options in the current graphics driver.</p> <dd> <p> Whether to use the {{VP}} and {{RT}} array index from any shader feeding the rasterizer. </p> </dd> <p> Describes feature data {{GPU}} virtual address support, including maximum address bits per resource and per process. </p> <p> See <strong>{{D3D11_FEATURE}}</strong>. </p> <dd> <p> The maximum {{GPU}} virtual address bits per resource. </p> </dd> <dd> <p> The maximum {{GPU}} virtual address bits per process. </p> </dd> <p>Stencil operations that can be performed based on the results of stencil test.</p> <p>All stencil operations are specified as a <strong>{{D3D11_STENCIL_OP}}</strong>. The stencil operation can be set differently based on the outcome of the stencil test (which is referred to as <strong>StencilFunc</strong> in the stencil test portion of depth-stencil testing.</p><p>This structure is a member of a <strong>depth-stencil description</strong>. </p> <dd> <p>The stencil operation to perform when stencil testing fails.</p> </dd> <dd> <p>The stencil operation to perform when stencil testing passes and depth testing fails.</p> </dd> <dd> <p>The stencil operation to perform when stencil testing and depth testing both pass.</p> </dd> <dd> <p>A function that compares stencil data against existing stencil data. The function options are listed in <strong>{{D3D11_COMPARISON_FUNC}}</strong>.</p> </dd> <p>Describes a video stream for a Microsoft Direct3D?11 video decoder or video processor. </p> <dd> <p>The decoding profile. To get the list of profiles supported by the device, call the <strong>{{ID3D11VideoDevice::GetVideoDecoderProfile}}</strong> method.</p> </dd> <dd> <p>The width of the video frame, in pixels. </p> </dd> <dd> <p>The height of the video frame, in pixels. </p> </dd> <dd> <p>The output surface format, specified as a <strong>{{DXGI_FORMAT}}</strong> value.</p> </dd> <p>Describes the configuration of a Microsoft Direct3D?11 decoder device for DirectX Video Acceleration ({{DXVA}}). </p> <dd> <p>If the bitstream data buffers are encrypted using the {{D3D11CryptoSession}} mechanism, this {{GUID}} should be set to zero. If no encryption is applied, the value is <strong>{{DXVA_NoEncrypt}}</strong>. If <strong>ConfigBitstreamRaw</strong> is 0, the value must be <strong>{{DXVA_NoEncrypt}}</strong>. </p> </dd> <dd> <p>If the macroblock control data buffers are encrypted using the {{D3D11CryptoSession}} mechanism, this {{GUID}} should be set to zero. If no encryption is applied, the value is <strong>{{DXVA_NoEncrypt}}</strong>. If <strong>ConfigBitstreamRaw</strong> is 1, the value must be <strong>{{DXVA_NoEncrypt}}</strong>. </p> </dd> <dd> <p>If the residual difference decoding data buffers are encrypted using the {{D3D11CryptoSession}} mechanism, this {{GUID}} should be set to zero. If no encryption is applied, the value is <strong>{{DXVA_NoEncrypt}}</strong>. If <strong>ConfigBitstreamRaw</strong> is 1, the value must be <strong>{{DXVA_NoEncrypt}}</strong>. </p> </dd> <dd> <p>Indicates whether the host-decoder sends raw bit-stream data. If the value is 1, the data for the pictures will be sent in bit-stream buffers as raw bit-stream content. If the value is 0, picture data will be sent using macroblock control command buffers. If either <strong>ConfigResidDiffHost</strong> or <strong>ConfigResidDiffAccelerator</strong> is 1, the value must be 0. </p> </dd> <dd> <p>Specifies whether macroblock control commands are in raster scan order or in arbitrary order. If the value is 1, the macroblock control commands within each macroblock control command buffer are in raster-scan order. If the value is 0, the order is arbitrary. For some types of bit streams, forcing raster order either greatly increases the number of required macroblock control buffers that must be processed, or requires host reordering of the control information. Therefore, supporting arbitrary order can be more efficient. </p> </dd> <dd> <p>Contains the host residual difference configuration. If the value is 1, some residual difference decoding data may be sent as blocks in the spatial domain from the host. If the value is 0, spatial domain data will not be sent. </p> </dd> <dd> <p>Indicates the word size used to represent residual difference spatial-domain blocks for predicted (non-intra) pictures when using host-based residual difference decoding. </p> <p>If <strong>ConfigResidDiffHost</strong> is 1 and <strong>ConfigSpatialResid8</strong> is 1, the host will send residual difference spatial-domain blocks for non-intra macroblocks using 8-bit signed samples and for intra macroblocks in predicted (non-intra) pictures in a format that depends on the value of <strong>ConfigIntraResidUnsigned</strong>: </p> <ul> <li> If <strong>ConfigIntraResidUnsigned</strong> is 0, spatial-domain blocks for intra macroblocks are sent as 8-bit signed integer values relative to a constant reference value of 2^({{BPP}}?1). </li> <li> If <strong>ConfigIntraResidUnsigned</strong> is 1, spatial-domain blocks for intra macroblocks are sent as 8-bit unsigned integer values relative to a constant reference value of 0. </li> </ul> <p> If <strong>ConfigResidDiffHost</strong> is 1 and <strong>ConfigSpatialResid8</strong> is 0, the host will send residual difference spatial-domain blocks of data for non-intra macroblocks using 16-bit signed samples and for intra macroblocks in predicted (non-intra) pictures in a format that depends on the value of <strong>ConfigIntraResidUnsigned</strong>: </p> <ul> <li> If <strong>ConfigIntraResidUnsigned</strong> is 0, spatial domain blocks for intra macroblocks are sent as 16-bit signed integer values relative to a constant reference value of 2^({{BPP}}?1). </li> <li> If <strong>ConfigIntraResidUnsigned</strong> is 1, spatial domain blocks for intra macroblocks are sent as 16-bit unsigned integer values relative to a constant reference value of 0. </li> </ul> <p> If <strong>ConfigResidDiffHost</strong> is 0, <strong>ConfigSpatialResid8</strong> must be 0. </p> <p> For intra pictures, spatial-domain blocks must be sent using 8-bit samples if bits-per-pixel ({{BPP}}) is 8, and using 16-bit samples if {{BPP}} &gt; 8. If <strong>ConfigIntraResidUnsigned</strong> is 0, these samples are sent as signed integer values relative to a constant reference value of 2^({{BPP}}?1), and if <strong>ConfigIntraResidUnsigned</strong> is 1, these samples are sent as unsigned integer values relative to a constant reference value of 0. </p> </dd> <dd> <p> If the value is 1, 8-bit difference overflow blocks are subtracted rather than added. The value must be 0 unless <strong>ConfigSpatialResid8</strong> is 1. </p> <p> The ability to subtract differences rather than add them enables 8-bit difference decoding to be fully compliant with the full ?255 range of values required in video decoder specifications, because +255 cannot be represented as the addition of two signed 8-bit numbers, but any number in the range ?255 can be represented as the difference between two signed 8-bit numbers (+255 = +127 minus ?128).</p> </dd> <dd> <p> If the value is 1, spatial-domain blocks for intra macroblocks must be clipped to an 8-bit range on the host and spatial-domain blocks for non-intra macroblocks must be clipped to a 9-bit range on the host. If the value is 0, no such clipping is necessary by the host. </p> <p> The value must be 0 unless <strong>ConfigSpatialResid8</strong> is 0 and <strong>ConfigResidDiffHost</strong> is 1. </p> </dd> <dd> <p> If the value is 1, any spatial-domain residual difference data must be sent in a chrominance-interleaved form matching the {{YUV}} format chrominance interleaving pattern. The value must be 0 unless <strong>ConfigResidDiffHost</strong> is 1 and the {{YUV}} format is {{NV12}} or {{NV21}}. </p> </dd> <dd> <p> Indicates the method of representation of spatial-domain blocks of residual difference data for intra blocks when using host-based difference decoding. </p> <p> If <strong>ConfigResidDiffHost</strong> is 1 and <strong>ConfigIntraResidUnsigned</strong> is 0, spatial-domain residual difference data blocks for intra macroblocks must be sent as follows: </p> <ul> <li> In a non-intra picture, if <strong>ConfigSpatialResid8</strong> is 0, the spatial-domain residual difference data blocks for intra macroblocks are sent as 16-bit signed integer values relative to a constant reference value of 2^({{BPP}}?1). </li> <li> In a non-intra picture, if <strong>ConfigSpatialResid8</strong> is 1, the spatial-domain residual difference data blocks for intra macroblocks are sent as 8-bit signed integer values relative to a constant reference value of 2^({{BPP}}?1). </li> <li> In an intra picture, if {{BPP}} is 8, the spatial-domain residual difference data blocks for intra macroblocks are sent as 8-bit signed integer values relative to a constant reference value of 2^({{BPP}}?1), regardless of the value of <strong>ConfigSpatialResid8</strong>. </li> </ul> <p> If <strong>ConfigResidDiffHost</strong> is 1 and <strong>ConfigIntraResidUnsigned</strong> is 1, spatial-domain residual difference data blocks for intra macroblocks must be sent as follows: </p> <ul> <li> In a non-intra picture, if <strong>ConfigSpatialResid8</strong> is 0, the spatial-domain residual difference data blocks for intra macroblocks must be sent as 16-bit unsigned integer values relative to a constant reference value of 0. </li> <li> In a non-intra picture, if <strong>ConfigSpatialResid8</strong> is 1, the spatial-domain residual difference data blocks for intra macroblocks are sent as 8-bit unsigned integer values relative to a constant reference value of 0. </li> <li> In an intra picture, if {{BPP}} is 8, the spatial-domain residual difference data blocks for intra macroblocks are sent as 8-bit unsigned integer values relative to a constant reference value of 0, regardless of the value of <strong>ConfigSpatialResid8</strong>. </li> </ul> <p> The value of the member must be 0 unless <strong>ConfigResidDiffHost</strong> is 1. </p> </dd> <dd> <p> If the value is 1, transform-domain blocks of coefficient data may be sent from the host for accelerator-based {{IDCT}}. If the value is 0, accelerator-based {{IDCT}} will not be used. If both <strong>ConfigResidDiffHost</strong> and <strong>ConfigResidDiffAccelerator</strong> are 1, this indicates that some residual difference decoding will be done on the host and some on the accelerator, as indicated by macroblock-level control commands. </p> <p> The value must be 0 if <strong>ConfigBitstreamRaw</strong> is 1. </p> </dd> <dd> <p> If the value is 1, the inverse scan for transform-domain block processing will be performed on the host, and absolute indices will be sent instead for any transform coefficients. If the value is 0, the inverse scan will be performed on the accelerator. </p> <p> The value must be 0 if <strong>ConfigResidDiffAccelerator</strong> is 0 or if <strong>Config4GroupedCoefs</strong> is 1. </p> </dd> <dd> <p> If the value is 1, the {{IDCT}} specified in Annex W of {{ITU}}-T Recommendation H.263 is used. If the value is 0, any compliant {{IDCT}} can be used for off-host {{IDCT}}. </p> <p> The H.263 annex does not comply with the {{IDCT}} requirements of {{MPEG}}-2 corrigendum 2, so the value must not be 1 for use with {{MPEG}}-2 video. </p> <p> The value must be 0 if <strong>ConfigResidDiffAccelerator</strong> is 0, indicating purely host-based residual difference decoding. </p> </dd> <dd> <p> If the value is 1, transform coefficients for off-host {{IDCT}} will be sent using the <strong>{{DXVA_TCoef4Group}}</strong> structure. If the value is 0, the <strong>{{DXVA_TCoefSingle}}</strong> structure is used. The value must be 0 if <strong>ConfigResidDiffAccelerator</strong> is 0 or if <strong>ConfigHostInverseScan</strong> is 1. </p> </dd> <dd> <p> Specifies how many frames the decoder device processes at any one time. </p> </dd> <dd> <p> Contains decoder-specific configuration information. </p> </dd> <p>Contains an initialization vector ({{IV}}) for 128-bit Advanced Encryption Standard {{CTR}} mode ({{AES}}-{{CTR}}) block cipher encryption. </p> <dd> <p>The {{IV}}, in big-endian format.</p> </dd> <dd> <p>The block count, in big-endian format.</p> </dd> <p>Specifies which bytes in a video surface are encrypted. </p> <dd> <p>The number of bytes that are encrypted at the start of the buffer. </p> </dd> <dd> <p>The number of bytes that are skipped after the first <strong>NumEncryptedBytesAtBeginning</strong> bytes, and then after each block of <strong>NumBytesInEncryptPattern</strong> bytes. Skipped bytes are not encrypted. </p> </dd> <dd> <p>The number of bytes that are encrypted after each block of skipped bytes.</p> </dd> <p>Describes a compressed buffer for decoding.</p> <dd> <p>The type of buffer, specified as a member of the <strong>{{D3D11_VIDEO_DECODER_BUFFER_TYPE}}</strong> enumeration.</p> </dd> <dd> <p>Reserved.</p> </dd> <dd> <p>The offset of the relevant data from the beginning of the buffer, in bytes. This value must be zero. </p> </dd> <dd> <p>The macroblock address of the first macroblock in the buffer. The macroblock address is given in raster scan order. </p> </dd> <dd> <p>The number of macroblocks of data in the buffer. This count includes skipped macroblocks. </p> </dd> <dd> <p>Reserved. Set to zero.</p> </dd> <dd> <p>Reserved. Set to zero.</p> </dd> <dd> <p>Reserved. Set to zero.</p> </dd> <dd> <p>Reserved. Set to zero.</p> </dd> <dd> <p>A reference to a buffer that contains an initialization vector ({{IV}}) for encrypted data. If the decode buffer does not contain encrypted data, set this member to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>The size of the buffer specified in the <strong>pIV</strong> parameter. If <strong>pIV</strong> is <strong>{{NULL}}</strong>, set this member to zero.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, the video surfaces are partially encrypted.</p> </dd> <dd> <p>A <strong>{{D3D11_ENCRYPTED_BLOCK_INFO}}</strong> structure that specifies which bytes of the surface are encrypted.</p> </dd> <p>Contains driver-specific data for the <strong>{{ID3D11VideoContext::DecoderExtension}}</strong> method.</p> <p>The exact meaning of each structure member depends on the value of <strong>Function</strong>.</p> <p>Describes the capabilities of a Microsoft Direct3D?11 video processor.</p> <p>The video processor stores state information for each input stream. These states persist between blits. With each blit, the application selects which streams to enable or disable. Disabling a stream does not affect the state information for that stream.</p><p>The <strong>MaxStreamStates</strong> member gives the maximum number of stream states that can be saved. The <strong>MaxInputStreams</strong> member gives the maximum number of streams that can be enabled during a blit. These two values can differ. </p> <dd> <p>A bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{D3D11_VIDEO_PROCESSOR_DEVICE_CAPS}}</strong> enumeration.</p> </dd> <dd> <p>A bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{D3D11_VIDEO_PROCESSOR_FEATURE_CAPS}}</strong> enumeration.</p> </dd> <dd> <p>A bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{D3D11_VIDEO_PROCESSPR_FILTER_CAPS}}</strong> enumeration.</p> </dd> <dd> <p>A bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{D3D11_VIDEO_PROCESSOR_FORMAT_CAPS}}</strong> enumeration.</p> </dd> <dd> <p>A bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS}}</strong> enumeration.</p> </dd> <dd> <p>A bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_CAPS}}</strong> enumeration.</p> </dd> <dd> <p>The number of frame-rate conversion capabilities. To enumerate the frame-rate conversion capabilities, call the <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorRateConversionCaps}}</strong> method.</p> </dd> <dd> <p>The maximum number of input streams that can be enabled at the same time. </p> </dd> <dd> <p>The maximum number of input streams for which the device can store state data.</p> </dd> <p>Defines a group of video processor capabilities that are associated with frame-rate conversion, including deinterlacing and inverse telecine.</p> <dd> <p>The number of past reference frames required to perform the optimal video processing. </p> </dd> <dd> <p>The number of future reference frames required to perform the optimal video processing. </p> </dd> <dd> <p>A bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{D3D11_VIDEO_PROCESSOR_PROCESSOR_CAPS}}</strong> enumeration. </p> </dd> <dd> <p>A bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{D3D11_VIDEO_PROCESSOR_ITELECINE_CAPS}}</strong> enumeration. </p> </dd> <dd> <p>The number of custom frame rates that the driver supports. To get the list of custom frame rates, call the <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCustomRate}}</strong> method.</p> </dd> <p>Describes the content-protection capabilities of a graphics driver.</p> <dd> <p>A bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{D3D11_CONTENT_PROTECTION_CAPS}}</strong> enumeration.</p> </dd> <dd> <p>The number of cryptographic key-exchange types that are supported by the driver. To get the list of key-exchange types, call the <strong>{{ID3D11VideoDevice::CheckCryptoKeyExchange}}</strong> method.</p> </dd> <dd> <p>The encyrption block size, in bytes. The size of data to be encrypted must be a multiple of this value. </p> </dd> <dd> <p>The total amount of memory, in bytes, that can be used to hold protected surfaces.</p> </dd> <p>Specifies a custom rate for frame-rate conversion or inverse telecine ({{IVTC}}). </p> <p>The <strong>CustomRate</strong> member gives the rate conversion factor, while the remaining members define the pattern of input and output samples.</p> <dd> <p>The ratio of the output frame rate to the input frame rate, expressed as a <strong>{{DXGI_RATIONAL}}</strong> structure that holds a rational number. </p> </dd> <dd> <p>The number of output frames that will be generated for every <em>N</em> input samples, where <em>N</em> = <strong>InputFramesOrFields</strong>. </p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, the input stream must be interlaced. Otherwise, the input stream must be progressive. </p> </dd> <dd> <p>The number of input fields or frames for every <em>N</em> output frames that will be generated, where <em>N</em> = <strong>OutputFrames</strong>. </p> </dd> <p>Defines the range of supported values for an image filter. </p> <p>The multiplier enables the filter range to have a fractional step value.</p><p>For example, a hue filter might have an actual range of [?180.0 ... +180.0] with a step size of 0.25. The device would report the following range and multiplier:</p><ul> <li>Minimum: ?720</li> <li>Maximum: +720</li> <li>Multiplier: 0.25</li> </ul><p>In this case, a filter value of 2 would be interpreted by the device as 0.50 (or 2 ? 0.25).</p><p>The device should use a multiplier that can be represented exactly as a base-2 fraction.</p> <dd> <p>The minimum value of the filter. </p> </dd> <dd> <p>The maximum value of the filter. </p> </dd> <dd> <p>The default value of the filter. </p> </dd> <dd> <p>A multiplier. Use the following formula to translate the filter setting into the actual filter value: <em>Actual Value</em> = <em>Set Value</em>???<em>Multiplier</em>.</p> </dd> <p>Describes a video stream for a video processor.</p> <dd> <p>A member of the <strong>{{D3D11_VIDEO_FRAME_FORMAT}}</strong> enumeration that describes how the video stream is interlaced.</p> </dd> <dd> <p>The frame rate of the input video stream, specified as a <strong>{{DXGI_RATIONAL}}</strong> structure. </p> </dd> <dd> <p>The width of the input frames, in pixels.</p> </dd> <dd> <p>The height of the input frames, in pixels.</p> </dd> <dd> <p>The frame rate of the output video stream, specified as a <strong>{{DXGI_RATIONAL}}</strong> structure. </p> </dd> <dd> <p>The width of the output frames, in pixels. </p> </dd> <dd> <p>The height of the output frames, in pixels.</p> </dd> <dd> <p>A member of the <strong>{{D3D11_VIDEO_USAGE}}</strong> enumeration that describes how the video processor will be used. The value indicates the desired trade-off between speed and video quality. The driver uses this flag as a hint when it creates the video processor.</p> </dd> <p>Specifies an {{RGB}} color value. </p> <p>The {{RGB}} values have a nominal range of [0...1]. For an {{RGB}} format with <em>n</em> bits per channel, the value of each color component is calculated as follows:</p><p><code>val = f * ((1 &lt;&lt; n)-1)</code></p><p>For example, for {{RGB}}-32 (8 bits per channel), <code>val = {{BYTE}}(f * 255.0)</code>.</p> <dd> <p>The red value.</p> </dd> <dd> <p>The green value.</p> </dd> <dd> <p>The blue value.</p> </dd> <dd> <p>The alpha value. Values range from 0 (transparent) to 1 (opaque). </p> </dd> <p>Defines a color value for Microsoft Direct3D?11 video.</p> <p>The anonymous union can represent both {{RGB}} and {{YCbCr}} colors. The interpretation of the union depends on the context. </p> <dd> <p>A <strong>{{D3D11_VIDEO_COLOR_YCbCrA}}</strong> structure that contains a {{YCbCr}} color value. </p> </dd> <dd> <p>A <strong>{{D3D11_VIDEO_COLOR_RGBA}}</strong> structure that contains an {{RGB}} color value. </p> </dd> <p>Specifies the color space for video processing.</p> <p>The <strong>{{RGB_Range}}</strong> member applies to {{RGB}} output, while the <strong>{{YCbCr_Matrix}}</strong> and <strong>{{YCbCr_xvYCC}}</strong> members apply to {{YCbCr}} output. If the driver performs color-space conversion on the background color, it uses the values that apply to both color spaces. </p><p>If the driver supports extended {{YCbCr}} (xvYCC), it returns the <strong>{{D3D11_VIDEO_PROCESSOR_DEVICE_CAPS_xvYCC}}</strong> capabilities flag in the <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> method. Otherwise, the driver ignores the value of <strong>{{YCbCr_xvYCC}}</strong> and treats all {{YCbCr}} output as conventional {{YCbCr}}. </p><p>If extended {{YCbCr}} is supported, it can be used with either transfer matrix. Extended {{YCbCr}} does not change the black point or white point?the black point is still 16 and the white point is still 235. However, extended {{YCbCr}} explicitly allows blacker-than-black values in the range 1?15, and whiter-than-white values in the range 236?254. When extended {{YCbCr}} is used, the driver should not clip the luma values to the nominal 16?235 range.</p> <dd> <p>Specifies whether the output is intended for playback or video processing (such as editing or authoring). The device can optimize the processing based on the type. The default state value is 0 (playback). </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0</dt> </dl> </td><td> <p>Playback</p> </td></tr> <tr><td> <dl> <dt>1</dt> </dl> </td><td> <p>Video processing</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Specifies the {{RGB}} color range. The default state value is 0 (full range). </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0</dt> </dl> </td><td> <p>Full range (0-255)</p> </td></tr> <tr><td> <dl> <dt>1</dt> </dl> </td><td> <p>Limited range (16-235)</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Specifies the {{YCbCr}} transfer matrix. The default state value is 0 ({{BT}}.601). </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0</dt> </dl> </td><td> <p>{{ITU}}-R {{BT}}.601</p> </td></tr> <tr><td> <dl> <dt>1</dt> </dl> </td><td> <p>{{ITU}}-R {{BT}}.709</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Specifies whether the output uses conventional {{YCbCr}} or extended {{YCbCr}} (xvYCC). The default state value is zero (conventional {{YCbCr}}). </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0</dt> </dl> </td><td> <p>Conventional {{YCbCr}}</p> </td></tr> <tr><td> <dl> <dt>1</dt> </dl> </td><td> <p>Extended {{YCbCr}} (xvYCC)</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Specifies the <strong>{{D3D11_VIDEO_PROCESSOR_NOMINAL_RANGE}}</strong>. </p> <p>Introduced in Windows?8.1.</p> </dd> <dd> <p>Reserved. Set to zero.</p> </dd> <p>Contains stream-level data for the <strong>{{ID3D11VideoContext::VideoProcessorBlt}}</strong> method. </p> <p>If the stereo 3D format is <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_SEPARATE}}</strong>, the <strong>ppPastSurfaces</strong>, <strong>pInputSurface</strong>, and <strong>ppFutureSurfaces</strong> members contain the left view.</p> <p>Contains a Message Authentication Code ({{MAC}}). </p> <dd> <p>A byte array that contains the cryptographic {{MAC}} value of the message.</p> </dd> <p>Contains input data for the <strong>{{ID3D11VideoContext::QueryAuthenticatedChannel}}</strong> method. </p> <p>Contains a response from the <strong>{{ID3D11VideoContext::QueryAuthenticatedChannel}}</strong> method.</p> <p>Specifies the protection level for video content.</p> <dd> <dl> <dt><strong>ProtectionEnabled</strong></dt> <dd> <p>If 1, video content protection is enabled. </p> </dd> <dt><strong>OverlayOrFullscreenRequired</strong></dt> <dd> <p>If 1, the application requires video to be displayed using either a hardware overlay or full-screen exclusive mode.</p> </dd> <dt><strong>Reserved </strong></dt> <dd> <p>Reserved. Set all bits to zero. </p> </dd> </dl> </dd> <dd> <p>Use this member to access all of the bits in the union. </p> </dd> <p>Contains the response to a <strong>{{D3D11_AUTHENTICATED_QUERY_PROTECTION}}</strong> query. </p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_QUERY_OUTPUT}}</strong> structure that contains a Message Authentication Code ({{MAC}}) and other data. </p> </dd> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_PROTECTION_FLAGS}}</strong> union that specifies the protection level. </p> </dd> <p>Contains the response to a <strong>{{D3D11_AUTHENTICATED_QUERY_CHANNEL_TYPE}}</strong> query.</p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_QUERY_OUTPUT}}</strong> structure that contains a Message Authentication Code ({{MAC}}) and other data.</p> </dd> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_CHANNEL_TYPE}}</strong> value that specifies the channel type. </p> </dd> <p>Contains the response to a <strong>{{D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE}}</strong> query. </p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_QUERY_OUTPUT}}</strong> structure that contains a Message Authentication Code ({{MAC}}) and other data. </p> </dd> <dd> <p>A handle to the device. </p> </dd> <p>Contains input data for a <strong>{{D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION}}</strong> query. </p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_QUERY_INPUT}}</strong> structure that contains the {{GUID}} for the query and other data.</p> </dd> <dd> <p>A handle to a decoder device.</p> </dd> <p>Contains the response to a <strong>{{D3D11_AUTHENTICATED_QUERY_CRYPTO_SESSION}}</strong> query. </p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_QUERY_OUTPUT}}</strong> structure that contains a Message Authentication Code ({{MAC}}) and other data.</p> </dd> <dd> <p>A handle to a decoder device.</p> </dd> <dd> <p>A handle to the cryptographic session that is associated with the decoder device.</p> </dd> <dd> <p>A handle to the Direct3D device that is associated with the decoder device.</p> </dd> <p>Contains the response to a <strong>{{D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS_COUNT}}</strong> query.</p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_QUERY_OUTPUT}}</strong> structure that contains a Message Authentication Code ({{MAC}}) and other data.</p> </dd> <dd> <p>The number of processes that are allowed to open shared resources that have restricted access. A process cannot open such a resource unless the process has been granted access. </p> </dd> <p>Contains input data for a <strong>{{D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS}}</strong> query.</p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_QUERY_INPUT}}</strong> structure that contains the {{GUID}} for the query and other data.</p> </dd> <dd> <p>The index of the process. </p> </dd> <p>Contains the response to a <strong>{{D3D11_AUTHENTICATED_QUERY_RESTRICTED_SHARED_RESOURCE_PROCESS}}</strong> query.</p> <p>The Desktop Window Manager ({{DWM}}) process is identified by setting <strong>ProcessIdentifier</strong> equal to <strong>{{D3D11_PROCESSIDTYPE_DWM}}</strong>. Other processes are identified by setting the process handle in <strong>ProcessHandle</strong> and setting <strong>ProcessIdentifier</strong> equal to <strong>{{D3D11_PROCESSIDTYPE_HANDLE}}</strong>.</p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_QUERY_OUTPUT}}</strong> structure that contains a Message Authentication Code ({{MAC}}) and other data.</p> </dd> <dd> <p>The index of the process in the list of processes.</p> </dd> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE}}</strong> value that specifies the type of process.</p> </dd> <dd> <p>A process handle. If the <strong>ProcessIdentifier</strong> member equals <strong>{{D3D11_PROCESSIDTYPE_HANDLE}}</strong>, the <strong>ProcessHandle</strong> member contains a valid handle to a process. Otherwise, this member is ignored.</p> </dd> <p>Contains the response to a <strong>{{D3D11_AUTHENTICATED_QUERY_UNRESTRICTED_PROTECTED_SHARED_RESOURCE_COUNT}}</strong> query.</p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_QUERY_OUTPUT}}</strong> structure that contains a Message Authentication Code ({{MAC}}) and other data.</p> </dd> <dd> <p>The number of protected, shared resources that can be opened by any process without restrictions.</p> </dd> <p>Contains input data for a <strong>{{D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT}}</strong> query.</p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_QUERY_INPUT}}</strong> structure that contains the {{GUID}} for the query and other data.</p> </dd> <dd> <p>A handle to the device.</p> </dd> <dd> <p>A handle to the cryptographic session.</p> </dd> <p>Contains the response to a <strong>{{D3D11_AUTHENTICATED_QUERY_OUTPUT_ID_COUNT}}</strong> query.</p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_QUERY_OUTPUT}}</strong> structure that contains a Message Authentication Code ({{MAC}}) and other data.</p> </dd> <dd> <p>A handle to the device.</p> </dd> <dd> <p>A handle to the cryptographic session.</p> </dd> <dd> <p>The number of output {{IDs}} associated with the specified device and cryptographic session.</p> </dd> <p>Contains input data for a <strong>{{D3D11_AUTHENTICATED_QUERY_OUTPUT_ID}}</strong> query.</p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_QUERY_INPUT}}</strong> structure that contains the {{GUID}} for the query and other data.</p> </dd> <dd> <p>A handle to the device.</p> </dd> <dd> <p>A handle to the cryptographic session.</p> </dd> <dd> <p>The index of the output {{ID}}.</p> </dd> <p>Contains the response to a <strong>{{D3D11_AUTHENTICATED_QUERY_OUTPUT_ID}}</strong> query.</p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_QUERY_OUTPUT}}</strong> structure that contains a Message Authentication Code ({{MAC}}) and other data.</p> </dd> <dd> <p>A handle to the device.</p> </dd> <dd> <p>A handle to the cryptographic session.</p> </dd> <dd> <p>The index of the output {{ID}}.</p> </dd> <dd> <p>An output {{ID}} that is associated with the specified device and cryptographic session.</p> </dd> <p>Contains the response to a <strong>{{D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID_COUNT}}</strong> query.</p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_QUERY_OUTPUT}}</strong> structure that contains a Message Authentication Code ({{MAC}}) and other data.</p> </dd> <dd> <p>The number of encryption {{GUIDs}}. </p> </dd> <p>Contains input data for a <strong>{{D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID}}</strong> query.</p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_QUERY_INPUT}}</strong> structure that contains the {{GUID}} for the query and other data.</p> </dd> <dd> <p>The index of the encryption {{GUID}}. </p> </dd> <p>Contains the response to a <strong>{{D3D11_AUTHENTICATED_QUERY_ENCRYPTION_WHEN_ACCESSIBLE_GUID}}</strong> query.</p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_QUERY_OUTPUT}}</strong> structure that contains a Message Authentication Code ({{MAC}}) and other data.</p> </dd> <dd> <p>The index of the encryption {{GUID}}.</p> </dd> <dd> <p>A {{GUID}} that specifies a supported encryption type.</p> </dd> <p>Contains the response to a <strong>{{D3D11_AUTHENTICATED_QUERY_CURRENT_ENCRYPTION_WHEN_ACCESSIBLE}} </strong>query.</p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_QUERY_OUTPUT}}</strong> structure that contains a Message Authentication Code ({{MAC}}) and other data.</p> </dd> <dd> <p>A {{GUID}} that specifies the current encryption type. </p> </dd> <p>Contains input data for the <strong>{{ID3D11VideoContext::ConfigureAuthenticatedChannel}}</strong> method.</p> <p>Contains the response from the <strong>{{ID3D11VideoContext::ConfigureAuthenticatedChannel}}</strong> method.</p> <p>Contains input data for a <strong>{{D3D11_AUTHENTICATED_CONFIGURE_INITIALIZE}}</strong> command.</p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_CONFIGURE_INPUT}}</strong> structure that contains the command {{GUID}} and other data. </p> </dd> <dd> <p>The initial sequence number for queries.</p> </dd> <dd> <p>The initial sequence number for commands.</p> </dd> <p>Contains input data for a <strong>{{D3D11_AUTHENTICATED_CONFIGURE_PROTECTION}}</strong> command.</p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_CONFIGURE_INPUT}}</strong> structure that contains the command {{GUID}} and other data. </p> </dd> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_PROTECTION_FLAGS}}</strong> union that specifies the protection level.</p> </dd> <p>Contains input data for a <strong>{{D3D11_AUTHENTICATED_CONFIGURE_CRYPTO_SESSION}}</strong> command.</p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_CONFIGURE_INPUT}}</strong> structure that contains the command {{GUID}} and other data. </p> </dd> <dd> <p>A handle to the decoder device. Get this from <strong>{{ID3D11VideoDecoder::GetDriverHandle}}</strong>.</p> </dd> <dd> <p>A handle to the cryptographic session. Get this from <strong>{{ID3D11CryptoSession::GetCryptoSessionHandle}}</strong>.</p> </dd> <dd> <p>A handle to the Direct3D device. Get this from <strong>{{D3D11VideoContext::QueryAuthenticatedChannel}}</strong> using <strong>{{D3D11_AUTHENTICATED_QUERY_DEVICE_HANDLE}}</strong>. </p> </dd> <p>Contains input data for a <strong>{{D3D11_AUTHENTICATED_CONFIGURE_SHARED_RESOURCE}}</strong> command.</p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_CONFIGURE_INPUT}}</strong> structure that contains the command {{GUID}} and other data. </p> </dd> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_PROCESS_IDENTIFIER_TYPE}}</strong> value that specifies the type of process. To specify the Desktop Window Manager ({{DWM}}) process, set this member to <strong>{{D3D11_PROCESSIDTYPE_DWM}}</strong>. Otherwise, set this member to <strong>{{D3D11_PROCESSIDTYPE_HANDLE}}</strong> and set the <strong>ProcessHandle</strong> member to a valid handle.</p> </dd> <dd> <p>A process handle. If the <strong>ProcessType</strong> member equals <strong>{{D3D11_PROCESSIDTYPE_HANDLE}}</strong>, the <strong>ProcessHandle</strong> member specifies a handle to a process. Otherwise, the value is ignored.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, the specified process has access to restricted shared resources.</p> </dd> <p>Contains input data for a <strong>{{D3D11_AUTHENTICATED_CONFIGURE_ENCRYPTION_WHEN_ACCESSIBLE}}</strong> command.</p> <dd> <p>A <strong>{{D3D11_AUTHENTICATED_CONFIGURE_INPUT}}</strong> structure that contains the command {{GUID}} and other data. </p> </dd> <dd> <p>A {{GUID}} that specifies the type of encryption to apply.</p> </dd> <p>Identifies the texture resource for a video decoder output view.</p> <dd> <p>The zero-based index of the texture.</p> </dd> <p>Describes a video decoder output view.</p> <dd> <p>The decoding profile. To get the list of profiles supported by the device, call the <strong>{{ID3D11VideoDevice::GetVideoDecoderProfile}}</strong> method.</p> </dd> <dd> <p>The resource type of the view, specified as a member of the <strong>{{D3D11_VDOV_DIMENSION}}</strong> enumeration.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX2D_VDOV}}</strong> structure that identifies the texture resource for the output view.</p> </dd> <p>Identifies the texture resource for a video processor input view.</p> <dd> <p>The zero-based index into the array of subtextures.</p> </dd> <dd> <p>The zero-based index of the texture.</p> </dd> <p>Describes a video processor input view.</p> <dd> <p>The surface format. If zero, the driver uses the {{DXGI}} format that was used to create the resource. If you are using feature level 9, the value must be zero.</p> </dd> <dd> <p>The resource type of the view, specified as a member of the <strong>{{D3D11_VPIV_DIMENSION}}</strong> enumeration.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX2D_VPIV}}</strong> structure that identifies the texture resource.</p> </dd> <p>Identifies a texture resource for a video processor output view.</p> <dd> <p>The zero-based index into the array of subtextures.</p> </dd> <p>Identifies a texture resource for a video processor output view.</p> <dd> <p>The zero-based index into the array of subtextures.</p> </dd> <dd> <p>The index of the first texture to use.</p> </dd> <dd> <p>The number of textures in the array.</p> </dd> <p>Describes a video processor output view.</p> <dd> <p>The resource type of the view, specified as a member of the <strong>{{D3D11_VPOV_DIMENSION}}</strong> enumeration.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX2D_VPOV}}</strong> structure that identifies the texture resource for the output view. </p> <p>Use this member of the union when <strong>ViewDimension</strong> equals <strong>{{D3D11_VPOV_DIMENSION_TEXTURE2D}}</strong>.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX2D_ARRAY_VPOV}}</strong> structure that identifies the texture array for the output view. </p> <p>Use this member of the union when <strong>ViewDimension</strong> equals <strong>{{D3D11_VPOV_DIMENSION_TEXTURE2DARRAY}}</strong>.</p> </dd> <p>A device-child interface accesses data used by a device.</p> <p>There are several types of device child interfaces, all of which inherit this interface. They include shaders, state objects, and input layouts.</p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Get a reference to the device that created this interface.</p> <p>Any returned interfaces will have their reference count incremented by one, so be sure to call ::release() on the returned reference(s) before they are freed or else you will have a memory leak.</p> <p>Returns nothing.</p> <dd> <p>Address of a reference to a device (see <strong>{{ID3D11Device}}</strong>).</p> </dd> <p>Get application-defined data from a device child.</p> <p> The data stored in the device child is set by calling <strong>{{ID3D11DeviceChild::SetPrivateData}}</strong>. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p> This method returns one of the Direct3D 11 Return Codes. </p> <dd> <p>Guid associated with the data.</p> </dd> <dd> <p> A reference to a variable that on input contains the size, in bytes, of the buffer that <em>pData</em> points to, and on output contains the size, in bytes, of the amount of data that <strong>GetPrivateData</strong> retrieved. </p> </dd> <dd> <p> A reference to a buffer that <strong>GetPrivateData</strong> fills with data from the device child if <em>pDataSize</em> points to a value that specifies a buffer large enough to hold the data. </p> </dd> <p>Set application-defined data to a device child and associate that data with an application-defined guid.</p> <p>The data stored in the device child with this method can be retrieved with <strong>{{ID3D11DeviceChild::GetPrivateData}}</strong>.</p><p>The debug layer reports memory leaks by outputting a list of object interface references along with their friendly names. The default friendly name is "&lt;unnamed&gt;". You can set the friendly name so that you can determine if the corresponding object interface reference caused the leak. To set the friendly name, use the <strong>SetPrivateData</strong> method and the <strong>{{WKPDID_D3DDebugObjectName}}</strong> {{GUID}} that is in {{D3Dcommon}}.h. For example, to give pContext a friendly name of <em>My name</em>, use the following code:</p><pre> static const char c_szName[] = "My name"; hr = pContext-&gt;SetPrivateData( {{WKPDID_D3DDebugObjectName}}, sizeof( c_szName ) - 1, c_szName ); </pre> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Guid associated with the data.</p> </dd> <dd> <p>Size of the data.</p> </dd> <dd> <p>Pointer to the data to be stored with this device child. If pData is <strong>{{NULL}}</strong>, DataSize must also be 0, and any data previously associated with the specified guid will be destroyed.</p> </dd> <p>Associate an {{IUnknown}}-derived interface with this device child and associate that interface with an application-defined guid.</p> <p>When this method is called ::addref() will be called on the {{IUnknown}}-derived interface, and when the device child is detroyed ::release() will be called on the {{IUnknown}}-derived interface.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Guid associated with the interface.</p> </dd> <dd> <p>Pointer to an {{IUnknown}}-derived interface to be associated with the device child.</p> </dd> <p>The depth-stencil-state interface holds a description for depth-stencil state that you can bind to the output-merger stage.</p> <p>To create a depth-stencil-state object, call <strong>{{ID3D11Device::CreateDepthStencilState}}</strong>. To bind the depth-stencil-state object to the output-merger stage, call <strong>{{ID3D11DeviceContext::OMSetDepthStencilState}}</strong>.</p> <p>Gets the description for depth-stencil state that you used to create the depth-stencil-state object.</p> <p>You use the description for depth-stencil state in a call to the <strong>{{ID3D11Device::CreateDepthStencilState}}</strong> method to create the depth-stencil-state object.</p> <p>Returns nothing.</p> <dd> <p>A reference to a <strong>{{D3D11_DEPTH_STENCIL_DESC}}</strong> structure that receives a description of the depth-stencil state.</p> </dd> <p>The blend-state interface holds a description for blending state that you can bind to the output-merger stage.</p> <p>Blending applies a simple function to combine output values from a pixel shader with data in a render target. You have control over how the pixels are blended by using a predefined set of blending operations and preblending operations.</p><p>To create a blend-state object, call <strong>{{ID3D11Device::CreateBlendState}}</strong>. To bind the blend-state object to the output-merger stage, call <strong>{{ID3D11DeviceContext::OMSetBlendState}}</strong>.</p> <p>Gets the description for blending state that you used to create the blend-state object.</p> <p>You use the description for blending state in a call to the <strong>{{ID3D11Device::CreateBlendState}}</strong> method to create the blend-state object.</p> <p>Returns nothing.</p> <dd> <p>A reference to a <strong>{{D3D11_BLEND_DESC}}</strong> structure that receives a description of the blend state.</p> </dd> <p>The rasterizer-state interface holds a description for rasterizer state that you can bind to the rasterizer stage.</p> <p>To create a rasterizer-state object, call <strong>{{ID3D11Device::CreateRasterizerState}}</strong>. To bind the rasterizer-state object to the rasterizer stage, call <strong>{{ID3D11DeviceContext::RSSetState}}</strong>.</p> <p>Gets the description for rasterizer state that you used to create the rasterizer-state object.</p> <p>You use the description for rasterizer state in a call to the <strong>{{ID3D11Device::CreateRasterizerState}}</strong> method to create the rasterizer-state object.</p> <p>Returns nothing.</p> <dd> <p>A reference to a <strong>{{D3D11_RASTERIZER_DESC}}</strong> structure that receives a description of the rasterizer state.</p> </dd> <p>A resource interface provides common actions on all resources.</p> <p>You don't directly create a resource interface; instead, you create buffers and textures that inherit from a resource interface. For more info, see How to: Create a Vertex Buffer, How to: Create an Index Buffer, How to: Create a Constant Buffer, and How to: Create a Texture.</p> <p>Get the type of the resource.</p> <p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Returns nothing.</p> <dd> <p> Pointer to the resource type (see <strong>{{D3D11_RESOURCE_DIMENSION}}</strong>). </p> </dd> <p>Set the eviction priority of a resource.</p> <p>Resource priorities determine which resource to evict from video memory when the system has run out of video memory. The resource will not be lost; it will be removed from video memory and placed into system memory, or possibly placed onto the hard drive. The resource will be loaded back into video memory when it is required.</p><p>A resource that is set to the maximum priority, {{DXGI_RESOURCE_PRIORITY_MAXIMUM}}, is only evicted if there is no other way of resolving the incoming memory request. The Windows Display Driver Model ({{WDDM}}) tries to split an incoming memory request to its minimum size and evict lower-priority resources before evicting a resource with maximum priority.</p><p>Changing the priorities of resources should be done carefully. The wrong eviction priorities could be a detriment to performance rather than an improvement. </p> <p>Returns nothing.</p> <dd> <p>Eviction priority for the resource, which is one of the following values:</p> <ul> <li>{{DXGI_RESOURCE_PRIORITY_MINIMUM}}</li> <li>{{DXGI_RESOURCE_PRIORITY_LOW}}</li> <li>{{DXGI_RESOURCE_PRIORITY_NORMAL}}</li> <li>{{DXGI_RESOURCE_PRIORITY_HIGH}}</li> <li>{{DXGI_RESOURCE_PRIORITY_MAXIMUM}}</li> </ul> </dd> <p>Get the eviction priority of a resource.</p> <p>One of the following values, which specifies the eviction priority for the resource:</p><ul> <li>{{DXGI_RESOURCE_PRIORITY_MINIMUM}}</li> <li>{{DXGI_RESOURCE_PRIORITY_LOW}}</li> <li>{{DXGI_RESOURCE_PRIORITY_NORMAL}}</li> <li>{{DXGI_RESOURCE_PRIORITY_HIGH}}</li> <li>{{DXGI_RESOURCE_PRIORITY_MAXIMUM}}</li> </ul> <p>A buffer interface accesses a buffer resource, which is unstructured memory. Buffers typically store vertex or index data.</p> <p>There are three types of buffers: vertex, index, or a shader-constant buffer. Create a buffer resource by calling <strong>{{ID3D11Device::CreateBuffer}}</strong>.</p><p>A buffer must be bound to the pipeline before it can be accessed. Buffers can be bound to the input-assembler stage by calls to <strong>{{ID3D11DeviceContext::IASetVertexBuffers}}</strong> and <strong>{{ID3D11DeviceContext::IASetIndexBuffer}}</strong>, to the stream-output stage by a call to <strong>{{ID3D11DeviceContext::SOSetTargets}}</strong>, and to a shader stage by calling the appropriate shader method (such as <strong>{{ID3D11DeviceContext::VSSetConstantBuffers}}</strong> for example).</p><p>Buffers can be bound to multiple pipeline stages simultaneously for reading. A buffer can also be bound to a single pipeline stage for writing; however, the same buffer cannot be bound for reading and writing simultaneously.</p> <p>Get the properties of a buffer resource.</p> <p>Returns nothing.</p> <dd> <p>Pointer to a resource description (see <strong>{{D3D11_BUFFER_DESC}}</strong>) filled in by the method.</p> </dd> <p>A 1D texture interface accesses texel data, which is structured memory.</p> <p>To create an empty 1D texture, call <strong>{{ID3D11Device::CreateTexture1D}}</strong>. For info about how to create a 2D texture, which is similar to creating a 1D texture, see How to: Create a Texture. </p><p>Textures cannot be bound directly to the pipeline; instead, a view must be created and bound. Using a view, texture data can be interpreted at run time within certain restrictions. To use the texture as a render target or depth-stencil resource, call <strong>{{ID3D11Device::CreateRenderTargetView}}</strong>, and <strong>{{ID3D11Device::CreateDepthStencilView}}</strong>, respectively. To use the texture as an input to a shader, create a by calling <strong>{{ID3D11Device::CreateShaderResourceView}}</strong>.</p> <p>Get the properties of the texture resource.</p> <p>Returns nothing.</p> <dd> <p>Pointer to a resource description (see <strong>{{D3D11_TEXTURE1D_DESC}}</strong>).</p> </dd> <p>A 2D texture interface manages texel data, which is structured memory.</p> <p>To create an empty Texture2D resource, call <strong>{{ID3D11Device::CreateTexture2D}}</strong>. For info about how to create a 2D texture, see How to: Create a Texture. </p><p>Textures cannot be bound directly to the pipeline; instead, a view must be created and bound. Using a view, texture data can be interpreted at run time within certain restrictions. To use the texture as a render target or depth-stencil resource, call <strong>{{ID3D11Device::CreateRenderTargetView}}</strong>, and <strong>{{ID3D11Device::CreateDepthStencilView}}</strong>, respectively. To use the texture as an input to a shader, create a by calling <strong>{{ID3D11Device::CreateShaderResourceView}}</strong>.</p> <p>Get the properties of the texture resource.</p> <p>Returns nothing.</p> <dd> <p>Pointer to a resource description (see <strong>{{D3D11_TEXTURE2D_DESC}}</strong>).</p> </dd> <p>A 3D texture interface accesses texel data, which is structured memory.</p> <p>To create an empty Texture3D resource, call <strong>{{ID3D11Device::CreateTexture3D}}</strong>. For info about how to create a 2D texture, which is similar to creating a 3D texture, see How to: Create a Texture. </p><p>Textures cannot be bound directly to the pipeline; instead, a view must be created and bound. Using a view, texture data can be interpreted at run time within certain restrictions. To use the texture as a render target or depth-stencil resource, call <strong>{{ID3D11Device::CreateRenderTargetView}}</strong>, and <strong>{{ID3D11Device::CreateDepthStencilView}}</strong>, respectively. To use the texture as an input to a shader, create a by calling <strong>{{ID3D11Device::CreateShaderResourceView}}</strong>.</p> <p>Get the properties of the texture resource.</p> <p>Returns nothing.</p> <dd> <p>Pointer to a resource description (see <strong>{{D3D11_TEXTURE3D_DESC}}</strong>).</p> </dd> <p>A view interface specifies the parts of a resource the pipeline can access during rendering.</p> <p>A view interface is the base interface for all views. There are four types of views; a depth-stencil view, a render-target view, a shader-resource view, and an unordered-access view.</p><ul> <li>To create a render-target view, call <strong>{{ID3D11Device::CreateRenderTargetView}}</strong>.</li> <li>To create a depth-stencil view, call <strong>{{ID3D11Device::CreateDepthStencilView}}</strong>.</li> <li>To create a shader-resource view, call <strong>{{ID3D11Device::CreateShaderResourceView}}</strong>.</li> <li>To create an unordered-access view, call <strong>{{ID3D11Device::CreateUnorderedAccessView}}</strong>.</li> </ul><p>All resources must be bound to the pipeline before they can be accessed.</p><ul> <li>To bind a render-target view or a depth-stencil view, call <strong>{{ID3D11DeviceContext::OMSetRenderTargets}}</strong>.</li> <li>To bind a shader resource, call <strong>{{ID3D11DeviceContext::VSSetShaderResources}}</strong>.</li> </ul> <p>Get the resource that is accessed through this view.</p> <p>This function increments the reference count of the resource by one, so it is necessary to call <strong>Release</strong> on the returned reference when the application is done with it. Destroying (or losing) the returned reference before <strong>Release</strong> is called will result in a memory leak.</p> <p>Returns nothing.</p> <dd> <p>Address of a reference to the resource that is accessed through this view. (See <strong>{{ID3D11Resource}}</strong>.)</p> </dd> <p>A shader-resource-view interface specifies the subresources a shader can access during rendering. Examples of shader resources include a constant buffer, a texture buffer, and a texture.</p> <p>To create a shader-resource view, call <strong>{{ID3D11Device::CreateShaderResourceView}}</strong>.</p><p>A shader-resource view is required when binding a resource to a shader stage; the binding occurs by calling <strong>{{ID3D11DeviceContext::GSSetShaderResources}}</strong>, <strong>{{ID3D11DeviceContext::VSSetShaderResources}}</strong> or <strong>{{ID3D11DeviceContext::PSSetShaderResources}}</strong>.</p> <p>Get the shader resource view's description.</p> <p>Returns nothing.</p> <dd> <p>A reference to a <strong>{{D3D11_SHADER_RESOURCE_VIEW_DESC}}</strong> structure to be filled with data about the shader resource view.</p> </dd> <p>A render-target-view interface identifies the render-target subresources that can be accessed during rendering.</p> <p>To create a render-target view, call <strong>{{ID3D11Device::CreateRenderTargetView}}</strong>. To bind a render-target view to the pipeline, call <strong>{{ID3D11DeviceContext::OMSetRenderTargets}}</strong>.</p><p>A rendertarget is a resource that can be written by the output-merger stage at the end of a render pass. Each render-target should also have a corresponding depth-stencil view.</p> <p>Get the properties of a render target view.</p> <p>Returns nothing.</p> <dd> <p>Pointer to the description of a render target view (see <strong>{{D3D11_RENDER_TARGET_VIEW_DESC}}</strong>).</p> </dd> <p>A depth-stencil-view interface accesses a texture resource during depth-stencil testing.</p> <p>To create a depth-stencil view, call <strong>{{ID3D11Device::CreateDepthStencilView}}</strong>.</p><p>To bind a depth-stencil view to the pipeline, call <strong>{{ID3D11DeviceContext::OMSetRenderTargets}}</strong>.</p> <p>A depth-stencil-view interface accesses a texture resource during depth-stencil testing.</p> <p>To create a depth-stencil view, call <strong>{{ID3D11Device::CreateDepthStencilView}}</strong>.</p><p>To bind a depth-stencil view to the pipeline, call <strong>{{ID3D11DeviceContext::OMSetRenderTargets}}</strong>.</p> <p>A view interface specifies the parts of a resource the pipeline can access during rendering.</p> <p>To create a view for an unordered access resource, call <strong>{{ID3D11Device::CreateUnorderedAccessView}}</strong>.</p><p>All resources must be bound to the pipeline before they can be accessed. Call <strong>{{ID3D11DeviceContext::CSSetUnorderedAccessViews}}</strong> to bind an unordered access view to a compute shader; call <strong>{{ID3D11DeviceContext::OMSetRenderTargetsAndUnorderedAccessViews}}</strong> to bind an unordered access view to a pixel shader.</p> <p>Get a description of the resource.</p> <p>Returns nothing.</p> <dd> <p>Pointer to a resource description (see <strong>{{D3D11_UNORDERED_ACCESS_VIEW_DESC}}</strong>.)</p> </dd> <p>A vertex-shader interface manages an executable program (a vertex shader) that controls the vertex-shader stage.</p> <p>The vertex-shader interface has no methods; use {{HLSL}} to implement your shader functionality. All shaders are implemented from a common set of features referred to as the common-shader core..</p><p>To create a vertex shader interface, call <strong>{{ID3D11Device::CreateVertexShader}}</strong>. Before using a vertex shader you must bind it to the device by calling <strong>{{ID3D11DeviceContext::VSSetShader}}</strong>.</p><p>This interface is defined in {{D3D11}}.h.</p> <p>A hull-shader interface manages an executable program (a hull shader) that controls the hull-shader stage.</p> <p>The hull-shader interface has no methods; use {{HLSL}} to implement your shader functionality. All shaders are implemented from a common set of features referred to as the common-shader core..</p><p>To create a hull-shader interface, call <strong>{{ID3D11Device::CreateHullShader}}</strong>. Before using a hull shader you must bind it to the device by calling <strong>{{ID3D11DeviceContext::HSSetShader}}</strong>.</p><p>This interface is defined in {{D3D11}}.h.</p> <p>A domain-shader interface manages an executable program (a domain shader) that controls the domain-shader stage.</p> <p>The domain-shader interface has no methods; use {{HLSL}} to implement your shader functionality. All shaders are implemented from a common set of features referred to as the common-shader core..</p><p>To create a domain-shader interface, call <strong>{{ID3D11Device::CreateDomainShader}}</strong>. Before using a domain shader you must bind it to the device by calling <strong>{{ID3D11DeviceContext::DSSetShader}}</strong>.</p><p>This interface is defined in {{D3D11}}.h.</p> <p>A geometry-shader interface manages an executable program (a geometry shader) that controls the geometry-shader stage.</p> <p>The geometry-shader interface has no methods; use {{HLSL}} to implement your shader functionality. All shaders are implemented from a common set of features referred to as the common-shader core..</p><p>To create a geometry shader interface, call either <strong>{{ID3D11Device::CreateGeometryShader}}</strong> or <strong>{{ID3D11Device::CreateGeometryShaderWithStreamOutput}}</strong>. Before using a geometry shader you must bind it to the device by calling <strong>{{ID3D11DeviceContext::GSSetShader}}</strong>.</p><p>This interface is defined in {{D3D11}}.h.</p> <p>A pixel-shader interface manages an executable program (a pixel shader) that controls the pixel-shader stage.</p> <p>The pixel-shader interface has no methods; use {{HLSL}} to implement your shader functionality. All shaders in are implemented from a common set of features referred to as the common-shader core..</p><p>To create a pixel shader interface, call <strong>{{ID3D11Device::CreatePixelShader}}</strong>. Before using a pixel shader you must bind it to the device by calling <strong>{{ID3D11DeviceContext::PSSetShader}}</strong>.</p><p>This interface is defined in {{D3D11}}.h.</p> <p>A compute-shader interface manages an executable program (a compute shader) that controls the compute-shader stage.</p> <p>The compute-shader interface has no methods; use {{HLSL}} to implement your shader functionality. All shaders are implemented from a common set of features referred to as the common-shader core..</p><p>To create a compute-shader interface, call <strong>{{ID3D11Device::CreateComputeShader}}</strong>. Before using a compute shader you must bind it to the device by calling <strong>{{ID3D11DeviceContext::CSSetShader}}</strong>.</p><p>This interface is defined in {{D3D11}}.h.</p> <p>An input-layout interface holds a definition of how to feed vertex data that is laid out in memory into the input-assembler stage of the graphics pipeline.</p> <p>To create an input-layout object, call <strong>{{ID3D11Device::CreateInputLayout}}</strong>. To bind the input-layout object to the input-assembler stage, call <strong>{{ID3D11DeviceContext::IASetInputLayout}}</strong>.</p> <p>The sampler-state interface holds a description for sampler state that you can bind to any shader stage of the pipeline for reference by texture sample operations.</p> <p>To create a sampler-state object, call <strong>{{ID3D11Device::CreateSamplerState}}</strong>.</p><p>To bind a sampler-state object to any pipeline shader stage, call the following methods:</p><ul> <li> <strong>{{ID3D11DeviceContext::VSSetSamplers}}</strong> </li> <li> <strong>{{ID3D11DeviceContext::HSSetSamplers}}</strong> </li> <li> <strong>{{ID3D11DeviceContext::DSSetSamplers}}</strong> </li> <li> <strong>{{ID3D11DeviceContext::GSSetSamplers}}</strong> </li> <li> <strong>{{ID3D11DeviceContext::PSSetSamplers}}</strong> </li> <li> <strong>{{ID3D11DeviceContext::CSSetSamplers}}</strong> </li> </ul><p>You can bind the same sampler-state object to multiple shader stages simultaneously.</p> <p>Gets the description for sampler state that you used to create the sampler-state object.</p> <p>You use the description for sampler state in a call to the <strong>{{ID3D11Device::CreateSamplerState}}</strong> method to create the sampler-state object.</p> <p>Returns nothing.</p> <dd> <p>A reference to a <strong>{{D3D11_SAMPLER_DESC}}</strong> structure that receives a description of the sampler state.</p> </dd> <p>This interface encapsulates methods for retrieving data from the {{GPU}} asynchronously.</p> <p>There are three types of asynchronous interfaces, all of which inherit this interface:</p><ul> <li> <strong>{{ID3D11Query}}</strong> - Queries information from the {{GPU}}.</li> <li> <strong>{{ID3D11Predicate}}</strong> - Determines whether a piece of geometry should be processed or not depending on the results of a previous draw call.</li> <li> <strong>{{ID3D11Counter}}</strong> - Measures {{GPU}} performance.</li> </ul> <p>Get the size of the data (in bytes) that is output when calling <strong>{{ID3D11DeviceContext::GetData}}</strong>.</p> <p>Size of the data (in bytes) that is output when calling GetData.</p> <p>A query interface queries information from the {{GPU}}.</p> <p>A query can be created with <strong>{{ID3D11Device::CreateQuery}}</strong>.</p><p>Query data is typically gathered by issuing an <strong>{{ID3D11DeviceContext::Begin}}</strong> command, issuing some graphics commands, issuing an <strong>{{ID3D11DeviceContext::End}}</strong> command, and then calling <strong>{{ID3D11DeviceContext::GetData}}</strong> to get data about what happened in between the Begin and End calls. The data returned by <strong>GetData</strong> will be different depending on the type of query.</p><p>There are, however, some queries that do not require calls to <strong>Begin</strong>. For a list of possible queries see <strong>{{D3D11_QUERY}}</strong>.</p><p>A query is typically executed as shown in the following code:</p><pre> {{D3D11_QUERY_DESC}} queryDesc; ... // Fill out queryDesc structure {{ID3D11Query}} * pQuery; pDevice-&gt;CreateQuery(&amp;queryDesc, &amp;pQuery); pDeviceContext-&gt;Begin(pQuery); ... // Issue graphics commands pDeviceContext-&gt;End(pQuery); {{UINT64}} queryData; // This data type is different depending on the query type while( {{S_OK}} != pDeviceContext-&gt;GetData(pQuery, &amp;queryData, sizeof({{UINT64}}), 0) ) { } </pre><p>When using a query that does not require a call to <strong>Begin</strong>, it still requires a call to <strong>End</strong>. The call to <strong>End</strong> causes the data returned by <strong>GetData</strong> to be accurate up until the last call to <strong>End</strong>.</p> <p>Get a query description.</p> <p>Returns nothing.</p> <dd> <p>Pointer to a query description (see <strong>{{D3D11_QUERY_DESC}}</strong>).</p> </dd> <p>A predicate interface determines whether geometry should be processed depending on the results of a previous draw call.</p> <p>To create a predicate object, call <strong>{{ID3D11Device::CreatePredicate}}</strong>. To set the predicate object, call <strong>{{ID3D11DeviceContext::SetPredication}}</strong>.</p><p>There are two types of predicates: stream-output-overflow predicates and occlusion predicates. Stream-output-overflow predicates cause any geometry residing in stream-output buffers that were overflowed to not be processed. Occlusion predicates cause any geometry that did not have a single sample pass the depth/stencil tests to not be processed.</p> <p>This interface encapsulates methods for measuring {{GPU}} performance.</p> <p>A counter can be created with <strong>{{ID3D11Device::CreateCounter}}</strong>.</p><p>This is a derived class of <strong>{{ID3D11Asynchronous}}</strong>.</p><p>Counter data is gathered by issuing an <strong>{{ID3D11DeviceContext::Begin}}</strong> command, issuing some graphics commands, issuing an <strong>{{ID3D11DeviceContext::End}}</strong> command, and then calling <strong>{{ID3D11DeviceContext::GetData}}</strong> to get data about what happened in between the Begin and End calls. The data returned by GetData will be different depending on the type of counter. The call to End causes the data returned by GetData to be accurate up until the last call to End.</p><p>Counters are best suited for profiling.</p><p>For a list of the types of performance counters, see <strong>{{D3D11_COUNTER}}</strong>.</p> <p>Get a counter description.</p> <p>Returns nothing.</p> <dd> <p>Pointer to a counter description (see <strong>{{D3D11_COUNTER_DESC}}</strong>).</p> </dd> <p>This interface encapsulates an {{HLSL}} class.</p> <p>This interface is created by calling <strong>{{ID3D11ClassLinkage::CreateClassInstance}}</strong>. The interface is used when binding shader resources to the pipeline using {{APIs}} such as <strong>{{ID3D11DeviceContext::VSSetShader}}</strong>.</p> <p> Gets the <strong>{{ID3D11ClassLinkage}}</strong> object associated with the current {{HLSL}} class. </p> <p> For more information about using the <strong>{{ID3D11ClassInstance}}</strong> interface, see Dynamic Linking. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>This method does not return a value.</p> <p>Gets a description of the current {{HLSL}} class.</p> <p> For more information about using the <strong>{{ID3D11ClassInstance}}</strong> interface, see Dynamic Linking. </p><p> An instance is not restricted to being used for a single type in a single shader. An instance is flexible and can be used for any shader that used the same type name or instance name when the instance was generated. </p><ul> <li> A created instance will work for any shader that contains a type of the same type name. For instance, a class instance created with the type name <strong>DefaultShader</strong> would work in any shader that contained a type <strong>DefaultShader</strong> even though several shaders could describe a different type. </li> <li> A gotten instance maps directly to an instance name/index in a shader. A class instance aquired using GetClassInstance will work for any shader that contains a class instance of the name used to generate the runtime instance, the instance does not have to be the same type in all of the shaders it's used in. </li> </ul><p> An instance does not replace the importance of reflection for a particular shader since a gotten instance will not know its slot location and a created instance only specifies a type name. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>This method does not return a value.</p> <dd> <p> A reference to a <strong>{{D3D11_CLASS_INSTANCE_DESC}}</strong> structure that describes the current {{HLSL}} class. </p> </dd> <p>Gets the instance name of the current {{HLSL}} class.</p> <p>GetInstanceName will return a valid name only for instances acquired using <strong>{{ID3D11ClassLinkage::GetClassInstance}}</strong>. </p><p> For more information about using the <strong>{{ID3D11ClassInstance}}</strong> interface, see Dynamic Linking. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>This method does not return a value.</p> <dd> <p>The instance name of the current {{HLSL}} class.</p> </dd> <dd> <p> The length of the <em>pInstanceName</em> parameter. </p> </dd> <p>Gets the type of the current {{HLSL}} class.</p> <p>GetTypeName will return a valid name only for instances acquired using <strong>{{ID3D11ClassLinkage::GetClassInstance}}</strong>. </p><p> For more information about using the <strong>{{ID3D11ClassInstance}}</strong> interface, see Dynamic Linking. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>This method does not return a value.</p> <dd> <p>Type of the current {{HLSL}} class.</p> </dd> <dd> <p> The length of the <em>pTypeName</em> parameter. </p> </dd> <p>This interface encapsulates an {{HLSL}} dynamic linkage.</p> <p>A class linkage object can hold up to 64K gotten instances. A gotten instance is a handle that references a variable name in any shader that is created with that linkage object. When you create a shader with a class linkage object, the runtime gathers these instances and stores them in the class linkage object. For more information about how a class linkage object is used, see Storing Variables and Types for Shaders to Share.</p><p>An <strong>{{ID3D11ClassLinkage}}</strong> object is created using the <strong>{{ID3D11Device::CreateClassLinkage}}</strong> method.</p> <p>Gets the class-instance object that represents the specified {{HLSL}} class.</p> <p> For more information about using the <strong>{{ID3D11ClassLinkage}}</strong> interface, see Dynamic Linking. </p><p> A class instance must have at least 1 data member in order to be available for the runtime to use with <strong>{{ID3D11ClassLinkage::GetClassInstance}}</strong>. Any instance with no members will be optimized out of a compiled shader blob as a zero-sized object. If you have a class with no data members, use <strong>{{ID3D11ClassLinkage::CreateClassInstance}}</strong> instead. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p> Returns {{S_OK}} if successful; otherwise, returns one of the Direct3D 11 Return Codes. </p> <dd> <p>The name of a class for which to get the class instance.</p> </dd> <dd> <p>The index of the class instance.</p> </dd> <dd> <p> The address of a reference to an <strong>{{ID3D11ClassInstance}}</strong> interface to initialize. </p> </dd> <p>Initializes a class-instance object that represents an {{HLSL}} class instance.</p> <p>Instances can be created (or gotten) before or after a shader is created. Use the same shader linkage object to acquire a class instance and create the shader the instance is going to be used in.</p><p> For more information about using the <strong>{{ID3D11ClassLinkage}}</strong> interface, see Dynamic Linking. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p> Returns {{S_OK}} if successful; otherwise, returns one of the following Direct3D 11 Return Codes. </p> <dd> <p>The type name of a class to initialize.</p> </dd> <dd> <p>Identifies the constant buffer that contains the class data.</p> </dd> <dd> <p>The four-component vector offset from the start of the constant buffer where the class data will begin. Consequently, this is not a byte offset.</p> </dd> <dd> <p>The texture slot for the first texture; there may be multiple textures following the offset.</p> </dd> <dd> <p>The sampler slot for the first sampler; there may be multiple samplers following the offset.</p> </dd> <dd> <p> The address of a reference to an <strong>{{ID3D11ClassInstance}}</strong> interface to initialize. </p> </dd> <p>The <strong>{{ID3D11CommandList}}</strong> interface encapsulates a list of graphics commands for play back.</p> <p>There is no explicit creation method, simply declare an <strong>{{ID3D11CommandList}}</strong> interface, then call <strong>{{ID3D11DeviceContext::FinishCommandList}}</strong> to record commands or <strong>{{ID3D11DeviceContext::ExecuteCommandList}}</strong> to play back commands.</p> <p>Gets the initialization flags associated with the deferred context that created the command list.</p> <p>The GetContextFlags method gets the flags that were supplied to the <em>ContextFlags</em> parameter of <strong>{{ID3D11Device::CreateDeferredContext}}</strong>; however, the context flag is reserved for future use.</p> <p>The context flag is reserved for future use and is always 0.</p> <p>The <strong>{{ID3D11DeviceContext}}</strong> interface represents a device context which generates rendering commands.</p> <p>Sets the constant buffers used by the vertex shader pipeline stage.</p> <p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p><p> The Direct3D 11.1 runtime, which is available starting with Windows?8, can bind a larger number of <strong>{{ID3D11Buffer}}</strong> resources to the shader than the maximum constant buffer size that is supported by shaders (4096 constants ? 4*32-bit components each). When you bind such a large buffer, the shader can access only the first 4096 4*32-bit component constants in the buffer, as if 4096 constants is the full size of the buffer. </p><p> If the application wants the shader to access other parts of the buffer, it must call the <strong>{{VSSetConstantBuffers1}}</strong> method instead. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>This method does not return a value.</p> <dd> <p> Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to <strong>{{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}}</strong> - 1). </p> </dd> <dd> <p> Number of buffers to set (ranges from 0 to <strong>{{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}}</strong> - <em>StartSlot</em>). </p> </dd> <dd> <p> Array of constant buffers (see <strong>{{ID3D11Buffer}}</strong>) being given to the device. </p> </dd> <p>Bind an array of shader resources to the pixel shader stage.</p> <p>If an overlapping resource view is already bound to an output slot, such as a rendertarget, then this {{API}} will fill the destination shader resource slot with <strong>{{NULL}}</strong>.</p><p>For information about creating shader-resource views, see <strong>{{ID3D11Device::CreateShaderResourceView}}</strong>.</p><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p> <p>Returns nothing.</p> <dd> <p>Index into the device's zero-based array to begin setting shader resources to (ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Array of <strong>shader resource view</strong> interfaces to set to the device.</p> </dd> <p>Sets a pixel shader to the device.</p> <p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p><p>The maximum number of instances a shader can have is 256.</p><p> Set ppClassInstances to <strong>{{NULL}}</strong> if no interfaces are used in the shader. If it is not <strong>{{NULL}}</strong>, the number of class instances must match the number of interfaces used in the shader. Furthermore, each interface reference must have a corresponding class instance or the assigned shader will be disabled. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>This method does not return a value.</p> <dd> <p> Pointer to a pixel shader (see <strong>{{ID3D11PixelShader}}</strong>). Passing in <strong>{{NULL}}</strong> disables the shader for this pipeline stage. </p> </dd> <dd> <p> A reference to an array of class-instance interfaces (see <strong>{{ID3D11ClassInstance}}</strong>). Each interface used by a shader must have a corresponding class instance or the shader will get disabled. Set ppClassInstances to <strong>{{NULL}}</strong> if the shader does not use any interfaces. </p> </dd> <dd> <p>The number of class-instance interfaces in the array.</p> </dd> <p>Set an array of sampler states to the pixel shader pipeline stage.</p> <p>Any sampler may be set to <strong>{{NULL}}</strong>; this invokes the default state, which is defined to be the following.</p><table> <tr><th>State</th><th>Default Value</th></tr> <tr><td>Filter</td><td>{{D3D11_FILTER_MIN_MAG_MIP_LINEAR}}</td></tr> <tr><td>AddressU</td><td>{{D3D11_TEXTURE_ADDRESS_CLAMP}}</td></tr> <tr><td>AddressV</td><td>{{D3D11_TEXTURE_ADDRESS_CLAMP}}</td></tr> <tr><td>AddressW</td><td>{{D3D11_TEXTURE_ADDRESS_CLAMP}}</td></tr> <tr><td>MipLODBias</td><td>0</td></tr> <tr><td>MaxAnisotropy</td><td>1</td></tr> <tr><td>ComparisonFunc</td><td>{{D3D11_COMPARISON_NEVER}}</td></tr> <tr><td>BorderColor[0]</td><td>1.0f</td></tr> <tr><td>BorderColor[1]</td><td>1.0f</td></tr> <tr><td>BorderColor[2]</td><td>1.0f</td></tr> <tr><td>BorderColor[3]</td><td>1.0f</td></tr> <tr><td>MinLOD</td><td>-{{FLT_MAX}}</td></tr> <tr><td>MaxLOD</td><td>{{FLT_MAX}}</td></tr> </table><p>?</p><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p> <p>This method does not return a value.</p> <dd> <p>Index into the device's zero-based array to begin setting samplers to (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Pointer to an array of sampler-state interfaces (see <strong>{{ID3D11SamplerState}}</strong>). See Remarks.</p> </dd> <p>Set a vertex shader to the device.</p> <p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p><p>The maximum number of instances a shader can have is 256.</p> <p>This method does not return a value.</p> <dd> <p>Pointer to a vertex shader (see <strong>{{ID3D11VertexShader}}</strong>). Passing in <strong>{{NULL}}</strong> disables the shader for this pipeline stage.</p> </dd> <dd> <p>A reference to an array of class-instance interfaces (see <strong>{{ID3D11ClassInstance}}</strong>). Each interface used by a shader must have a corresponding class instance or the shader will get disabled. Set ppClassInstances to <strong>{{NULL}}</strong> if the shader does not use any interfaces.</p> </dd> <dd> <p>The number of class-instance interfaces in the array.</p> </dd> <p>Draw indexed, non-instanced primitives.</p> <p>A draw {{API}} submits work to the rendering pipeline.</p><p>If the sum of both indices is negative, the result of the function call is undefined.</p> <p>Returns nothing.</p> <dd> <p>Number of indices to draw.</p> </dd> <dd> <p>The location of the first index read by the {{GPU}} from the index buffer.</p> </dd> <dd> <p>A value added to each index before reading a vertex from the vertex buffer.</p> </dd> <p>Draw non-indexed, non-instanced primitives.</p> <p><strong>Draw</strong> submits work to the rendering pipeline.</p><p>The vertex data for a draw call normally comes from a vertex buffer that is bound to the pipeline.</p><p>Even without any vertex buffer bound to the pipeline, you can generate your own vertex data in your vertex shader by using the <strong>{{SV_VertexID}}</strong> system-value semantic to determine the current vertex that the runtime is processing.</p> <p>Returns nothing.</p> <dd> <p>Number of vertices to draw.</p> </dd> <dd> <p>Index of the first vertex, which is usually an offset in a vertex buffer.</p> </dd> <p> Gets a reference to the data contained in a subresource, and denies the {{GPU}} access to that subresource. </p> <p> If you call <strong>Map</strong> on a deferred context, you can only pass <strong>{{D3D11_MAP_WRITE_DISCARD}}</strong>, <strong>{{D3D11_MAP_WRITE_NO_OVERWRITE}}</strong>, or both to the <em>MapType</em> parameter. Other <strong>{{D3D11_MAP}}</strong>-typed values are not supported for a deferred context. </p><strong>Note</strong>?? The Direct3D 11.1 runtime, which is available starting with Windows?8, enables mapping dynamic constant buffers and shader resource views ({{SRVs}}) of dynamic buffers with <strong>{{D3D11_MAP_WRITE_NO_OVERWRITE}}</strong>. The Direct3D 11 and earlier runtimes limited mapping to vertex or index buffers. To determine if a Direct3D device supports these features, call <strong>{{ID3D11Device::CheckFeatureSupport}}</strong> with <strong>{{D3D11_FEATURE_D3D11_OPTIONS}}</strong>. <strong>CheckFeatureSupport</strong> fills members of a <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS}}</strong> structure with the device's features. The relevant members here are <strong>MapNoOverwriteOnDynamicConstantBuffer</strong> and <strong>MapNoOverwriteOnDynamicBufferSRV</strong>.?<p> For info about how to use <strong>Map</strong>, see How to: Use dynamic resources. </p> <p> This method returns one of the Direct3D 11 Return Codes. </p><p> This method also returns <strong>{{DXGI_ERROR_WAS_STILL_DRAWING}}</strong> if <em>MapFlags</em> specifies <strong>{{D3D11_MAP_FLAG_DO_NOT_WAIT}}</strong> and the {{GPU}} is not yet finished with the resource. </p><p> This method also returns <strong>{{DXGI_ERROR_DEVICE_REMOVED}}</strong> if <em>MapType</em> allows any {{CPU}} read access and the video card has been removed. </p><p> For more information about these error codes, see {{DXGI_ERROR}}. </p> <p>Invalidate the reference to a resource and reenable the {{GPU}}'s access to that resource.</p> <p> For info about how to use <strong>Unmap</strong>, see How to: Use dynamic resources. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Returns nothing.</p> <dd> <p> A reference to a <strong>{{ID3D11Resource}}</strong> interface. </p> </dd> <dd> <p>A subresource to be unmapped.</p> </dd> <p> Sets the constant buffers used by the pixel shader pipeline stage. </p> <p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p><p> The Direct3D 11.1 runtime, which is available on Windows?8 and later operating systems, can bind a larger number of <strong>{{ID3D11Buffer}}</strong> resources to the shader than the maximum constant buffer size that is supported by shaders (4096 constants ? 4*32-bit components each). When you bind such a large buffer, the shader can access only the first 4096 4*32-bit component constants in the buffer, as if 4096 constants is the full size of the buffer. </p><p> To enable the shader to access other parts of the buffer, call <strong>{{PSSetConstantBuffers1}}</strong> instead of <strong>{{PSSetConstantBuffers}}</strong>. <strong>{{PSSetConstantBuffers1}}</strong> has additional parameters <em>pFirstConstant</em> and <em>pNumConstants</em>. </p> <p> This method does not return a value. </p> <dd> <p> Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to <strong>{{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}}</strong> - 1). </p> </dd> <dd> <p> Number of buffers to set (ranges from 0 to <strong>{{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}}</strong> - <em>StartSlot</em>). </p> </dd> <dd> <p> Array of constant buffers (see <strong>{{ID3D11Buffer}}</strong>) being given to the device. </p> </dd> <p>Bind an input-layout object to the input-assembler stage.</p> <p>Input-layout objects describe how vertex buffer data is streamed into the {{IA}} pipeline stage. To create an input-layout object, call <strong>{{ID3D11Device::CreateInputLayout}}</strong>.</p><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p> <p>Returns nothing.</p> <dd> <p>A reference to the input-layout object (see <strong>{{ID3D11InputLayout}}</strong>), which describes the input buffers that will be read by the {{IA}} stage.</p> </dd> <p> Bind an array of vertex buffers to the input-assembler stage. </p> <p> For info about creating vertex buffers, see How to: Create a Vertex Buffer. </p><p> Calling this method using a buffer that is currently bound for writing (that is, bound to the stream output pipeline stage) will effectively bind <strong>{{NULL}}</strong> instead because a buffer can't be bound as both an input and an output at the same time. </p><p>The debug layer will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime.</p><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>This method does not return a value.</p> <p>Bind an index buffer to the input-assembler stage.</p> <p> For information about creating index buffers, see How to: Create an Index Buffer. </p><p> Calling this method using a buffer that is currently bound for writing (i.e. bound to the stream output pipeline stage) will effectively bind <strong>{{NULL}}</strong> instead because a buffer cannot be bound as both an input and an output at the same time. </p><p> The debug layer will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime. </p><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Returns nothing.</p> <dd> <p> A reference to an <strong>{{ID3D11Buffer}}</strong> object, that contains indices. The index buffer must have been created with the <strong>{{D3D11_BIND_INDEX_BUFFER}}</strong> flag. </p> </dd> <dd> <p> A <strong>{{DXGI_FORMAT}}</strong> that specifies the format of the data in the index buffer. The only formats allowed for index buffer data are 16-bit ({{DXGI_FORMAT_R16_UINT}}) and 32-bit ({{DXGI_FORMAT_R32_UINT}}) integers. </p> </dd> <dd> <p>Offset (in bytes) from the start of the index buffer to the first index to use.</p> </dd> <p>Draw indexed, instanced primitives.</p> <p>A draw {{API}} submits work to the rendering pipeline.</p><p>Instancing may extend performance by reusing the same geometry to draw multiple objects in a scene. One example of instancing could be to draw the same object with different positions and colors. Instancing requires multiple vertex buffers: at least one for per-vertex data and a second buffer for per-instance data.</p> <p>Returns nothing.</p> <dd> <p>Number of indices read from the index buffer for each instance.</p> </dd> <dd> <p>Number of instances to draw.</p> </dd> <dd> <p>The location of the first index read by the {{GPU}} from the index buffer.</p> </dd> <dd> <p>A value added to each index before reading a vertex from the vertex buffer.</p> </dd> <dd> <p>A value added to each index before reading per-instance data from a vertex buffer.</p> </dd> <p>Draw non-indexed, instanced primitives.</p> <p>A draw {{API}} submits work to the rendering pipeline.</p><p>Instancing may extend performance by reusing the same geometry to draw multiple objects in a scene. One example of instancing could be to draw the same object with different positions and colors.</p><p>The vertex data for an instanced draw call normally comes from a vertex buffer that is bound to the pipeline. However, you could also provide the vertex data from a shader that has instanced data identified with a system-value semantic ({{SV_InstanceID}}).</p> <p>Returns nothing.</p> <dd> <p>Number of vertices to draw.</p> </dd> <dd> <p>Number of instances to draw.</p> </dd> <dd> <p>Index of the first vertex.</p> </dd> <dd> <p>A value added to each index before reading per-instance data from a vertex buffer.</p> </dd> <p>Sets the constant buffers used by the geometry shader pipeline stage.</p> <p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p><p>You can't use the <strong>{{ID3D11ShaderReflectionConstantBuffer}}</strong> interface to get information about what is currently bound to the pipeline in the device context. But you can use <strong>{{ID3D11ShaderReflectionConstantBuffer}}</strong> to get information from a compiled shader. For example, you can use <strong>{{ID3D11ShaderReflectionConstantBuffer}}</strong> and <strong>{{ID3D11ShaderReflectionVariable}}</strong> to determine the slot in which a geometry shader expects a constant buffer. You can then pass this slot number to <strong>{{GSSetConstantBuffers}}</strong> to set the constant buffer. You can call the <strong>{{D3D11Reflect}}</strong> function to retrieve the address of a reference to the <strong>{{ID3D11ShaderReflection}}</strong> interface and then call <strong>{{ID3D11ShaderReflection::GetConstantBufferByName}}</strong> to get a reference to <strong>{{ID3D11ShaderReflectionConstantBuffer}}</strong>.</p><p>The Direct3D 11.1 runtime, which is available starting with Windows?8, can bind a larger number of <strong>{{ID3D11Buffer}}</strong> resources to the shader than the maximum constant buffer size that is supported by shaders (4096 constants ? 4*32-bit components each). When you bind such a large buffer, the shader can access only the first 4096 4*32-bit component constants in the buffer, as if 4096 constants is the full size of the buffer. </p><p>If the application wants the shader to access other parts of the buffer, it must call the <strong>{{GSSetConstantBuffers1}}</strong> method instead. </p> <p>This method does not return a value.</p> <dd> <p>Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to <strong>{{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}}</strong> - 1).</p> </dd> <dd> <p>Number of buffers to set (ranges from 0 to <strong>{{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}}</strong> - <em>StartSlot</em>).</p> </dd> <dd> <p>Array of constant buffers (see <strong>{{ID3D11Buffer}}</strong>) being given to the device.</p> </dd> <p>Set a geometry shader to the device.</p> <p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p><p>The maximum number of instances a shader can have is 256.</p> <p>This method does not return a value.</p> <dd> <p>Pointer to a geometry shader (see <strong>{{ID3D11GeometryShader}}</strong>). Passing in <strong>{{NULL}}</strong> disables the shader for this pipeline stage.</p> </dd> <dd> <p>A reference to an array of class-instance interfaces (see <strong>{{ID3D11ClassInstance}}</strong>). Each interface used by a shader must have a corresponding class instance or the shader will get disabled. Set ppClassInstances to <strong>{{NULL}}</strong> if the shader does not use any interfaces.</p> </dd> <dd> <p>The number of class-instance interfaces in the array.</p> </dd> <p>Bind information about the primitive type, and data order that describes input data for the input assembler stage.</p> <p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>This method does not return a value.</p> <dd> <p> The type of primitive and ordering of the primitive data (see <strong>{{D3D11_PRIMITIVE_TOPOLOGY}}</strong>). </p> </dd> <p>Bind an array of shader resources to the vertex-shader stage.</p> <p>If an overlapping resource view is already bound to an output slot, such as a rendertarget, then this {{API}} will fill the destination shader resource slot with <strong>{{NULL}}</strong>.</p><p>For information about creating shader-resource views, see <strong>{{ID3D11Device::CreateShaderResourceView}}</strong>.</p><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p> <p>This method does not return a value.</p> <dd> <p>Index into the device's zero-based array to begin setting shader resources to (range is from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources (range is from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Array of <strong>shader resource view</strong> interfaces to set to the device.</p> </dd> <p>Set an array of sampler states to the vertex shader pipeline stage.</p> <p>Any sampler may be set to <strong>{{NULL}}</strong>; this invokes the default state, which is defined to be the following.</p><pre> //Default sampler state: {{D3D11_SAMPLER_DESC}} SamplerDesc; SamplerDesc.Filter = {{D3D11_FILTER_MIN_MAG_MIP_LINEAR}}; SamplerDesc.AddressU = {{D3D11_TEXTURE_ADDRESS_CLAMP}}; SamplerDesc.AddressV = {{D3D11_TEXTURE_ADDRESS_CLAMP}}; SamplerDesc.AddressW = {{D3D11_TEXTURE_ADDRESS_CLAMP}}; SamplerDesc.MipLODBias = 0; SamplerDesc.MaxAnisotropy = 1; SamplerDesc.ComparisonFunc = {{D3D11_COMPARISON_NEVER}}; SamplerDesc.BorderColor[0] = 1.0f; SamplerDesc.BorderColor[1] = 1.0f; SamplerDesc.BorderColor[2] = 1.0f; SamplerDesc.BorderColor[3] = 1.0f; SamplerDesc.MinLOD = -{{FLT_MAX}}; SamplerDesc.MaxLOD = {{FLT_MAX}}; </pre><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p> <p>This method does not return a value.</p> <dd> <p>Index into the device's zero-based array to begin setting samplers to (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Pointer to an array of sampler-state interfaces (see <strong>{{ID3D11SamplerState}}</strong>). See Remarks.</p> </dd> <p>Mark the beginning of a series of commands.</p> <p>Use <strong>{{ID3D11DeviceContext::End}}</strong> to mark the ending of the series of commands.</p> <p>Returns nothing.</p> <dd> <p>A reference to an <strong>{{ID3D11Asynchronous}}</strong> interface.</p> </dd> <p>Mark the end of a series of commands.</p> <p>Use <strong>{{ID3D11DeviceContext::Begin}}</strong> to mark the beginning of the series of commands.</p> <p>Returns nothing.</p> <dd> <p>A reference to an <strong>{{ID3D11Asynchronous}}</strong> interface.</p> </dd> <p>Get data from the graphics processing unit ({{GPU}}) asynchronously.</p> <p>Queries in a deferred context are limited to predicated drawing. That is, you cannot call <strong>{{ID3D11DeviceContext::GetData}}</strong> on a deferred context to get data about a query; you can only call <strong>GetData</strong> on the immediate context to get data about a query. For predicated drawing, the results of a predication-type query are used by the {{GPU}} and not returned to an application. For more information about predication and predicated drawing, see <strong>{{D3D11DeviceContext::SetPredication}}</strong>.</p><p><strong>GetData</strong> retrieves the data that the runtime collected between calls to <strong>{{ID3D11DeviceContext::Begin}}</strong> and <strong>{{ID3D11DeviceContext::End}}</strong>. Certain queries only require a call to <strong>{{ID3D11DeviceContext::End}}</strong> in which case the data returned by <strong>GetData</strong> is accurate up to the last call to <strong>{{ID3D11DeviceContext::End}}</strong>. For information about the queries that only require a call to <strong>{{ID3D11DeviceContext::End}}</strong> and about the type of data that <strong>GetData</strong> retrieves for each query, see <strong>{{D3D11_QUERY}}</strong>.</p><p>If <em>DataSize</em> is 0, <strong>GetData</strong> is only used to check status.</p><p>An application gathers counter data by calling <strong>{{ID3D11DeviceContext::Begin}}</strong>, issuing some graphics commands, calling <strong>{{ID3D11DeviceContext::End}}</strong>, and then calling <strong>{{ID3D11DeviceContext::GetData}}</strong> to get data about what happened in between the <strong>Begin</strong> and <strong>End</strong> calls. For information about performance counter types, see <strong>{{D3D11_COUNTER}}</strong>. </p> <p>This method returns one of the Direct3D 11 Return Codes. A return value of {{S_OK}} indicates that the data at <em>pData</em> is available for the calling application to access. A return value of {{S_FALSE}} indicates that the data is not yet available. If the data is not yet available, the application must call <strong>GetData</strong> until the data is available.</p> <dd> <p>A reference to an <strong>{{ID3D11Asynchronous}}</strong> interface for the object about which <strong>GetData</strong> retrieves data.</p> </dd> <dd> <p>Address of memory that will receive the data. If <strong>{{NULL}}</strong>, <strong>GetData</strong> will be used only to check status. The type of data output depends on the type of asynchronous interface.</p> </dd> <dd> <p>Size of the data to retrieve or 0. Must be 0 when <em>pData</em> is <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Optional flags. Can be 0 or any combination of the flags enumerated by <strong>{{D3D11_ASYNC_GETDATA_FLAG}}</strong>.</p> </dd> <p>Set a rendering predicate.</p> <p>The predicate must be in the "issued" or "signaled" state to be used for predication. While the predicate is set for predication, calls to <strong>{{ID3D11DeviceContext::Begin}}</strong> and <strong>{{ID3D11DeviceContext::End}}</strong> are invalid.</p><p>Use this method to denote that subsequent rendering and resource manipulation commands are not actually performed if the resulting predicate data of the predicate is equal to the <em>PredicateValue</em>. However, some predicates are only hints, so they may not actually prevent operations from being performed. </p><p>The primary usefulness of predication is to allow an application to issue rendering and resource manipulation commands without taking the performance hit of spinning, waiting for <strong>{{ID3D11DeviceContext::GetData}}</strong> to return. So, predication can occur while <strong>{{ID3D11DeviceContext::GetData}}</strong> returns <strong>{{S_FALSE}}</strong>. Another way to think of it: an application can also use predication as a fallback, if it is possible that <strong>{{ID3D11DeviceContext::GetData}}</strong> returns <strong>{{S_FALSE}}</strong>. If <strong>{{ID3D11DeviceContext::GetData}}</strong> returns <strong>{{S_OK}}</strong>, the application can skip calling the rendering and resource manipulation commands manually with it's own application logic.</p><p>Rendering and resource manipulation commands for Direct3D?11 include these Draw, Dispatch, Copy, Update, Clear, Generate, and Resolve operations.</p><ul> <li> <strong>Draw</strong> </li> <li> <strong>DrawAuto</strong> </li> <li> <strong>DrawIndexed</strong> </li> <li> <strong>DrawIndexedInstanced</strong> </li> <li> <strong>DrawIndexedInstancedIndirect</strong> </li> <li> <strong>DrawInstanced</strong> </li> <li> <strong>DrawInstancedIndirect</strong> </li> <li> <strong>Dispatch</strong> </li> <li> <strong>DispatchIndirect</strong> </li> <li> <strong>CopyResource</strong> </li> <li> <strong>CopyStructureCount</strong> </li> <li> <strong>CopySubresourceRegion</strong> </li> <li> <strong>CopySubresourceRegion1</strong> </li> <li> <strong>CopyTiles</strong> </li> <li> <strong>CopyTileMappings</strong> </li> <li> <strong>UpdateSubresource</strong> </li> <li> <strong>UpdateSubresource1</strong> </li> <li> <strong>UpdateTiles</strong> </li> <li> <strong>UpdateTileMappings</strong> </li> <li> <strong>ClearRenderTargetView</strong> </li> <li> <strong>ClearUnorderedAccessViewFloat</strong> </li> <li> <strong>ClearUnorderedAccessViewUint</strong> </li> <li> <strong>ClearView</strong> </li> <li> <strong>ClearDepthStencilView</strong> </li> <li> <strong>GenerateMips</strong> </li> <li> <strong>ResolveSubresource</strong> </li> </ul><p>You can set a rendering predicate on an immediate or a deferred context. For info about immediate and deferred contexts, see Immediate and Deferred Rendering. </p> <p>Returns nothing.</p> <dd> <p>A reference to the <strong>{{ID3D11Predicate}}</strong> interface that represents the rendering predicate. A <strong>{{NULL}}</strong> value indicates "no" predication; in this case, the value of <em>PredicateValue</em> is irrelevant but will be preserved for <strong>{{ID3D11DeviceContext::GetPredication}}</strong>.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, rendering will be affected by when the predicate's conditions are met. If <strong>{{FALSE}}</strong>, rendering will be affected when the conditions are not met.</p> </dd> <p>Bind an array of shader resources to the geometry shader stage.</p> <p>If an overlapping resource view is already bound to an output slot, such as a render target, then the method will fill the destination shader resource slot with <strong>{{NULL}}</strong>.</p><p>For information about creating shader-resource views, see <strong>{{ID3D11Device::CreateShaderResourceView}}</strong>.</p><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p> <p>This method does not return a value.</p> <dd> <p>Index into the device's zero-based array to begin setting shader resources to (ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources(ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Array of <strong>shader resource view</strong> interfaces to set to the device.</p> </dd> <p>Set an array of sampler states to the geometry shader pipeline stage.</p> <p>Any sampler may be set to <strong>{{NULL}}</strong>; this invokes the default state, which is defined to be the following.</p><pre> //Default sampler state: {{D3D11_SAMPLER_DESC}} SamplerDesc; SamplerDesc.Filter = {{D3D11_FILTER_MIN_MAG_MIP_LINEAR}}; SamplerDesc.AddressU = {{D3D11_TEXTURE_ADDRESS_CLAMP}}; SamplerDesc.AddressV = {{D3D11_TEXTURE_ADDRESS_CLAMP}}; SamplerDesc.AddressW = {{D3D11_TEXTURE_ADDRESS_CLAMP}}; SamplerDesc.MipLODBias = 0; SamplerDesc.MaxAnisotropy = 1; SamplerDesc.ComparisonFunc = {{D3D11_COMPARISON_NEVER}}; SamplerDesc.BorderColor[0] = 1.0f; SamplerDesc.BorderColor[1] = 1.0f; SamplerDesc.BorderColor[2] = 1.0f; SamplerDesc.BorderColor[3] = 1.0f; SamplerDesc.MinLOD = -{{FLT_MAX}}; SamplerDesc.MaxLOD = {{FLT_MAX}}; </pre><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p> <p>This method does not return a value.</p> <dd> <p>Index into the device's zero-based array to begin setting samplers to (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Pointer to an array of sampler-state interfaces (see <strong>{{ID3D11SamplerState}}</strong>). See Remarks.</p> </dd> <p>Bind one or more render targets atomically and the depth-stencil buffer to the output-merger stage.</p> <p>The maximum number of active render targets a device can have active at any given time is set by a #define in {{D3D11}}.h called <strong>{{D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT}}</strong>. It is invalid to try to set the same subresource to multiple render target slots. Any render targets not defined by this call are set to <strong>{{NULL}}</strong>.</p><p>If any subresources are also currently bound for reading in a different stage or writing (perhaps in a different part of the pipeline), those bind points will be set to <strong>{{NULL}}</strong>, in order to prevent the same subresource from being read and written simultaneously in a single rendering operation.</p><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p><p>If the render-target views were created from an array resource type, all of the render-target views must have the same array size. This restriction also applies to the depth-stencil view, its array size must match that of the render-target views being bound.</p><p>The pixel shader must be able to simultaneously render to at least eight separate render targets. All of these render targets must access the same type of resource: Buffer, Texture1D, Texture1DArray, Texture2D, Texture2DArray, Texture3D, or TextureCube. All render targets must have the same size in all dimensions (width and height, and depth for 3D or array size for *Array types). If render targets use multisample anti-aliasing, all bound render targets and depth buffer must be the same form of multisample resource (that is, the sample counts must be the same). Each render target can have a different data format. These render target formats are not required to have identical bit-per-element counts.</p><p>Any combination of the eight slots for render targets can have a render target set or not set.</p><p>The same resource view cannot be bound to multiple render target slots simultaneously. However, you can set multiple non-overlapping resource views of a single resource as simultaneous multiple render targets.</p> <p>Returns nothing.</p> <p>Binds resources to the output-merger stage.</p> <p> For pixel shaders, the render targets and unordered-access views share the same resource slots when being written out. This means that {{UAVs}} must be given an offset so that they are placed in the slots after the render target views that are being bound. </p><strong>Note</strong>??{{RTVs}}, {{DSV}}, and {{UAVs}} cannot be set independently; they all need to be set at the same time.?<p>Two {{RTVs}} conflict if they share a subresource (and therefore share the same resource).</p><p>Two {{UAVs}} conflict if they share a subresource (and therefore share the same resource).</p><p>An {{RTV}} conflicts with a {{UAV}} if they share a subresource or share a bind point.</p><p><strong>{{OMSetRenderTargetsAndUnorderedAccessViews}}</strong> operates properly in the following situations: </p><ol> <li> <p><em>NumRTVs</em> != {{D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL}} and <em>NumUAVs</em> != {{D3D11_KEEP_UNORDERED_ACCESS_VIEWS}} </p> <p> The following conditions must be true for <strong>{{OMSetRenderTargetsAndUnorderedAccessViews}}</strong> to succeed and for the runtime to pass the bind information to the driver: </p> <ul> <li><em>NumRTVs</em> &lt;= 8 </li> <li><em>{{UAVStartSlot}}</em> &gt;= <em>NumRTVs</em></li> <li><em>{{UAVStartSlot}}</em> + <em>NumUAVs</em> &lt;= 8 </li> <li> There must be no conflicts in the set of all <em>ppRenderTargetViews</em> and <em>ppUnorderedAccessViews</em>. </li> <li><em>ppDepthStencilView</em> must match the render-target views. For more information about resource views, see Introduction to a Resource in Direct3D 11. </li> </ul> <p><strong>{{OMSetRenderTargetsAndUnorderedAccessViews}}</strong> performs the following tasks: </p> <ul> <li>Unbinds all currently bound conflicting resources (stream-output target resources ({{SOTargets}}), compute shader ({{CS}}) {{UAVs}}, shader-resource views ({{SRVs}})).</li> <li> Binds <em>ppRenderTargetViews</em>, <em>ppDepthStencilView</em>, and <em>ppUnorderedAccessViews</em>. </li> </ul> </li> <li> <p><em>NumRTVs</em> == {{D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL}} </p> <p> In this situation, <strong>{{OMSetRenderTargetsAndUnorderedAccessViews}}</strong> binds only {{UAVs}}. </p> <p> The following conditions must be true for <strong>{{OMSetRenderTargetsAndUnorderedAccessViews}}</strong> to succeed and for the runtime to pass the bind information to the driver: </p> <ul> <li><em>{{UAVStartSlot}}</em> + <em>NumUAVs</em> &lt;= 8 </li> <li> There must be no conflicts in <em>ppUnorderedAccessViews</em>. </li> </ul> <p><strong>{{OMSetRenderTargetsAndUnorderedAccessViews}}</strong> unbinds the following items: </p> <ul> <li> All {{RTVs}} in slots &gt;= <em>{{UAVStartSlot}}</em></li> <li> All {{RTVs}} that conflict with any {{UAVs}} in <em>ppUnorderedAccessViews</em></li> <li> All currently bound resources ({{SOTargets}}, {{CS}} {{UAVs}}, {{SRVs}}) that conflict with <em>ppUnorderedAccessViews</em></li> </ul> <p><strong>{{OMSetRenderTargetsAndUnorderedAccessViews}}</strong> binds <em>ppUnorderedAccessViews</em>. </p> <p><strong>{{OMSetRenderTargetsAndUnorderedAccessViews}}</strong> ignores <em>ppDepthStencilView</em>, and the current depth-stencil view remains bound. </p> </li> <li> <p><em>NumUAVs</em> == {{D3D11_KEEP_UNORDERED_ACCESS_VIEWS}} </p> <p> In this situation, <strong>{{OMSetRenderTargetsAndUnorderedAccessViews}}</strong> binds only {{RTVs}} and {{DSV}}. </p> <p> The following conditions must be true for <strong>{{OMSetRenderTargetsAndUnorderedAccessViews}}</strong> to succeed and for the runtime to pass the bind information to the driver: </p> <ul> <li><em>NumRTVs</em> &lt;= 8 </li> <li> There must be no conflicts in <em>ppRenderTargetViews</em>. </li> <li><em>ppDepthStencilView</em> must match the render-target views. For more information about resource views, see Introduction to a Resource in Direct3D 11. </li> </ul> <p><strong>{{OMSetRenderTargetsAndUnorderedAccessViews}}</strong> unbinds the following items: </p> <ul> <li> All {{UAVs}} in slots &lt; <em>NumRTVs</em></li> <li> All {{UAVs}} that conflict with any {{RTVs}} in <em>ppRenderTargetViews</em></li> <li> All currently bound resources ({{SOTargets}}, {{CS}} {{UAVs}}, {{SRVs}}) that conflict with <em>ppRenderTargetViews</em></li> </ul> <p><strong>{{OMSetRenderTargetsAndUnorderedAccessViews}}</strong> binds <em>ppRenderTargetViews</em> and <em>ppDepthStencilView</em>. </p> <p><strong>{{OMSetRenderTargetsAndUnorderedAccessViews}}</strong> ignores <em>{{UAVStartSlot}}</em>. </p> </li> </ol><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>This method does not return a value.</p> <dd> <p> Number of render targets to bind (ranges between 0 and <strong>{{D3D11_SIMULTANEOUS_RENDER_TARGET_COUNT}}</strong>). If this parameter is nonzero, the number of entries in the array to which <em>ppRenderTargetViews</em> points must equal the number in this parameter. If you set <em>NumRTVs</em> to {{D3D11_KEEP_RENDER_TARGETS_AND_DEPTH_STENCIL}} (0xffffffff), this method does not modify the currently bound render-target views ({{RTVs}}) and also does not modify depth-stencil view ({{DSV}}). </p> </dd> <dd> <p> Pointer to an array of <strong>{{ID3D11RenderTargetView}}</strong>s that represent the render targets to bind to the device. If this parameter is <strong>{{NULL}}</strong> and <em>NumRTVs</em> is 0, no render targets are bound. </p> </dd> <dd> <p> Pointer to a <strong>{{ID3D11DepthStencilView}}</strong> that represents the depth-stencil view to bind to the device. If this parameter is <strong>{{NULL}}</strong>, the depth-stencil state is not bound. </p> </dd> <dd> <p>Index into a zero-based array to begin setting unordered-access views (ranges from 0 to {{D3D11_PS_CS_UAV_REGISTER_COUNT}} - 1).</p> <p> For the Direct3D 11.1 runtime, which is available starting with Windows?8, this value can range from 0 to {{D3D11_1_UAV_SLOT_COUNT}} - 1. {{D3D11_1_UAV_SLOT_COUNT}} is defined as 64. </p> <p> For pixel shaders, <em>{{UAVStartSlot}}</em> should be equal to the number of render-target views being bound. </p> </dd> <dd> <p> Number of unordered-access views ({{UAVs}}) in <em>ppUnorderedAccessViews</em>. If you set <em>NumUAVs</em> to {{D3D11_KEEP_UNORDERED_ACCESS_VIEWS}} (0xffffffff), this method does not modify the currently bound unordered-access views. </p> <p> For the Direct3D 11.1 runtime, which is available starting with Windows?8, this value can range from 0 to {{D3D11_1_UAV_SLOT_COUNT}} - <em>{{UAVStartSlot}}</em>. </p> </dd> <dd> <p> Pointer to an array of <strong>{{ID3D11UnorderedAccessView}}</strong>s that represent the unordered-access views to bind to the device. If this parameter is <strong>{{NULL}}</strong> and <em>NumUAVs</em> is 0, no unordered-access views are bound. </p> </dd> <dd> <p> An array of append and consume buffer offsets. A value of -1 indicates to keep the current offset. Any other values set the hidden counter for that appendable and consumable {{UAV}}. <em>pUAVInitialCounts</em> is relevant only for {{UAVs}} that were created with either <strong>{{D3D11_BUFFER_UAV_FLAG_APPEND}}</strong> or <strong>{{D3D11_BUFFER_UAV_FLAG_COUNTER}}</strong> specified when the {{UAV}} was created; otherwise, the argument is ignored. </p> </dd> <p>Set the blend state of the output-merger stage.</p> <p>Blend state is used by the output-merger stage to determine how to blend together two {{RGB}} pixel values and two alpha values. The two {{RGB}} pixel values and two alpha values are the {{RGB}} pixel value and alpha value that the pixel shader outputs and the {{RGB}} pixel value and alpha value already in the output render target. The <strong>blend option</strong> controls the data source that the blending stage uses to modulate values for the pixel shader, render target, or both. The <strong>blend operation</strong> controls how the blending stage mathematically combines these modulated values.</p><p>To create a blend-state interface, call <strong>{{ID3D11Device::CreateBlendState}}</strong>.</p><p>Passing in <strong>{{NULL}}</strong> for the blend-state interface indicates to the runtime to set a default blending state. The following table indicates the default blending parameters.</p><table> <tr><th>State</th><th>Default Value</th></tr> <tr><td>AlphaToCoverageEnable</td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>IndependentBlendEnable</td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>RenderTarget[0].BlendEnable</td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>RenderTarget[0].SrcBlend</td><td>{{D3D11_BLEND_ONE}}</td></tr> <tr><td>RenderTarget[0].DestBlend</td><td>{{D3D11_BLEND_ZERO}}</td></tr> <tr><td>RenderTarget[0].BlendOp</td><td>{{D3D11_BLEND_OP_ADD}}</td></tr> <tr><td>RenderTarget[0].SrcBlendAlpha</td><td>{{D3D11_BLEND_ONE}}</td></tr> <tr><td>RenderTarget[0].DestBlendAlpha</td><td>{{D3D11_BLEND_ZERO}}</td></tr> <tr><td>RenderTarget[0].BlendOpAlpha</td><td>{{D3D11_BLEND_OP_ADD}}</td></tr> <tr><td>RenderTarget[0].RenderTargetWriteMask</td><td>{{D3D11_COLOR_WRITE_ENABLE_ALL}}</td></tr> </table><p>?</p><p>A sample mask determines which samples get updated in all the active render targets. The mapping of bits in a sample mask to samples in a multisample render target is the responsibility of an individual application. A sample mask is always applied; it is independent of whether multisampling is enabled, and does not depend on whether an application uses multisample render targets.</p><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p> <p>Returns nothing.</p> <dd> <p>Pointer to a blend-state interface (see <strong>{{ID3D11BlendState}}</strong>). Pass <strong>{{NULL}}</strong> for a default blend state. For more info about default blend state, see Remarks.</p> </dd> <dd> <p>Array of blend factors, one for each {{RGBA}} component. The blend factors modulate values for the pixel shader, render target, or both. If you created the blend-state object with <strong>{{D3D11_BLEND_BLEND_FACTOR}}</strong> or <strong>{{D3D11_BLEND_INV_BLEND_FACTOR}}</strong>, the blending stage uses the non-{{NULL}} array of blend factors. If you didn't create the blend-state object with <strong>{{D3D11_BLEND_BLEND_FACTOR}}</strong> or <strong>{{D3D11_BLEND_INV_BLEND_FACTOR}}</strong>, the blending stage does not use the non-{{NULL}} array of blend factors; the runtime stores the blend factors, and you can later call <strong>{{ID3D11DeviceContext::OMGetBlendState}}</strong> to retrieve the blend factors. If you pass <strong>{{NULL}}</strong>, the runtime uses or stores a blend factor equal to { 1, 1, 1, 1 }.</p> </dd> <dd> <p>32-bit sample coverage. The default value is 0xffffffff. See remarks.</p> </dd> <p>Sets the depth-stencil state of the output-merger stage.</p> <p>To create a depth-stencil state interface, call <strong>{{ID3D11Device::CreateDepthStencilState}}</strong>.</p><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p> <p>Returns nothing.</p> <dd> <p>Pointer to a depth-stencil state interface (see <strong>{{ID3D11DepthStencilState}}</strong>) to bind to the device. Set this to <strong>{{NULL}}</strong> to use the default state listed in <strong>{{D3D11_DEPTH_STENCIL_DESC}}</strong>.</p> </dd> <dd> <p>Reference value to perform against when doing a depth-stencil test. See remarks.</p> </dd> <p>Set the target output buffers for the stream-output stage of the pipeline.</p> <p>An offset of -1 will cause the stream output buffer to be appended, continuing after the last location written to the buffer in a previous stream output pass.</p><p> Calling this method using a buffer that is currently bound for writing will effectively bind <strong>{{NULL}}</strong> instead because a buffer cannot be bound as both an input and an output at the same time. </p><p>The debug layer will generate a warning whenever a resource is prevented from being bound simultaneously as an input and an output, but this will not prevent invalid data from being used by the runtime.</p><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>This method does not return a value.</p> <dd> <p> The number of buffer to bind to the device. A maximum of four output buffers can be set. If less than four are defined by the call, the remaining buffer slots are set to <strong>{{NULL}}</strong>. See Remarks. </p> </dd> <dd> <p> The array of output buffers (see <strong>{{ID3D11Buffer}}</strong>) to bind to the device. The buffers must have been created with the <strong>{{D3D11_BIND_STREAM_OUTPUT}}</strong> flag. </p> </dd> <dd> <p> Array of offsets to the output buffers from <em>ppSOTargets</em>, one offset for each buffer. The offset values must be in bytes. </p> </dd> <p>Draw geometry of an unknown size.</p> <p>A draw {{API}} submits work to the rendering pipeline. This {{API}} submits work of an unknown size that was processed by the input assembler, vertex shader, and stream-output stages; the work may or may not have gone through the geometry-shader stage.</p><p>After data has been streamed out to stream-output stage buffers, those buffers can be again bound to the Input Assembler stage at input slot 0 and DrawAuto will draw them without the application needing to know the amount of data that was written to the buffers. A measurement of the amount of data written to the {{SO}} stage buffers is maintained internally when the data is streamed out. This means that the {{CPU}} does not need to fetch the measurement before re-binding the data that was streamed as input data. Although this amount is tracked internally, it is still the responsibility of applications to use input layouts to describe the format of the data in the {{SO}} stage buffers so that the layouts are available when the buffers are again bound to the input assembler.</p><p>The following diagram shows the DrawAuto process.</p><p></p><p>Calling DrawAuto does not change the state of the streaming-output buffers that were bound again as inputs.</p><p>DrawAuto only works when drawing with one input buffer bound as an input to the {{IA}} stage at slot 0. Applications must create the {{SO}} buffer resource with both binding flags, <strong>{{D3D11_BIND_VERTEX_BUFFER}}</strong> and <strong>{{D3D11_BIND_STREAM_OUTPUT}}</strong>.</p><p>This {{API}} does not support indexing or instancing.</p><p>If an application needs to retrieve the size of the streaming-output buffer, it can query for statistics on streaming output by using <strong>{{D3D11_QUERY_SO_STATISTICS}}</strong>.</p> <p>Returns nothing.</p> <p>Draw indexed, instanced, {{GPU}}-generated primitives.</p> <p> When an application creates a buffer that is associated with the <strong>{{ID3D11Buffer}}</strong> interface that <em>pBufferForArgs</em> points to, the application must set the <strong>{{D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS}}</strong> flag in the <strong>MiscFlags</strong> member of the <strong>{{D3D11_BUFFER_DESC}}</strong> structure that describes the buffer. To create the buffer, the application calls the <strong>{{ID3D11Device::CreateBuffer}}</strong> method and in this call passes a reference to <strong>{{D3D11_BUFFER_DESC}}</strong> in the <em>pDesc</em> parameter. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Returns nothing.</p> <dd> <p> A reference to an <strong>{{ID3D11Buffer}}</strong>, which is a buffer containing the {{GPU}} generated primitives. </p> </dd> <dd> <p> Offset in <em>pBufferForArgs</em> to the start of the {{GPU}} generated primitives. </p> </dd> <p>Draw instanced, {{GPU}}-generated primitives.</p> <p>When an application creates a buffer that is associated with the <strong>{{ID3D11Buffer}}</strong> interface that <em>pBufferForArgs</em> points to, the application must set the <strong>{{D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS}}</strong> flag in the <strong>MiscFlags</strong> member of the <strong>{{D3D11_BUFFER_DESC}}</strong> structure that describes the buffer. To create the buffer, the application calls the <strong>{{ID3D11Device::CreateBuffer}}</strong> method and in this call passes a reference to <strong>{{D3D11_BUFFER_DESC}}</strong> in the <em>pDesc</em> parameter.</p> <p>Returns nothing.</p> <dd> <p>A reference to an <strong>{{ID3D11Buffer}}</strong>, which is a buffer containing the {{GPU}} generated primitives.</p> </dd> <dd> <p>Offset in <em>pBufferForArgs</em> to the start of the {{GPU}} generated primitives.</p> </dd> <p>Execute a command list from a thread group.</p> <p>You call the <strong>Dispatch</strong> method to execute commands in a compute shader. A compute shader can be run on many threads in parallel, within a thread group. Index a particular thread, within a thread group using a 3D vector given by (x,y,z).</p><p>In the following illustration, assume a thread group with 50 threads where the size of the group is given by (5,5,2). A single thread is identified from a thread group with 50 threads in it, using the vector (4,1,1).</p><p></p><p>The following illustration shows the relationship between the parameters passed to <strong>{{ID3D11DeviceContext::Dispatch}}</strong>, Dispatch(5,3,2), the values specified in the numthreads attribute, numthreads(10,8,3), and values that will passed to the compute shader for the thread-related system values ({{SV_GroupIndex}},{{SV_DispatchThreadID}},{{SV_GroupThreadID}},{{SV_GroupID}}).</p><p></p> <p>Returns nothing.</p> <dd> <p>The number of groups dispatched in the x direction. <em>ThreadGroupCountX</em> must be less than or equal to {{D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION}} (65535).</p> </dd> <dd> <p>The number of groups dispatched in the y direction. <em>ThreadGroupCountY</em> must be less than or equal to {{D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION}} (65535).</p> </dd> <dd> <p>The number of groups dispatched in the z direction. <em>ThreadGroupCountZ</em> must be less than or equal to {{D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION}} (65535). In feature level 10 the value for <em>ThreadGroupCountZ</em> must be 1.</p> </dd> <p>Execute a command list over one or more thread groups.</p> <p>You call the <strong>DispatchIndirect</strong> method to execute commands in a compute shader.</p><p>When an application creates a buffer that is associated with the <strong>{{ID3D11Buffer}}</strong> interface that <em>pBufferForArgs</em> points to, the application must set the <strong>{{D3D11_RESOURCE_MISC_DRAWINDIRECT_ARGS}}</strong> flag in the <strong>MiscFlags</strong> member of the <strong>{{D3D11_BUFFER_DESC}}</strong> structure that describes the buffer. To create the buffer, the application calls the <strong>{{ID3D11Device::CreateBuffer}}</strong> method and in this call passes a reference to <strong>{{D3D11_BUFFER_DESC}}</strong> in the <em>pDesc</em> parameter.</p> <p>Returns nothing.</p> <dd> <p>A reference to an <strong>{{ID3D11Buffer}}</strong>, which must be loaded with data that matches the argument list for <strong>{{ID3D11DeviceContext::Dispatch}}</strong>.</p> </dd> <dd> <p>A byte-aligned offset between the start of the buffer and the arguments.</p> </dd> <p>Set the <strong>rasterizer state</strong> for the rasterizer stage of the pipeline.</p> <p>To create a rasterizer state interface, call <strong>{{ID3D11Device::CreateRasterizerState}}</strong>.</p><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p> <p>Returns nothing.</p> <p>Bind an array of viewports to the rasterizer stage of the pipeline.</p> <p>All viewports must be set atomically as one operation. Any viewports not defined by the call are disabled.</p><p>Which viewport to use is determined by the {{SV_ViewportArrayIndex}} semantic output by a geometry shader; if a geometry shader does not specify the semantic, Direct3D will use the first viewport in the array.</p><strong>Note</strong>??Even though you specify float values to the members of the <strong>{{D3D11_VIEWPORT}}</strong> structure for the <em>pViewports</em> array in a call to <strong>{{ID3D11DeviceContext::RSSetViewports}}</strong> for feature levels 9_x, <strong>{{RSSetViewports}}</strong> uses {{DWORDs}} internally. Because of this behavior, when you use a negative top left corner for the viewport, the call to <strong>{{RSSetViewports}}</strong> for feature levels 9_x fails. This failure occurs because <strong>{{RSSetViewports}}</strong> for 9_x casts the floating point values into unsigned integers without validation, which results in integer overflow.? <p>Returns nothing.</p> <dd> <p>Number of viewports to bind.</p> </dd> <dd> <p>An array of <strong>{{D3D11_VIEWPORT}}</strong> structures to bind to the device. See the structure page for details about how the viewport size is dependent on the device feature level which has changed between Direct3D 11 and Direct3D 10.</p> </dd> <p>Bind an array of scissor rectangles to the rasterizer stage.</p> <p>All scissor rects must be set atomically as one operation. Any scissor rects not defined by the call are disabled.</p><p> The scissor rectangles will only be used if ScissorEnable is set to true in the rasterizer state (see <strong>{{D3D11_RASTERIZER_DESC}}</strong>). </p><p>Which scissor rectangle to use is determined by the {{SV_ViewportArrayIndex}} semantic output by a geometry shader (see shader semantic syntax). If a geometry shader does not make use of the {{SV_ViewportArrayIndex}} semantic then Direct3D will use the first scissor rectangle in the array.</p><p> Each scissor rectangle in the array corresponds to a viewport in an array of viewports (see <strong>{{ID3D11DeviceContext::RSSetViewports}}</strong>). </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Returns nothing.</p> <dd> <p>Number of scissor rectangles to bind.</p> </dd> <dd> <p> An array of scissor rectangles (see <strong>{{D3D11_RECT}}</strong>). </p> </dd> <p>Copy a region from a source resource to a destination resource.</p> <p>The source box must be within the size of the source resource. The destination offsets, (x, y, and z), allow the source box to be offset when writing into the destination resource; however, the dimensions of the source box and the offsets must be within the size of the resource. If you try and copy outside the destination resource or specify a source box that is larger than the source resource, the behavior of <strong>CopySubresourceRegion</strong> is undefined. If you created a device that supports the debug layer, the debug output reports an error on this invalid <strong>CopySubresourceRegion</strong> call. Invalid parameters to <strong>CopySubresourceRegion</strong> cause undefined behavior and might result in incorrect rendering, clipping, no copy, or even the removal of the rendering device.</p><p>If the resources are buffers, all coordinates are in bytes; if the resources are textures, all coordinates are in texels. <strong>{{D3D11CalcSubresource}}</strong> is a helper function for calculating subresource indexes.</p><p><strong>CopySubresourceRegion</strong> performs the copy on the {{GPU}} (similar to a memcpy by the {{CPU}}). As a consequence, the source and destination resources:</p><ul> <li>Must be different subresources (although they can be from the same resource).</li> <li>Must be the same type.</li> <li>Must have compatible {{DXGI}} formats (identical or from the same type group). For example, a {{DXGI_FORMAT_R32G32B32_FLOAT}} texture can be copied to an {{DXGI_FORMAT_R32G32B32_UINT}} texture since both of these formats are in the {{DXGI_FORMAT_R32G32B32_TYPELESS}} group. <strong>CopySubresourceRegion</strong> can copy between a few format types. For more info, see Format Conversion using Direct3D 10.1.</li> <li>May not be currently mapped.</li> </ul><p><strong>CopySubresourceRegion</strong> only supports copy; it does not support any stretch, color key, or blend. <strong>CopySubresourceRegion</strong> can reinterpret the resource data between a few format types. For more info, see Format Conversion using Direct3D 10.1.</p><p> If your app needs to copy an entire resource, we recommend to use <strong>{{ID3D11DeviceContext::CopyResource}}</strong> instead. </p><p><strong>CopySubresourceRegion</strong> is an asynchronous call, which may be added to the command-buffer queue, this attempts to remove pipeline stalls that may occur when copying data. For more information about pipeline stalls, see performance considerations.</p><strong>Note</strong>??<strong>Applies only to feature level 9_x hardware</strong> If you use <strong>{{ID3D11DeviceContext::UpdateSubresource}}</strong> or <strong>CopySubresourceRegion</strong> to copy from a staging resource to a default resource, you can corrupt the destination contents. This occurs if you pass a <strong>{{NULL}}</strong> source box and if the source resource has different dimensions from those of the destination resource or if you use destination offsets, (x, y, and z). In this situation, always pass a source box that is the full size of the source resource.?<strong>Note</strong>??<strong>Applies only to feature level 9_x hardware</strong> You can't use <strong>CopySubresourceRegion</strong> to copy mipmapped volume textures.?<strong>Note</strong>??<strong>Applies only to feature levels 9_x</strong> Subresources created with the {{D3D11_BIND_DEPTH_STENCIL}} flag can only be used as a source for <strong>CopySubresourceRegion</strong>.?<strong>Note</strong>??If you use <strong>CopySubresourceRegion</strong> with a depth-stencil buffer or a multisampled resource, you must copy the whole subresource. In this situation, you must pass 0 to the <em>DstX</em>, <em>DstY</em>, and <em>DstZ</em> parameters and <strong>{{NULL}}</strong> to the <em>pSrcBox</em> parameter. In addition, source and destination resources, which are represented by the <em>pSrcResource</em> and <em>pDstResource</em> parameters, should have identical sample count values.? <p>Returns nothing</p> <dd> <p>A reference to the destination resource (see <strong>{{ID3D11Resource}}</strong>).</p> </dd> <dd> <p>Destination subresource index.</p> </dd> <dd> <p>The x-coordinate of the upper left corner of the destination region.</p> </dd> <dd> <p>The y-coordinate of the upper left corner of the destination region. For a 1D subresource, this must be zero.</p> </dd> <dd> <p>The z-coordinate of the upper left corner of the destination region. For a 1D or 2D subresource, this must be zero.</p> </dd> <dd> <p>A reference to the source resource (see <strong>{{ID3D11Resource}}</strong>).</p> </dd> <dd> <p>Source subresource index.</p> </dd> <dd> <p>A reference to a 3D box (see <strong>{{D3D11_BOX}}</strong>) that defines the source subresource that can be copied. If <strong>{{NULL}}</strong>, the entire source subresource is copied. The box must fit within the source resource.</p> <p>An empty box results in a no-op. A box is empty if the top value is greater than or equal to the bottom value, or the left value is greater than or equal to the right value, or the front value is greater than or equal to the back value. When the box is empty, <strong>CopySubresourceRegion</strong> doesn't perform a copy operation.</p> </dd> <p>Copy the entire contents of the source resource to the destination resource using the {{GPU}}. </p> <p>This method is unusual in that it causes the {{GPU}} to perform the copy operation (similar to a memcpy by the {{CPU}}). As a result, it has a few restrictions designed for improving performance. For instance, the source and destination resources:</p><ul> <li>Must be different resources.</li> <li>Must be the same type.</li> <li>Must have identical dimensions (including width, height, depth, and size as appropriate).</li> <li>Must have compatible {{DXGI}} formats, which means the formats must be identical or at least from the same type group. For example, a {{DXGI_FORMAT_R32G32B32_FLOAT}} texture can be copied to an {{DXGI_FORMAT_R32G32B32_UINT}} texture since both of these formats are in the {{DXGI_FORMAT_R32G32B32_TYPELESS}} group. <strong>CopyResource</strong> can copy between a few format types. For more info, see Format Conversion using Direct3D 10.1.</li> <li>Can't be currently mapped.</li> </ul><p><strong>CopyResource</strong> only supports copy; it doesn't support any stretch, color key, or blend. <strong>CopyResource</strong> can reinterpret the resource data between a few format types. For more info, see Format Conversion using Direct3D 10.1.</p><p>You can't use an <strong>Immutable</strong> resource as a destination. You can use a <strong>depth-stencil</strong> resource as either a source or a destination provided that the feature level is {{D3D_FEATURE_LEVEL_10_1}} or greater. For feature levels 9_x, resources created with the {{D3D11_BIND_DEPTH_STENCIL}} flag can only be used as a source for <strong>CopyResource</strong>. Resources created with multisampling capability (see <strong>{{DXGI_SAMPLE_DESC}}</strong>) can be used as source and destination only if both source and destination have identical multisampled count and quality. If source and destination differ in multisampled count and quality or if one is multisampled and the other is not multisampled, the call to <strong>{{ID3D11DeviceContext::CopyResource}}</strong> fails. Use <strong>{{ID3D11DeviceContext::ResolveSubresource}}</strong> to resolve a multisampled resource to a resource that is not multisampled.</p><p>The method is an asynchronous call, which may be added to the command-buffer queue. This attempts to remove pipeline stalls that may occur when copying data. For more info, see performance considerations.</p><p>We recommend to use <strong>{{ID3D11DeviceContext::CopySubresourceRegion}}</strong> instead if you only need to copy a portion of the data in a resource.</p> <p>Returns nothing</p> <dd> <p>A reference to the <strong>{{ID3D11Resource}}</strong> interface that represents the destination resource.</p> </dd> <dd> <p>A reference to the <strong>{{ID3D11Resource}}</strong> interface that represents the source resource.</p> </dd> <p>The {{CPU}} copies data from memory to a subresource created in non-mappable memory.</p> <p>For a shader-constant buffer; set <em>pDstBox</em> to <strong>{{NULL}}</strong>. It is not possible to use this method to partially update a shader-constant buffer.</p><p>A resource cannot be used as a destination if:</p><ul> <li>the resource is created with <strong>immutable</strong> or <strong>dynamic</strong> usage.</li> <li>the resource is created as a depth-stencil resource.</li> <li>the resource is created with multisampling capability (see <strong>{{DXGI_SAMPLE_DESC}}</strong>).</li> </ul><p>When <strong>UpdateSubresource</strong> returns, the application is free to change or even free the data pointed to by <em>pSrcData</em> because the method has already copied/snapped away the original contents.</p><p>The performance of <strong>UpdateSubresource</strong> depends on whether or not there is contention for the destination resource. For example, contention for a vertex buffer resource occurs when the application executes a <strong>Draw</strong> call and later calls <strong>UpdateSubresource</strong> on the same vertex buffer before the <strong>Draw</strong> call is actually executed by the {{GPU}}.</p><ul> <li>When there is contention for the resource, <strong>UpdateSubresource</strong> will perform 2 copies of the source data. First, the data is copied by the {{CPU}} to a temporary storage space accessible by the command buffer. This copy happens before the method returns. A second copy is then performed by the {{GPU}} to copy the source data into non-mappable memory. This second copy happens asynchronously because it is executed by {{GPU}} when the command buffer is flushed.</li> <li>When there is no resource contention, the behavior of <strong>UpdateSubresource</strong> is dependent on which is faster (from the {{CPU}}'s perspective): copying the data to the command buffer and then having a second copy execute when the command buffer is flushed, or having the {{CPU}} copy the data to the final resource location. This is dependent on the architecture of the underlying system.</li> </ul><strong>Note</strong>??<strong>Applies only to feature level 9_x hardware</strong> If you use <strong>UpdateSubresource</strong> or <strong>{{ID3D11DeviceContext::CopySubresourceRegion}}</strong> to copy from a staging resource to a default resource, you can corrupt the destination contents. This occurs if you pass a <strong>{{NULL}}</strong> source box and if the source resource has different dimensions from those of the destination resource or if you use destination offsets, (x, y, and z). In this situation, always pass a source box that is the full size of the source resource.?<p>To better understand the source row pitch and source depth pitch parameters, the following illustration shows a 3D volume texture.</p><p></p><p>Each block in this visual represents an element of data, and the size of each element is dependent on the resource's format. For example, if the resource format is {{DXGI_FORMAT_R32G32B32A32_FLOAT}}, the size of each element would be 128 bits, or 16 bytes. This 3D volume texture has a width of two, a height of three, and a depth of four.</p><p>To calculate the source row pitch and source depth pitch for a given resource, use the following formulas:</p><ul> <li>Source Row Pitch = [size of one element in bytes] * [number of elements in one row]</li> <li>Source Depth Pitch = [Source Row Pitch] * [number of rows (height)]</li> </ul><p>In the case of this example 3D volume texture where the size of each element is 16 bytes, the formulas are as follows:</p><ul> <li>Source Row Pitch = 16 * 2 = 32</li> <li>Source Depth Pitch = 16 * 2 * 3 = 96</li> </ul><p>The following illustration shows the resource as it is laid out in memory.</p><p></p><p>For example, the following code snippet shows how to specify a destination region in a 2D texture. Assume the destination texture is 512x512 and the operation will copy the data pointed to by <em>pData</em> to [(120,100)..(200,220)] in the destination texture. Also assume that <em>rowPitch</em> has been initialized with the proper value (as explained above). <strong>front</strong> and <strong>back</strong> are set to 0 and 1 respectively, because by having <strong>front</strong> equal to <strong>back</strong>, the box is technically empty.</p><pre> {{D3D11_BOX}} destRegion; destRegion.left = 120; destRegion.right = 200; destRegion.top = 100; destRegion.bottom = 220; destRegion.front = 0; destRegion.back = 1; pd3dDeviceContext-&gt;UpdateSubresource( pDestTexture, 0, &amp;destRegion, pData, rowPitch, 0 ); </pre><p>The 1D case is similar. The following snippet shows how to specify a destination region in a 1D texture. Use the same assumptions as above, except that the texture is 512 in length.</p><pre> {{D3D11_BOX}} destRegion; destRegion.left = 120; destRegion.right = 200; destRegion.top = 0; destRegion.bottom = 1; destRegion.front = 0; destRegion.back = 1; pd3dDeviceContext-&gt;UpdateSubresource( pDestTexture, 0, &amp;destRegion, pData, rowPitch, 0 ); </pre><p>For info about various resource types and how <strong>UpdateSubresource</strong> might work with each resource type, see Introduction to a Resource in Direct3D 11. </p> <p>Returns nothing</p> <dd> <p>A reference to the destination resource (see <strong>{{ID3D11Resource}}</strong>).</p> </dd> <dd> <p>A zero-based index, that identifies the destination subresource. See <strong>{{D3D11CalcSubresource}}</strong> for more details.</p> </dd> <dd> <p>A reference to a box that defines the portion of the destination subresource to copy the resource data into. Coordinates are in bytes for buffers and in texels for textures. If <strong>{{NULL}}</strong>, the data is written to the destination subresource with no offset. The dimensions of the source must fit the destination (see <strong>{{D3D11_BOX}}</strong>).</p> <p>An empty box results in a no-op. A box is empty if the top value is greater than or equal to the bottom value, or the left value is greater than or equal to the right value, or the front value is greater than or equal to the back value. When the box is empty, <strong>UpdateSubresource</strong> doesn't perform an update operation.</p> </dd> <dd> <p>A reference to the source data in memory.</p> </dd> <dd> <p>The size of one row of the source data.</p> </dd> <dd> <p>The size of one depth slice of source data.</p> </dd> <p>Copies data from a buffer holding variable length data.</p> <p>Returns nothing.</p> <dd> <p>Pointer to <strong>{{ID3D11Buffer}}</strong>. This can be any buffer resource that other copy commands, such as <strong>{{ID3D11DeviceContext::CopyResource}}</strong> or <strong>{{ID3D11DeviceContext::CopySubresourceRegion}}</strong>, are able to write to.</p> </dd> <dd> <p>Offset from the start of <em>pDstBuffer</em> to write 32-bit {{UINT}} structure (vertex) count from <em>pSrcView</em>.</p> </dd> <dd> <p>Pointer to an <strong>{{ID3D11UnorderedAccessView}}</strong> of a Structured Buffer resource created with either <strong>{{D3D11_BUFFER_UAV_FLAG_APPEND}}</strong> or <strong>{{D3D11_BUFFER_UAV_FLAG_COUNTER}}</strong> specified when the {{UAV}} was created. These types of resources have hidden counters tracking "how many" records have been written.</p> </dd> <p>Set all the elements in a render target to one value.</p> <p>Applications that wish to clear a render target to a specific integer value bit pattern should render a screen-aligned quad instead of using this method. The reason for this is because this method accepts as input a floating point value, which may not have the same bit pattern as the original integer.</p><table> <tr><td> <p>Differences between Direct3D 9 and Direct3D 11/10:</p> <p>Unlike Direct3D 9, the full extent of the resource view is always cleared. Viewport and scissor settings are not applied.</p> </td></tr> </table><p>?</p><p>When using <strong>{{D3D_FEATURE_LEVEL_9_x}}</strong>, <strong>ClearRenderTargetView</strong> only clears the first array slice in the render target view. This can impact (for example) cube map rendering scenarios. Applications should create a render target view for each face or array slice, then clear each view individually.</p> <p>Returns nothing.</p> <dd> <p>Pointer to the render target.</p> </dd> <dd> <p>A 4-component array that represents the color to fill the render target with.</p> </dd> <p>Clears an unordered access resource with bit-precise values.</p> <p>This {{API}} copies the lower ni bits from each array element i to the corresponding channel, where ni is the number of bits in the ith channel of the resource format (for example, {{R8G8B8_FLOAT}} has 8 bits for the first 3 channels). This works on any {{UAV}} with no format conversion. For a raw or structured buffer view, only the first array element value is used.</p> <p>Returns nothing.</p> <p>Clears an unordered access resource with a float value.</p> <p>This {{API}} works on {{FLOAT}}, {{UNORM}}, and {{SNORM}} unordered access views ({{UAVs}}), with format conversion from {{FLOAT}} to *{{NORM}} where appropriate. On other {{UAVs}}, the operation is invalid and the call will not reach the driver.</p> <p>Returns nothing.</p> <p>Clears the depth-stencil resource.</p> <table> <tr><td> <p>Differences between Direct3D 9 and Direct3D 11/10:</p> <p>Unlike Direct3D 9, the full extent of the resource view is always cleared. Viewport and scissor settings are not applied.</p> </td></tr> </table><p>?</p> <p>Returns nothing.</p> <dd> <p>Pointer to the depth stencil to be cleared.</p> </dd> <dd> <p>Identify the type of data to clear (see <strong>{{D3D11_CLEAR_FLAG}}</strong>).</p> </dd> <dd> <p>Clear the depth buffer with this value. This value will be clamped between 0 and 1.</p> </dd> <dd> <p>Clear the stencil buffer with this value.</p> </dd> <p>Generates mipmaps for the given shader resource.</p> <p>You can call <strong>GenerateMips</strong> on any shader-resource view to generate the lower mipmap levels for the shader resource. <strong>GenerateMips</strong> uses the largest mipmap level of the view to recursively generate the lower levels of the mip and stops with the smallest level that is specified by the view. If the base resource wasn't created with <strong>{{D3D11_BIND_RENDER_TARGET}}</strong>, <strong>{{D3D11_BIND_SHADER_RESOURCE}}</strong>, and <strong>{{D3D11_RESOURCE_MISC_GENERATE_MIPS}}</strong>, the call to <strong>GenerateMips</strong> has no effect.</p><p>Feature levels 9.1, 9.2, and 9.3 can't support automatic generation of mipmaps for 3D (volume) textures.</p><p>Video adapters that support feature level 9.1 and higher support generating mipmaps if you use any of these formats:</p><pre> {{DXGI_FORMAT_R8G8B8A8_UNORM}} {{DXGI_FORMAT_R8G8B8A8_UNORM_SRGB}} {{DXGI_FORMAT_B5G6R5_UNORM}} {{DXGI_FORMAT_B8G8R8A8_UNORM}} {{DXGI_FORMAT_B8G8R8A8_UNORM_SRGB}} {{DXGI_FORMAT_B8G8R8X8_UNORM}} {{DXGI_FORMAT_B8G8R8X8_UNORM_SRGB}} </pre><p>Video adapters that support feature level 9.2 and higher support generating mipmaps if you use any of these formats in addition to any of the formats for feature level 9.1:</p><pre> {{DXGI_FORMAT_R16G16B16A16_FLOAT}} {{DXGI_FORMAT_R16G16B16A16_UNORM}} {{DXGI_FORMAT_R16G16_FLOAT}} {{DXGI_FORMAT_R16G16_UNORM}} {{DXGI_FORMAT_R32_FLOAT}} </pre><p>Video adapters that support feature level 9.3 and higher support generating mipmaps if you use any of these formats in addition to any of the formats for feature levels 9.1 and 9.2:</p><pre> {{DXGI_FORMAT_R32G32B32A32_FLOAT}} {{DXGI_FORMAT_B4G4R4A4}} (optional) </pre><p>Video adapters that support feature level 10 and higher support generating mipmaps if you use any of these formats in addition to any of the formats for feature levels 9.1, 9.2, and 9.3:</p><pre> {{DXGI_FORMAT_R32G32B32_FLOAT}} (optional) {{DXGI_FORMAT_R16G16B16A16_SNORM}} {{DXGI_FORMAT_R32G32_FLOAT}} {{DXGI_FORMAT_R10G10B10A2_UNORM}} {{DXGI_FORMAT_R11G11B10_FLOAT}} {{DXGI_FORMAT_R8G8B8A8_SNORM}} {{DXGI_FORMAT_R16G16_SNORM}} {{DXGI_FORMAT_R8G8_UNORM}} {{DXGI_FORMAT_R8G8_SNORM}} {{DXGI_FORMAT_R16_FLOAT}} {{DXGI_FORMAT_R16_UNORM}} {{DXGI_FORMAT_R16_SNORM}} {{DXGI_FORMAT_R8_UNORM}} {{DXGI_FORMAT_R8_SNORM}} {{DXGI_FORMAT_A8_UNORM}} {{DXGI_FORMAT_B5G5R5A1_UNORM}} (optional) </pre><p>For all other unsupported formats, <strong>GenerateMips</strong> will silently fail.</p> <p>Returns nothing.</p> <dd> <p>A reference to an <strong>{{ID3D11ShaderResourceView}}</strong> interface that represents the shader resource.</p> </dd> <p>Sets the minimum level-of-detail ({{LOD}}) for a resource.</p> <p>To use a resource with <strong>SetResourceMinLOD</strong>, you must set the <strong>{{D3D11_RESOURCE_MISC_RESOURCE_CLAMP}}</strong> flag when you create that resource.</p><p>For Direct3D 10 and Direct3D 10.1, when sampling from a texture resource in a shader, the sampler can define a minimum {{LOD}} clamp to force sampling from less detailed mip levels. For Direct3D 11, this functionality is extended from the sampler to the entire resource. Therefore, the application can specify the highest-resolution mip level of a resource that is available for access. This restricts the set of mip levels that are required to be resident in {{GPU}} memory, thereby saving memory.</p><p>The set of mip levels resident per-resource in {{GPU}} memory can be specified by the user.</p><p>Minimum {{LOD}} affects all of the resident mip levels. Therefore, only the resident mip levels can be updated and read from.</p><p>All methods that access texture resources must adhere to minimum {{LOD}} clamps.</p><p>Empty-set accesses are handled as out-of-bounds cases.</p> <p>Returns nothing.</p> <dd> <p>A reference to an <strong>{{ID3D11Resource}}</strong> that represents the resource.</p> </dd> <dd> <p>The level-of-detail, which ranges between 0 and the maximum number of mipmap levels of the resource. For example, the maximum number of mipmap levels of a 1D texture is specified in the <strong>MipLevels</strong> member of the <strong>{{D3D11_TEXTURE1D_DESC}}</strong> structure.</p> </dd> <p>Gets the minimum level-of-detail ({{LOD}}).</p> <p>Returns the minimum {{LOD}}.</p> <dd> <p>A reference to an <strong>{{ID3D11Resource}}</strong> which represents the resource.</p> </dd> <p>Copy a multisampled resource into a non-multisampled resource.</p> <p>This {{API}} is most useful when re-using the resulting rendertarget of one render pass as an input to a second render pass.</p><p>The source and destination resources must be the same resource type and have the same dimensions. In addition, they must have compatible formats. There are three scenarios for this:</p><table> <tr><th>Scenario</th><th>Requirements</th></tr> <tr><td>Source and destination are prestructured and typed</td><td>Both the source and destination must have identical formats and that format must be specified in the Format parameter.</td></tr> <tr><td>One resource is prestructured and typed and the other is prestructured and typeless</td><td>The typed resource must have a format that is compatible with the typeless resource (i.e. the typed resource is {{DXGI_FORMAT_R32_FLOAT}} and the typeless resource is {{DXGI_FORMAT_R32_TYPELESS}}). The format of the typed resource must be specified in the Format parameter.</td></tr> <tr><td>Source and destination are prestructured and typeless</td><td>Both the source and desintation must have the same typeless format (i.e. both must have {{DXGI_FORMAT_R32_TYPELESS}}), and the Format parameter must specify a format that is compatible with the source and destination (i.e. if both are {{DXGI_FORMAT_R32_TYPELESS}} then {{DXGI_FORMAT_R32_FLOAT}} could be specified in the Format parameter). <p>For example, given the {{DXGI_FORMAT_R16G16B16A16_TYPELESS}} format:</p> <ul> <li>The source (or dest) format could be {{DXGI_FORMAT_R16G16B16A16_UNORM}}</li> <li>The dest (or source) format could be {{DXGI_FORMAT_R16G16B16A16_FLOAT}}</li> </ul> </td></tr> </table><p>?</p> <p>Returns nothing.</p> <dd> <p>Destination resource. Must be a created with the <strong>{{D3D11_USAGE_DEFAULT}}</strong> flag and be single-sampled. See <strong>{{ID3D11Resource}}</strong>.</p> </dd> <dd> <p>A zero-based index, that identifies the destination subresource. Use <strong>{{D3D11CalcSubresource}}</strong> to calculate the index.</p> </dd> <dd> <p>Source resource. Must be multisampled.</p> </dd> <dd> <p>The source subresource of the source resource.</p> </dd> <dd> <p>A <strong>{{DXGI_FORMAT}}</strong> that indicates how the multisampled resource will be resolved to a single-sampled resource. See remarks.</p> </dd> <p>Queues commands from a command list onto a device.</p> <p>Use this method to play back a command list that was recorded by a deferred context on any thread.</p><p> A call to <strong>ExecuteCommandList</strong> of a command list from a deferred context onto the immediate context is required for the recorded commands to be executed on the graphics processing unit ({{GPU}}). A call to <strong>ExecuteCommandList</strong> of a command list from a deferred context onto another deferred context can be used to merge recorded lists. But to run the commands from the merged deferred command list on the {{GPU}}, you need to execute them on the immediate context. </p><p> This method performs some runtime validation related to queries. Queries that are begun in a device context cannot be manipulated indirectly by executing a command list (that is, Begin or End was invoked against the same query by the deferred context which generated the command list). If such a condition occurs, the ExecuteCommandList method does not execute the command list. However, the state of the device context is still maintained, as would be expected (<strong>{{ID3D11DeviceContext::ClearState}}</strong> is performed, unless the application indicates to preserve the device context state). </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>This method does not return a value.</p> <dd> <p> A reference to an <strong>{{ID3D11CommandList}}</strong> interface that encapsulates a command list. </p> </dd> <dd> <p> A Boolean flag that determines whether the target context state is saved prior to and restored after the execution of a command list. Use <strong>{{TRUE}}</strong> to indicate that the runtime needs to save and restore the state. Use <strong>{{FALSE}}</strong> to indicate that no state shall be saved or restored, which causes the target context to return to its default state after the command list executes. Applications should typically use <strong>{{FALSE}}</strong> unless they will restore the state to be nearly equivalent to the state that the runtime would restore if <strong>{{TRUE}}</strong> were passed. When applications use <strong>{{FALSE}}</strong>, they can avoid unnecessary and inefficient state transitions. </p> </dd> <p>Bind an array of shader resources to the hull-shader stage.</p> <p>If an overlapping resource view is already bound to an output slot, such as a render target, then the method will fill the destination shader resource slot with <strong>{{NULL}}</strong>.</p><p>For information about creating shader-resource views, see <strong>{{ID3D11Device::CreateShaderResourceView}}</strong>.</p><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p> <p>This method does not return a value.</p> <p>Set a hull shader to the device.</p> <p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p><p>The maximum number of instances a shader can have is 256.</p> <p>This method does not return a value.</p> <dd> <p>Pointer to a hull shader (see <strong>{{ID3D11HullShader}}</strong>). Passing in <strong>{{NULL}}</strong> disables the shader for this pipeline stage.</p> </dd> <dd> <p>A reference to an array of class-instance interfaces (see <strong>{{ID3D11ClassInstance}}</strong>). Each interface used by a shader must have a corresponding class instance or the shader will get disabled. Set ppClassInstances to <strong>{{NULL}}</strong> if the shader does not use any interfaces.</p> </dd> <dd> <p>The number of class-instance interfaces in the array.</p> </dd> <p>Set an array of sampler states to the hull-shader stage.</p> <p>Any sampler may be set to <strong>{{NULL}}</strong>; this invokes the default state, which is defined to be the following.</p><pre> //Default sampler state: {{D3D11_SAMPLER_DESC}} SamplerDesc; SamplerDesc.Filter = {{D3D11_FILTER_MIN_MAG_MIP_LINEAR}}; SamplerDesc.AddressU = {{D3D11_TEXTURE_ADDRESS_CLAMP}}; SamplerDesc.AddressV = {{D3D11_TEXTURE_ADDRESS_CLAMP}}; SamplerDesc.AddressW = {{D3D11_TEXTURE_ADDRESS_CLAMP}}; SamplerDesc.MipLODBias = 0; SamplerDesc.MaxAnisotropy = 1; SamplerDesc.ComparisonFunc = {{D3D11_COMPARISON_NEVER}}; SamplerDesc.BorderColor[0] = 1.0f; SamplerDesc.BorderColor[1] = 1.0f; SamplerDesc.BorderColor[2] = 1.0f; SamplerDesc.BorderColor[3] = 1.0f; SamplerDesc.MinLOD = -{{FLT_MAX}}; SamplerDesc.MaxLOD = {{FLT_MAX}}; </pre><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p> <p>This method does not return a value.</p> <p>Set the constant buffers used by the hull-shader stage.</p> <p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p><p>The Direct3D 11.1 runtime, which is available starting with Windows?8, can bind a larger number of <strong>{{ID3D11Buffer}}</strong> resources to the shader than the maximum constant buffer size that is supported by shaders (4096 constants ? 4*32-bit components each). When you bind such a large buffer, the shader can access only the first 4096 4*32-bit component constants in the buffer, as if 4096 constants is the full size of the buffer. </p><p>If the application wants the shader to access other parts of the buffer, it must call the <strong>{{HSSetConstantBuffers1}}</strong> method instead. </p> <p>This method does not return a value.</p> <p>Bind an array of shader resources to the domain-shader stage.</p> <p>If an overlapping resource view is already bound to an output slot, such as a render target, then the method will fill the destination shader resource slot with <strong>{{NULL}}</strong>.</p><p>For information about creating shader-resource views, see <strong>{{ID3D11Device::CreateShaderResourceView}}</strong>.</p><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p> <p>This method does not return a value.</p> <dd> <p>Index into the device's zero-based array to begin setting shader resources to (ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources(ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Array of <strong>shader resource view</strong> interfaces to set to the device.</p> </dd> <p>Set a domain shader to the device.</p> <p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p><p>The maximum number of instances a shader can have is 256.</p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>This method does not return a value.</p> <dd> <p> Pointer to a domain shader (see <strong>{{ID3D11DomainShader}}</strong>). Passing in <strong>{{NULL}}</strong> disables the shader for this pipeline stage. </p> </dd> <dd> <p> A reference to an array of class-instance interfaces (see <strong>{{ID3D11ClassInstance}}</strong>). Each interface used by a shader must have a corresponding class instance or the shader will get disabled. Set ppClassInstances to <strong>{{NULL}}</strong> if the shader does not use any interfaces. </p> </dd> <dd> <p>The number of class-instance interfaces in the array.</p> </dd> <p>Set an array of sampler states to the domain-shader stage.</p> <p>Any sampler may be set to <strong>{{NULL}}</strong>; this invokes the default state, which is defined to be the following.</p><pre> //Default sampler state: {{D3D11_SAMPLER_DESC}} SamplerDesc; SamplerDesc.Filter = {{D3D11_FILTER_MIN_MAG_MIP_LINEAR}}; SamplerDesc.AddressU = {{D3D11_TEXTURE_ADDRESS_CLAMP}}; SamplerDesc.AddressV = {{D3D11_TEXTURE_ADDRESS_CLAMP}}; SamplerDesc.AddressW = {{D3D11_TEXTURE_ADDRESS_CLAMP}}; SamplerDesc.MipLODBias = 0; SamplerDesc.MaxAnisotropy = 1; SamplerDesc.ComparisonFunc = {{D3D11_COMPARISON_NEVER}}; SamplerDesc.BorderColor[0] = 1.0f; SamplerDesc.BorderColor[1] = 1.0f; SamplerDesc.BorderColor[2] = 1.0f; SamplerDesc.BorderColor[3] = 1.0f; SamplerDesc.MinLOD = -{{FLT_MAX}}; SamplerDesc.MaxLOD = {{FLT_MAX}}; </pre><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p> <p>This method does not return a value.</p> <dd> <p>Index into the device's zero-based array to begin setting samplers to (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Pointer to an array of sampler-state interfaces (see <strong>{{ID3D11SamplerState}}</strong>). See Remarks.</p> </dd> <p>Sets the constant buffers used by the domain-shader stage.</p> <p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p><p> The Direct3D 11.1 runtime, which is available starting with Windows?8, can bind a larger number of <strong>{{ID3D11Buffer}}</strong> resources to the shader than the maximum constant buffer size that is supported by shaders (4096 constants ? 4*32-bit components each). When you bind such a large buffer, the shader can access only the first 4096 4*32-bit component constants in the buffer, as if 4096 constants is the full size of the buffer. </p><p> If the application wants the shader to access other parts of the buffer, it must call the <strong>{{DSSetConstantBuffers1}}</strong> method instead. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>This method does not return a value.</p> <dd> <p> Index into the zero-based array to begin setting constant buffers to (ranges from 0 to <strong>{{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}}</strong> - 1). </p> </dd> <dd> <p> Number of buffers to set (ranges from 0 to <strong>{{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}}</strong> - <em>StartSlot</em>). </p> </dd> <dd> <p> Array of constant buffers (see <strong>{{ID3D11Buffer}}</strong>) being given to the device. </p> </dd> <p>Bind an array of shader resources to the compute-shader stage.</p> <p>If an overlapping resource view is already bound to an output slot, such as a render target, then the method will fill the destination shader resource slot with <strong>{{NULL}}</strong>.</p><p>For information about creating shader-resource views, see <strong>{{ID3D11Device::CreateShaderResourceView}}</strong>.</p><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p> <p>This method does not return a value.</p> <dd> <p>Index into the device's zero-based array to begin setting shader resources to (ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources(ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Array of <strong>shader resource view</strong> interfaces to set to the device.</p> </dd> <p>Sets an array of views for an unordered resource.</p> <p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>This method does not return a value.</p> <dd> <p>Index of the first element in the zero-based array to begin setting (ranges from 0 to {{D3D11_1_UAV_SLOT_COUNT}} - 1). {{D3D11_1_UAV_SLOT_COUNT}} is defined as 64.</p> </dd> <dd> <p> Number of views to set (ranges from 0 to {{D3D11_1_UAV_SLOT_COUNT}} - <em>StartSlot</em>). </p> </dd> <dd> <p> A reference to an array of <strong>{{ID3D11UnorderedAccessView}}</strong> references to be set by the method. </p> </dd> <dd> <p> An array of append and consume buffer offsets. A value of -1 indicates to keep the current offset. Any other values set the hidden counter for that appendable and consumable {{UAV}}. <em>pUAVInitialCounts</em> is only relevant for {{UAVs}} that were created with either <strong>{{D3D11_BUFFER_UAV_FLAG_APPEND}}</strong> or <strong>{{D3D11_BUFFER_UAV_FLAG_COUNTER}}</strong> specified when the {{UAV}} was created; otherwise, the argument is ignored. </p> </dd> <p>Set a compute shader to the device.</p> <p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p><p>The maximum number of instances a shader can have is 256.</p> <p>This method does not return a value.</p> <dd> <p>Pointer to a compute shader (see <strong>{{ID3D11ComputeShader}}</strong>). Passing in <strong>{{NULL}}</strong> disables the shader for this pipeline stage.</p> </dd> <dd> <p>A reference to an array of class-instance interfaces (see <strong>{{ID3D11ClassInstance}}</strong>). Each interface used by a shader must have a corresponding class instance or the shader will get disabled. Set ppClassInstances to <strong>{{NULL}}</strong> if the shader does not use any interfaces.</p> </dd> <dd> <p>The number of class-instance interfaces in the array.</p> </dd> <p>Set an array of sampler states to the compute-shader stage.</p> <p>Any sampler may be set to <strong>{{NULL}}</strong>; this invokes the default state, which is defined to be the following.</p><pre>//Default sampler state: {{D3D11_SAMPLER_DESC}} SamplerDesc; SamplerDesc.Filter = {{D3D11_FILTER_MIN_MAG_MIP_LINEAR}}; SamplerDesc.AddressU = {{D3D11_TEXTURE_ADDRESS_CLAMP}}; SamplerDesc.AddressV = {{D3D11_TEXTURE_ADDRESS_CLAMP}}; SamplerDesc.AddressW = {{D3D11_TEXTURE_ADDRESS_CLAMP}}; SamplerDesc.MipLODBias = 0; SamplerDesc.MaxAnisotropy = 1; SamplerDesc.ComparisonFunc = {{D3D11_COMPARISON_NEVER}}; SamplerDesc.BorderColor[0] = 1.0f; SamplerDesc.BorderColor[1] = 1.0f; SamplerDesc.BorderColor[2] = 1.0f; SamplerDesc.BorderColor[3] = 1.0f; SamplerDesc.MinLOD = -{{FLT_MAX}}; SamplerDesc.MaxLOD = {{FLT_MAX}}; </pre><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p> <p>This method does not return a value.</p> <dd> <p>Index into the device's zero-based array to begin setting samplers to (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of samplers in the array. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Pointer to an array of sampler-state interfaces (see <strong>{{ID3D11SamplerState}}</strong>). See Remarks.</p> </dd> <p>Sets the constant buffers used by the compute-shader stage.</p> <p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p><p>The Direct3D 11.1 runtime, which is available starting with Windows?8, can bind a larger number of <strong>{{ID3D11Buffer}}</strong> resources to the shader than the maximum constant buffer size that is supported by shaders (4096 constants ? 4*32-bit components each). When you bind such a large buffer, the shader can access only the first 4096 4*32-bit component constants in the buffer, as if 4096 constants is the full size of the buffer. </p><p>If the application wants the shader to access other parts of the buffer, it must call the <strong>{{CSSetConstantBuffers1}}</strong> method instead. </p> <p>This method does not return a value.</p> <dd> <p>Index into the zero-based array to begin setting constant buffers to (ranges from 0 to <strong>{{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}}</strong> - 1).</p> </dd> <dd> <p>Number of buffers to set (ranges from 0 to <strong>{{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}}</strong> - <em>StartSlot</em>).</p> </dd> <dd> <p>Array of constant buffers (see <strong>{{ID3D11Buffer}}</strong>) being given to the device.</p> </dd> <p>Get the constant buffers used by the vertex shader pipeline stage.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of buffers to retrieve (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Array of constant buffer interface references (see <strong>{{ID3D11Buffer}}</strong>) to be returned by the method.</p> </dd> <p>Bind an array of shader resources to the pixel shader stage.</p> <p>If an overlapping resource view is already bound to an output slot, such as a rendertarget, then this {{API}} will fill the destination shader resource slot with <strong>{{NULL}}</strong>.</p><p>For information about creating shader-resource views, see <strong>{{ID3D11Device::CreateShaderResourceView}}</strong>.</p><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p> <p>Returns nothing.</p> <dd> <p>Index into the device's zero-based array to begin setting shader resources to (ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of shader resources to set. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Array of <strong>shader resource view</strong> interfaces to set to the device.</p> </dd> <p> Get the pixel shader currently set on the device. </p> <p> Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed, to avoid memory leaks. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p> Returns nothing. </p> <dd> <p> Address of a reference to a pixel shader (see <strong>{{ID3D11PixelShader}}</strong>) to be returned by the method. </p> </dd> <dd> <p> Pointer to an array of class instance interfaces (see <strong>{{ID3D11ClassInstance}}</strong>). </p> </dd> <dd> <p> The number of class-instance elements in the array. </p> </dd> <p>Get an array of sampler states from the pixel shader pipeline stage.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Index into a zero-based array to begin getting samplers from (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of samplers to get from a device context. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Arry of sampler-state interface references (see <strong>{{ID3D11SamplerState}}</strong>) to be returned by the device.</p> </dd> <p>Get the vertex shader currently set on the device.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Address of a reference to a vertex shader (see <strong>{{ID3D11VertexShader}}</strong>) to be returned by the method.</p> </dd> <dd> <p>Pointer to an array of class instance interfaces (see <strong>{{ID3D11ClassInstance}}</strong>).</p> </dd> <dd> <p>The number of class-instance elements in the array.</p> </dd> <p>Get the constant buffers used by the pixel shader pipeline stage.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of buffers to retrieve (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Array of constant buffer interface references (see <strong>{{ID3D11Buffer}}</strong>) to be returned by the method.</p> </dd> <p>Get a reference to the input-layout object that is bound to the input-assembler stage.</p> <p>For information about creating an input-layout object, see Creating the Input-Layout Object.</p><p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>A reference to the input-layout object (see <strong>{{ID3D11InputLayout}}</strong>), which describes the input buffers that will be read by the {{IA}} stage.</p> </dd> <p>Get the vertex buffers bound to the input-assembler stage.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>The input slot of the first vertex buffer to get. The first vertex buffer is explicitly bound to the start slot; this causes each additional vertex buffer in the array to be implicitly bound to each subsequent input slot. The maximum of 16 or 32 input slots (ranges from 0 to {{D3D11_IA_VERTEX_INPUT_RESOURCE_SLOT_COUNT}} - 1) are available; the maximum number of input slots depends on the feature level.</p> </dd> <dd> <p>The number of vertex buffers to get starting at the offset. The number of buffers (plus the starting slot) cannot exceed the total number of {{IA}}-stage input slots.</p> </dd> <dd> <p>A reference to an array of vertex buffers returned by the method (see <strong>{{ID3D11Buffer}}</strong>).</p> </dd> <dd> <p>Pointer to an array of stride values returned by the method; one stride value for each buffer in the vertex-buffer array. Each stride value is the size (in bytes) of the elements that are to be used from that vertex buffer.</p> </dd> <dd> <p>Pointer to an array of offset values returned by the method; one offset value for each buffer in the vertex-buffer array. Each offset is the number of bytes between the first element of a vertex buffer and the first element that will be used.</p> </dd> <p>Get a reference to the index buffer that is bound to the input-assembler stage.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>A reference to an index buffer returned by the method (see <strong>{{ID3D11Buffer}}</strong>).</p> </dd> <dd> <p>Specifies format of the data in the index buffer (see <strong>{{DXGI_FORMAT}}</strong>). These formats provide the size and type of the data in the buffer. The only formats allowed for index buffer data are 16-bit ({{DXGI_FORMAT_R16_UINT}}) and 32-bit ({{DXGI_FORMAT_R32_UINT}}) integers.</p> </dd> <dd> <p>Offset (in bytes) from the start of the index buffer, to the first index to use.</p> </dd> <p>Get the constant buffers used by the geometry shader pipeline stage.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>This method does not return a value.</p> <dd> <p>Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of buffers to retrieve (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Array of constant buffer interface references (see <strong>{{ID3D11Buffer}}</strong>) to be returned by the method.</p> </dd> <p>Get the geometry shader currently set on the device.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Address of a reference to a geometry shader (see <strong>{{ID3D11GeometryShader}}</strong>) to be returned by the method.</p> </dd> <dd> <p>Pointer to an array of class instance interfaces (see <strong>{{ID3D11ClassInstance}}</strong>).</p> </dd> <dd> <p>The number of class-instance elements in the array.</p> </dd> <p>Get information about the primitive type, and data order that describes input data for the input assembler stage.</p> <p>Returns nothing.</p> <dd> <p>A reference to the type of primitive, and ordering of the primitive data (see <strong>{{D3D11_PRIMITIVE_TOPOLOGY}}</strong>).</p> </dd> <p>Get the vertex shader resources.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Index into the device's zero-based array to begin getting shader resources from (ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>The number of resources to get from the device. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Array of <strong>shader resource view</strong> interfaces to be returned by the device.</p> </dd> <p>Get an array of sampler states from the vertex shader pipeline stage.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Index into a zero-based array to begin getting samplers from (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of samplers to get from a device context. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Arry of sampler-state interface references (see <strong>{{ID3D11SamplerState}}</strong>) to be returned by the device.</p> </dd> <p>Get the rendering predicate state.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Address of a reference to a predicate (see <strong>{{ID3D11Predicate}}</strong>). Value stored here will be <strong>{{NULL}}</strong> upon device creation.</p> </dd> <dd> <p>Address of a boolean to fill with the predicate comparison value. <strong>{{FALSE}}</strong> upon device creation.</p> </dd> <p>Get the geometry shader resources.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Index into the device's zero-based array to begin getting shader resources from (ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>The number of resources to get from the device. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Array of <strong>shader resource view</strong> interfaces to be returned by the device.</p> </dd> <p>Get an array of sampler state interfaces from the geometry shader pipeline stage.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Index into a zero-based array to begin getting samplers from (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of samplers to get from a device context. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Pointer to an array of sampler-state interfaces (see <strong>{{ID3D11SamplerState}}</strong>).</p> </dd> <p>Get references to the resources bound to the output-merger stage.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Number of render targets to retrieve.</p> </dd> <dd> <p>Pointer to an array of <strong>{{ID3D11RenderTargetView}}</strong>s which represent render target views. Specify <strong>{{NULL}}</strong> for this parameter when retrieval of a render target is not needed. </p> </dd> <dd> <p>Pointer to a <strong>{{ID3D11DepthStencilView}}</strong>, which represents a depth-stencil view. Specify <strong>{{NULL}}</strong> for this parameter when retrieval of the depth-stencil view is not needed.</p> </dd> <p>Get references to the resources bound to the output-merger stage.</p> <p> Any returned interfaces will have their reference count incremented by one. Applications should call <strong>{{IUnknown::Release}}</strong> on the returned interfaces when they are no longer needed to avoid memory leaks. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Returns nothing.</p> <dd> <p>The number of render-target views to retrieve.</p> </dd> <dd> <p> Pointer to an array of <strong>{{ID3D11RenderTargetView}}</strong>s, which represent render-target views. Specify <strong>{{NULL}}</strong> for this parameter when retrieval of render-target views is not required. </p> </dd> <dd> <p> Pointer to a <strong>{{ID3D11DepthStencilView}}</strong>, which represents a depth-stencil view. Specify <strong>{{NULL}}</strong> for this parameter when retrieval of the depth-stencil view is not required. </p> </dd> <dd> <p> Index into a zero-based array to begin retrieving unordered-access views (ranges from 0 to {{D3D11_PS_CS_UAV_REGISTER_COUNT}} - 1). For pixel shaders <em>{{UAVStartSlot}}</em> should be equal to the number of render-target views that are bound. </p> </dd> <dd> <p> Number of unordered-access views to return in <em>ppUnorderedAccessViews</em>. This number ranges from 0 to {{D3D11_PS_CS_UAV_REGISTER_COUNT}} - <em>{{UAVStartSlot}}</em>. </p> </dd> <dd> <p> Pointer to an array of <strong>{{ID3D11UnorderedAccessView}}</strong>s, which represent unordered-access views that are retrieved. Specify <strong>{{NULL}}</strong> for this parameter when retrieval of unordered-access views is not required. </p> </dd> <p>Set the blend state of the output-merger stage.</p> <p>Blend state is used by the output-merger stage to determine how to blend together two {{RGB}} pixel values and two alpha values. The two {{RGB}} pixel values and two alpha values are the {{RGB}} pixel value and alpha value that the pixel shader outputs and the {{RGB}} pixel value and alpha value already in the output render target. The <strong>blend option</strong> controls the data source that the blending stage uses to modulate values for the pixel shader, render target, or both. The <strong>blend operation</strong> controls how the blending stage mathematically combines these modulated values.</p><p>To create a blend-state interface, call <strong>{{ID3D11Device::CreateBlendState}}</strong>.</p><p>Passing in <strong>{{NULL}}</strong> for the blend-state interface indicates to the runtime to set a default blending state. The following table indicates the default blending parameters.</p><table> <tr><th>State</th><th>Default Value</th></tr> <tr><td>AlphaToCoverageEnable</td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>IndependentBlendEnable</td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>RenderTarget[0].BlendEnable</td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>RenderTarget[0].SrcBlend</td><td>{{D3D11_BLEND_ONE}}</td></tr> <tr><td>RenderTarget[0].DestBlend</td><td>{{D3D11_BLEND_ZERO}}</td></tr> <tr><td>RenderTarget[0].BlendOp</td><td>{{D3D11_BLEND_OP_ADD}}</td></tr> <tr><td>RenderTarget[0].SrcBlendAlpha</td><td>{{D3D11_BLEND_ONE}}</td></tr> <tr><td>RenderTarget[0].DestBlendAlpha</td><td>{{D3D11_BLEND_ZERO}}</td></tr> <tr><td>RenderTarget[0].BlendOpAlpha</td><td>{{D3D11_BLEND_OP_ADD}}</td></tr> <tr><td>RenderTarget[0].RenderTargetWriteMask</td><td>{{D3D11_COLOR_WRITE_ENABLE_ALL}}</td></tr> </table><p>?</p><p>A sample mask determines which samples get updated in all the active render targets. The mapping of bits in a sample mask to samples in a multisample render target is the responsibility of an individual application. A sample mask is always applied; it is independent of whether multisampling is enabled, and does not depend on whether an application uses multisample render targets.</p><p> The method will hold a reference to the interfaces passed in. This differs from the device state behavior in Direct3D 10. </p> <p>Returns nothing.</p> <dd> <p>Pointer to a blend-state interface (see <strong>{{ID3D11BlendState}}</strong>). Pass <strong>{{NULL}}</strong> for a default blend state. For more info about default blend state, see Remarks.</p> </dd> <dd> <p>Array of blend factors, one for each {{RGBA}} component. The blend factors modulate values for the pixel shader, render target, or both. If you created the blend-state object with <strong>{{D3D11_BLEND_BLEND_FACTOR}}</strong> or <strong>{{D3D11_BLEND_INV_BLEND_FACTOR}}</strong>, the blending stage uses the non-{{NULL}} array of blend factors. If you didn't create the blend-state object with <strong>{{D3D11_BLEND_BLEND_FACTOR}}</strong> or <strong>{{D3D11_BLEND_INV_BLEND_FACTOR}}</strong>, the blending stage does not use the non-{{NULL}} array of blend factors; the runtime stores the blend factors, and you can later call <strong>{{ID3D11DeviceContext::OMGetBlendState}}</strong> to retrieve the blend factors. If you pass <strong>{{NULL}}</strong>, the runtime uses or stores a blend factor equal to { 1, 1, 1, 1 }.</p> </dd> <dd> <p>32-bit sample coverage. The default value is 0xffffffff. See remarks.</p> </dd> <p>Gets the depth-stencil state of the output-merger stage.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Returns nothing.</p> <dd> <p> Address of a reference to a depth-stencil state interface (see <strong>{{ID3D11DepthStencilState}}</strong>) to be filled with information from the device. </p> </dd> <dd> <p>Pointer to the stencil reference value used in the depth-stencil test.</p> </dd> <p>Get the target output buffers for the stream-output stage of the pipeline.</p> <p>A maximum of four output buffers can be retrieved.</p><p> The offsets to the output buffers pointed to in the returned <em>ppSOTargets</em> array may be assumed to be -1 (append), as defined for use in <strong>{{ID3D11DeviceContext::SOSetTargets}}</strong>. </p><p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Returns nothing.</p> <dd> <p>Number of buffers to get.</p> </dd> <dd> <p> An array of output buffers (see <strong>{{ID3D11Buffer}}</strong>) to be retrieved from the device. </p> </dd> <p> Gets a reference to the data contained in a subresource, and denies the {{GPU}} access to that subresource. </p> <p> If you call <strong>Map</strong> on a deferred context, you can only pass <strong>{{D3D11_MAP_WRITE_DISCARD}}</strong>, <strong>{{D3D11_MAP_WRITE_NO_OVERWRITE}}</strong>, or both to the <em>MapType</em> parameter. Other <strong>{{D3D11_MAP}}</strong>-typed values are not supported for a deferred context. </p><strong>Note</strong>?? The Direct3D 11.1 runtime, which is available starting with Windows?8, enables mapping dynamic constant buffers and shader resource views ({{SRVs}}) of dynamic buffers with <strong>{{D3D11_MAP_WRITE_NO_OVERWRITE}}</strong>. The Direct3D 11 and earlier runtimes limited mapping to vertex or index buffers. To determine if a Direct3D device supports these features, call <strong>{{ID3D11Device::CheckFeatureSupport}}</strong> with <strong>{{D3D11_FEATURE_D3D11_OPTIONS}}</strong>. <strong>CheckFeatureSupport</strong> fills members of a <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS}}</strong> structure with the device's features. The relevant members here are <strong>MapNoOverwriteOnDynamicConstantBuffer</strong> and <strong>MapNoOverwriteOnDynamicBufferSRV</strong>.?<p> For info about how to use <strong>Map</strong>, see How to: Use dynamic resources. </p> <p> This method returns one of the Direct3D 11 Return Codes. </p><p> This method also returns <strong>{{DXGI_ERROR_WAS_STILL_DRAWING}}</strong> if <em>MapFlags</em> specifies <strong>{{D3D11_MAP_FLAG_DO_NOT_WAIT}}</strong> and the {{GPU}} is not yet finished with the resource. </p><p> This method also returns <strong>{{DXGI_ERROR_DEVICE_REMOVED}}</strong> if <em>MapType</em> allows any {{CPU}} read access and the video card has been removed. </p><p> For more information about these error codes, see {{DXGI_ERROR}}. </p> <p>Gets the array of viewports bound to the rasterizer stage.</p> <p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Returns nothing.</p> <dd> <p> A reference to a variable that, on input, specifies the number of viewports (ranges from 0 to <strong>{{D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE}}</strong>) in the <em>pViewports</em> array; on output, the variable contains the actual number of viewports that are bound to the rasterizer stage. If <em>pViewports</em> is <strong>{{NULL}}</strong>, <strong>{{RSGetViewports}}</strong> fills the variable with the number of viewports currently bound.</p> <strong>Note</strong>?? In some versions of the Windows {{SDK}}, a debug device will raise an exception if the input value in the variable to which <em>pNumViewports</em> points is greater than <strong>{{D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE}}</strong> even if <em>pViewports</em> is <strong>{{NULL}}</strong>. The regular runtime ignores the value in the variable to which <em>pNumViewports</em> points when <em>pViewports</em> is <strong>{{NULL}}</strong>. This behavior of a debug device might be corrected in a future release of the Windows {{SDK}}. ? </dd> <dd> <p> An array of <strong>{{D3D11_VIEWPORT}}</strong> structures for the viewports that are bound to the rasterizer stage. If the number of viewports (in the variable to which <em>pNumViewports</em> points) is greater than the actual number of viewports currently bound, unused elements of the array contain 0. For info about how the viewport size depends on the device feature level, which has changed between Direct3D 11 and Direct3D 10, see <strong>{{D3D11_VIEWPORT}}</strong>. </p> </dd> <p>Get the array of scissor rectangles bound to the rasterizer stage.</p> <p>Returns nothing.</p> <dd> <p>The number of scissor rectangles (ranges between 0 and {{D3D11_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE}}) bound; set <em>pRects</em> to <strong>{{NULL}}</strong> to use <em>pNumRects</em> to see how many rectangles would be returned.</p> </dd> <dd> <p>An array of scissor rectangles (see <strong>{{D3D11_RECT}}</strong>). If NumRects is greater than the number of scissor rects currently bound, then unused members of the array will contain 0.</p> </dd> <p>Get the hull-shader resources.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Index into the device's zero-based array to begin getting shader resources from (ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>The number of resources to get from the device. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Array of <strong>shader resource view</strong> interfaces to be returned by the device.</p> </dd> <p>Get the hull shader currently set on the device.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Address of a reference to a hull shader (see <strong>{{ID3D11HullShader}}</strong>) to be returned by the method.</p> </dd> <dd> <p>Pointer to an array of class instance interfaces (see <strong>{{ID3D11ClassInstance}}</strong>).</p> </dd> <dd> <p>The number of class-instance elements in the array.</p> </dd> <p>Get an array of sampler state interfaces from the hull-shader stage.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <p>Get the constant buffers used by the hull-shader stage.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <p>Get the domain-shader resources.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Index into the device's zero-based array to begin getting shader resources from (ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>The number of resources to get from the device. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Array of <strong>shader resource view</strong> interfaces to be returned by the device.</p> </dd> <p>Get the domain shader currently set on the device.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Address of a reference to a domain shader (see <strong>{{ID3D11DomainShader}}</strong>) to be returned by the method.</p> </dd> <dd> <p>Pointer to an array of class instance interfaces (see <strong>{{ID3D11ClassInstance}}</strong>).</p> </dd> <dd> <p>The number of class-instance elements in the array.</p> </dd> <p>Get an array of sampler state interfaces from the domain-shader stage.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Index into a zero-based array to begin getting samplers from (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of samplers to get from a device context. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Pointer to an array of sampler-state interfaces (see <strong>{{ID3D11SamplerState}}</strong>).</p> </dd> <p>Get the constant buffers used by the domain-shader stage.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of buffers to retrieve (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Array of constant buffer interface references (see <strong>{{ID3D11Buffer}}</strong>) to be returned by the method.</p> </dd> <p>Get the compute-shader resources.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Index into the device's zero-based array to begin getting shader resources from (ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>The number of resources to get from the device. Up to a maximum of 128 slots are available for shader resources (ranges from 0 to {{D3D11_COMMONSHADER_INPUT_RESOURCE_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Array of <strong>shader resource view</strong> interfaces to be returned by the device.</p> </dd> <p>Gets an array of views for an unordered resource.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call <strong>{{IUnknown::Release}}</strong> on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Index of the first element in the zero-based array to return (ranges from 0 to {{D3D11_1_UAV_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of views to get (ranges from 0 to {{D3D11_1_UAV_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>A reference to an array of interface references (see <strong>{{ID3D11UnorderedAccessView}}</strong>) to get.</p> </dd> <p>Get the compute shader currently set on the device.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Address of a reference to a Compute shader (see <strong>{{ID3D11ComputeShader}}</strong>) to be returned by the method.</p> </dd> <dd> <p>Pointer to an array of class instance interfaces (see <strong>{{ID3D11ClassInstance}}</strong>).</p> </dd> <dd> <p>The number of class-instance elements in the array.</p> </dd> <p>Get an array of sampler state interfaces from the compute-shader stage.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Index into a zero-based array to begin getting samplers from (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of samplers to get from a device context. Each pipeline stage has a total of 16 sampler slots available (ranges from 0 to {{D3D11_COMMONSHADER_SAMPLER_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Pointer to an array of sampler-state interfaces (see <strong>{{ID3D11SamplerState}}</strong>).</p> </dd> <p>Get the constant buffers used by the compute-shader stage.</p> <p>Any returned interfaces will have their reference count incremented by one. Applications should call {{IUnknown::Release}} on the returned interfaces when they are no longer needed to avoid memory leaks.</p> <p>Returns nothing.</p> <dd> <p>Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of buffers to retrieve (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - StartSlot).</p> </dd> <dd> <p>Array of constant buffer interface references (see <strong>{{ID3D11Buffer}}</strong>) to be returned by the method.</p> </dd> <p>Restore all default settings.</p> <p>This method resets any device context to the default settings. This sets all input/output resource slots, shaders, input layouts, predications, scissor rectangles, depth-stencil state, rasterizer state, blend state, sampler state, and viewports to <strong>{{NULL}}</strong>. The primitive topology is set to {{UNDEFINED}}.</p><p>For a scenario where you would like to clear a list of commands recorded so far, call <strong>{{ID3D11DeviceContext::FinishCommandList}}</strong> and throw away the resulting <strong>{{ID3D11CommandList}}</strong>.</p> <p>Returns nothing.</p> <p>Sends queued-up commands in the command buffer to the graphics processing unit ({{GPU}}).</p> <p>Most applications don't need to call this method. If an application calls this method when not necessary, it incurs a performance penalty. Each call to <strong>Flush</strong> incurs a significant amount of overhead.</p><p>When Microsoft Direct3D state-setting, present, or draw commands are called by an application, those commands are queued into an internal command buffer. <strong>Flush</strong> sends those commands to the {{GPU}} for processing. Typically, the Direct3D runtime sends these commands to the {{GPU}} automatically whenever the runtime determines that they need to be sent, such as when the command buffer is full or when an application maps a resource. <strong>Flush</strong> sends the commands manually.</p><p>We recommend that you use <strong>Flush</strong> when the {{CPU}} waits for an arbitrary amount of time (such as when you call the <strong>Sleep</strong> function).</p><p>Because <strong>Flush</strong> operates asynchronously, it can return either before or after the {{GPU}} finishes executing the queued graphics commands. However, the graphics commands eventually always complete. You can call the <strong>{{ID3D11Device::CreateQuery}}</strong> method with the <strong>{{D3D11_QUERY_EVENT}}</strong> value to create an event query; you can then use that event query in a call to the <strong>{{ID3D11DeviceContext::GetData}}</strong> method to determine when the {{GPU}} is finished processing the graphics commands. </p><p>Microsoft Direct3D?11 defers the destruction of objects. Therefore, an application can't rely upon objects immediately being destroyed. By calling <strong>Flush</strong>, you destroy any objects whose destruction was deferred. If an application requires synchronous destruction of an object, we recommend that the application release all its references, call <strong>{{ID3D11DeviceContext::ClearState}}</strong>, and then call <strong>Flush</strong>.</p> <p>This method does not return a value.</p> <p>Gets the type of device context.</p> <p>A member of <strong>{{D3D11_DEVICE_CONTEXT_TYPE}}</strong> that indicates the type of device context.</p> <p>Gets the initialization flags associated with the current deferred context.</p> <p>The GetContextFlags method gets the flags that were supplied to the <em>ContextFlags</em> parameter of <strong>{{ID3D11Device::CreateDeferredContext}}</strong>; however, the context flag is reserved for future use.</p> <p>Create a command list and record graphics commands into it.</p> <p> Create a command list from a deferred context and record commands into it by calling <strong>FinishCommandList</strong>. Play back a command list with an immediate context by calling <strong>{{ID3D11DeviceContext::ExecuteCommandList}}</strong>. </p><p> Immediate context state is cleared before and after a command list is executed. A command list has no concept of inheritance. Each call to <strong>FinishCommandList</strong> will record only the state set since any previous call to <strong>FinishCommandList</strong>. </p><p> For example, the state of a device context is its render state or pipeline state. To retrieve device context state, an application can call <strong>{{ID3D11DeviceContext::GetData}}</strong> or <strong>{{ID3D11DeviceContext::GetPredication}}</strong>. </p><p> For more information about how to use <strong>FinishCommandList</strong>, see How to: Record a Command List. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the following:</p><ul> <li>Returns {{DXGI_ERROR_DEVICE_REMOVED}} if the video card has been physically removed from the system, or a driver upgrade for the video card has occurred. If this error occurs, you should destroy and recreate the device.</li> <li> Returns {{DXGI_ERROR_INVALID_CALL}} if <strong>FinishCommandList</strong> cannot be called from the current context. See remarks. </li> <li>Returns {{E_OUTOFMEMORY}} if the application has exhausted available memory.</li> </ul> <dd> <p> A Boolean flag that determines whether the runtime saves deferred context state before it executes <strong>FinishCommandList</strong> and restores it afterwards. Use <strong>{{TRUE}}</strong> to indicate that the runtime needs to save and restore the state. Use <strong>{{FALSE}}</strong> to indicate that the runtime will not save or restore any state. In this case, the deferred context will return to its default state after the call to <strong>FinishCommandList</strong> completes. For information about default state, see <strong>{{ID3D11DeviceContext::ClearState}}</strong>. Typically, use <strong>{{FALSE}}</strong> unless you restore the state to be nearly equivalent to the state that the runtime would restore if you passed <strong>{{TRUE}}</strong>. When you use <strong>{{FALSE}}</strong>, you can avoid unnecessary and inefficient state transitions. </p> <strong>Note</strong>?? This parameter does not affect the command list that the current call to <strong>FinishCommandList</strong> returns. However, this parameter affects the command list of the next call to <strong>FinishCommandList</strong> on the same deferred context. ? </dd> <dd> <p> Upon completion of the method, the passed reference to an <strong>{{ID3D11CommandList}}</strong> interface reference is initialized with the recorded command list information. The resulting <strong>{{ID3D11CommandList}}</strong> object is immutable and can only be used with <strong>{{ID3D11DeviceContext::ExecuteCommandList}}</strong>. </p> </dd> <p>Represents a hardware-accelerated video decoder for Microsoft Direct3D?11.</p> <p>To get a reference to this interface, call <strong>{{ID3D11VideoDevice::CreateVideoDecoder}}</strong>.</p> <p>Gets the parameters that were used to create the decoder.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_DECODER_DESC}}</strong> structure that receives a description of the video stream.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_DECODER_CONFIG}}</strong> structure that receives the decoder configuration.</p> </dd> <p>Gets a handle to the driver.</p> <p>The driver handle can be used to configure content protection.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a handle to the driver.</p> </dd> <p>Gets the content description that was used to create this enumerator.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_PROCESSOR_CONTENT_DESC}}</strong> structure that receives the content description.</p> </dd> <p>Gets the content description that was used to create this enumerator.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_PROCESSOR_CONTENT_DESC}}</strong> structure that receives the content description.</p> </dd> <p>Queries whether the video processor supports a specified video format.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The video format to query, specified as a <strong>{{DXGI_FORMAT}}</strong> value.</p> </dd> <dd> <p>Receives a bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{D3D11_VIDEO_PROCESSOR_FORMAT_SUPPORT}}</strong> enumeration.</p> </dd> <p>Gets the capabilities of the video processor.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_PROCESSOR_CAPS}}</strong> structure that receives the capabilities.</p> </dd> <p>Returns a group of video processor capabilities that are associated with frame-rate conversion, including deinterlacing and inverse telecine.</p> <p>The capabilities defined in the <strong>{{D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS}}</strong> structure are interdependent. Therefore, the driver can support multiple, distinct groups of these capabilities. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the group to retrieve. To get the maximum index, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>RateConversionCapsCount</strong> member of the <strong>{{D3D11_VIDEO_PROCESSOR_CAPS}}</strong> structure.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS}}</strong> structure that receives the frame-rate conversion capabilities.</p> </dd> <p>Gets a list of custom frame rates that a video processor supports.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the frame-rate capability group. To get the maxmum index, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}} </strong> and check the <strong>RateConversionCapsCount</strong> member of the <strong>{{D3D11_VIDEO_PROCESSOR_CAPS}}</strong> structure.</p> </dd> <dd> <p>The zero-based index of the custom rate to retrieve. To get the maximum index, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorRateConversionCaps}}</strong> and check the <strong>CustomRateCount</strong> member of the <strong>{{D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS}}</strong> structure.</p> <p>This index value is always relative to the capability group specified in the <em>TypeIndex</em> parameter.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_PROCESSOR_CUSTOM_RATE}}</strong> structure that receives the custom rate.</p> </dd> <p>Gets the range of values for an image filter.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The type of image filter, specified as a <strong>{{D3D11_VIDEO_PROCESSOR_FILTER}}</strong> value.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_PROCESSOR_FILTER_RANGE}}</strong> structure. The method fills the structure with the range of values for the specified filter.</p> </dd> <p>Represents a video processor for Microsoft Direct3D?11.</p> <p>To get a reference to this interface, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> <p>Gets the content description that was used to create the video processor.</p> <p>This method does not return a value.</p> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_PROCESSOR_CONTENT_DESC}}</strong> structure that receives the content description.</p> </dd> <p>Gets the rate conversion capabilities of the video processor.</p> <p>This method does not return a value.</p> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_PROCESSOR_RATE_CONVERSION_CAPS}}</strong> structure that receives the rate conversion capabilities.</p> </dd> <p>Provides a communication channel with the graphics driver or the Microsoft Direct3D runtime. </p> <p>To get a reference to this interface, call <strong>{{ID3D11VideoDevice::CreateAuthenticatedChannel}}</strong>.</p> <p>Gets the size of the driver's certificate chain.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the size of the certificate chain, in bytes.</p> </dd> <p>Gets the driver's certificate chain.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The size of the <em>pCertificate</em> array, in bytes. To get the size of the certificate chain, call <strong>{{ID3D11CryptoSession::GetCertificateSize}}</strong>.</p> </dd> <dd> <p>A reference to a byte array that receives the driver's certificate chain. The caller must allocate the array.</p> </dd> <p>Gets a handle to the authenticated channel.</p> <p>This method does not return a value.</p> <dd> <p>Receives a handle to the channel.</p> </dd> <p>Represents a cryptographic session. </p> <p>To get a reference to this interface, call <strong>{{ID3D11VideoDevice::CreateCryptoSession}}</strong>.</p> <p>Gets the type of encryption that is supported by this session.</p> <p>The application specifies the encryption type when it creates the session.</p> <p>This method does not return a value.</p> <dd> <p>Receives a {{GUID}} that specifies the encryption type. The following {{GUIDs}} are defined.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{D3D11_CRYPTO_TYPE_AES128_CTR}}</strong></dt> </dl> </td><td> <p>128-bit Advanced Encryption Standard {{CTR}} mode ({{AES}}-{{CTR}}) block cipher. </p> </td></tr> </table> <p>?</p> </dd> <p>Gets the decoding profile of the session.</p> <p>The application specifies the profile when it creates the session.</p> <p>This method does not return a value.</p> <dd> <p>Receives the decoding profile. For a list of possible values, see <strong>{{ID3D11VideoDevice::GetVideoDecoderProfile}}</strong>. </p> </dd> <p>Gets the size of the driver's certificate chain.</p> <p>To get the certificate, call <strong>{{ID3D11CryptoSession::GetCertificate}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the size of the certificate chain, in bytes. </p> </dd> <p>Gets the driver's certificate chain.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The size of the <em>pCertificate</em> array, in bytes. To get the size of the certificate chain, call <strong>{{ID3D11CryptoSession::GetCertificateSize}}</strong>.</p> </dd> <dd> <p>A reference to a byte array that receives the driver's certificate chain. The caller must allocate the array.</p> </dd> <p>Gets a handle to the cryptographic session.</p> <p>You can use this handle to associate the session with a decoder. This enables the decoder to decrypt data that is encrypted using this session.</p> <p>This method does not return a value.</p> <dd> <p>Receives a handle to the session.</p> </dd> <p>Identifies the output surfaces that can be accessed during video decoding.</p> <p>To get a reference to this interface, call <strong>{{ID3D11VideoDevice::CreateVideoDecoderOutputView}}</strong>.</p> <p>Gets the properties of the video decoder output view. </p> <p>This method does not return a value.</p> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC}}</strong> structure. The method fills the structure with the view properties.</p> </dd> <p>Identifies the input surfaces that can be accessed during video processing.</p> <p>To get a reference to this interface, call <strong>{{ID3D11VideoDevice::CreateVideoProcessorInputView}}</strong>.</p> <p>Gets the properties of the video processor input view.</p> <p>This method does not return a value.</p> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC}}</strong> structure. The method fills the structure with the view properties.</p> </dd> <p>Identifies the output surfaces that can be accessed during video processing.</p> <p>To get a reference to this interface, call <strong>{{ID3D11VideoDevice::CreateVideoProcessorOutputView}}</strong>.</p> <p>Gets the properties of the video processor output view.</p> <p>This method does not return a value.</p> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC}}</strong> structure. The method fills the structure with the view properties.</p> </dd> <p> Provides the video functionality of a Microsoft Direct3D?11 device. </p> <p>To get a reference to this interface, call <strong>QueryInterface</strong> with an <strong>{{ID3D11DeviceContext}}</strong> interface reference.</p><p>This interface provides access to several areas of Microsoft Direct3D video functionality:</p><ul> <li>Hardware-accelerated video decoding</li> <li>Video processing</li> <li>{{GPU}}-based content protection</li> <li>Video encryption and decryption</li> </ul><p>In Microsoft Direct3D?9, the equivalent functions were distributed across several interfaces:</p><ul> <li> <strong>{{IDirect3DAuthenticatedChannel9}}</strong> </li> <li> <strong>{{IDirect3DCryptoSession9}}</strong> </li> <li> <strong>{{IDirectXVideoDecoder}}</strong> </li> <li> <strong>{{IDirectXVideoProcessor}}</strong> </li> <li> <strong>{{IDXVAHD_VideoProcessor}}</strong> </li> </ul> <p>Gets a reference to a decoder buffer.</p> <p>The graphics driver allocates the buffers that are used for decoding. This method locks the Microsoft Direct3D surface that contains the buffer. When you are done using the buffer, call <strong>{{ID3D11VideoContext::ReleaseDecoderBuffer}}</strong> to unlock the surface. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoDecoder}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoDecoder}}</strong>.</p> </dd> <dd> <p>The type of buffer to retrieve, specified as a member of the <strong>{{D3D11_VIDEO_DECODER_BUFFER_TYPE}}</strong> enumeration.</p> </dd> <dd> <p>Receives the size of the buffer, in bytes. </p> </dd> <dd> <p>Receives a reference to the start of the memory buffer. </p> </dd> <p>Releases a buffer that was obtained by calling the <strong>{{ID3D11VideoContext::GetDecoderBuffer}}</strong> method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Starts a decoding operation to decode a video frame.</p> <p>After this method is called, call <strong>{{ID3D11VideoContext::SubmitDecoderBuffers}}</strong> to perform decoding operations. When all decoding operations have been executed, call <strong>{{ID3D11VideoContext::DecoderEndFrame}}</strong>. </p><p>Each call to <strong>DecoderBeginFrame</strong> must have a matching call to <strong>DecoderEndFrame</strong>. In most cases you cannot nest <strong>DecoderBeginFrame</strong> calls, but some codecs, such as like {{VC}}-1, can have nested <strong>DecoderBeginFrame</strong> calls for special operations like post processing.</p><p>The following encryption scenarios are supported through the content key:</p><ul> <li>The decoder can choose to not encrypt every frame, for example it may only encrypt the I frames and not encrypt the P/B frames. In these scenario, the decoder will specify pContentKey = {{NULL}} and ContentKeySize = 0 for those frames that it does not encrypt.</li> <li>The decoder can choose to encrypt the compressed buffers using the session key. In this scenario, the decoder will specify a content key containing all zeros.</li> <li>The decoder can choose to encrypt the compressed buffers using a separate content key. In this scenario, the decoder will {{ECB}} encrypt the content key using the session key and pass the encrypted content key.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. <strong>{{D3DERR_WASSTILLDRAWING}}</strong> or <strong>{{E_PENDING}}</strong> is returned if the harware is busy, in which case the decoder should try to make the call again.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoDecoder}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoDecoder}}</strong>.</p> </dd> <dd> <p>A reference to the <strong>{{ID3D11VideoDecoderOutputView}}</strong> interface. This interface describes the resource that will receive the decoded frame. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoDecoderOutputView}}</strong>.</p> </dd> <dd> <p>The size of the content key that is specified in <em>pContentKey</em>. If <em>pContentKey</em> is {{NULL}}, set <em>ContentKeySize</em> to zero.</p> </dd> <dd> <p>An optional reference to a content key that was used to encrypt the frame data. If no content key was used, set this parameter to <strong>{{NULL}}</strong>. If the caller provides a content key, the caller must use the session key to encrypt the content key.</p> </dd> <p>Signals the end of a decoding operation.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoDecoder}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoDecoder}}</strong>.</p> </dd> <p>Submits one or more buffers for decoding.</p> <p>This function does not honor a {{D3D11}} predicate that may have been set.</p><p>If the application uses <strong>{{D3D11}} quries</strong>, this function may not be accounted for with <strong>{{D3D11_QUERY_EVENT}}</strong> and <strong>{{D3D11_QUERY_TIMESTAMP}}</strong> when using feature levels lower than 11. <strong>{{D3D11_QUERY_PIPELINE_STATISTICS}}</strong> will not include this function for any feature level.</p><p>When using feature levels 9_x, all partially encrypted buffers must use the same EncryptedBlockInfo, and partial encryption cannot be turned off on a per frame basis.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoDecoder}}</strong> interface. To get this reference, call the <strong>{{ID3D11VideoDevice::CreateVideoDecoder}}</strong> method.</p> </dd> <dd> <p>The number of buffers submitted for decoding.</p> </dd> <dd> <p>A reference to an array of <strong>{{D3D11_VIDEO_DECODER_BUFFER_DESC}}</strong> structures. The <em>NumBuffers</em> parameter specifies the number of elements in the array. Each element in the array describes a compressed buffer for decoding.</p> </dd> <p>Performs an extended function for decoding. This method enables extensions to the basic decoder functionality.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoDecoder}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoDecoder}}</strong>.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_DECODER_EXTENSION}}</strong> structure that contains data for the function.</p> </dd> <p>Sets the target rectangle for the video processor.</p> <p>The target rectangle is the area within the destination surface where the output will be drawn. The target rectangle is given in pixel coordinates, relative to the destination surface.</p><p>If this method is never called, or if the <em>Enable</em> parameter is <strong>{{FALSE}}</strong>, the video processor writes to the entire destination surface.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>Specifies whether to apply the target rectangle.</p> </dd> <dd> <p>A reference to a <strong>{{RECT}}</strong> structure that specifies the target rectangle. If <em>Enable</em> is <strong>{{FALSE}}</strong>, this parameter is ignored.</p> </dd> <p>Sets the background color for the video processor.</p> <p>The video processor uses the background color to fill areas of the target rectangle that do not contain a video image. Areas outside the target rectangle are not affected.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, the color is specified as a {{YCbCr}} value. Otherwise, the color is specified as an {{RGB}} value.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_COLOR}}</strong> structure that specifies the background color.</p> </dd> <p>Sets the output color space for the video processor.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_PROCESSOR_COLOR_SPACE}}</strong> structure that specifies the color space.</p> </dd> <p>Sets the alpha fill mode for data that the video processor writes to the render target.</p> <p>To find out which fill modes the device supports, call the <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> method. If the driver reports the <strong>{{D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_FILL}}</strong> capability, the driver supports all of the fill modes. Otherwise, the <em>AlphaFillMode</em> parameter must be <strong>{{D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_OPAQUE}}</strong>. </p><p>The default fill mode is <strong>{{D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_OPAQUE}}</strong>.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The alpha fill mode, specified as a <strong>{{D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE}}</strong> value.</p> </dd> <dd> <p>The zero-based index of an input stream. This parameter is used if <em>AlphaFillMode</em> is <strong>{{D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_SOURCE_STREAM}}</strong>. Otherwise, the parameter is ignored.</p> </dd> <p>Sets the amount of downsampling to perform on the output.</p> <p>Downsampling is sometimes used to reduce the quality of premium content when other forms of content protection are not available. By default, downsampling is disabled.</p><p>If the <em>Enable</em> parameter is <strong>{{TRUE}}</strong>, the driver downsamples the composed image to the specified size, and then scales it back to the size of the target rectangle.</p><p>The width and height of <em>Size</em> must be greater than zero. If the size is larger than the target rectangle, downsampling does not occur.</p><p>To use this feature, the driver must support downsampling, indicated by the <strong>{{D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_CONSTRICTION}}</strong> capability flag. To query for this capability, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong>.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, downsampling is enabled. Otherwise, downsampling is disabled and the <strong>Size</strong> member is ignored. </p> </dd> <dd> <p>The sampling size.</p> </dd> <p>Specifies whether the video processor produces stereo video frames.</p> <p>By default, the video processor produces mono video frames.</p><p>To use this feature, the driver must support stereo video, indicated by the <strong>{{D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_STEREO}}</strong> capability flag. To query for this capability, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong>.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, stereo output is enabled. Otherwise, the video processor produces mono video frames.</p> </dd> <p>Sets a driver-specific video processing state.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>A reference to a {{GUID}} that identifies the operation. The meaning of this {{GUID}} is defined by the graphics driver.</p> </dd> <dd> <p>The size of the <em>pData</em> buffer, in bytes.</p> </dd> <dd> <p>A reference to a buffer that contains private state data. The method passes this buffer directly to the driver without validation. It is the responsibility of the driver to validate the data.</p> </dd> <p>Gets the current target rectangle for the video processor.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if the target rectangle was explicitly set using the <strong>{{ID3D11VideoContext::VideoProcessorSetOutputTargetRect}}</strong> method. Receives the value {{FALSE}} if the target rectangle was disabled or was never set.</p> </dd> <dd> <p>If <em>Enabled</em> receives the value <strong>{{TRUE}}</strong>, this parameter receives the target rectangle. Otherwise, this parameter is ignored. </p> </dd> <p>Gets the current background color for the video processor.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if the background color is a {{YCbCr}} color, or <strong>{{FALSE}}</strong> if the background color is an {{RGB}} color.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_COLOR}}</strong> structure. The method fills in the structure with the background color.</p> </dd> <p>Gets the current output color space for the video processor.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_PROCESSOR_COLOR_SPACE}}</strong> structure. The method fills in the structure with the output color space.</p> </dd> <p>Gets the current alpha fill mode for the video processor.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>Receives the alpha fill mode, as a <strong>{{D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE}}</strong> value.</p> </dd> <dd> <p>If the alpha fill mode is <strong>{{D3D11_VIDEO_PROCESSOR_ALPHA_FILL_MODE_SOURCE_STREAM}}</strong>, this parameter receives the zero-based index of an input stream. The input stream provides the alpha values for the alpha fill.</p> </dd> <p>Gets the current level of downsampling that is performed by the video processor.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if downsampling was explicitly enabled using the <strong>{{ID3D11VideoContext::VideoProcessorSetOutputConstriction}}</strong> method. Receives the value <strong>{{FALSE}}</strong> if the downsampling was disabled or was never set.</p> </dd> <dd> <p>If <em>Enabled</em> receives the value <strong>{{TRUE}}</strong>, this parameter receives the downsampling size. Otherwise, this parameter is ignored.</p> </dd> <p>Queries whether the video processor produces stereo video frames.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if stereo output is enabled, or <strong>{{FALSE}}</strong> otherwise.</p> </dd> <p>Gets private state data from the video processor.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>A reference to a {{GUID}} that identifies the state. The meaning of this {{GUID}} is defined by the graphics driver.</p> </dd> <dd> <p>The size of the <em>pData</em> buffer, in bytes.</p> </dd> <dd> <p>A reference to a buffer that receives the private state data. </p> </dd> <p>Specifies whether an input stream on the video processor contains interlaced or progressive frames.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>A <strong>{{D3D11_VIDEO_FRAME_FORMAT}}</strong> value that specifies the interlacing.</p> </dd> <p>Sets the color space for an input stream on the video processor.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_PROCESSOR_COLOR_SPACE}}</strong> structure that specifies the color space.</p> </dd> <p>Sets the rate at which the video processor produces output frames for an input stream.</p> <p>The standard output rates are normal frame-rate (<strong>{{D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_NORMAL}}</strong>) and half frame-rate (<strong>{{D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_HALF}}</strong>). In addition, the driver might support custom rates for rate conversion or inverse telecine. To get the list of custom rates, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCustomRate}}</strong>.</p><p>Depending on the output rate, the driver might need to convert the frame rate. If so, the value of <em>RepeatFrame</em> controls whether the driver creates interpolated frames or simply repeats input frames.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>The output rate, specified as a <strong>{{D3D11_VIDEO_PROCESSOR_OUTPUT_RATE}}</strong> value.</p> </dd> <dd> <p>Specifies how the driver performs frame-rate conversion, if required.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{TRUE}}</strong></dt> </dl> </td><td> <p>Repeat frames.</p> </td></tr> <tr><td><dl> <dt><strong>{{FALSE}}</strong></dt> </dl> </td><td> <p>Interpolate frames.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A reference to a <strong>{{DXGI_RATIONAL}}</strong> structure. If <em>OutputRate</em> is <strong>{{D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_CUSTOM}}</strong>, this parameter specifies the exact output rate. Otherwise, this parameter is ignored and can be <strong>{{NULL}}</strong>.</p> </dd> <p>Sets the source rectangle for an input stream on the video processor.</p> <p>The source rectangle is the portion of the input surface that is blitted to the destination surface. The source rectangle is given in pixel coordinates, relative to the input surface.</p><p>If this method is never called, or if the <em>Enable</em> parameter is <strong>{{FALSE}}</strong>, the video processor reads from the entire input surface.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>Specifies whether to apply the source rectangle.</p> </dd> <dd> <p>A reference to a <strong>{{RECT}}</strong> structure that specifies the source rectangle. If <em>Enable</em> is <strong>{{FALSE}}</strong>, this parameter is ignored.</p> </dd> <p>Sets the destination rectangle for an input stream on the video processor.</p> <p>The destination rectangle is the portion of the output surface that receives the blit for this stream. The destination rectangle is given in pixel coordinates, relative to the output surface.</p><p>The default destination rectangle is an empty rectangle (0, 0, 0, 0). If this method is never called, or if the <em>Enable</em> parameter is <strong>{{FALSE}}</strong>, no data is written from this stream. </p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>Specifies whether to apply the destination rectangle.</p> </dd> <dd> <p>A reference to a <strong>{{RECT}}</strong> structure that specifies the destination rectangle. If <em>Enable</em> is <strong>{{FALSE}}</strong>, this parameter is ignored.</p> </dd> <p>Sets the planar alpha for an input stream on the video processor.</p> <p>To use this feature, the driver must support stereo video, indicated by the <strong>{{D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALHPA_STREAM}}</strong> capability flag. To query for this capability, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong>.</p><p>Alpha blending is disabled by default. </p><p>For each pixel, the destination color value is computed as follows:</p><p><code>Cd = Cs * (As * Ap * Ae) + Cd * (1.0 - As * Ap * Ae)</code></p><p>where:</p><ul> <li><code>Cd</code> = The color value of the destination pixel</li> <li><code>Cs</code> = The color value of the source pixel</li> <li><code>As</code> = The per-pixel source alpha</li> <li><code>Ap</code> = The planar alpha value</li> <li><code>Ae</code> = The palette-entry alpha value, or 1.0 (see Note)</li> </ul><strong>Note</strong>??Palette-entry alpha values apply only to palettized color formats, and only when the device supports the <strong>{{D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_PALETTE}}</strong> capability. Otherwise, this factor equals 1.0.?<p>The destination alpha value is computed according to the alpha fill mode. For more information, see <strong>{{ID3D11VideoContext::VideoProcessorSetOutputAlphaFillMode}}</strong>.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>Specifies whether alpha blending is enabled.</p> </dd> <dd> <p>The planar alpha value. The value can range from 0.0 (transparent) to 1.0 (opaque). If <em>Enable</em> is <strong>{{FALSE}}</strong>, this parameter is ignored.</p> </dd> <p>Sets the color-palette entries for an input stream on the video processor.</p> <p>This method applies only to input streams that have a palettized color format. Palettized formats with 4 bits per pixel (bpp) use the first 16 entries in the list. Formats with 8 bpp use the first 256 entries.</p><p>If a pixel has a palette index greater than the number of entries, the device treats the pixel as white with opaque alpha. For full-range {{RGB}}, this value is (255, 255, 255, 255); for {{YCbCr}} the value is (255, 235, 128, 128).</p><p>If the driver does not report the <strong>{{D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ALPHA_PALETTE}}</strong> capability flag, every palette entry must have an alpha value of 0xFF (opaque). To query for this capability, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong>.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>The number of elements in the <em>pEntries</em> array.</p> </dd> <dd> <p>A reference to an array of palette entries. For {{RGB}} streams, the palette entries use the <strong>{{DXGI_FORMAT_B8G8R8A8}}</strong> representation. For {{YCbCr}} streams, the palette entries use the <strong>{{DXGI_FORMAT_AYUV}}</strong> representation. The caller allocates the array.</p> </dd> <p>Sets the pixel aspect ratio for an input stream on the video processor.</p> <p>This function can only be called if the driver reports the <strong>{{D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_PIXEL_ASPECT_RATIO}}</strong> capability. If this capability is not set, this function will have no effect.</p><p>Pixel aspect ratios of the form 0/n and n/0 are not valid.</p><p>The default pixel aspect ratio is 1:1 (square pixels).</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>Specifies whether the <em>pSourceAspectRatio</em> and <em>pDestinationAspectRatio</em> parameters contain valid values. Otherwise, the pixel aspect ratios are unspecified.</p> </dd> <dd> <p>A reference to a <strong>{{DXGI_RATIONAL}}</strong> structure that contains the pixel aspect ratio of the source rectangle. If <em>Enable</em> is <strong>{{FALSE}}</strong>, this parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>A reference to a <strong>{{DXGI_RATIONAL}}</strong> structure that contains the pixel aspect ratio of the destination rectangle. If <em>Enable</em> is <strong>{{FALSE}}</strong>, this parameter can be <strong>{{NULL}}</strong>.</p> </dd> <p>Sets the luma key for an input stream on the video processor.</p> <p>To use this feature, the driver must support luma keying, indicated by the <strong>{{D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_LUMA_KEY}}</strong> capability flag. To query for this capability, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong>. In addition, if the input format is {{RGB}}, the device must support the <strong>{{D3D11_VIDEO_PROCESSOR_FORMAT_CAPS_RGB_LUMA_KEY}}</strong> capability.</p><p>The values of <em>Lower</em> and <em>Upper</em> give the lower and upper bounds of the luma key, using a nominal range of [0...1]. Given a format with <em>n</em> bits per channel, these values are converted to luma values as follows:</p><p><code>val = f * ((1 &lt;&lt; n)-1)</code></p><p>Any pixel whose luma value falls within the upper and lower bounds (inclusive) is treated as transparent.</p><p>For example, if the pixel format uses 8-bit luma, the upper bound is calculated as follows:</p><p><code>{{BYTE}} Y = {{BYTE}}(max(min(1.0, Upper), 0.0) * 255.0)</code></p><p>Note that the value is clamped to the range [0...1] before multiplying by 255.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>Specifies whether luma keying is enabled.</p> </dd> <dd> <p>The lower bound for the luma key. The valid range is [0?1]. If <em>Enable</em> is <strong>{{FALSE}}</strong>, this parameter is ignored.</p> </dd> <dd> <p>The upper bound for the luma key. The valid range is [0?1]. If <em>Enable</em> is <strong>{{FALSE}}</strong>, this parameter is ignored.</p> </dd> <p>Enables or disables stereo 3D video for an input stream on the video processor. In addition, this method specifies the layout of the video frames in memory.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>Specifies whether stereo 3D is enabled for this stream. If the value is <strong>{{FALSE}}</strong>, the remaining parameters of this method are ignored.</p> </dd> <dd> <p>Specifies the layout of the two stereo views in memory, as a <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT}}</strong> value.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, frame 0 contains the left view. Otherwise, frame 0 contains the right view. </p> <p>This parameter is ignored for the following stereo formats:</p> <ul> <li><strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO}} </strong></li> <li><strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET}}</strong></li> </ul> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, frame 0 contains the base view. Otherwise, frame 1 contains the base view.</p> <p>This parameter is ignored for the following stereo formats:</p> <ul> <li><strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO}} </strong></li> <li><strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET}}</strong></li> <li>When <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_SEPARATE}}</strong> is used and the application wants to convert the stereo data to mono, it can either:<ul> <li>Specify the base view as a mono input.</li> <li>Specify both resources and allow the driver to do the conversion from the base view. In this case, <strong>{{D3D11_VIDEO_PROCESSOR_STREAM}}.hInputSurface</strong> is considered frame 0 and <strong>{{D3D11_VIDEO_PROCESSOR_STREAM}}.hInputSurfaceRight</strong> is considered frame 1.</li> </ul> </li> </ul> </dd> <dd> <p>A flag from the <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE}}</strong> enumeration, specifying whether one of the views is flipped.</p> </dd> <dd> <p>For <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET}}</strong> format, this parameter specifies how to generate the left and right views: </p> <ul> <li>If <em>MonoOffset</em> is positive, the right view is shifted to the right by that many pixels, and the left view is shifted to the left by the same amount. </li> <li>If <em>MonoOffset</em> is negative, the right view is shifted to the left by that many pixels, and the left view is shifted to right by the same amount.</li> </ul> <p>If <em>Format</em> is not <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET}}</strong>, this parameter must be zero.</p> </dd> <p>Enables or disables automatic processing features on the video processor.</p> <p>By default, the driver might perform certain processing tasks automatically during the video processor blit. This method enables the application to disable these extra video processing features. For example, if you provide your own pixel shader for the video processor, you might want to disable the driver's automatic processing.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, automatic processing features are enabled. If <strong>{{FALSE}}</strong>, the driver disables any extra video processing that it might be performing.</p> </dd> <p>Enables or disables an image filter for an input stream on the video processor.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>The filter, specified as a <strong>{{D3D11_VIDEO_PROCESSOR_FILTER}}</strong> value.</p> <p>To query which filters the driver supports, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong>.</p> </dd> <dd> <p>Specifies whether to enable the filter.</p> </dd> <dd> <p>The filter level. If <em>Enable</em> is <strong>{{FALSE}}</strong>, this parameter is ignored. </p> <p>To find the valid range of levels for a specified filter, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorFilterRange}}</strong>.</p> </dd> <p>Sets a driver-specific state on a video processing stream.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>A reference to a {{GUID}} that identifies the operation. The meaning of this {{GUID}} is defined by the graphics driver.</p> </dd> <dd> <p>The size of the <em>pData</em> buffer, in bytes.</p> </dd> <dd> <p>A reference to a buffer that contains private state data. The method passes this buffer directly to the driver without validation. It is the responsibility of the driver to validate the data.</p> </dd> <p>Gets the format of an input stream on the video processor.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>Receives a <strong>{{D3D11_VIDEO_FRAME_FORMAT}}</strong> value that specifies whether the stream contains interlaced or progressive frames.</p> </dd> <p>Gets the color space for an input stream of the video processor. </p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>Receives a <strong>{{D3D11_VIDEO_PROCESSOR_COLOR_SPACE}}</strong> value that specifies the color space.</p> </dd> <p>Gets the rate at which the video processor produces output frames for an input stream. </p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>Receives a <strong>{{D3D11_VIDEO_PROCESSOR_OUTPUT_RATE}}</strong> value that specifies the output rate.</p> </dd> <dd> <p>Receives a Boolean value that specifies how the driver performs frame-rate conversion, if required. </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{TRUE}}</strong></dt> </dl> </td><td> <p>Repeat frames.</p> </td></tr> <tr><td><dl> <dt><strong>{{FALSE}}</strong></dt> </dl> </td><td> <p>Interpolate frames.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A reference to a <strong>{{DXGI_RATIONAL}}</strong> structure. If the output rate is <strong>{{D3D11_VIDEO_PROCESSOR_OUTPUT_RATE_CUSTOM}}</strong>, the method fills in this structure with the exact output rate. Otherwise, this parameter is ignored. </p> </dd> <p>Gets the source rectangle for an input stream on the video processor. </p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if the source rectangle is enabled, or <strong>{{FALSE}}</strong> otherwise.</p> </dd> <dd> <p>A reference to a <strong>{{RECT}}</strong> structure that receives the source rectangle.</p> </dd> <p>Gets the destination rectangle for an input stream on the video processor. </p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if the destination rectangle is enabled, or <strong>{{FALSE}}</strong> otherwise.</p> </dd> <dd> <p>A reference to a <strong>{{RECT}}</strong> structure that receives the destination rectangle.</p> </dd> <p>Gets the planar alpha for an input stream on the video processor. </p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if planar alpha is enabled, or <strong>{{FALSE}}</strong> otherwise.</p> </dd> <dd> <p>Receives the planar alpha value. The value can range from 0.0 (transparent) to 1.0 (opaque).</p> </dd> <p>Gets the color-palette entries for an input stream on the video processor.</p> <p>This method applies only to input streams that have a palettized color format. Palettized formats with 4 bits per pixel (bpp) use 16 palette entries. Formats with 8 bpp use 256 entries.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>The number of entries in the <em>pEntries</em> array.</p> </dd> <dd> <p>A reference to a <strong>{{UINT}}</strong> array allocated by the caller. The method fills the array with the palette entries. For {{RGB}} streams, the palette entries use the <strong>{{DXGI_FORMAT_B8G8R8A8}}</strong> representation. For {{YCbCr}} streams, the palette entries use the <strong>{{DXGI_FORMAT_AYUV}}</strong> representation.</p> </dd> <p>Gets the pixel aspect ratio for an input stream on the video processor. </p> <p>When the method returns, if <em>*pEnabled</em> is <strong>{{TRUE}}</strong>, the <em>pSourceAspectRatio</em> and <em>pDestinationAspectRatio</em> parameters contain the pixel aspect ratios. Otherwise, the default pixel aspect ratio is 1:1 (square pixels).</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if the pixel aspect ratio is specified. Otherwise, receives the value <strong>{{FALSE}}</strong>.</p> </dd> <dd> <p>A reference to a <strong>{{DXGI_RATIONAL}}</strong> structure. If *<em>pEnabled</em> is <strong>{{TRUE}}</strong>, this parameter receives the pixel aspect ratio of the source rectangle.</p> </dd> <dd> <p>A reference to a <strong>{{DXGI_RATIONAL}}</strong> structure. If *<em>pEnabled</em> is <strong>{{TRUE}}</strong>, this parameter receives the pixel aspect ratio of the destination rectangle.</p> </dd> <p>Gets the luma key for an input stream of the video processor. </p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if luma keying is enabled, or <strong>{{FALSE}}</strong> otherwise.</p> </dd> <dd> <p>Receives the lower bound for the luma key. The valid range is [0?1]. </p> </dd> <dd> <p>Receives the upper bound for the luma key. The valid range is [0?1]. </p> </dd> <p>Gets the stereo 3D format for an input stream on the video processor</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if stereo 3D is enabled for this stream, or <strong>{{FALSE}}</strong> otherwise. If the value is <strong>{{FALSE}}</strong>, ignore the remaining parameters.</p> </dd> <dd> <p>Receives a <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT}}</strong> value that specifies the layout of the two stereo views in memory.</p> </dd> <dd> <p>Receives a Boolean value.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{TRUE}}</strong></dt> </dl> </td><td> <p>Frame 0 contains the left view.</p> </td></tr> <tr><td><dl> <dt><strong>{{FALSE}}</strong></dt> </dl> </td><td> <p>Frame 0 contains the right view.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Receives a Boolean value.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{TRUE}}</strong></dt> </dl> </td><td> <p>Frame 0 contains the base view.</p> </td></tr> <tr><td><dl> <dt><strong>{{FALSE}}</strong></dt> </dl> </td><td> <p>Frame 1 contains the base view.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Receives a <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FLIP_MODE}}</strong> value. This value specifies whether one of the views is flipped. </p> </dd> <dd> <p>Receives the pixel offset used for <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO_OFFSET}}</strong> format. This parameter is ignored for other stereo formats.</p> </dd> <p>Queries whether automatic processing features of the video processor are enabled.</p> <p>Automatic processing refers to additional image processing that drivers might have performed on the image data prior to the application receiving the data. </p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if automatic processing features are enabled, or <strong>{{FALSE}}</strong> otherwise.</p> </dd> <p>Gets the image filter settings for an input stream on the video processor.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>The filter to query, specified as a <strong>{{D3D11_VIDEO_PROCESSOR_FILTER}}</strong> value. </p> </dd> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if the image filter is enabled, or <strong>{{FALSE}}</strong> otherwise.</p> </dd> <dd> <p>Receives the filter level.</p> </dd> <p>Gets a driver-specific state for a video processing stream. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>A reference to a {{GUID}} that identifies the state. The meaning of this {{GUID}} is defined by the graphics driver.</p> </dd> <dd> <p>The size of the <em>pData</em> buffer, in bytes.</p> </dd> <dd> <p>A reference to a buffer that receives the private state data. </p> </dd> <p>Performs a video processing operation on one or more input samples and writes the result to a Direct3D surface.</p> <p>The maximum value of <em>StreamCount</em> is given in the <strong>MaxStreamStates</strong> member of the <strong>{{D3D11_VIDEO_PROCESSOR_CAPS}}</strong> structure. The maximum number of streams that can be enabled at one time is given in the <strong>MaxInputStreams</strong> member of that structure. </p><p>If the output stereo mode is <strong>{{TRUE}}</strong>:</p><ul> <li>The output view must contain a texture array of two elements.</li> <li>At least one stereo stream must be specified.</li> <li>If multiple input streams are enabled, it is possible that one or more of the input streams may contain mono data.</li> </ul><p>Otherwise:</p><ul> <li>The output view must contain a single element.</li> <li>The stereo format cannot be <strong>{{D3D11_VIDEO_PROCESSOR_STEREO_FORMAT_MONO}}</strong> .</li> </ul><p>This function does not honor a {{D3D11}} predicate that may have been set.</p><p>If the application uses <strong>{{D3D11}} quries</strong>, this function may not be accounted for with <strong>{{D3D11_QUERY_EVENT}}</strong> and <strong>{{D3D11_QUERY_TIMESTAMP}}</strong> when using feature levels lower than 11. <strong>{{D3D11_QUERY_PIPELINE_STATISTICS}}</strong> will not include this function for any feature level.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call the <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong> method.</p> </dd> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessorOutputView}}</strong> interface for the output surface. The output of the video processing operation will be written to this surface.</p> </dd> <dd> <p>The frame number of the output video frame, indexed from zero. </p> </dd> <dd> <p>The number of input streams to process.</p> </dd> <dd> <p>A reference to an array of <strong>{{D3D11_VIDEO_PROCESSOR_STREAM}}</strong> structures that contain information about the input streams. The caller allocates the array and fills in each structure. The number of elements in the array is given in the <em>StreamCount</em> parameter. </p> </dd> <p>Establishes the session key for a cryptographic session. </p> <p>The key exchange mechanism depends on the type of cryptographic session.</p><p>For {{RSA}} Encryption Scheme - Optimal Asymmetric Encryption Padding ({{RSAES}}-{{OAEP}}), the software decoder generates the secret key, encrypts the secret key by using the public key with {{RSAES}}-{{OAEP}}, and places the cipher text in the <em>pData</em> parameter. The actual size of the buffer for {{RSAES}}-{{OAEP}} is 256 bytes.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11CryptoSession}}</strong> interface of the cryptographic session.</p> </dd> <dd> <p>The size of the <em>pData</em> byte array, in bytes. </p> </dd> <dd> <p>A reference to a byte array that contains the encrypted session key. </p> </dd> <p>Reads encrypted data from a protected surface. </p> <p>Not all drivers support this method. To query the driver capabilities, call <strong>{{ID3D11VideoDevice::GetContentProtectionCaps}}</strong> and check for the <strong>{{D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK}}</strong> flag in the <strong>Caps</strong> member of the <strong>{{D3D11_VIDEO_CONTENT_PROTECTION_CAPS}}</strong> structure.</p><p>Some drivers might require a separate key to decrypt the data that is read back. To check for this requirement, call <strong>GetContentProtectionCaps</strong> and check for the <strong>{{D3D11_CONTENT_PROTECTION_CAPS_ENCRYPTED_READ_BACK_KEY}}</strong> flag. If this flag is present, call <strong>{{ID3D11VideoContext::GetEncryptionBltKey}}</strong> to get the decryption key.</p><p>This method has the following limitations:</p><ul> <li>Reading back sub-rectangles is not supported.</li> <li>Reading back partially encrypted surfaces is not supported.</li> <li>The protected surface must be either an off-screen plain surface or a render target.</li> <li>The destination surface must be a {{D3D11_USAGE_STAGING}} resource.</li> <li>The protected surface cannot be multisampled.</li> <li>Stretching and colorspace conversion are not supported.</li> </ul><p> This function does not honor a {{D3D11}} predicate that may have been set.</p><p> If the application uses <strong>{{D3D11}} quries</strong>, this function may not be accounted for with <strong>{{D3D11_QUERY_EVENT}}</strong> and <strong>{{D3D11_QUERY_TIMESTAMP}}</strong> when using feature levels lower than 11. <strong>{{D3D11_QUERY_PIPELINE_STATISTICS}}</strong> will not include this function for any feature level.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11CryptoSession}}</strong> interface of the cryptographic session.</p> </dd> <dd> <p>A reference to the <strong>{{ID3D11Texture2D}}</strong> interface of the protected surface.</p> </dd> <dd> <p>A reference to the <strong>{{ID3D11Texture2D}}</strong> interface of the surface that receives the encrypted data. </p> </dd> <dd> <p>A reference to a buffer that receives the initialization vector ({{IV}}). The caller allocates this buffer, but the driver generates the {{IV}}. </p> <p>For 128-bit {{AES}}-{{CTR}} encryption, <em>pIV</em> points to a <strong>{{D3D11_AES_CTR_IV}}</strong> structure. When the driver generates the first {{IV}}, it initializes the structure to a random number. For each subsequent {{IV}}, the driver simply increments the <strong>{{IV}}</strong> member of the structure, ensuring that the value always increases. The application can validate that the same {{IV}} is never used more than once with the same key pair.</p> </dd> <dd> <p>The size of the <em>pIV</em> buffer, in bytes.</p> </dd> <p>Writes encrypted data to a protected surface.</p> <p>Not all hardware or drivers support this functionality for all cryptographic types. This function can only be called when the <strong>{{D3D11_CONTENT_PROTECTION_CAPS_DECRYPTION_BLT}}</strong> cap is reported.</p><p>This method does not support writing to sub-rectangles of the surface.</p><p>If the hardware and driver support a content key:</p><ul> <li>The data is encrypted by the caller using the content key.</li> <li>The content key is encrypted by the caller using the session key.</li> <li>The encrypted content key is passed to the driver.</li> </ul><p> Otherwise, the data is encrypted by the caller using the session key and {{NULL}} is passed as the content key.</p><p>If the driver and hardware support partially encrypted buffers, <em>pEncryptedBlockInfo</em> indicates which portions of the buffer are encrypted and which is not. If the entire buffer is encrypted, <em>pEncryptedBlockinfo</em> should be <strong>{{NULL}}</strong>.</p><p>The <strong>{{D3D11_ENCRYPTED_BLOCK_INFO}}</strong> allows the application to indicate which bytes in the buffer are encrypted. This is specified in bytes, so the application must ensure that the encrypted blocks match the {{GPU}}?s crypto block alignment.</p><p>This function does not honor a {{D3D11}} predicate that may have been set.</p><p>If the application uses <strong>{{D3D11}} quries</strong>, this function may not be accounted for with <strong>{{D3D11_QUERY_EVENT}}</strong> and <strong>{{D3D11_QUERY_TIMESTAMP}}</strong> when using feature levels lower than 11. <strong>{{D3D11_QUERY_PIPELINE_STATISTICS}}</strong> will not include this function for any feature level.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11CryptoSession}}</strong> interface.</p> </dd> <dd> <p>A reference to the surface that contains the source data.</p> </dd> <dd> <p>A reference to the protected surface where the encrypted data is written.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_ENCRYPTED_BLOCK_INFO}}</strong> structure, or <strong>{{NULL}}</strong>.</p> <p>If the driver supports partially encrypted buffers, <em>pEncryptedBlockInfo</em> indicates which portions of the buffer are encrypted. If the entire surface is encrypted, set this parameter to <strong>{{NULL}}</strong>. </p> <p>To check whether the driver supports partially encrypted buffers, call <strong>{{ID3D11VideoDevice::GetContentProtectionCaps}}</strong> and check for the <strong>{{D3D11_CONTENT_PROTECTION_CAPS_PARTIAL_DECRYPTION}} </strong> capabilities flag. If the driver does not support partially encrypted buffers, set this parameter to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>A reference to a buffer that contains a content encryption key, or <strong>{{NULL}}</strong>. To query whether the driver supports the use of content keys, call <strong>{{ID3D11VideoDevice::GetContentProtectionCaps}}</strong> and check for the <strong>{{D3D11_CONTENT_PROTECTION_CAPS_CONTENT_KEY}}</strong> capabilities flag. </p> <p>If the driver supports content keys, use the content key to encrypt the surface. Encrypt the content key using the session key, and place the resulting cipher text in <em>pContentKey</em>. If the driver does not support content keys, use the session key to encrypt the surface and set <em>pContentKey</em> to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>The size of the encrypted content key, in bytes.</p> </dd> <dd> <p>A reference to a buffer that contains the initialization vector ({{IV}}). </p> <p>For 128-bit {{AES}}-{{CTR}} encryption, <em>pIV</em> points to a <strong>{{D3D11_AES_CTR_IV}}</strong> structure. The caller allocates the structure and generates the {{IV}}. When you generate the first {{IV}}, initialize the structure to a random number. For each subsequent {{IV}}, simply increment the <strong>{{IV}}</strong> member of the structure, ensuring that the value always increases. This procedure enables the driver to validate that the same {{IV}} is never used more than once with the same key pair.</p> <p>For other encryption types, a different structure might be used, or the encryption might not use an {{IV}}.</p> </dd> <dd> <p>The size of the <em>pIV</em> buffer, in bytes.</p> </dd> <p>Gets a random number that can be used to refresh the session key. </p> <p>To generate a new session key, perform a bitwise <strong>{{XOR}}</strong> between the previous session key and the random number. The new session key does not take affect until the application calls <strong>{{ID3D11VideoContext::FinishSessionKeyRefresh}}</strong>.</p><p>To query whether the driver supports this method, call <strong>{{ID3D11VideoDevice::GetContentProtectionCaps}}</strong> and check for the <strong>{{D3D11_CONTENT_PROTECTION_CAPS_FRESHEN_SESSION_KEY}}</strong> capabilities flag.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11CryptoSession}}</strong> interface.</p> </dd> <dd> <p>The size of the <em>pRandomNumber</em> array, in bytes. The size should match the size of the session key.</p> </dd> <dd> <p>A reference to a byte array that receives a random number.</p> </dd> <p>Switches to a new session key. </p> <p>This function can only be called when the <strong>{{D3D11_CONTENT_PROTECTION_CAPS_FRESHEN_SESSION_KEY}}</strong> cap is reported.</p><p>Before calling this method, call <strong>{{ID3D11VideoContext::StartSessionKeyRefresh}}</strong>. The <strong>StartSessionKeyRefresh</strong> method gets a random number from the driver, which is used to create a new session key. The new session key does not become active until the application calls <strong>FinishSessionKeyRefresh</strong>. After the application calls <strong>FinishSessionKeyRefresh</strong>, all protected surfaces are encrypted using the new session key. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11CryptoSession}}</strong> interface.</p> </dd> <p>Gets the cryptographic key to decrypt the data returned by the <strong>{{ID3D11VideoContext::EncryptionBlt}}</strong> method.</p> <p>This method applies only when the driver requires a separate content key for the <strong>EncryptionBlt</strong> method. For more information, see the Remarks for <strong>EncryptionBlt</strong>.</p><p>Each time this method is called, the driver generates a new key.</p><p>The <em>KeySize</em> should match the size of the session key.</p><p>The read back key is encrypted by the driver/hardware using the session key. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Establishes a session key for an authenticated channel. </p> <p>This method will fail if the channel type is <strong>{{D3D11_AUTHENTICATED_CHANNEL_D3D11}}</strong>, because the Direct3D11 channel does not support authentication.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11AuthenticatedChannel}}</strong> interface. This method will fail if the channel type is <strong>{{D3D11_AUTHENTICATED_CHANNEL_D3D11}}</strong>, because the Direct3D11 channel does not support authentication.</p> </dd> <dd> <p>The size of the data in the <em>pData</em> array, in bytes.</p> </dd> <dd> <p>A reference to a byte array that contains the encrypted session key. The buffer must contain 256 bytes of data, encrypted using {{RSA}} Encryption Scheme - Optimal Asymmetric Encryption Padding ({{RSAES}}-{{OAEP}}). </p> </dd> <p>Sends a query to an authenticated channel. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11AuthenticatedChannel}}</strong> interface.</p> </dd> <dd> <p>The size of the <em>pInput</em> array, in bytes.</p> </dd> <dd> <p>A reference to a byte array that contains input data for the query. This array always starts with a <strong>{{D3D11_AUTHENTICATED_QUERY_INPUT}}</strong> structure. The <strong>QueryType</strong> member of the structure specifies the query and defines the meaning of the rest of the array.</p> </dd> <dd> <p>The size of the <em>pOutput</em> array, in bytes.</p> </dd> <dd> <p>A reference to a byte array that receives the result of the query. This array always starts with a <strong>{{D3D11_AUTHENTICATED_QUERY_OUTPUT}}</strong> structure. The meaning of the rest of the array depends on the query.</p> </dd> <p>Sends a configuration command to an authenticated channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11AuthenticatedChannel}}</strong> interface.</p> </dd> <dd> <p>The size of the <em>pInput</em> array, in bytes.</p> </dd> <dd> <p>A reference to a byte array that contains input data for the command. This buffer always starts with a <strong>{{D3D11_AUTHENTICATED_CONFIGURE_INPUT}}</strong> structure. The <strong>ConfigureType</strong> member of the structure specifies the command and defines the meaning of the rest of the buffer.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_AUTHENTICATED_CONFIGURE_OUTPUT}}</strong> structure that receives the response to the command.</p> </dd> <p>Sets the stream rotation for an input stream on the video processor.</p> <p>This is an optional state and the application should only use it if <strong>{{D3D11_VIDEO_PROCESSOR_FEATURE_CAPS_ROTATION}}</strong> is reported in <strong>{{D3D11_VIDEO_PROCESSOR_CAPS}}.FeatureCaps</strong>.</p><p>The stream source rectangle will be specified in the pre-rotation coordinates (typically landscape) and the stream destination rectangle will be specified in the post-rotation coordinates (typically portrait). The application must update the stream destination rectangle correctly when using a rotation value other than 0? and 180?.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>Specifies if the stream is to be rotated in a clockwise orientation. </p> </dd> <dd> <p>Specifies the rotation of the stream.</p> </dd> <p>Gets the stream rotation for an input stream on the video processor.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong>.</p> </dd> <dd> <p>The zero-based index of the input stream. To get the maximum number of streams, call <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorCaps}}</strong> and check the <strong>MaxStreamStates</strong> structure member.</p> </dd> <dd> <p>Specifies if the stream is rotated. </p> </dd> <dd> <p>Specifies the rotation of the stream in a clockwise orientation.</p> </dd> <p>Provides the video decoding and video processing capabilities of a Microsoft Direct3D?11 device. </p> <p>The Direct3D?11 device supports this interface. To get a reference to this interface, call <strong>QueryInterface</strong> with an <strong>{{ID3D11Device}}</strong> interface reference.</p><p>If you query an <strong>{{ID3D11Device}}</strong> for <strong>{{ID3D11VideoDevice}}</strong> and the Direct3D?11 device created is using the reference rasterizer or {{WARP}}, or is a hardware device and you are using the Microsoft Basic Display Adapter, <strong>{{E_NOINTERFACE}}</strong> is returned.</p> <p>Creates a video decoder device for Microsoft Direct3D?11.</p> <p>This method allocates the necessary decoder buffers. </p><p>The <strong>{{ID3D11DeviceContext::ClearState}}</strong> method does not affect the internal state of the video decoder.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_DECODER_DESC}}</strong> structure that describes the video stream and the decoder profile.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_DECODER_CONFIG}}</strong> structure that specifies the decoder configuration.</p> </dd> <dd> <p>Receives a reference to the <strong>{{ID3D11VideoDecoder}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates a video processor device for Microsoft Direct3D?11.</p> <p>The <strong>{{ID3D11DeviceContext::ClearState}}</strong> method does not affect the internal state of the video processor.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessorEnumerator}}</strong> interface. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessorEnumerator}}</strong>.</p> </dd> <dd> <p>Specifies the frame-rate conversion capabilities for the video processor. The value is a zero-based index that corresponds to the <em>TypeIndex</em> parameter of the <strong>{{ID3D11VideoProcessorEnumerator::GetVideoProcessorRateConversionCaps}}</strong> method. </p> </dd> <dd> <p>Receives a reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates a channel to communicate with the Microsoft Direct3D device or the graphics driver. The channel can be used to send commands and queries for content protection.</p> <p>If the <em>ChannelType</em> parameter is <strong>{{D3D11_AUTHENTICATED_CHANNEL_D3D11}}</strong>, the method creates a channel with the Direct3D device. This type of channel does not support authentication.</p><p>If <em>ChannelType</em> is <strong>{{D3D11_AUTHENTICATED_CHANNEL_DRIVER_SOFTWARE}}</strong> or <strong>{{D3D11_AUTHENTICATED_CHANNEL_DRIVER_HARDWARE}}</strong>, the method creates an authenticated channel with the graphics driver.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Specifies the type of channel, as a member of the <strong>{{D3D11_AUTHENTICATED_CHANNEL_TYPE}}</strong> enumeration.</p> </dd> <dd> <p>Receives a reference to the <strong>{{ID3D11AuthenticatedChannel}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates a cryptographic session to encrypt video content that is sent to the graphics driver. </p> <p>The <strong>{{ID3D11DeviceContext::ClearState}}</strong> method does not affect the internal state of the cryptographic session.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a {{GUID}} that specifies the type of encryption to use. The following {{GUIDs}} are defined. </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{D3D11_CRYPTO_TYPE_AES128_CTR}}</strong></dt> </dl> </td><td> <p>128-bit Advanced Encryption Standard {{CTR}} mode ({{AES}}-{{CTR}}) block cipher. </p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A reference to a {{GUID}} that specifies the decoding profile. For a list of possible values, see <strong>{{ID3D11VideoDevice::GetVideoDecoderProfile}}</strong>. If decoding will not be used, set this parameter to <strong>{{NULL}}</strong>. </p> </dd> <dd> <p>A reference to a {{GUID}} that specifies the type of key exchange.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{D3D11_KEY_EXCHANGE_RSAES_OAEP}}</strong></dt> </dl> </td><td> <p>The caller will create the session key, encrypt it with {{RSA}} Encryption Scheme - Optimal Asymmetric Encryption Padding ({{RSAES}}-{{OAEP}}) by using the driver's public key, and pass the session key to the driver.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Receives a reference to the <strong>{{ID3D11CryptoSession}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates a resource view for a video decoder, describing the output sample for the decoding operation.</p> <p>Set the <em>ppVDOVView</em> parameter to <strong>{{NULL}}</strong> to test whether a view is supported.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11Resource}}</strong> interface of the decoder surface. The resource must be created with the <strong>{{D3D11_BIND_DECODER}}</strong> flag. See <strong>{{D3D11_BIND_FLAG}}</strong>.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_DECODER_OUTPUT_VIEW_DESC}}</strong> structure that describes the view.</p> </dd> <dd> <p>Receives a reference to the <strong>{{ID3D11VideoDecoderOutputView}}</strong> interface. The caller must release the interface. If this parameter is <strong>{{NULL}}</strong>, the method checks whether the view is supported, but does not create the view. </p> </dd> <p>Creates a resource view for a video processor, describing the input sample for the video processing operation.</p> <p>Set the <em>ppVPIView</em> parameter to <strong>{{NULL}}</strong> to test whether a view is supported.</p><p>The surface format is given in the <strong>FourCC</strong> member of the <strong>{{D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC}}</strong> structure. The method fails if the video processor does not support this format as an input sample. An app must specify 0 when using 9_1, 9_2, or 9_3 feature levels. </p><p>Resources used for video processor input views must use the following bind flag combinations:</p><ul> <li>Any combination of bind flags that includes <strong>{{D3D11_BIND_DECODER}}</strong>,<strong>{{D3D11_BIND_VIDEO_ENCODER}}</strong>, <strong>{{D3D11_BIND_RENDER_TARGET}}</strong>, and <strong>{{D3D11_BIND_UNORDERED_ACCESS_VIEW}}</strong> can be used as for video processor input views (regardless of what other bind flags may be set).</li> <li>Bind flags = 0 is also allowed for a video processor input view.</li> <li>Other restrictions will apply such as:<ul> <li>No multi-sampling is allowed.</li> <li>The Texture2D must have been created using {{D3D11_USAGE_DEFAULT}}.</li> </ul> </li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11Resource}}</strong> interface of the input surface.</p> </dd> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessorEnumerator}}</strong> interface that specifies the video processor. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessorEnumerator}}</strong>.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_PROCESSOR_INPUT_VIEW_DESC}}</strong> structure that describes the view.</p> </dd> <dd> <p>Receives a reference to the <strong>{{ID3D11VideoProcessorInputView}}</strong> interface. The caller must release the resource. If this parameter is <strong>{{NULL}}</strong>, the method checks whether the view is supported, but does not create the view. </p> </dd> <p>Creates a resource view for a video processor, describing the output sample for the video processing operation.</p> <p>Set the <em>ppVPOView</em> parameter to <strong>{{NULL}}</strong> to test whether a view is supported.</p><p>Resources used for video processor output views must use the following <strong>{{D3D11_BIND_FLAG}}</strong> combinations:</p><ul> <li> <strong>{{D3D11_BIND_RENDER_TARGET}}</strong> indicates that it can be used for a video processor output view. The following bind flags are allowed to be set with <strong>{{D3D11_BIND_RENDER_TARGET}}</strong>:<ul> <li> <strong>{{D3D11_BIND_VIDEO_ENCODER}}</strong> </li> <li> <strong>{{D3D11_BIND_SHADER_RESOURCE}}</strong> </li> </ul> </li> <li>Other restrictions will apply such as:<ul> <li>No multi-sampling is allowed.</li> <li>The Texture2D must have been created using {{D3D11_USAGE_DEFAULT}}.</li> </ul> </li> <li>Some {{YUV}} formats can be supported as a video processor output view, but might not be supported as a 3D render target. {{D3D11}} will allow the <strong>{{D3D11_BIND_RENDER_TARGET}}</strong> flag for these formats, but <strong>CreateRenderTargetView</strong> will not be allowed for these formats.</li> </ul><p>If stereo output is enabled, the output view must have 2 array elements. Otherwise, it must only have a single array element.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{ID3D11Resource}}</strong> interface of the output surface. The resource must be created with the <strong>{{D3D11_BIND_RENDER_TARGET}}</strong> flag. See <strong>{{D3D11_BIND_FLAG}}</strong>.</p> </dd> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessorEnumerator}}</strong> interface that specifies the video processor. To get this reference, call <strong>{{ID3D11VideoDevice::CreateVideoProcessorEnumerator}}</strong>.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_PROCESSOR_OUTPUT_VIEW_DESC}}</strong> structure that describes the view.</p> </dd> <dd> <p>Receives a reference to the <strong>{{ID3D11VideoProcessorOutputView}}</strong> interface. The caller must release the resource. If this parameter is <strong>{{NULL}}</strong>, the method checks whether the view is supported, but does not create the view. </p> </dd> <p>Enumerates the video processor capabilities of the driver.</p> <p>To create the video processor device, pass the <strong>{{ID3D11VideoProcessorEnumerator}}</strong> reference to the <strong>{{ID3D11VideoDevice::CreateVideoProcessor}}</strong> method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_PROCESSOR_CONTENT_DESC}}</strong> structure that describes the video content.</p> </dd> <dd> <p>Receives a reference to the <strong>{{ID3D11VideoProcessorEnumerator}}</strong> interface. The caller must release the interface.</p> </dd> <p>Gets the number of profiles that are supported by the driver.</p> <p>To enumerate the profiles, call <strong>{{ID3D11VideoDevice::GetVideoDecoderProfile}}</strong>.</p> <p>Returns the number of profiles.</p> <p>Gets a profile that is supported by the driver.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the profile. To get the number of profiles that the driver supports, call <strong>{{ID3D11VideoDevice::GetVideoDecoderProfileCount}}</strong>.</p> </dd> <dd> <p>Receives a {{GUID}} that identifies the profile.</p> </dd> <p>Given aprofile, checks whether the driver supports a specified output format.</p> <p>If the driver does not support the profile given in <em>pDecoderProfile</em>, the method returns <strong>{{E_INVALIDARG}}</strong>. If the driver supports the profile, but the {{DXGI}} format is not compatible with the profile, the method succeeds but returns the value <strong>{{FALSE}}</strong> in <em>pSupported</em>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a {{GUID}} that identifies the profile. To get the list of supported profiles, call <strong>{{ID3D11VideoDevice::GetVideoDecoderProfile}}</strong>.</p> </dd> <dd> <p>A <strong>{{DXGI_FORMAT}}</strong> value that specifies the output format. Typical values include <strong>{{DXGI_FORMAT_NV12}}</strong> and <strong>{{DXGI_FORMAT_420_OPAQUE}}</strong>.</p> </dd> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if the format is supported, or <strong>{{FALSE}}</strong> otherwise.</p> </dd> <p>Gets the number of decoder configurations that the driver supports for a specified video description.</p> <p>To enumerate the decoder configurations, call <strong>{{ID3D11VideoDevice::GetVideoDecoderConfig}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_DECODER_DESC}}</strong> structure that describes the video stream.</p> </dd> <dd> <p>Receives the number of decoder configurations.</p> </dd> <p>Gets a decoder configuration that is supported by the driver.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_DECODER_DESC}}</strong> structure that describes the video stream.</p> </dd> <dd> <p>The zero-based index of the decoder configuration. To get the number of configurations that the driver supports, call <strong>{{ID3D11VideoDevice::GetVideoDecoderConfigCount}}</strong>.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_DECODER_CONFIG}}</strong> structure. The method fills in the structure with the decoder configuration.</p> </dd> <p>Queries the driver for its content protection capabilities. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a {{GUID}} that specifies the type of encryption to be used. The following {{GUIDs}} are defined.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{D3D11_CRYPTO_TYPE_AES128_CTR}}</strong></dt> </dl> </td><td> <p>128-bit Advanced Encryption Standard {{CTR}} mode ({{AES}}-{{CTR}}) block cipher. </p> </td></tr> </table> <p>?</p> <p>If no encryption will be used, set this parameter to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>A reference to a {{GUID}} that specifies the decoding profile. To get profiles that the driver supports, call <strong>{{ID3D11VideoDevice::GetVideoDecoderProfile}}</strong>. If decoding will not be used, set this parameter to <strong>{{NULL}}</strong>.</p> <p>The driver might disallow some combinations of encryption type and profile.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_VIDEO_CONTENT_PROTECTION_CAPS}}</strong> structure. The method fills in this structure with the driver's content protection capabilities. </p> </dd> <p>Gets a cryptographic key-exchange mechanism that is supported by the driver.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a {{GUID}} that specifies the type of encryption to be used. The following {{GUIDs}} are defined.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{D3D11_CRYPTO_TYPE_AES128_CTR}}</strong></dt> </dl> </td><td> <p>128-bit Advanced Encryption Standard {{CTR}} mode ({{AES}}-{{CTR}}) block cipher. </p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A reference to a {{GUID}} that specifies the decoding profile. To get profiles that the driver supports, call <strong>{{ID3D11VideoDevice::GetVideoDecoderProfile}}</strong>. If decoding will not be used, set this parameter to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>The zero-based index of the key-exchange type. The driver reports the number of types in the <strong>KeyExchangeTypeCount</strong> member of the <strong>{{D3D11_VIDEO_CONTENT_PROTECTION_CAPS}}</strong> structure.</p> </dd> <dd> <p>Receives a {{GUID}} that identifies the type of key exchange.</p> </dd> <p>Sets private data on the video device and associates that data with a {{GUID}}. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{GUID}} associated with the data.</p> </dd> <dd> <p>The size of the data, in bytes.</p> </dd> <dd> <p>A reference to the data.</p> </dd> <p>Sets a private <strong>{{IUnknown}}</strong> reference on the video device and associates that reference with a {{GUID}}. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>The device interface represents a virtual adapter; it is used to create resources.</p> <p> A device is created using <strong>{{D3D11CreateDevice}}</strong>. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Creates a buffer (vertex buffer, index buffer, or shader-constant buffer).</p> <p> For example code, see How to: Create a Vertex Buffer, How to: Create an Index Buffer or How to: Create a Constant Buffer. </p><p> For a constant buffer (<strong>BindFlags</strong> of <strong>{{D3D11_BUFFER_DESC}}</strong> set to <strong>{{D3D11_BIND_CONSTANT_BUFFER}}</strong>), you must set the <strong>ByteWidth</strong> value of <strong>{{D3D11_BUFFER_DESC}}</strong> in multiples of 16, and less than or equal to <strong>{{D3D11_REQ_CONSTANT_BUFFER_ELEMENT_COUNT}}</strong>. </p><p> The Direct3D 11.1 runtime, which is available on Windows?8 and later operating systems, provides the following new functionality for <strong>CreateBuffer</strong>: </p><p> You can create a constant buffer that is larger than the maximum constant buffer size that a shader can access (4096 32-bit*4-component constants ? 64KB). When you bind the constant buffer to the pipeline (for example, via <strong>{{PSSetConstantBuffers}}</strong> or <strong>{{PSSetConstantBuffers1}}</strong>), you can define a range of the buffer that the shader can access that fits within the 4096 constant limit. </p><p> The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher. On existing drivers that are implemented to feature level 10 and higher, a call to <strong>CreateBuffer</strong> to request a constant buffer that is larger than 4096 fails. </p> <p> This method returns <strong>{{E_OUTOFMEMORY}}</strong> if there is insufficient memory to create the buffer. See Direct3D 11 Return Codes for other possible return values. </p> <dd> <p> A reference to a <strong>{{D3D11_BUFFER_DESC}}</strong> structure that describes the buffer. </p> </dd> <dd> <p> A reference to a <strong>{{D3D11_SUBRESOURCE_DATA}}</strong> structure that describes the initialization data; use <strong>{{NULL}}</strong> to allocate space only (with the exception that it cannot be <strong>{{NULL}}</strong> if the usage flag is <strong>{{D3D11_USAGE_IMMUTABLE}}</strong>). </p> <p> If you don't pass anything to <em>pInitialData</em>, the initial content of the memory for the buffer is undefined. In this case, you need to write the buffer content some other way before the resource is read. </p> </dd> <dd> <p> Address of a reference to the <strong>{{ID3D11Buffer}}</strong> interface for the buffer object created. Set this parameter to <strong>{{NULL}}</strong> to validate the other input parameters (<strong>{{S_FALSE}}</strong> indicates a pass). </p> </dd> <p>Creates an array of 1D textures.</p> <p><strong>CreateTexture1D</strong> creates a 1D texture resource, which can contain a number of 1D subresources. The number of textures is specified in the texture description. All textures in a resource must have the same format, size, and number of mipmap levels.</p><p>All resources are made up of one or more subresources. To load data into the texture, applications can supply the data initially as an array of <strong>{{D3D11_SUBRESOURCE_DATA}}</strong> structures pointed to by <em>pInitialData</em>, or they can use one of the {{D3DX}} texture functions such as <strong>{{D3DX11CreateTextureFromFile}}</strong>.</p><p>For a 32 width texture with a full mipmap chain, the <em>pInitialData</em> array has the following 6 elements: </p><ul> <li>pInitialData[0] = 32x1</li> <li>pInitialData[1] = 16x1</li> <li>pInitialData[2] = 8x1</li> <li>pInitialData[3] = 4x1 </li> <li>pInitialData[4] = 2x1 </li> <li>pInitialData[5] = 1x1 </li> </ul> <p>If the method succeeds, the return code is {{S_OK}}. See Direct3D 11 Return Codes for failing error codes.</p> <p>Create an array of 2D textures.</p> <p><strong>CreateTexture2D</strong> creates a 2D texture resource, which can contain a number of 2D subresources. The number of textures is specified in the texture description. All textures in a resource must have the same format, size, and number of mipmap levels.</p><p>All resources are made up of one or more subresources. To load data into the texture, applications can supply the data initially as an array of <strong>{{D3D11_SUBRESOURCE_DATA}}</strong> structures pointed to by <em>pInitialData</em>, or it may use one of the {{D3DX}} texture functions such as <strong>{{D3DX11CreateTextureFromFile}}</strong>.</p><p>For a 32 x 32 texture with a full mipmap chain, the <em>pInitialData</em> array has the following 6 elements: </p><ul> <li>pInitialData[0] = 32x32</li> <li>pInitialData[1] = 16x16</li> <li>pInitialData[2] = 8x8</li> <li>pInitialData[3] = 4x4 </li> <li>pInitialData[4] = 2x2 </li> <li>pInitialData[5] = 1x1 </li> </ul> <p>If the method succeeds, the return code is {{S_OK}}. See Direct3D 11 Return Codes for failing error codes.</p> <p>Create a single 3D texture.</p> <p><strong>CreateTexture3D</strong> creates a 3D texture resource, which can contain a number of 3D subresources. The number of textures is specified in the texture description. All textures in a resource must have the same format, size, and number of mipmap levels.</p><p>All resources are made up of one or more subresources. To load data into the texture, applications can supply the data initially as an array of <strong>{{D3D11_SUBRESOURCE_DATA}}</strong> structures pointed to by <em>pInitialData</em>, or they can use one of the {{D3DX}} texture functions such as <strong>{{D3DX11CreateTextureFromFile}}</strong>.</p><p>Each element of <em>pInitialData</em> provides all of the slices that are defined for a given miplevel. For example, for a 32 x 32 x 4 volume texture with a full mipmap chain, the array has the following 6 elements:</p><ul> <li>pInitialData[0] = 32x32 with 4 slices</li> <li>pInitialData[1] = 16x16 with 2 slices</li> <li>pInitialData[2] = 8x8 with 1 slice</li> <li>pInitialData[3] = 4x4 with 1 slice</li> <li>pInitialData[4] = 2x2 with 1 slice</li> <li>pInitialData[5] = 1x1 with 1 slice</li> </ul> <p>If the method succeeds, the return code is {{S_OK}}. See Direct3D 11 Return Codes for failing error codes.</p> <p>Create a shader-resource view for accessing data in a resource.</p> <p> A resource is made up of one or more subresources; a view identifies which subresources to allow the pipeline to access. In addition, each resource is bound to the pipeline using a view. A shader-resource view is designed to bind any buffer or texture resource to the shader stages using the following {{API}} methods: <strong>{{ID3D11DeviceContext::VSSetShaderResources}}</strong>, <strong>{{ID3D11DeviceContext::GSSetShaderResources}}</strong> and <strong>{{ID3D11DeviceContext::PSSetShaderResources}}</strong>. </p><p>Because a view is fully typed, this means that typeless resources become fully typed when bound to the pipeline.</p><strong>Note</strong>?? To successfully create a shader-resource view from a typeless buffer (for example, <strong>{{DXGI_FORMAT_R32G32B32A32_TYPELESS}}</strong>), you must set the <strong>{{D3D11_RESOURCE_MISC_BUFFER_ALLOW_RAW_VIEWS}}</strong> flag when you create the buffer.?<p> The Direct3D 11.1 runtime, which is available starting with Windows?8, allows you to use <strong>CreateShaderResourceView</strong> for the following new purpose. </p><p> You can create shader-resource views of video resources so that Direct3D shaders can process those shader-resource views. These video resources are either Texture2D or Texture2DArray. The value in the <strong>ViewDimension</strong> member of the <strong>{{D3D11_SHADER_RESOURCE_VIEW_DESC}}</strong> structure for a created shader-resource view must match the type of video resource, {{D3D11_SRV_DIMENSION_TEXTURE2D}} for Texture2D and {{D3D11_SRV_DIMENSION_TEXTURE2DARRAY}} for Texture2DArray. Additionally, the format of the underlying video resource restricts the formats that the view can use. The video resource format values on the <strong>{{DXGI_FORMAT}}</strong> reference page specify the format values that views are restricted to. </p><p>The runtime read+write conflict prevention logic (which stops a resource from being bound as an {{SRV}} and {{RTV}} or {{UAV}} at the same time) treats views of different parts of the same video surface as conflicting for simplicity. Therefore, the runtime does not allow an application to read from luma while the application simultaneously renders to chroma in the same surface even though the hardware might allow these simultaneous operations.</p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p> This method returns one of the following Direct3D 11 Return Codes. </p> <dd> <p> Pointer to the resource that will serve as input to a shader. This resource must have been created with the <strong> {{D3D11_BIND_SHADER_RESOURCE}} </strong> flag. </p> </dd> <dd> <p> Pointer to a shader-resource view description (see <strong>{{D3D11_SHADER_RESOURCE_VIEW_DESC}}</strong>). Set this parameter to <strong>{{NULL}}</strong> to create a view that accesses the entire resource (using the format the resource was created with). </p> </dd> <dd> <p> Address of a reference to an <strong>{{ID3D11ShaderResourceView}}</strong>. Set this parameter to <strong>{{NULL}}</strong> to validate the other input parameters (the method will return <strong>{{S_FALSE}}</strong> if the other input parameters pass validation). </p> </dd> <p>Creates a view for accessing an unordered access resource.</p> <p>The Direct3D 11.1 runtime, which is available starting with Windows?8, allows you to use <strong>CreateUnorderedAccessView</strong> for the following new purpose. </p><p>You can create unordered-access views of video resources so that Direct3D shaders can process those unordered-access views. These video resources are either Texture2D or Texture2DArray. The value in the <strong>ViewDimension</strong> member of the <strong>{{D3D11_UNORDERED_ACCESS_VIEW_DESC}}</strong> structure for a created unordered-access view must match the type of video resource, {{D3D11_UAV_DIMENSION_TEXTURE2D}} for Texture2D and {{D3D11_UAV_DIMENSION_TEXTURE2DARRAY}} for Texture2DArray. Additionally, the format of the underlying video resource restricts the formats that the view can use. The video resource format values on the <strong>{{DXGI_FORMAT}}</strong> reference page specify the format values that views are restricted to.</p><p>The runtime read+write conflict prevention logic (which stops a resource from being bound as an {{SRV}} and {{RTV}} or {{UAV}} at the same time) treats views of different parts of the same video surface as conflicting for simplicity. Therefore, the runtime does not allow an application to read from luma while the application simultaneously renders to chroma in the same surface even though the hardware might allow these simultaneous operations.</p> <p>This method returns one of the Direct3D 11 Return Codes.</p> <p>Creates a render-target view for accessing resource data.</p> <p>A render-target view can be bound to the output-merger stage by calling <strong>{{ID3D11DeviceContext::OMSetRenderTargets}}</strong>.</p><p>The Direct3D 11.1 runtime, which is available starting with Windows?8, allows you to use <strong>CreateRenderTargetView</strong> for the following new purpose. </p><p>You can create render-target views of video resources so that Direct3D shaders can process those render-target views. These video resources are either Texture2D or Texture2DArray. The value in the <strong>ViewDimension</strong> member of the <strong>{{D3D11_RENDER_TARGET_VIEW_DESC}}</strong> structure for a created render-target view must match the type of video resource, {{D3D11_RTV_DIMENSION_TEXTURE2D}} for Texture2D and {{D3D11_RTV_DIMENSION_TEXTURE2DARRAY}} for Texture2DArray. Additionally, the format of the underlying video resource restricts the formats that the view can use. The video resource format values on the <strong>{{DXGI_FORMAT}}</strong> reference page specify the format values that views are restricted to.</p><p>The runtime read+write conflict prevention logic (which stops a resource from being bound as an {{SRV}} and {{RTV}} or {{UAV}} at the same time) treats views of different parts of the same video surface as conflicting for simplicity. Therefore, the runtime does not allow an application to read from luma while the application simultaneously renders to chroma in the same surface even though the hardware might allow these simultaneous operations.</p> <p>This method returns one of the Direct3D 11 Return Codes.</p> <dd> <p>Pointer to a <strong>{{ID3D11Resource}}</strong> that represents a render target. This resource must have been created with the <strong>{{D3D11_BIND_RENDER_TARGET}}</strong> flag.</p> </dd> <dd> <p>Pointer to a <strong>{{D3D11_RENDER_TARGET_VIEW_DESC}}</strong> that represents a render-target view description. Set this parameter to <strong>{{NULL}}</strong> to create a view that accesses all of the subresources in mipmap level 0.</p> </dd> <dd> <p>Address of a reference to an <strong>{{ID3D11RenderTargetView}}</strong>. Set this parameter to <strong>{{NULL}}</strong> to validate the other input parameters (the method will return {{S_FALSE}} if the other input parameters pass validation).</p> </dd> <p>Create a depth-stencil view for accessing resource data.</p> <p>A depth-stencil view can be bound to the output-merger stage by calling <strong>{{ID3D11DeviceContext::OMSetRenderTargets}}</strong>.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Pointer to the resource that will serve as the depth-stencil surface. This resource must have been created with the <strong>{{D3D11_BIND_DEPTH_STENCIL}}</strong> flag.</p> </dd> <dd> <p>Pointer to a depth-stencil-view description (see <strong>{{D3D11_DEPTH_STENCIL_VIEW_DESC}}</strong>). Set this parameter to <strong>{{NULL}}</strong> to create a view that accesses mipmap level 0 of the entire resource (using the format the resource was created with).</p> </dd> <dd> <p>Address of a reference to an <strong>{{ID3D11DepthStencilView}}</strong>. Set this parameter to <strong>{{NULL}}</strong> to validate the other input parameters (the method will return {{S_FALSE}} if the other input parameters pass validation).</p> </dd> <p>Create an input-layout object to describe the input-buffer data for the input-assembler stage.</p> <p>After creating an input layout object, it must be bound to the input-assembler stage before calling a draw {{API}}.</p><p>Once an input-layout object is created from a shader signature, the input-layout object can be reused with any other shader that has an identical input signature (semantics included). This can simplify the creation of input-layout objects when you are working with many shaders with identical inputs.</p><p> If a data type in the input-layout declaration does not match the data type in a shader-input signature, CreateInputLayout will generate a warning during compilation. The warning is simply to call attention to the fact that the data may be reinterpreted when read from a register. You may either disregard this warning (if reinterpretation is intentional) or make the data types match in both declarations to eliminate the warning. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p> If the method succeeds, the return code is {{S_OK}}. See Direct3D 11 Return Codes for failing error codes. </p> <dd> <p> An array of the input-assembler stage input data types; each type is described by an element description (see <strong>{{D3D11_INPUT_ELEMENT_DESC}}</strong>). </p> </dd> <dd> <p>The number of input-data types in the array of input-elements.</p> </dd> <dd> <p> A reference to the compiled shader. The compiled shader code contains a input signature which is validated against the array of elements. See remarks. </p> </dd> <dd> <p>Size of the compiled shader.</p> </dd> <dd> <p> A reference to the input-layout object created (see <strong>{{ID3D11InputLayout}}</strong>). To validate the other input parameters, set this reference to be <strong>{{NULL}}</strong> and verify that the method returns {{S_FALSE}}. </p> </dd> <p>Create a vertex-shader object from a compiled shader.</p> <p>The Direct3D 11.1 runtime, which is available starting with Windows?8, provides the following new functionality for <strong>CreateVertexShader</strong>.</p><p>The following shader model 5.0 instructions are available to just pixel shaders and compute shaders in the Direct3D 11.0 runtime. For the Direct3D 11.1 runtime, because unordered access views ({{UAV}}) are available at all shader stages, you can use these instructions in all shader stages.</p><p>Therefore, if you use the following shader model 5.0 instructions in a vertex shader, you can successfully pass the compiled vertex shader to <em>pShaderBytecode</em>. That is, the call to <strong>CreateVertexShader</strong> succeeds.</p><p>If you pass a compiled shader to <em>pShaderBytecode</em> that uses any of the following instructions on a device that doesn?t support {{UAVs}} at every shader stage (including existing drivers that are not implemented to support {{UAVs}} at every shader stage), <strong>CreateVertexShader</strong> fails. <strong>CreateVertexShader</strong> also fails if the shader tries to use a {{UAV}} slot beyond the set of {{UAV}} slots that the hardware supports.</p><ul> <li> dcl_uav_typed </li> <li> dcl_uav_raw </li> <li> dcl_uav_structured </li> <li> ld_raw </li> <li> ld_structured </li> <li> ld_uav_typed </li> <li> store_raw </li> <li> store_structured </li> <li> store_uav_typed </li> <li> sync_uglobal </li> <li>All atomics and immediate atomics (for example, atomic_and and imm_atomic_and)</li> </ul> <p>This method returns one of the Direct3D 11 Return Codes.</p> <dd> <p>A reference to the compiled shader. </p> </dd> <dd> <p>Size of the compiled vertex shader.</p> </dd> <dd> <p>A reference to a class linkage interface (see <strong>{{ID3D11ClassLinkage}}</strong>); the value can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Address of a reference to a <strong>{{ID3D11VertexShader}}</strong> interface. If this is <strong>{{NULL}}</strong>, all other parameters will be validated, and if all parameters pass validation this {{API}} will return <strong>{{S_FALSE}}</strong> instead of <strong>{{S_OK}}</strong>.</p> </dd> <p>Create a geometry shader.</p> <p>After it is created, the shader can be set to the device by calling <strong>{{ID3D11DeviceContext::GSSetShader}}</strong>.</p><p>The Direct3D 11.1 runtime, which is available starting with Windows?8, provides the following new functionality for <strong>CreateGeometryShader</strong>.</p><p>The following shader model 5.0 instructions are available to just pixel shaders and compute shaders in the Direct3D 11.0 runtime. For the Direct3D 11.1 runtime, because unordered access views ({{UAV}}) are available at all shader stages, you can use these instructions in all shader stages.</p><p>Therefore, if you use the following shader model 5.0 instructions in a geometry shader, you can successfully pass the compiled geometry shader to <em>pShaderBytecode</em>. That is, the call to <strong>CreateGeometryShader</strong> succeeds.</p><p>If you pass a compiled shader to <em>pShaderBytecode</em> that uses any of the following instructions on a device that doesn?t support {{UAVs}} at every shader stage (including existing drivers that are not implemented to support {{UAVs}} at every shader stage), <strong>CreateGeometryShader</strong> fails. <strong>CreateGeometryShader</strong> also fails if the shader tries to use a {{UAV}} slot beyond the set of {{UAV}} slots that the hardware supports.</p><ul> <li> dcl_uav_typed </li> <li> dcl_uav_raw </li> <li> dcl_uav_structured </li> <li> ld_raw </li> <li> ld_structured </li> <li> ld_uav_typed </li> <li> store_raw </li> <li> store_structured </li> <li> store_uav_typed </li> <li> sync_uglobal </li> <li>All atomics and immediate atomics (for example, atomic_and and imm_atomic_and)</li> </ul> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the compiled shader. </p> </dd> <dd> <p>Size of the compiled geometry shader.</p> </dd> <dd> <p>A reference to a class linkage interface (see <strong>{{ID3D11ClassLinkage}}</strong>); the value can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Address of a reference to a <strong>{{ID3D11GeometryShader}}</strong> interface. If this is <strong>{{NULL}}</strong>, all other parameters will be validated, and if all parameters pass validation this {{API}} will return {{S_FALSE}} instead of {{S_OK}}.</p> </dd> <p>Creates a geometry shader that can write to streaming output buffers.</p> <p> For more info about using <strong>CreateGeometryShaderWithStreamOutput</strong>, see Create a Geometry-Shader Object with Stream Output. </p><p> The Direct3D 11.1 runtime, which is available starting with Windows?8, provides the following new functionality for <strong>CreateGeometryShaderWithStreamOutput</strong>. </p><p>The following shader model 5.0 instructions are available to just pixel shaders and compute shaders in the Direct3D 11.0 runtime. For the Direct3D 11.1 runtime, because unordered access views ({{UAV}}) are available at all shader stages, you can use these instructions in all shader stages.</p><p> Therefore, if you use the following shader model 5.0 instructions in a geometry shader, you can successfully pass the compiled geometry shader to <em>pShaderBytecode</em>. That is, the call to <strong>CreateGeometryShaderWithStreamOutput</strong> succeeds. </p><p> If you pass a compiled shader to <em>pShaderBytecode</em> that uses any of the following instructions on a device that doesn?t support {{UAVs}} at every shader stage (including existing drivers that are not implemented to support {{UAVs}} at every shader stage), <strong>CreateGeometryShaderWithStreamOutput</strong> fails. <strong>CreateGeometryShaderWithStreamOutput</strong> also fails if the shader tries to use a {{UAV}} slot beyond the set of {{UAV}} slots that the hardware supports. </p><ul> <li> dcl_uav_typed </li> <li> dcl_uav_raw </li> <li> dcl_uav_structured </li> <li> ld_raw </li> <li> ld_structured </li> <li> ld_uav_typed </li> <li> store_raw </li> <li> store_structured </li> <li> store_uav_typed </li> <li> sync_uglobal </li> <li> All atomics and immediate atomics (for example, atomic_and and imm_atomic_and) </li> </ul><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p> This method returns one of the Direct3D 11 Return Codes. </p> <dd> <p> A reference to the compiled geometry shader for a standard geometry shader plus stream output. For info on how to get this reference, see Getting a Pointer to a Compiled Shader.</p> <p> To create the stream output without using a geometry shader, pass a reference to the output signature for the prior stage. To obtain this output signature, call the <strong>{{D3DGetOutputSignatureBlob}}</strong> compiler function. You can also pass a reference to the compiled shader for the prior stage (for example, the vertex-shader stage or domain-shader stage). This compiled shader provides the output signature for the data. </p> </dd> <dd> <p>Size of the compiled geometry shader.</p> </dd> <dd> <p> Pointer to a <strong>{{D3D11_SO_DECLARATION_ENTRY}}</strong> array. Cannot be <strong>{{NULL}}</strong> if NumEntries &gt; 0. </p> </dd> <dd> <p>The number of entries in the stream output declaration ( ranges from 0 to {{D3D11_SO_STREAM_COUNT}} * {{D3D11_SO_OUTPUT_COMPONENT_COUNT}} ).</p> </dd> <dd> <p>An array of buffer strides; each stride is the size of an element for that buffer.</p> </dd> <dd> <p> The number of strides (or buffers) in <em>pBufferStrides</em> (ranges from 0 to {{D3D11_SO_BUFFER_SLOT_COUNT}}). </p> </dd> <dd> <p> The index number of the stream to be sent to the rasterizer stage (ranges from 0 to {{D3D11_SO_STREAM_COUNT}} - 1). Set to {{D3D11_SO_NO_RASTERIZED_STREAM}} if no stream is to be rasterized. </p> </dd> <dd> <p> A reference to a class linkage interface (see <strong>{{ID3D11ClassLinkage}}</strong>); the value can be <strong>{{NULL}}</strong>. </p> </dd> <dd> <p> Address of a reference to an <strong>{{ID3D11GeometryShader}}</strong> interface, representing the geometry shader that was created. Set this to <strong>{{NULL}}</strong> to validate the other parameters; if validation passes, the method will return {{S_FALSE}} instead of {{S_OK}}. </p> </dd> <p>Create a pixel shader.</p> <p>After creating the pixel shader, you can set it to the device using <strong>{{ID3D11DeviceContext::PSSetShader}}</strong>.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the compiled shader. </p> </dd> <dd> <p>Size of the compiled pixel shader.</p> </dd> <dd> <p>A reference to a class linkage interface (see <strong>{{ID3D11ClassLinkage}}</strong>); the value can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Address of a reference to a <strong>{{ID3D11PixelShader}}</strong> interface. If this is <strong>{{NULL}}</strong>, all other parameters will be validated, and if all parameters pass validation this {{API}} will return {{S_FALSE}} instead of {{S_OK}}.</p> </dd> <p>Create a hull shader.</p> <p>The Direct3D 11.1 runtime, which is available starting with Windows?8, provides the following new functionality for <strong>CreateHullShader</strong>.</p><p>The following shader model 5.0 instructions are available to just pixel shaders and compute shaders in the Direct3D 11.0 runtime. For the Direct3D 11.1 runtime, because unordered access views ({{UAV}}) are available at all shader stages, you can use these instructions in all shader stages.</p><p>Therefore, if you use the following shader model 5.0 instructions in a hull shader, you can successfully pass the compiled hull shader to <em>pShaderBytecode</em>. That is, the call to <strong>CreateHullShader</strong> succeeds.</p><p>If you pass a compiled shader to <em>pShaderBytecode</em> that uses any of the following instructions on a device that doesn?t support {{UAVs}} at every shader stage (including existing drivers that are not implemented to support {{UAVs}} at every shader stage), <strong>CreateHullShader</strong> fails. <strong>CreateHullShader</strong> also fails if the shader tries to use a {{UAV}} slot beyond the set of {{UAV}} slots that the hardware supports.</p><ul> <li> dcl_uav_typed </li> <li> dcl_uav_raw </li> <li> dcl_uav_structured </li> <li> ld_raw </li> <li> ld_structured </li> <li> ld_uav_typed </li> <li> store_raw </li> <li> store_structured </li> <li> store_uav_typed </li> <li> sync_uglobal </li> <li>All atomics and immediate atomics (for example, atomic_and and imm_atomic_and)</li> </ul> <p>This method returns one of the Direct3D 11 Return Codes.</p> <p>Create a domain shader .</p> <p>The Direct3D 11.1 runtime, which is available starting with Windows?8, provides the following new functionality for <strong>CreateDomainShader</strong>.</p><p>The following shader model 5.0 instructions are available to just pixel shaders and compute shaders in the Direct3D 11.0 runtime. For the Direct3D 11.1 runtime, because unordered access views ({{UAV}}) are available at all shader stages, you can use these instructions in all shader stages.</p><p>Therefore, if you use the following shader model 5.0 instructions in a domain shader, you can successfully pass the compiled domain shader to <em>pShaderBytecode</em>. That is, the call to <strong>CreateDomainShader</strong> succeeds.</p><p>If you pass a compiled shader to <em>pShaderBytecode</em> that uses any of the following instructions on a device that doesn?t support {{UAVs}} at every shader stage (including existing drivers that are not implemented to support {{UAVs}} at every shader stage), <strong>CreateDomainShader</strong> fails. <strong>CreateDomainShader</strong> also fails if the shader tries to use a {{UAV}} slot beyond the set of {{UAV}} slots that the hardware supports.</p><ul> <li> dcl_uav_typed </li> <li> dcl_uav_raw </li> <li> dcl_uav_structured </li> <li> ld_raw </li> <li> ld_structured </li> <li> ld_uav_typed </li> <li> store_raw </li> <li> store_structured </li> <li> store_uav_typed </li> <li> sync_uglobal </li> <li>All atomics and immediate atomics (for example, atomic_and and imm_atomic_and)</li> </ul> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <p>Create a compute shader.</p> <p>For an example, see How To: Create a Compute Shader and {{HDRToneMappingCS11}} Sample.</p> <p>This method returns {{E_OUTOFMEMORY}} if there is insufficient memory to create the compute shader. See Direct3D 11 Return Codes for other possible return values.</p> <p>Creates class linkage libraries to enable dynamic shader linkage.</p> <p>The <strong>{{ID3D11ClassLinkage}}</strong> interface returned in <em>ppLinkage</em> is associated with a shader by passing it as a parameter to one of the <strong>{{ID3D11Device}}</strong> create shader methods such as <strong>{{ID3D11Device::CreatePixelShader}}</strong>.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a class-linkage interface reference (see <strong>{{ID3D11ClassLinkage}}</strong>).</p> </dd> <p>Create a blend-state object that encapsules blend state for the output-merger stage.</p> <p> An application can create up to 4096 unique blend-state objects. For each object created, the runtime checks to see if a previous object has the same state. If such a previous object exists, the runtime will return a reference to previous instance instead of creating a duplicate object. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p> This method returns {{E_OUTOFMEMORY}} if there is insufficient memory to create the blend-state object. See Direct3D 11 Return Codes for other possible return values. </p> <dd> <p> Pointer to a blend-state description (see <strong>{{D3D11_BLEND_DESC}}</strong>). </p> </dd> <dd> <p> Address of a reference to the blend-state object created (see <strong>{{ID3D11BlendState}}</strong>). </p> </dd> <p>Create a depth-stencil state object that encapsulates depth-stencil test information for the output-merger stage.</p> <p>4096 unique depth-stencil state objects can be created on a device at a time.</p><p>If an application attempts to create a depth-stencil-state interface with the same state as an existing interface, the same interface will be returned and the total number of unique depth-stencil state objects will stay the same.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Pointer to a depth-stencil state description (see <strong>{{D3D11_DEPTH_STENCIL_DESC}}</strong>).</p> </dd> <dd> <p>Address of a reference to the depth-stencil state object created (see <strong>{{ID3D11DepthStencilState}}</strong>).</p> </dd> <p>Create a rasterizer state object that tells the rasterizer stage how to behave.</p> <p>4096 unique rasterizer state objects can be created on a device at a time.</p><p>If an application attempts to create a rasterizer-state interface with the same state as an existing interface, the same interface will be returned and the total number of unique rasterizer state objects will stay the same.</p> <p>This method returns {{E_OUTOFMEMORY}} if there is insufficient memory to create the compute shader. See Direct3D 11 Return Codes for other possible return values.</p> <dd> <p>Pointer to a rasterizer state description (see <strong>{{D3D11_RASTERIZER_DESC}}</strong>).</p> </dd> <dd> <p>Address of a reference to the rasterizer state object created (see <strong>{{ID3D11RasterizerState}}</strong>).</p> </dd> <p>Create a sampler-state object that encapsulates sampling information for a texture.</p> <p>4096 unique sampler state objects can be created on a device at a time.</p><p>If an application attempts to create a sampler-state interface with the same state as an existing interface, the same interface will be returned and the total number of unique sampler state objects will stay the same.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Pointer to a sampler state description (see <strong>{{D3D11_SAMPLER_DESC}}</strong>).</p> </dd> <dd> <p>Address of a reference to the sampler state object created (see <strong>{{ID3D11SamplerState}}</strong>).</p> </dd> <p>This interface encapsulates methods for querying information from the {{GPU}}.</p> <p>This method returns {{E_OUTOFMEMORY}} if there is insufficient memory to create the query object. See Direct3D 11 Return Codes for other possible return values.</p> <dd> <p>Pointer to a query description (see <strong>{{D3D11_QUERY_DESC}}</strong>).</p> </dd> <dd> <p>Address of a reference to the query object created (see <strong>{{ID3D11Query}}</strong>).</p> </dd> <p>Creates a predicate.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Pointer to a query description where the type of query must be a {{D3D11_QUERY_SO_OVERFLOW_PREDICATE}} or {{D3D11_QUERY_OCCLUSION_PREDICATE}} (see <strong>{{D3D11_QUERY_DESC}}</strong>).</p> </dd> <dd> <p>Address of a reference to a predicate (see <strong>{{ID3D11Predicate}}</strong>).</p> </dd> <p>Create a counter object for measuring {{GPU}} performance.</p> <p>If this function succeeds, it will return {{S_OK}}. If it fails, possible return values are: {{S_FALSE}}, {{E_OUTOFMEMORY}}, {{DXGI_ERROR_UNSUPPORTED}}, {{DXGI_ERROR_NONEXCLUSIVE}}, or {{E_INVALIDARG}}.</p><p>{{DXGI_ERROR_UNSUPPORTED}} is returned whenever the application requests to create a well-known counter, but the current device does not support it.</p><p>{{DXGI_ERROR_NONEXCLUSIVE}} indicates that another device object is currently using the counters, so they cannot be used by this device at the moment.</p><p>{{E_INVALIDARG}} is returned whenever an out-of-range well-known or device-dependent counter is requested, or when the simulataneously active counters have been exhausted.</p> <dd> <p>Pointer to a counter description (see <strong>{{D3D11_COUNTER_DESC}}</strong>).</p> </dd> <dd> <p>Address of a reference to a counter (see <strong>{{ID3D11Counter}}</strong>).</p> </dd> <p> Creates a deferred context, which can record command lists. </p> <p> A deferred context is a thread-safe context that you can use to record graphics commands on a thread other than the main rendering thread. Using a deferred context, you can record graphics commands into a command list that is encapsulated by the <strong>{{ID3D11CommandList}}</strong> interface. After all scene items are recorded, you can then submit them to the main render thread for final rendering. In this manner, you can perform rendering tasks concurrently across multiple threads and potentially improve performance in multi-core {{CPU}} scenarios. </p><p> You can create multiple deferred contexts. </p><strong>Note</strong>?? If you use the <strong>{{D3D11_CREATE_DEVICE_SINGLETHREADED}}</strong> value to create the device that is represented by <strong>{{ID3D11Device}}</strong>, the <strong>CreateDeferredContext</strong> method will fail, and you will not be able to create a deferred context.?<p> For more information about deferred contexts, see Immediate and Deferred Rendering. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p> Returns {{S_OK}} if successful; otherwise, returns one of the following: </p><ul> <li> Returns <strong>{{DXGI_ERROR_DEVICE_REMOVED}}</strong> if the video card has been physically removed from the system, or a driver upgrade for the video card has occurred. If this error occurs, you should destroy and recreate the device. </li> <li> Returns <strong>{{DXGI_ERROR_INVALID_CALL}}</strong> if the <strong>CreateDeferredContext</strong> method cannot be called from the current context. For example, if the device was created with the <strong>{{D3D11_CREATE_DEVICE_SINGLETHREADED}}</strong> value, <strong>CreateDeferredContext</strong> returns <strong>{{DXGI_ERROR_INVALID_CALL}}</strong>. </li> <li> Returns <strong>{{E_INVALIDARG}}</strong> if the <em>ContextFlags</em> parameter is invalid. </li> <li> Returns <strong>{{E_OUTOFMEMORY}}</strong> if the application has exhausted available memory. </li> </ul> <dd> <p> Reserved for future use. Pass 0. </p> </dd> <dd> <p> Upon completion of the method, the passed reference to an <strong>{{ID3D11DeviceContext}}</strong> interface reference is initialized. </p> </dd> <p>Give a device access to a shared resource created on a different device.</p> <p>The {{REFIID}}, or {{GUID}}, of the interface to the resource can be obtained by using the __uuidof() macro. For example, __uuidof({{ID3D11Buffer}}) will get the {{GUID}} of the interface to a buffer resource.</p><p>The unique handle of the resource is obtained differently depending on the type of device that originally created the resource.</p><p>To share a resource between two Direct3D 11 devices the resource must have been created with the <strong>{{D3D11_RESOURCE_MISC_SHARED}}</strong> flag, if it was created using the {{ID3D11Device}} interface. If it was created using a {{DXGI}} device interface, then the resource is always shared.</p><p>The {{REFIID}}, or {{GUID}}, of the interface to the resource can be obtained by using the __uuidof() macro. For example, __uuidof({{ID3D11Buffer}}) will get the {{GUID}} of the interface to a buffer resource.</p><p>When sharing a resource between two Direct3D 10/11 devices the unique handle of the resource can be obtained by querying the resource for the <strong>{{IDXGIResource}}</strong> interface and then calling <strong>GetSharedHandle</strong>.</p><pre> {{IDXGIResource}}* pOtherResource({{NULL}}); hr = pOtherDeviceResource-&gt;QueryInterface( __uuidof({{IDXGIResource}}), (void**)&amp;pOtherResource ); {{HANDLE}} sharedHandle; pOtherResource-&gt;GetSharedHandle(&amp;sharedHandle); </pre><p>The only resources that can be shared are 2D non-mipmapped textures.</p><p>To share a resource between a Direct3D 9 device and a Direct3D 11 device the texture must have been created using the <em>pSharedHandle</em> argument of <strong>CreateTexture</strong>. The shared Direct3D 9 handle is then passed to OpenSharedResource in the <em>hResource</em> argument.</p><p>The following code illustrates the method calls involved.</p><pre> sharedHandle = {{NULL}}; // must be set to {{NULL}} to create, can use a valid handle here to open in {{D3D9}} pDevice9-&gt;CreateTexture(..., pTex2D_9, &amp;sharedHandle); ... pDevice11-&gt;OpenSharedResource(sharedHandle, __uuidof({{ID3D11Resource}}), (void**)(&amp;tempResource11)); tempResource11-&gt;QueryInterface(__uuidof({{ID3D11Texture2D}}), (void**)(&amp;pTex2D_11)); tempResource11-&gt;Release(); // now use pTex2D_11 with pDevice11 </pre><p>Textures being shared from {{D3D9}} to {{D3D11}} have the following restrictions.</p><ul> <li>Textures must be 2D</li> <li>Only 1 mip level is allowed</li> <li>Texture must have default usage</li> <li>Texture must be write only</li> <li>{{MSAA}} textures are not allowed</li> <li>Bind flags must have {{SHADER_RESOURCE}} and {{RENDER_TARGET}} set</li> <li>Only {{R10G10B10A2_UNORM}}, {{R16G16B16A16_FLOAT}} and {{R8G8B8A8_UNORM}} formats are allowed</li> </ul><p>If a shared texture is updated on one device <strong>{{ID3D11DeviceContext::Flush}}</strong> must be called on that device.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A resource handle. See remarks.</p> </dd> <dd> <p>The globally unique identifier ({{GUID}}) for the resource interface. See remarks.</p> </dd> <dd> <p>Address of a reference to the resource we are gaining access to.</p> </dd> <p>Get the support of a given format on the installed video device.</p> <p>Returns {{S_OK}} if successful; otherwise, returns {{E_INVALIDARG}} if the <em>Format</em> parameter is <strong>{{NULL}}</strong>, or returns {{E_FAIL}} if the described format does not exist.</p> <dd> <p>A <strong>{{DXGI_FORMAT}}</strong> enumeration that describes a format for which to check for support.</p> </dd> <dd> <p>A bitfield of <strong>{{D3D11_FORMAT_SUPPORT}}</strong> enumeration values describing how the specified format is supported on the installed device. The values are {{ORed}} together.</p> </dd> <p>Get the number of quality levels available during multisampling.</p> <p>When multisampling a texture, the number of quality levels available for an adapter is dependent on the texture format used and the number of samples requested. The maximum number of quality levels is defined by {{D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT}} in {{D3D11}}.h. If this method returns 0, the format and sample count combination is not supported for the installed adapter.</p><p>Furthermore, the definition of a quality level is up to each hardware vendor to define, however no facility is provided by Direct3D to help discover this information.</p><p>Note that {{FEATURE_LEVEL_10_1}} devices are required to support 4x {{MSAA}} for all render targets except {{R32G32B32A32}} and {{R32G32B32}}. {{FEATURE_LEVEL_11_0}} devices are required to support 4x {{MSAA}} for all render target formats, and 8x {{MSAA}} for all render target formats except {{R32G32B32A32}} formats.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>The texture format. See <strong>{{DXGI_FORMAT}}</strong>.</p> </dd> <dd> <p>The number of samples during multisampling.</p> </dd> <dd> <p>Number of quality levels supported by the adapter. See remarks.</p> </dd> <p>Get a counter's information.</p> <p>Returns nothing.</p> <dd> <p>Pointer to counter information (see <strong>{{D3D11_COUNTER_INFO}}</strong>).</p> </dd> <p>Get the type, name, units of measure, and a description of an existing counter.</p> <p> Length parameters can be <strong>{{NULL}}</strong>, which indicates the application is not interested in the length nor the corresponding string value. When a length parameter is non-<strong>{{NULL}}</strong> and the corresponding string is <strong>{{NULL}}</strong>, the input value of the length parameter is ignored, and the length of the corresponding string (including terminating <strong>{{NULL}}</strong>) will be returned through the length parameter. When length and the corresponding parameter are both non-<strong>{{NULL}}</strong>, the input value of length is checked to ensure there is enough room, and then the length of the string (including terminating <strong>{{NULL}}</strong> character) is passed out through the length parameter. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p> This method returns one of the following Direct3D 11 Return Codes. </p> <dd> <p> Pointer to a counter description (see <strong>{{D3D11_COUNTER_DESC}}</strong>). Specifies which counter information is to be retrieved about. </p> </dd> <dd> <p> Pointer to the data type of a counter (see <strong>{{D3D11_COUNTER_TYPE}}</strong>). Specifies the data type of the counter being retrieved. </p> </dd> <dd> <p>Pointer to the number of hardware counters that are needed for this counter type to be created. All instances of the same counter type use the same hardware counters.</p> </dd> <dd> <p> String to be filled with a brief name for the counter. May be <strong>{{NULL}}</strong> if the application is not interested in the name of the counter. </p> </dd> <dd> <p> Length of the string returned to szName. Can be <strong>{{NULL}}</strong>. </p> </dd> <dd> <p> Name of the units a counter measures, provided the memory the reference points to has enough room to hold the string. Can be <strong>{{NULL}}</strong>. The returned string will always be in English. </p> </dd> <dd> <p> Length of the string returned to szUnits. Can be <strong>{{NULL}}</strong>. </p> </dd> <dd> <p> A description of the counter, provided the memory the reference points to has enough room to hold the string. Can be <strong>{{NULL}}</strong>. The returned string will always be in English. </p> </dd> <dd> <p> Length of the string returned to szDescription. Can be <strong>{{NULL}}</strong>. </p> </dd> <p>Gets information about the features that are supported by the current graphics driver.</p> <p>To query for multi-threading support, pass the <strong>{{D3D11_FEATURE_THREADING}}</strong> value to the <em>Feature</em> parameter, pass the <strong>{{D3D11_FEATURE_DATA_THREADING}}</strong> structure to the <em>pFeatureSupportData</em> parameter, and pass the size of the <strong>{{D3D11_FEATURE_DATA_THREADING}}</strong> structure to the <em>FeatureSupportDataSize</em> parameter.</p><p>Calling CheckFeatureSupport with <em>Feature</em> set to {{D3D11_FEATURE_FORMAT_SUPPORT}} causes the method to return the same information that would be returned by <strong>{{ID3D11Device::CheckFormatSupport}}</strong>.</p> <p>Returns {{S_OK}} if successful; otherwise, returns {{E_INVALIDARG}} if an unsupported data type is passed to the <em>pFeatureSupportData</em> parameter or a size mismatch is detected for the <em>FeatureSupportDataSize</em> parameter.</p> <dd> <p>A member of the <strong>{{D3D11_FEATURE}}</strong> enumerated type that describes which feature to query for support.</p> </dd> <dd> <p>Upon completion of the method, the passed structure is filled with data that describes the feature support.</p> </dd> <dd> <p>The size of the structure passed to the <em>pFeatureSupportData</em> parameter.</p> </dd> <p>Get application-defined data from a device.</p> <p>This method returns one of the codes described in the topic Direct3D 11 Return Codes.</p> <dd> <p>Guid associated with the data.</p> </dd> <dd> <p>A reference to a variable that on input contains the size, in bytes, of the buffer that <em>pData</em> points to, and on output contains the size, in bytes, of the amount of data that <strong>GetPrivateData</strong> retrieved.</p> </dd> <dd> <p>A reference to a buffer that <strong>GetPrivateData</strong> fills with data from the device if <em>pDataSize</em> points to a value that specifies a buffer large enough to hold the data.</p> </dd> <p>Set data to a device and associate that data with a guid.</p> <p>The data stored in the device with this method can be retrieved with <strong>{{ID3D11Device::GetPrivateData}}</strong>.</p><p>The data and guid set with this method will typically be application-defined.</p><p>The debug layer reports memory leaks by outputting a list of object interface references along with their friendly names. The default friendly name is "&lt;unnamed&gt;". You can set the friendly name so that you can determine if the corresponding object interface reference caused the leak. To set the friendly name, use the <strong>SetPrivateData</strong> method and the <strong>{{WKPDID_D3DDebugObjectName}}</strong> {{GUID}} that is in {{D3Dcommon}}.h. For example, to give pContext a friendly name of <em>My name</em>, use the following code:</p><pre> static const char c_szName[] = "My name"; hr = pContext-&gt;SetPrivateData( {{WKPDID_D3DDebugObjectName}}, sizeof( c_szName ) - 1, c_szName ); </pre> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Guid associated with the data.</p> </dd> <dd> <p>Size of the data.</p> </dd> <dd> <p>Pointer to the data to be stored with this device. If pData is <strong>{{NULL}}</strong>, DataSize must also be 0, and any data previously associated with the guid will be destroyed.</p> </dd> <p>Associate an {{IUnknown}}-derived interface with this device child and associate that interface with an application-defined guid.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Guid associated with the interface.</p> </dd> <dd> <p>Pointer to an {{IUnknown}}-derived interface to be associated with the device child.</p> </dd> <p>Gets the feature level of the hardware device.</p> <p> Feature levels determine the capabilities of your device.</p> <p>A member of the <strong>{{D3D_FEATURE_LEVEL}}</strong> enumerated type that describes the feature level of the hardware device.</p> <p>Get the flags used during the call to create the device with <strong>{{D3D11CreateDevice}}</strong>.</p> <p>A bitfield containing the flags used to create the device. See <strong>{{D3D11_CREATE_DEVICE_FLAG}}</strong>.</p> <p>Get the reason why the device was removed.</p> <p>Possible return values include: </p><ul> <li>{{DXGI_ERROR_DEVICE_HUNG}}</li> <li>{{DXGI_ERROR_DEVICE_REMOVED}}</li> <li>{{DXGI_ERROR_DEVICE_RESET}}</li> <li>{{DXGI_ERROR_DRIVER_INTERNAL_ERROR}}</li> <li>{{DXGI_ERROR_INVALID_CALL}}</li> <li>{{S_OK}}</li> </ul><p>For more detail on these return codes, see {{DXGI_ERROR}}.</p> <p>Gets an immediate context, which can play back command lists.</p> <p>The <strong>GetImmediateContext</strong> method returns an <strong>{{ID3D11DeviceContext}}</strong> object that represents an immediate context which is used to perform rendering that you want immediately submitted to a device. For most applications, an immediate context is the primary object that is used to draw your scene.</p><p>The <strong>GetImmediateContext</strong> method increments the reference count of the immediate context by one. Therefore, you must call <strong>Release</strong> on the returned interface reference when you are done with it to avoid a memory leak. </p> <p>This method does not return a value.</p> <dd> <p>Upon completion of the method, the passed reference to an <strong>{{ID3D11DeviceContext}}</strong> interface reference is initialized.</p> </dd> <p>Get the exception-mode flags.</p> <p>Set an exception-mode flag to elevate an error condition to a non-continuable exception. </p><p>Whenever an error occurs, a Direct3D device enters the {{DEVICEREMOVED}} state and if the appropriate exception flag has been set, an exception is raised. A raised exception is designed to terminate an application. Before termination, the last chance an application has to persist data is by using an UnhandledExceptionFilter (see Structured Exception Handling). In general, UnhandledExceptionFilters are leveraged to try to persist data when an application is crashing (to disk, for example). Any code that executes during an UnhandledExceptionFilter is not guaranteed to reliably execute (due to possible process corruption). Any data that the UnhandledExceptionFilter manages to persist, before the UnhandledExceptionFilter crashes again, should be treated as suspect, and therefore inspected by a new, non-corrupted process to see if it is usable.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A value that contains one or more exception flags; each flag specifies a condition which will cause an exception to be raised. The flags are listed in <strong>{{D3D11_RAISE_FLAG}}</strong>. A default value of 0 means there are no flags.</p> </dd> <p>Get the exception-mode flags.</p> <p>An exception-mode flag is used to elevate an error condition to a non-continuable exception. </p> <p>A value that contains one or more exception flags; each flag specifies a condition which will cause an exception to be raised. The flags are listed in <strong>{{D3D11_RAISE_FLAG}}</strong>. A default value of 0 means there are no flags.</p> <p>Creates a device that represents the display adapter.</p> <p> This entry-point is supported by the Direct3D 11 runtime, which is available on Windows 7, Windows Server 2008 {{R2}}, and as an update to Windows Vista ({{KB971644}}). </p><p> To create a Direct3D 11.1 device (<strong>{{ID3D11Device1}}</strong>), which is available on Windows?8, Windows Server?2012, and Windows?7 and Windows Server?2008?{{R2}} with the Platform Update for Windows 7 installed, you first create a <strong>{{ID3D11Device}}</strong> with this function, and then call the <strong>QueryInterface</strong> method on the <strong>{{ID3D11Device}}</strong> object to obtain the <strong>{{ID3D11Device1}}</strong> interface. </p><p> To create a Direct3D 11.2 device (<strong>{{ID3D11Device2}}</strong>), which is available on Windows?8.1 and Windows Server?2012?{{R2}}, you first create a <strong>{{ID3D11Device}}</strong> with this function, and then call the <strong>QueryInterface</strong> method on the <strong>{{ID3D11Device}}</strong> object to obtain the <strong>{{ID3D11Device2}}</strong> interface. </p><p> Set <em>ppDevice</em> and <em>ppImmediateContext</em> to <strong>{{NULL}}</strong> to determine which feature level is supported by looking at <em>pFeatureLevel</em> without creating a device. </p><p> For an example, see How To: Create a Device and Immediate Context; to create a device and a swap chain at the same time, use <strong>{{D3D11CreateDeviceAndSwapChain}}</strong>. </p><p> If you set the <em>pAdapter</em> parameter to a non-<strong>{{NULL}}</strong> value, you must also set the <em>DriverType</em> parameter to the {{D3D_DRIVER_TYPE_UNKNOWN}} value. If you set the <em>pAdapter</em> parameter to a non-<strong>{{NULL}}</strong> value and the <em>DriverType</em> parameter to the {{D3D_DRIVER_TYPE_HARDWARE}} value, <strong>{{D3D11CreateDevice}}</strong> returns an <strong>{{HRESULT}}</strong> of {{E_INVALIDARG}}. </p><table> <tr><td> <p>Differences between Direct3D 10 and Direct3D 11:</p> <p> In Direct3D 10, the presence of <em>pAdapter</em> dictated which adapter to use and the <em>DriverType</em> could mismatch what the adapter was. </p> <p> In Direct3D 11, if you are trying to create a hardware or a software device, set <em>pAdapter</em> != <strong>{{NULL}}</strong> which constrains the other inputs to be: </p> <ul> <li><em>DriverType</em> must be {{D3D_DRIVER_TYPE_UNKNOWN}} </li> <li><em>Software</em> must be <strong>{{NULL}}</strong>. </li> </ul> <p> On the other hand, if <em>pAdapter</em> == <strong>{{NULL}}</strong>, the <em>DriverType</em> cannot be set to {{D3D_DRIVER_TYPE_UNKNOWN}}; it can be set to either: </p> <ul> <li> If <em>DriverType</em> == {{D3D_DRIVER_TYPE_SOFTWARE}}, <em>Software</em> cannot be <strong>{{NULL}}</strong>. </li> <li> If <em>DriverType</em> == {{D3D_DRIVER_TYPE_HARDWARE}}, the adapter used will be the default adapter, which is the first adapter that is enumerated by <strong>{{IDXGIFactory1::EnumAdapters}}</strong> </li> </ul> </td></tr> </table><p>?</p><p> The function signature {{PFN_D3D11_CREATE_DEVICE}} is provided as a typedef, so that you can use dynamic linking techniques (GetProcAddress) instead of statically linking. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p><p><strong>Windows Phone 8.1: </strong> This {{API}} is supported. </p> <p> This method can return one of the Direct3D 11 Return Codes. </p><p> This method returns {{E_INVALIDARG}} if you set the <em>pAdapter</em> parameter to a non-<strong>{{NULL}}</strong> value and the <em>DriverType</em> parameter to the {{D3D_DRIVER_TYPE_HARDWARE}} value. </p><p> This method returns <strong>{{DXGI_ERROR_SDK_COMPONENT_MISSING}}</strong> if you specify <strong>{{D3D11_CREATE_DEVICE_DEBUG}}</strong> in <em>Flags</em> and the incorrect version of the debug layer is installed on your computer. Install the latest Windows {{SDK}} to get the correct version. </p> <dd> <p> A reference to the video adapter to use when creating a device. Pass <strong>{{NULL}}</strong> to use the default adapter, which is the first adapter that is enumerated by <strong>{{IDXGIFactory1::EnumAdapters}}</strong>. </p> <strong>Note</strong>?? Do not mix the use of {{DXGI}} 1.0 (<strong>{{IDXGIFactory}}</strong>) and {{DXGI}} 1.1 (<strong>{{IDXGIFactory1}}</strong>) in an application. Use <strong>{{IDXGIFactory}}</strong> or <strong>{{IDXGIFactory1}}</strong>, but not both in an application. ? </dd> <dd> <p> The <strong>{{D3D_DRIVER_TYPE}}</strong>, which represents the driver type to create. </p> </dd> <dd> <p> A handle to a {{DLL}} that implements a software rasterizer. If <em>DriverType</em> is <em>{{D3D_DRIVER_TYPE_SOFTWARE}}</em>, <em>Software</em> must not be <strong>{{NULL}}</strong>. Get the handle by calling LoadLibrary, LoadLibraryEx , or GetModuleHandle. </p> </dd> <dd> <p> The runtime layers to enable (see <strong>{{D3D11_CREATE_DEVICE_FLAG}}</strong>); values can be bitwise {{OR}}'d together. </p> </dd> <dd> <p> A reference to an array of <strong>{{D3D_FEATURE_LEVEL}}</strong>s, which determine the order of feature levels to attempt to create. If <em>pFeatureLevels</em> is set to <strong>{{NULL}}</strong>, this function uses the following array of feature levels: </p> <pre>{ {{D3D_FEATURE_LEVEL_11_0}}, {{D3D_FEATURE_LEVEL_10_1}}, {{D3D_FEATURE_LEVEL_10_0}}, {{D3D_FEATURE_LEVEL_9_3}}, {{D3D_FEATURE_LEVEL_9_2}}, {{D3D_FEATURE_LEVEL_9_1}}, };</pre> <strong>Note</strong>?? If the Direct3D 11.1 runtime is present on the computer and <em>pFeatureLevels</em> is set to <strong>{{NULL}}</strong>, this function won't create a <strong>{{D3D_FEATURE_LEVEL_11_1}}</strong> device. To create a <strong>{{D3D_FEATURE_LEVEL_11_1}}</strong> device, you must explicitly provide a <strong>{{D3D_FEATURE_LEVEL}}</strong> array that includes <strong>{{D3D_FEATURE_LEVEL_11_1}}</strong>. If you provide a <strong>{{D3D_FEATURE_LEVEL}}</strong> array that contains <strong>{{D3D_FEATURE_LEVEL_11_1}}</strong> on a computer that doesn't have the Direct3D 11.1 runtime installed, this function immediately fails with {{E_INVALIDARG}}. ? </dd> <dd> <p> The number of elements in <em>pFeatureLevels</em>. </p> </dd> <dd> <p> The {{SDK}} version; use <em>{{D3D11_SDK_VERSION}}</em>. </p> </dd> <dd> <p> Returns the address of a reference to an <strong>{{ID3D11Device}}</strong> object that represents the device created. If this parameter is <strong>{{NULL}}</strong>, no {{ID3D11Device}} will be returned. </p> </dd> <dd> <p> If successful, returns the first <strong>{{D3D_FEATURE_LEVEL}}</strong> from the <em>pFeatureLevels</em> array which succeeded. Supply <strong>{{NULL}}</strong> as an input if you don't need to determine which feature level is supported. </p> </dd> <dd> <p> Returns the address of a reference to an <strong>{{ID3D11DeviceContext}}</strong> object that represents the device context. If this parameter is <strong>{{NULL}}</strong>, no {{ID3D11DeviceContext}} will be returned. </p> </dd> <p>Creates a device that represents the display adapter and a swap chain used for rendering.</p> <strong>Note</strong>?? If you call this method in a Session 0 process, it returns <strong>{{DXGI_ERROR_NOT_CURRENTLY_AVAILABLE}}</strong>.?<p> This entry-point is supported by the Direct3D 11 runtime, which is available on Windows 7, Windows Server 2008 {{R2}}, and as an update to Windows Vista ({{KB971644}}). </p><p> To create a Direct3D 11.1 device (<strong>{{ID3D11Device1}}</strong>), which is available on Windows?8, Windows Server?2012, and Windows?7 and Windows Server?2008?{{R2}} with the Platform Update for Windows 7 installed, you first create a <strong>{{ID3D11Device}}</strong> with this function, and then call the <strong>QueryInterface</strong> method on the <strong>{{ID3D11Device}}</strong> object to obtain the <strong>{{ID3D11Device1}}</strong> interface. </p><p> To create a Direct3D 11.2 device (<strong>{{ID3D11Device2}}</strong>), which is available on Windows?8.1 and Windows Server?2012?{{R2}}, you first create a <strong>{{ID3D11Device}}</strong> with this function, and then call the <strong>QueryInterface</strong> method on the <strong>{{ID3D11Device}}</strong> object to obtain the <strong>{{ID3D11Device2}}</strong> interface. </p><p> Also, see the remarks section in <strong>{{D3D11CreateDevice}}</strong> for details about input parameter dependencies. To create a device without creating a swap chain, use the <strong>{{D3D11CreateDevice}}</strong> function. </p><p> If you set the <em>pAdapter</em> parameter to a non-<strong>{{NULL}}</strong> value, you must also set the <em>DriverType</em> parameter to the {{D3D_DRIVER_TYPE_UNKNOWN}} value. If you set the <em>pAdapter</em> parameter to a non-<strong>{{NULL}}</strong> value and the <em>DriverType</em> parameter to the {{D3D_DRIVER_TYPE_HARDWARE}} value, <strong>{{D3D11CreateDeviceAndSwapChain}}</strong> returns an <strong>{{HRESULT}}</strong> of {{E_INVALIDARG}}. </p><p> The function signature {{PFN_D3D11_CREATE_DEVICE_AND_SWAP_CHAIN}} is provided as a typedef, so that you can use dynamic linking techniques (GetProcAddress) instead of statically linking. </p> <p> This method can return one of the Direct3D 11 Return Codes. </p><p> This method returns <strong>{{DXGI_ERROR_NOT_CURRENTLY_AVAILABLE}}</strong> if you call it in a Session 0 process. </p><p> This method returns {{E_INVALIDARG}} if you set the <em>pAdapter</em> parameter to a non-<strong>{{NULL}}</strong> value and the <em>DriverType</em> parameter to the {{D3D_DRIVER_TYPE_HARDWARE}} value. </p><p> This method returns <strong>{{DXGI_ERROR_SDK_COMPONENT_MISSING}}</strong> if you specify <strong>{{D3D11_CREATE_DEVICE_DEBUG}}</strong> in <em>Flags</em> and the incorrect version of the debug layer is installed on your computer. Install the latest Windows {{SDK}} to get the correct version. </p> <dd> <p> A reference to the video adapter to use when creating a device. Pass <strong>{{NULL}}</strong> to use the default adapter, which is the first adapter enumerated by <strong>{{IDXGIFactory1::EnumAdapters}}</strong>. </p> <strong>Note</strong>?? Do not mix the use of {{DXGI}} 1.0 (<strong>{{IDXGIFactory}}</strong>) and {{DXGI}} 1.1 (<strong>{{IDXGIFactory1}}</strong>) in an application. Use <strong>{{IDXGIFactory}}</strong> or <strong>{{IDXGIFactory1}}</strong>, but not both in an application. ? </dd> <dd> <p> The <strong>{{D3D_DRIVER_TYPE}}</strong>, which represents the driver type to create. </p> </dd> <dd> <p> A handle to a {{DLL}} that implements a software rasterizer. If <em>DriverType</em> is <em>{{D3D_DRIVER_TYPE_SOFTWARE}}</em>, <em>Software</em> must not be <strong>{{NULL}}</strong>. Get the handle by calling LoadLibrary, LoadLibraryEx , or GetModuleHandle. The value should be non-<strong>{{NULL}}</strong> when <strong>{{D3D_DRIVER_TYPE}}</strong> is <strong>{{D3D_DRIVER_TYPE_SOFTWARE}}</strong> and <strong>{{NULL}}</strong> otherwise. </p> </dd> <dd> <p> The runtime layers to enable (see <strong>{{D3D11_CREATE_DEVICE_FLAG}}</strong>); values can be bitwise {{OR}}'d together. </p> </dd> <dd> <p> A reference to an array of <strong>{{D3D_FEATURE_LEVEL}}</strong>s, which determine the order of feature levels to attempt to create. If <em>pFeatureLevels</em> is set to <strong>{{NULL}}</strong>, this function uses the following array of feature levels: </p> <pre> { {{D3D_FEATURE_LEVEL_11_0}}, {{D3D_FEATURE_LEVEL_10_1}}, {{D3D_FEATURE_LEVEL_10_0}}, {{D3D_FEATURE_LEVEL_9_3}}, {{D3D_FEATURE_LEVEL_9_2}}, {{D3D_FEATURE_LEVEL_9_1}}, }; </pre> <strong>Note</strong>?? If the Direct3D 11.1 runtime is present on the computer and <em>pFeatureLevels</em> is set to <strong>{{NULL}}</strong>, this function won't create a <strong>{{D3D_FEATURE_LEVEL_11_1}}</strong> device. To create a <strong>{{D3D_FEATURE_LEVEL_11_1}}</strong> device, you must explicitly provide a <strong>{{D3D_FEATURE_LEVEL}}</strong> array that includes <strong>{{D3D_FEATURE_LEVEL_11_1}}</strong>. If you provide a <strong>{{D3D_FEATURE_LEVEL}}</strong> array that contains <strong>{{D3D_FEATURE_LEVEL_11_1}}</strong> on a computer that doesn't have the Direct3D 11.1 runtime installed, this function immediately fails with {{E_INVALIDARG}}. ? </dd> <dd> <p> The number of elements in <em>pFeatureLevels</em>. </p> </dd> <dd> <p> The {{SDK}} version; use <em>{{D3D11_SDK_VERSION}}</em>. </p> </dd> <dd> <p> A reference to a swap chain description (see <strong>{{DXGI_SWAP_CHAIN_DESC}}</strong>) that contains initialization parameters for the swap chain. </p> </dd> <dd> <p> Returns the address of a reference to the <strong>{{IDXGISwapChain}}</strong> object that represents the swap chain used for rendering. </p> </dd> <dd> <p> Returns the address of a reference to an <strong>{{ID3D11Device}}</strong> object that represents the device created. If this parameter is <strong>{{NULL}}</strong>, no {{ID3D11Device}} will be returned'. </p> </dd> <dd> <p> Returns a reference to a <strong>{{D3D_FEATURE_LEVEL}}</strong>, which represents the first element in an array of feature levels supported by the device. Supply <strong>{{NULL}}</strong> as an input if you don't need to determine which feature level is supported. </p> </dd> <dd> <p> Returns the address of a reference to an <strong>{{ID3D11DeviceContext}}</strong> object that represents the device context. If this parameter is <strong>{{NULL}}</strong>, no {{ID3D11DeviceContext}} will be returned. </p> </dd> <strong>Note</strong>??This enumeration is supported by the Direct3D 11.1 runtime, which is available on Windows?8 and later operating systems.?<p>Specifies how to handle the existing contents of a resource during a copy or update operation of a region within that resource.</p> <dd> <p>The existing contents of the resource cannot be overwritten.</p> </dd> <dd> <p>The existing contents of the resource are undefined and can be discarded.</p> </dd> <strong>Note</strong>??This enumeration is supported by the Direct3D 11.1 runtime, which is available on Windows?8 and later operating systems.?<p>Specifies logical operations to configure for a render target.</p> <dd> <p>Clears the render target.</p> </dd> <dd> <p>Sets the render target.</p> </dd> <dd> <p>Copys the render target.</p> </dd> <dd> <p>Performs an inverted-copy of the render target.</p> </dd> <dd> <p>No operation is performed on the render target.</p> </dd> <dd> <p>Inverts the render target.</p> </dd> <dd> <p>Performs a logical {{AND}} operation on the render target.</p> </dd> <dd> <p>Performs a logical {{NAND}} operation on the render target.</p> </dd> <dd> <p>Performs a logical {{OR}} operation on the render target.</p> </dd> <dd> <p>Performs a logical {{NOR}} operation on the render target.</p> </dd> <dd> <p>Performs a logical {{XOR}} operation on the render target.</p> </dd> <dd> <p>Performs a logical equal operation on the render target.</p> </dd> <dd> <p>Performs a logical {{AND}} and reverse operation on the render target.</p> </dd> <dd> <p>Performs a logical {{AND}} and invert operation on the render target.</p> </dd> <dd> <p>Performs a logical {{OR}} and reverse operation on the render target.</p> </dd> <dd> <p>Performs a logical {{OR}} and invert operation on the render target.</p> </dd> <p>Describes flags that are used to create a device context state object (<strong>{{ID3DDeviceContextState}}</strong>) with the <strong>{{ID3D11Device1::CreateDeviceContextState}}</strong> method.</p> <p>Specifies capabilities of the video decoder.</p> <dd> <p>Indicates that the graphics driver supports at least a subset of downsampling operations.</p> </dd> <dd> <p>Indicates that the decoding hardware cannot support the decode operation in real-time. Decoding is still supported for transcoding scenarios. With this capability, it is possible that decoding can occur in real-time if downsampling is enabled. </p> </dd> <dd> <p>Indicates that the driver supports changing down sample parameters after the initial down sample parameters have been applied. For more information, see <strong>{{ID3D11VideoContext1::DecoderUpdateDownsampling}}</strong>.</p> </dd> <p>Specifies flags that indicate the most efficient methods for performing video processing operations. </p> <dd> <p>Multi-plane overlay hardware can perform the rotation operation more efficiently than the <strong>{{ID3D11VideoContext::VideoProcessorBlt}}</strong> method.</p> </dd> <dd> <p>Multi-plane overlay hardware can perform the scaling operation more efficiently than the <strong>{{ID3D11VideoContext::VideoProcessorBlt}}</strong> method.</p> </dd> <dd> <p>Multi-plane overlay hardware can perform the colorspace conversion operation more efficiently than the <strong>{{ID3D11VideoContext::VideoProcessorBlt}}</strong> method.</p> </dd> <dd> <p>The video processor output data should be at least triple buffered for optimal performance.</p> </dd> <p>Represents the status of an <strong>{{ID3D11CryptoSession}}</strong> interface.</p> <strong>Note</strong>??This structure is supported by the Direct3D 11.1 runtime, which is available on Windows?8 and later operating systems.?<p>Describes the blend state for a render target.</p> <p>You specify an array of <strong>{{D3D11_RENDER_TARGET_BLEND_DESC1}}</strong> structures in the <strong>RenderTarget</strong> member of the <strong>{{D3D11_BLEND_DESC1}}</strong> structure to describe the blend states for render targets; you can bind up to eight render targets to the output-merger stage at one time.</p><p>For info about how blending is done, see the output-merger stage.</p><p>Here are the default values for blend state.</p><table> <tr><th>State</th><th>Default Value</th></tr> <tr><td>BlendEnable</td><td>{{FALSE}}</td></tr> <tr><td>LogicOpEnable</td><td>{{FALSE}}</td></tr> <tr><td>SrcBlend</td><td>{{D3D11_BLEND_ONE}}</td></tr> <tr><td>DestBlend</td><td>{{D3D11_BLEND_ZERO}}</td></tr> <tr><td>BlendOp</td><td>{{D3D11_BLEND_OP_ADD}}</td></tr> <tr><td>SrcBlendAlpha</td><td>{{D3D11_BLEND_ONE}}</td></tr> <tr><td>DestBlendAlpha</td><td>{{D3D11_BLEND_ZERO}}</td></tr> <tr><td>BlendOpAlpha</td><td>{{D3D11_BLEND_OP_ADD}}</td></tr> <tr><td>LogicOp</td><td>{{D3D11_LOGIC_OP_NOOP}}</td></tr> <tr><td>RenderTargetWriteMask</td><td>{{D3D11_COLOR_WRITE_ENABLE_ALL}}</td></tr> </table><p>?</p> <dd> <p>Enable (or disable) blending.</p> </dd> <dd> <p>Enable (or disable) a logical operation.</p> </dd> <dd> <p>This <strong>blend option</strong> specifies the operation to perform on the {{RGB}} value that the pixel shader outputs. The <strong>BlendOp</strong> member defines how to combine the <strong>SrcBlend</strong> and <strong>DestBlend</strong> operations.</p> </dd> <dd> <p>This <strong>blend option</strong> specifies the operation to perform on the current {{RGB}} value in the render target. The <strong>BlendOp</strong> member defines how to combine the <strong>SrcBlend</strong> and <strong>DestBlend</strong> operations.</p> </dd> <dd> <p>This <strong>blend operation</strong> defines how to combine the <strong>SrcBlend</strong> and <strong>DestBlend</strong> operations.</p> </dd> <dd> <p>This <strong>blend option</strong> specifies the operation to perform on the alpha value that the pixel shader outputs. Blend options that end in _COLOR are not allowed. The <strong>BlendOpAlpha</strong> member defines how to combine the <strong>SrcBlendAlpha</strong> and <strong>DestBlendAlpha</strong> operations.</p> </dd> <dd> <p>This <strong>blend option</strong> specifies the operation to perform on the current alpha value in the render target. Blend options that end in _COLOR are not allowed. The <strong>BlendOpAlpha</strong> member defines how to combine the <strong>SrcBlendAlpha</strong> and <strong>DestBlendAlpha</strong> operations.</p> </dd> <dd> <p>This <strong>blend operation</strong> defines how to combine the <strong>SrcBlendAlpha</strong> and <strong>DestBlendAlpha</strong> operations.</p> </dd> <dd> <p>A <strong>{{D3D11_LOGIC_OP}}</strong>-typed value that specifies the logical operation to configure for the render target.</p> </dd> <dd> <p>A write mask.</p> </dd> <strong>Note</strong>?? This structure is supported by the Direct3D 11.1 runtime, which is available on Windows?8 and later operating systems.?<p> Describes the blend state that you use in a call to <strong>{{ID3D11Device1::CreateBlendState1}}</strong> to create a blend-state object. </p> <p> Here are the default values for blend state. </p><table> <tr><th>State</th><th>Default Value</th></tr> <tr><td>AlphaToCoverageEnable</td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>IndependentBlendEnable</td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>RenderTarget[0].BlendEnable</td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>RenderTarget[0].LogicOpEnable</td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>RenderTarget[0].SrcBlend</td><td>{{D3D11_BLEND_ONE}}</td></tr> <tr><td>RenderTarget[0].DestBlend</td><td>{{D3D11_BLEND_ZERO}}</td></tr> <tr><td>RenderTarget[0].BlendOp</td><td>{{D3D11_BLEND_OP_ADD}}</td></tr> <tr><td>RenderTarget[0].SrcBlendAlpha</td><td>{{D3D11_BLEND_ONE}}</td></tr> <tr><td>RenderTarget[0].DestBlendAlpha</td><td>{{D3D11_BLEND_ZERO}}</td></tr> <tr><td>RenderTarget[0].BlendOpAlpha</td><td>{{D3D11_BLEND_OP_ADD}}</td></tr> <tr><td>RenderTarget[0].LogicOp</td><td>{{D3D11_LOGIC_OP_NOOP}}</td></tr> <tr><td>RenderTarget[0].RenderTargetWriteMask</td><td>{{D3D11_COLOR_WRITE_ENABLE_ALL}}</td></tr> </table><p>?</p><p> If the driver type is set to <strong>{{D3D_DRIVER_TYPE_HARDWARE}}</strong>, the feature level is set to less than or equal to <strong>{{D3D_FEATURE_LEVEL_9_3}}</strong>, and the pixel format of the render target is set to <strong>{{DXGI_FORMAT_R8G8B8A8_UNORM_SRGB}}</strong>, <strong>{{DXGI_FORMAT_B8G8R8A8_UNORM_SRGB}}</strong>, or <strong>{{DXGI_FORMAT_B8G8R8X8_UNORM_SRGB}}</strong>, the display device performs the blend in standard {{RGB}} (sRGB) space and not in linear space. However, if the feature level is set to greater than <strong>{{D3D_FEATURE_LEVEL_9_3}}</strong>, the display device performs the blend in linear space, which is ideal. </p><p> When you set the <strong>LogicOpEnable</strong> member of the first element of the <strong>RenderTarget</strong> array (<strong>RenderTarget</strong>[0]) to <strong>{{TRUE}}</strong>, you must also set the <strong>BlendEnable</strong> member of <strong>RenderTarget</strong>[0] to <strong>{{FALSE}}</strong>, and the <strong>IndependentBlendEnable</strong> member of this <strong>{{D3D11_BLEND_DESC1}}</strong> to <strong>{{FALSE}}</strong>. This reflects the limitation in hardware that you can't mix logic operations with blending across multiple render targets, and that when you use a logic operation, you must apply the same logic operation to all render targets. </p> <strong>Note</strong>??This structure is supported by the Direct3D 11.1 runtime, which is available on Windows?8 and later operating systems.?<p>Describes rasterizer state.</p> <p>Rasterizer state defines the behavior of the rasterizer stage. To create a rasterizer-state object, call <strong>{{ID3D11Device1::CreateRasterizerState1}}</strong>. To set rasterizer state, call <strong>{{ID3D11DeviceContext::RSSetState}}</strong>.</p><p>If you do not specify some rasterizer state, the Direct3D runtime uses the following default values for rasterizer state.</p><table> <tr><th>State</th><th>Default Value</th></tr> <tr><td><strong>FillMode</strong></td><td>Solid</td></tr> <tr><td><strong>CullMode</strong></td><td>Back</td></tr> <tr><td><strong>FrontCounterClockwise</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td><strong>DepthBias</strong></td><td>0</td></tr> <tr><td><strong>SlopeScaledDepthBias</strong></td><td>0.0f</td></tr> <tr><td><strong>DepthBiasClamp</strong></td><td>0.0f</td></tr> <tr><td><strong>DepthClipEnable</strong></td><td><strong>{{TRUE}}</strong></td></tr> <tr><td><strong>ScissorEnable</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td><strong>MultisampleEnable</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td><strong>AntialiasedLineEnable</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td><strong>ForcedSampleCount</strong></td><td>0</td></tr> </table><p>?</p><strong>Note</strong>??For feature levels 9.1, 9.2, 9.3, and 10.0, if you set <strong>MultisampleEnable</strong> to <strong>{{FALSE}}</strong>, the runtime renders all points, lines, and triangles without anti-aliasing even for render targets with a sample count greater than 1. For feature levels 10.1 and higher, the setting of <strong>MultisampleEnable</strong> has no effect on points and triangles with regard to {{MSAA}} and impacts only the selection of the line-rendering algorithm as shown in this table:?<p> </p><table> <tr><th>Line-rendering algorithm</th><th><strong>MultisampleEnable</strong></th><th><strong>AntialiasedLineEnable</strong></th></tr> <tr><td>Aliased</td><td><strong>{{FALSE}}</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>Alpha antialiased</td><td><strong>{{FALSE}}</strong></td><td><strong>{{TRUE}}</strong></td></tr> <tr><td>Quadrilateral</td><td><strong>{{TRUE}}</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>Quadrilateral</td><td><strong>{{TRUE}}</strong></td><td><strong>{{TRUE}}</strong></td></tr> </table><p>?</p><p>The settings of the <strong>MultisampleEnable</strong> and <strong>AntialiasedLineEnable</strong> members apply only to multisample antialiasing ({{MSAA}}) render targets (that is, render targets with sample counts greater than 1). Because of the differences in feature-level behavior and as long as you aren?t performing any line drawing or don?t mind that lines render as quadrilaterals, we recommend that you always set <strong>MultisampleEnable</strong> to <strong>{{TRUE}}</strong> whenever you render on {{MSAA}} render targets.</p> <dd> <p>Determines the fill mode to use when rendering.</p> </dd> <dd> <p>Indicates that triangles facing the specified direction are not drawn.</p> </dd> <dd> <p>Specifies whether a triangle is front- or back-facing. If <strong>{{TRUE}}</strong>, a triangle will be considered front-facing if its vertices are counter-clockwise on the render target and considered back-facing if they are clockwise. If <strong>{{FALSE}}</strong>, the opposite is true.</p> </dd> <dd> <p>Depth value added to a given pixel. For info about depth bias, see Depth Bias.</p> </dd> <dd> <p>Maximum depth bias of a pixel. For info about depth bias, see Depth Bias.</p> </dd> <dd> <p>Scalar on a given pixel's slope. For info about depth bias, see Depth Bias.</p> </dd> <dd> <p>Specifies whether to enable clipping based on distance.</p> <p>The hardware always performs x and y clipping of rasterized coordinates. When <strong>DepthClipEnable</strong> is set to the default?<strong>{{TRUE}}</strong>, the hardware also clips the z value (that is, the hardware performs the last step of the following algorithm). </p> <code> 0 &lt; w -w &lt;= x &lt;= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden) -w &lt;= y &lt;= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden) 0 &lt;= z &lt;= w </code> <p>When you set <strong>DepthClipEnable</strong> to <strong>{{FALSE}}</strong>, the hardware skips the z clipping (that is, the last step in the preceding algorithm). However, the hardware still performs the "0 &lt; w" clipping. When z clipping is disabled, improper depth ordering at the pixel level might result. However, when z clipping is disabled, stencil shadow implementations are simplified. In other words, you can avoid complex special-case handling for geometry that goes beyond the back clipping plane. </p> </dd> <dd> <p>Specifies whether to enable scissor-rectangle culling. All pixels outside an active scissor rectangle are culled.</p> </dd> <dd> <p>Specifies whether to use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing ({{MSAA}}) render targets. Set to <strong>{{TRUE}}</strong> to use the quadrilateral line anti-aliasing algorithm and to <strong>{{FALSE}}</strong> to use the alpha line anti-aliasing algorithm. For more info about this member, see Remarks.</p> </dd> <dd> <p>Specifies whether to enable line antialiasing; only applies if doing line drawing and <strong>MultisampleEnable</strong> is <strong>{{FALSE}}</strong>. For more info about this member, see Remarks.</p> </dd> <dd> <p>The sample count that is forced while {{UAV}} rendering or rasterizing. Valid values are 0, 1, 2, 4, 8, and optionally 16. 0 indicates that the sample count is not forced.</p> <strong>Note</strong>??<p>If you want to render with <strong>ForcedSampleCount</strong> set to 1 or greater, you must follow these guidelines: </p> <ul> <li>Don't bind depth-stencil views.</li> <li>Disable depth testing.</li> <li>Ensure the shader doesn't output depth.</li> <li>If you have any render-target views bound (<strong>{{D3D11_BIND_RENDER_TARGET}}</strong>) and <strong>ForcedSampleCount</strong> is greater than 1, ensure that every render target has only a single sample.</li> <li>Don't operate the shader at sample frequency. Therefore, <strong>{{ID3D11ShaderReflection::IsSampleFrequencyShader}}</strong> returns <strong>{{FALSE}}</strong>.</li> </ul>Otherwise, rendering behavior is undefined. For info about how to configure depth-stencil, see Configuring Depth-Stencil Functionality. ? </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Describes a sub sample mapping block.</p> <p>Values in the sub sample mapping blocks are relative to the start of the decode buffer.</p> <dd> <p>The number of clear (non-encrypted) bytes at the start of the block.</p> </dd> <dd> <p>The number of encrypted bytes following the clear bytes.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Describes a compressed buffer for decoding.</p> <dd> <p>The type of buffer.</p> </dd> <dd> <p>The offset of the relevant data from the beginning of the buffer, in bytes. This value must be zero. </p> </dd> <dd> <p>Size of the relevant data.</p> </dd> <dd> <p>A reference to a buffer that contains an initialization vector ({{IV}}) for encrypted data. If the decode buffer does not contain encrypted data, set this member to {{NULL}}.</p> </dd> <dd> <p>The size of the buffer specified in the <em>pIV</em> parameter. If <em>pIV</em> is {{NULL}}, set this member to zero.</p> </dd> <dd> <p>A reference to an array of <strong>{{D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK}}</strong> structures, which indicates exactly which bytes in the decode buffer are encrypted and which are in the clear. If the decode buffer does not contain encrypted data, set this member to {{NULL}}.</p> <p>Values in the sub sample mapping blocks are relative to the start of the decode buffer.</p> </dd> <dd> <p>The number of <strong>{{D3D11_VIDEO_DECODER_SUB_SAMPLE_MAPPING_BLOCK}}</strong> structures specified in the <em>pSubSampleMappingBlocks</em> parameter. If <em>pSubSampleMappingBlocks</em> is {{NULL}}, set this member to zero.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Provides data to the <strong>{{ID3D11VideoContext::DecoderBeginFrame}}</strong> method.</p> <p>This structure is passed in the <em>pContentKey</em> parameter of the <strong>{{ID3D11VideoContext::DecoderBeginFrame}}</strong> function when <strong>{{D3D11_DECODER_ENCRYPTION_HW_CENC}}</strong> is specified in the <strong>guidConfigBitstreamEncryption</strong> member of the <strong>{{D3D11_VIDEO_DECODER_CONFIG}}</strong> structure when creating the video decoder interface.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Provides information about the input streams passed into the <strong>{{ID3DVideoContext1::VideoProcessorGetBehaviorHints}}</strong> method.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Represents key exchange input data for hardware content protection.</p> <dd> <p>The size of the private data reserved for {{IHV}} usage. This size is determined from the <em>pPrivateInputSize</em> parameter returned by the <strong>{{ID3D11VideoDevice1::GetCryptoSessionPrivateDataSize}}</strong> function.</p> </dd> <dd> <p>The size of the {{DRM}} command data.</p> </dd> <dd> <p>If <strong>PrivateDataSize</strong> is greater than 0, pbInput[0] ? <strong>pbInput</strong>[<strong>PrivateDataSize</strong> - 1] is reserved for {{IHV}} use.</p> <p><strong>pbInput</strong>[<strong>PrivateDataSize</strong>] ? <strong>pbInput</strong>[<strong>{{HWProtectionDataSize}}</strong> + <strong>PrivateDataSize</strong> - 1] contains the input data for the {{DRM}} command. The format and size of the {{DRM}} command is defined by the {{DRM}} specification.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Represents key exchange output data for hardware content protection.</p> <dd> <p>The size of the private data reserved for {{IHV}} usage. This size is determined from the <em>pPrivateOutputSize</em> parameter returned by the <strong>{{ID3D11VideoDevice1::GetCryptoSessionPrivateDataSize}}</strong> function.</p> </dd> <dd> <p>The maximum size of data that the driver can return in the output buffer. The last byte that it can write to is <strong>pbOuput</strong>[<strong>PrivateDataSize</strong> + <strong>MaxHWProtectionDataSize</strong> ? 1].</p> </dd> <dd> <p>The size of the output data written by the driver.</p> </dd> <dd> <p>The number of 100 nanosecond units spent transporting the data.</p> </dd> <dd> <p>The number of 100 nanosecond units spent executing the content protection command.</p> </dd> <dd> <p>If <strong>PrivateDataSize</strong> is greater than 0, pbInput[0] ? <strong>pbOutput</strong>[<strong>PrivateDataSize</strong> - 1] is reserved for {{IHV}} use.</p> <p><strong>pbOutput</strong>[<strong>PrivateDataSize</strong>] ? <strong>pbOutput</strong>[<strong>{{HWProtectionDataSize}}</strong> + <strong>PrivateDataSize</strong> - 1] contains the input data for the {{DRM}} command. The format and size of the {{DRM}} command is defined by the {{DRM}} specification.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Represents key exchange data for hardware content protection.</p> <p>A reference to this structure is passed in the <em>pData</em> parameter of <strong>{{ID3D11VideoContext::NegotiateCryptoSessionKeyExchange}}</strong> method when the <strong>{{ID3D11CryptoSession}}</strong> is creating using the <strong>{{D3D11_KEY_EXCHANGE_HW_PROTECTION}}</strong> key exchange type.</p> <dd> <p>The function {{ID}} of the {{DRM}} command. The values and meanings of the function {{ID}} are defined by the {{DRM}} specification.</p> </dd> <dd> <p>Pointer to a buffer containing a <strong>{{D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA}}</strong> structure that specifies memory reserved for {{IHV}} use and the input data for the {{DRM}} command.</p> </dd> <dd> <p>Pointer to a buffer containing a <strong>{{D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA}}</strong> structure that specifies memory reserved for {{IHV}} use and the input data for the {{DRM}} command.</p> </dd> <dd> <p>The result of the hardware {{DRM}} command.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Describes a video sample.</p> <dd> <p>The width of the video sample.</p> </dd> <dd> <p>The height of the video sample.</p> </dd> <dd> <p>The format of the video sample.</p> </dd> <dd> <p>The colorspace of the sample.</p> </dd> <p>The blend-state interface holds a description for blending state that you can bind to the output-merger stage. This blend-state interface supports logical operations as well as blending operations.</p> <p>Blending applies a simple function to combine output values from a pixel shader with data in a render target. You have control over how the pixels are blended by using a predefined set of blending operations and preblending operations.</p><p>To create a blend-state object, call <strong>{{ID3D11Device1::CreateBlendState1}}</strong>. To bind the blend-state object to the output-merger stage, call <strong>{{ID3D11DeviceContext::OMSetBlendState}}</strong>.</p> <p>Gets the description for blending state that you used to create the blend-state object.</p> <p>You use the description for blending state in a call to the <strong>{{ID3D11Device1::CreateBlendState1}}</strong> method to create the blend-state object.</p> <p>Returns nothing.</p> <dd> <p>A reference to a <strong>{{D3D11_BLEND_DESC1}}</strong> structure that receives a description of the blend state. This blend state can specify logical operations as well as blending operations.</p> </dd> <p>The rasterizer-state interface holds a description for rasterizer state that you can bind to the rasterizer stage. This rasterizer-state interface supports forced sample count.</p> <p>To create a rasterizer-state object, call <strong>{{ID3D11Device1::CreateRasterizerState1}}</strong>. To bind the rasterizer-state object to the rasterizer stage, call <strong>{{ID3D11DeviceContext::RSSetState}}</strong>.</p> <p>Gets the description for rasterizer state that you used to create the rasterizer-state object.</p> <p>You use the description for rasterizer state in a call to the <strong>{{ID3D11Device1::CreateRasterizerState1}}</strong> method to create the rasterizer-state object.</p> <p>Returns nothing.</p> <dd> <p>A reference to a <strong> {{D3D11_RASTERIZER_DESC1}}</strong> structure that receives a description of the rasterizer state. This rasterizer state can specify forced sample count.</p> </dd> <p>The <strong>{{ID3DDeviceContextState}}</strong> interface represents a context state object, which holds state and behavior information about a Microsoft Direct3D device.</p> <p>The device context interface represents a device context; it is used to render commands. <strong>{{ID3D11DeviceContext1}}</strong> adds new methods to those in <strong>{{ID3D11DeviceContext}}</strong>.</p> <p>Copies a region from a source resource to a destination resource.</p> <p>If the display driver supports overlapping, the source and destination subresources can be identical, and the source and destination regions can overlap each other. For existing display drivers that don?t support overlapping, the runtime drops calls with identical source and destination subresources, regardless of whether the regions overlap. To determine whether the display driver supports overlapping, check the <strong>CopyWithOverlap</strong> member of <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS}}</strong>. This overlapping support enables additional scroll functionality in a call to <strong>{{IDXGISwapChain::Present}}</strong>.</p><strong>Note</strong>??<strong>Applies only to feature level 9_x hardware</strong> If you use <strong>{{ID3D11DeviceContext1::UpdateSubresource1}}</strong> or <strong>CopySubresourceRegion1</strong> to copy from a staging resource to a default resource, you can corrupt the destination contents. This occurs if you pass a <strong>{{NULL}}</strong> source box and if the source resource has different dimensions from those of the destination resource or if you use destination offsets, (x, y, and z). In this situation, always pass a source box that is the full size of the source resource.? <p>Returns nothing</p> <dd> <p>A reference to the destination resource.</p> </dd> <dd> <p>Destination subresource index.</p> </dd> <dd> <p>The x-coordinate of the upper-left corner of the destination region.</p> </dd> <dd> <p>The y-coordinate of the upper-left corner of the destination region. For a 1D subresource, this must be zero.</p> </dd> <dd> <p>The z-coordinate of the upper-left corner of the destination region. For a 1D or 2D subresource, this must be zero.</p> </dd> <dd> <p>A reference to the source resource.</p> </dd> <dd> <p>Source subresource index.</p> </dd> <dd> <p>A reference to a 3D box that defines the region of the source subresource that <strong>CopySubresourceRegion1</strong> can copy. If <strong>{{NULL}}</strong>, <strong>CopySubresourceRegion1</strong> copies the entire source subresource. The box must fit within the source resource.</p> <p>An empty box results in a no-op. A box is empty if the top value is greater than or equal to the bottom value, or the left value is greater than or equal to the right value, or the front value is greater than or equal to the back value. When the box is empty, <strong>CopySubresourceRegion1</strong> doesn't perform a copy operation.</p> </dd> <dd> <p>A <strong>{{D3D11_COPY_FLAGS}}</strong>-typed value that specifies how to perform the copy operation. If you specify zero for no copy option, <strong>CopySubresourceRegion1</strong> behaves like <strong>{{ID3D11DeviceContext::CopySubresourceRegion}}</strong>. For existing display drivers that can't process these flags, the runtime doesn't use them. </p> </dd> <p>The {{CPU}} copies data from memory to a subresource created in non-mappable memory.</p> <p>If you call <strong>UpdateSubresource1</strong> to update a constant buffer, pass any region, and the driver has not been implemented to Windows?8, the runtime drops the call (except feature level 9.1, 9.2, and 9.3 where the runtime emulates support). The runtime also drops the call if you update a constant buffer with a partial region whose extent is not aligned to 16-byte granularity (16 bytes being a full constant). When the runtime drops the call, the runtime doesn't call the corresponding device driver interface ({{DDI}}).</p><p>When you record a call to <strong>UpdateSubresource</strong> with an offset <em>pDstBox</em> in a software command list, the offset in <em>pDstBox</em> is incorrectly applied to <em>pSrcData</em> when you play back the command list. The new-for-Windows?8<strong>UpdateSubresource1</strong> fixes this issue. In a call to <strong>UpdateSubresource1</strong>, <em>pDstBox</em> does not affect <em>pSrcData</em>.</p><p>For info about various resource types and how <strong>UpdateSubresource1</strong> might work with each resource type, see Introduction to a Resource in Direct3D 11. </p><strong>Note</strong>??<strong>Applies only to feature level 9_x hardware</strong> If you use <strong>UpdateSubresource1</strong> or <strong>{{ID3D11DeviceContext1::CopySubresourceRegion1}}</strong> to copy from a staging resource to a default resource, you can corrupt the destination contents. This occurs if you pass a <strong>{{NULL}}</strong> source box and if the source resource has different dimensions from those of the destination resource or if you use destination offsets, (x, y, and z). In this situation, always pass a source box that is the full size of the source resource.? <p>Returns nothing.</p> <dd> <p>A reference to the destination resource.</p> </dd> <dd> <p>A zero-based index that identifies the destination subresource. See <strong>{{D3D11CalcSubresource}}</strong> for more details.</p> </dd> <dd> <p>A reference to a box that defines the portion of the destination subresource to copy the resource data into. Coordinates are in bytes for buffers and in texels for textures. If <strong>{{NULL}}</strong>, <strong>UpdateSubresource1</strong> writes the data to the destination subresource with no offset. The dimensions of the source must fit the destination.</p> <p>An empty box results in a no-op. A box is empty if the top value is greater than or equal to the bottom value, or the left value is greater than or equal to the right value, or the front value is greater than or equal to the back value. When the box is empty, <strong>UpdateSubresource1</strong> doesn't perform an update operation.</p> </dd> <dd> <p>A reference to the source data in memory.</p> </dd> <dd> <p>The size of one row of the source data.</p> </dd> <dd> <p>The size of one depth slice of source data.</p> </dd> <dd> <p>A <strong>{{D3D11_COPY_FLAGS}}</strong>-typed value that specifies how to perform the update operation. If you specify zero for no update option, <strong>UpdateSubresource1</strong> behaves like <strong>{{ID3D11DeviceContext::UpdateSubresource}}</strong>. For existing display drivers that can't process these flags, the runtime doesn't use them.</p> </dd> <p>Discards a resource from the device context.</p> <p><strong>DiscardResource</strong> informs the graphics processing unit ({{GPU}}) that the existing content in the resource that <em>pResource</em> points to is no longer needed.</p> <p>Returns nothing</p> <dd> <p>A reference to the <strong>{{ID3D11Resource}}</strong> interface for the resource to discard. The resource must have been created with usage <strong>{{D3D11_USAGE_DEFAULT}}</strong> or <strong>{{D3D11_USAGE_DYNAMIC}}</strong>, otherwise the runtime drops the call to <strong>DiscardResource</strong>; if the debug layer is enabled, the runtime returns an error message.</p> </dd> <p>Discards a resource view from the device context.</p> <p><strong>DiscardView</strong> informs the graphics processing unit ({{GPU}}) that the existing content in the resource view that <em>pResourceView</em> points to is no longer needed. The view can be an {{SRV}}, {{RTV}}, {{UAV}}, or {{DSV}}. <strong>DiscardView</strong> is a variation on the <strong>DiscardResource</strong> method. <strong>DiscardView</strong> allows you to discard a subset of a resource that is in a view (such as a single miplevel). More importantly, <strong>DiscardView</strong> provides a convenience because often views are what are being bound and unbound at the pipeline. Some pipeline bindings do not have views, such as stream output. In that situation, <strong>DiscardResource</strong> can do the job for any resource.</p> <p>Returns nothing</p> <dd> <p>A reference to the <strong>{{ID3D11View}}</strong> interface for the resource view to discard. The resource that underlies the view must have been created with usage <strong>{{D3D11_USAGE_DEFAULT}}</strong> or <strong>{{D3D11_USAGE_DYNAMIC}}</strong>, otherwise the runtime drops the call to <strong>DiscardView</strong>; if the debug layer is enabled, the runtime returns an error message.</p> </dd> <p>Sets the constant buffers that the vertex shader pipeline stage uses.</p> <p>The runtime drops the call to <strong>{{VSSetConstantBuffers1}}</strong> if the number of constants to which <em>pNumConstants</em> points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the <em>pFirstConstant</em> and <em>pFirstConstant</em> + <em>pNumConstants</em> arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of <em>pFirstConstant</em>, value in an element of <em>pFirstConstant</em> + value in an element of <em>pNumConstants</em>]. The runtime also drops the call to <strong>{{VSSetConstantBuffers1}}</strong> on existing drivers that don't support this offsetting.</p><p>The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.</p><p>From the shader?s point of view, element [0] in the constant buffers array is the constant at <em>pFirstConstant</em>.</p><p>Out of bounds access to the constant buffers from the shader to the range that is defined by <em>pFirstConstant</em> and <em>pNumConstants</em> returns 0. </p><p>If <em>pFirstConstant</em> and <em>pNumConstants</em> arrays are <strong>{{NULL}}</strong>, you get the same result as if you were binding the entire buffer into view. You get this same result if you call the <strong>{{VSSetConstantBuffers}}</strong> method. If the buffer is larger than the maximum constant buffer size that is supported by shaders (4096 elements), the shader can access only the first 4096 constants.</p><p>If either <em>pFirstConstant</em> or <em>pNumConstants</em> is <strong>{{NULL}}</strong>, the other parameter must also be <strong>{{NULL}}</strong>.</p> <p>Returns nothing.</p> <dd> <p>Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of buffers to set (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - <em>StartSlot</em>).</p> </dd> <dd> <p>Array of constant buffers being given to the device.</p> </dd> <dd> <p>An array that holds the offsets into the buffers that <em>ppConstantBuffers</em> specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.</p> </dd> <dd> <p>An array that holds the numbers of constants in the buffers that <em>ppConstantBuffers</em> specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the <em>pFirstConstant</em> array. Each number of constants must be a multiple of 16 constants, in the range [0..4096]. </p> </dd> <p>Sets the constant buffers that the hull-shader stage of the pipeline uses.</p> <p>The runtime drops the call to <strong>{{HSSetConstantBuffers1}}</strong> if the number of constants to which <em>pNumConstants</em> points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the <em>pFirstConstant</em> and <em>pFirstConstant</em> + <em>pNumConstants</em> arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of <em>pFirstConstant</em>, value in an element of <em>pFirstConstant</em> + value in an element of <em>pNumConstants</em>]. The runtime also drops the call to <strong>{{HSSetConstantBuffers1}}</strong> on existing drivers that don't support this offsetting.</p><p>The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.</p><p>From the shader?s point of view, element [0] in the constant buffers array is the constant at <em>pFirstConstant</em>.</p><p>Out of bounds access to the constant buffers from the shader to the range that is defined by <em>pFirstConstant</em> and <em>pNumConstants</em> returns 0. </p><p>If the <em>pFirstConstant</em> and <em>pNumConstants</em> arrays are <strong>{{NULL}}</strong>, you get the same result as if you were binding the entire buffer into view. You get this same result if you call the <strong>{{HSSetConstantBuffers}}</strong> method. If the buffer is larger than the maximum constant buffer size that is supported by shaders (4096 elements), the shader can access only the first 4096 constants.</p><p>If either <em>pFirstConstant</em> or <em>pNumConstants</em> is <strong>{{NULL}}</strong>, the other parameter must also be <strong>{{NULL}}</strong>.</p> <p>Returns nothing</p> <p>Sets the constant buffers that the domain-shader stage uses.</p> <p>The runtime drops the call to <strong>{{DSSetConstantBuffers1}}</strong> if the number of constants to which <em>pNumConstants</em> points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the <em>pFirstConstant</em> and <em>pFirstConstant</em> + <em>pNumConstants</em> arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of <em>pFirstConstant</em>, value in an element of <em>pFirstConstant</em> + value in an element of <em>pNumConstants</em>]. The runtime also drops the call to <strong>{{DSSetConstantBuffers1}}</strong> on existing drivers that don't support this offsetting.</p><p>The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.</p><p>From the shader?s point of view, element [0] in the constant buffers array is the constant at <em>pFirstConstant</em>.</p><p>Out of bounds access to the constant buffers from the shader to the range that is defined by <em>pFirstConstant</em> and <em>pNumConstants</em> returns 0. </p><p>If <em>pFirstConstant</em> and <em>pNumConstants</em> arrays are <strong>{{NULL}}</strong>, you get the same result as if you were binding the entire buffer into view. You get this same result if you call the <strong>{{DSSetConstantBuffers}}</strong> method. If the buffer is larger than the maximum constant buffer size that is supported by shaders (4096 elements), the shader can access only the first 4096 constants.</p><p>If either <em>pFirstConstant</em> or <em>pNumConstants</em> is <strong>{{NULL}}</strong>, the other parameter must also be <strong>{{NULL}}</strong>.</p> <p>Returns nothing</p> <dd> <p>Index into the zero-based array to begin setting constant buffers to (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of buffers to set (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - <em>StartSlot</em>).</p> </dd> <dd> <p>Array of constant buffers being given to the device.</p> </dd> <dd> <p>An array that holds the offsets into the buffers that <em>ppConstantBuffers</em> specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.</p> </dd> <dd> <p>An array that holds the numbers of constants in the buffers that <em>ppConstantBuffers</em> specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the <em>pFirstConstant</em> array. Each number of constants must be a multiple of 16 constants, in the range [0..4096]. </p> </dd> <p>Sets the constant buffers that the geometry shader pipeline stage uses.</p> <p>The runtime drops the call to <strong>{{GSSetConstantBuffers1}}</strong> if the number of constants to which <em>pNumConstants</em> points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the <em>pFirstConstant</em> and <em>pFirstConstant</em> + <em>pNumConstants</em> arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of <em>pFirstConstant</em>, value in an element of <em>pFirstConstant</em> + value in an element of <em>pNumConstants</em>]. The runtime also drops the call to <strong>{{GSSetConstantBuffers1}}</strong> on existing drivers that don't support this offsetting.</p><p>The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.</p><p>From the shader?s point of view, element [0] in the constant buffers array is the constant at <em>pFirstConstant</em>.</p><p>Out of bounds access to the constant buffers from the shader to the range that is defined by <em>pFirstConstant</em> and <em>pNumConstants</em> returns 0. </p><p>If <em>pFirstConstant</em> and <em>pNumConstants</em> arrays are <strong>{{NULL}}</strong>, you get the same result as if you were binding the entire buffer into view. You get this same result if you call the <strong>{{GSSetConstantBuffers}}</strong> method. If the buffer is larger than the maximum constant buffer size that is supported by shaders (4096 elements), the shader can access only the first 4096 constants.</p><p>If either <em>pFirstConstant</em> or <em>pNumConstants</em> is <strong>{{NULL}}</strong>, the other parameter must also be <strong>{{NULL}}</strong>.</p> <p>Returns nothing.</p> <dd> <p>Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of buffers to set (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - <em>StartSlot</em>).</p> </dd> <dd> <p>Array of constant buffers (see <strong>{{ID3D11Buffer}}</strong>) being given to the device.</p> </dd> <dd> <p>An array that holds the offsets into the buffers that <em>ppConstantBuffers</em> specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.</p> </dd> <dd> <p>An array that holds the numbers of constants in the buffers that <em>ppConstantBuffers</em> specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the <em>pFirstConstant</em> array. Each number of constants must be a multiple of 16 constants, in the range [0..4096]. </p> </dd> <p> Sets the constant buffers that the pixel shader pipeline stage uses, and enables the shader to access other parts of the buffer. </p> <p> To enable the shader to access other parts of the buffer, call <strong>{{PSSetConstantBuffers1}}</strong> instead of <strong>{{PSSetConstantBuffers}}</strong>. <strong>{{PSSetConstantBuffers1}}</strong> has additional parameters <em>pFirstConstant</em> and <em>pNumConstants</em>. </p><p> The runtime drops the call to <strong>{{PSSetConstantBuffers1}}</strong> if the numbers of constants to which <em>pNumConstants</em> points is larger than the maximum constant buffer size that is supported by shaders. The maximum constant buffer size that is supported by shaders holds 4096 constants, where each constant has four 32-bit components. </p><p> The values in the elements of the <em>pFirstConstant</em> and <em>pFirstConstant</em> + <em>pNumConstants</em> arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the following window (range): </p><p> [value in an element of <em>pFirstConstant</em>, value in an element of <em>pFirstConstant</em> + value in an element of <em>pNumConstants</em>] </p><p> That is, the window is the range is from (value in an element of <em>pFirstConstant</em>) to (value in an element of <em>pFirstConstant</em> + value in an element of <em>pNumConstants</em>). </p><p> The runtime also drops the call to <strong>{{PSSetConstantBuffers1}}</strong> on existing drivers that do not support this offsetting. </p><p> The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher. </p><p> From the shader?s point of view, element [0] in the constant buffers array is the constant at <em>pFirstConstant</em>. </p><p> Out of bounds access to the constant buffers from the shader to the range that is defined by <em>pFirstConstant</em> and <em>pNumConstants</em> returns 0. </p><p> If <em>pFirstConstant</em> and <em>pNumConstants</em> arrays are <strong>{{NULL}}</strong>, you get the same result as if you were binding the entire buffer into view. You get this same result if you call the <strong>{{PSSetConstantBuffers}}</strong> method. If the buffer is larger than the maximum constant buffer size that is supported by shaders (4096 elements), the shader can access only the first 4096 constants. </p><p> If either <em>pFirstConstant</em> or <em>pNumConstants</em> is <strong>{{NULL}}</strong>, the other parameter must also be <strong>{{NULL}}</strong>. </p> <p> Returns nothing. </p> <dd> <p> Index into the device's zero-based array to begin setting constant buffers to (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - 1). </p> </dd> <dd> <p> Number of buffers to set (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - <em>StartSlot</em>). </p> </dd> <dd> <p> Array of constant buffers being given to the device. </p> </dd> <dd> <p> An array that holds the offsets into the buffers that <em>ppConstantBuffers</em> specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants. </p> </dd> <dd> <p> An array that holds the numbers of constants in the buffers that <em>ppConstantBuffers</em> specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the <em>pFirstConstant</em> array. Each number of constants must be a multiple of 16 constants, in the range [0..4096]. </p> </dd> <p>Sets the constant buffers that the compute-shader stage uses.</p> <p>The runtime drops the call to <strong>{{CSSetConstantBuffers1}}</strong> if the number of constants to which <em>pNumConstants</em> points is larger than the maximum constant buffer size that is supported by shaders (4096 constants). The values in the elements of the <em>pFirstConstant</em> and <em>pFirstConstant</em> + <em>pNumConstants</em> arrays can exceed the length of each buffer; from the shader's point of view, the constant buffer is the intersection of the actual memory allocation for the buffer and the window [value in an element of <em>pFirstConstant</em>, value in an element of <em>pFirstConstant</em> + value in an element of <em>pNumConstants</em>]. The runtime also drops the call to <strong>{{CSSetConstantBuffers1}}</strong> on existing drivers that don't support this offsetting.</p><p>The runtime will emulate this feature for feature level 9.1, 9.2, and 9.3; therefore, this feature is supported for feature level 9.1, 9.2, and 9.3. This feature is always available on new drivers for feature level 10 and higher.</p><p>From the shader?s point of view, element [0] in the constant buffers array is the constant at <em>pFirstConstant</em>.</p><p>Out of bounds access to the constant buffers from the shader to the range that is defined by <em>pFirstConstant</em> and <em>pNumConstants</em> returns 0. </p><p>If <em>pFirstConstant</em> and <em>pNumConstants</em> arrays are <strong>{{NULL}}</strong>, you get the same result as if you were binding the entire buffer into view. You get this same result if you call the <strong>{{CSSetConstantBuffers}}</strong> method. If the buffer is larger than the maximum constant buffer size that is supported by shaders (4096 elements), the shader can access only the first 4096 constants.</p><p>If either <em>pFirstConstant</em> or <em>pNumConstants</em> is <strong>{{NULL}}</strong>, the other parameter must also be <strong>{{NULL}}</strong>.</p> <p>Returns nothing.</p> <dd> <p>Index into the zero-based array to begin setting constant buffers to (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of buffers to set (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - <em>StartSlot</em>).</p> </dd> <dd> <p>Array of constant buffers (see <strong>{{ID3D11Buffer}}</strong>) being given to the device.</p> </dd> <dd> <p>An array that holds the offsets into the buffers that <em>ppConstantBuffers</em> specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 16 indicates that the start of the associated constant buffer is 256 bytes into the constant buffer. Each offset must be a multiple of 16 constants.</p> </dd> <dd> <p>An array that holds the numbers of constants in the buffers that <em>ppConstantBuffers</em> specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the <em>pFirstConstant</em> array. Each number of constants must be a multiple of 16 constants, in the range [0..4096]. </p> </dd> <p>Gets the constant buffers that the vertex shader pipeline stage uses.</p> <p>If no buffer is bound at a slot, <em>pFirstConstant</em> and <em>pNumConstants</em> are <strong>{{NULL}}</strong> for that slot.</p> <p>Returns nothing.</p> <dd> <p>Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of buffers to retrieve (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - <em>StartSlot</em>).</p> </dd> <dd> <p>Array of constant buffer interface references to be returned by the method.</p> </dd> <dd> <p>A reference to an array that receives the offsets into the buffers that <em>ppConstantBuffers</em> specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 2 indicates that the start of the associated constant buffer is 32 bytes into the constant buffer. The runtime sets <em>pFirstConstant</em> to <strong>{{NULL}}</strong> if the buffers do not have offsets.</p> </dd> <dd> <p>A reference to an array that receives the numbers of constants in the buffers that <em>ppConstantBuffers</em> specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the <em>pFirstConstant</em> array. The runtime sets <em>pNumConstants</em> to <strong>{{NULL}}</strong> if it doesn't specify the numbers of constants in each buffer.</p> </dd> <p>Gets the constant buffers that the hull-shader stage uses.</p> <p>If no buffer is bound at a slot, <em>pFirstConstant</em> and <em>pNumConstants</em> are <strong>{{NULL}}</strong> for that slot.</p> <p>Returns nothing</p> <p>Gets the constant buffers that the domain-shader stage uses.</p> <p>If no buffer is bound at a slot, <em>pFirstConstant</em> and <em>pNumConstants</em> are <strong>{{NULL}}</strong> for that slot.</p> <p>Returns nothing</p> <dd> <p>Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of buffers to retrieve (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - <em>StartSlot</em>).</p> </dd> <dd> <p>Array of constant buffer interface references to be returned by the method.</p> </dd> <dd> <p>A reference to an array that receives the offsets into the buffers that <em>ppConstantBuffers</em> specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 2 indicates that the start of the associated constant buffer is 32 bytes into the constant buffer. The runtime sets <em>pFirstConstant</em> to <strong>{{NULL}}</strong> if the buffers do not have offsets.</p> </dd> <dd> <p>A reference to an array that receives the numbers of constants in the buffers that <em>ppConstantBuffers</em> specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the <em>pFirstConstant</em> array. The runtime sets <em>pNumConstants</em> to <strong>{{NULL}}</strong> if it doesn't specify the numbers of constants in each buffer.</p> </dd> <p>Gets the constant buffers that the geometry shader pipeline stage uses.</p> <p>If no buffer is bound at a slot, <em>pFirstConstant</em> and <em>pNumConstants</em> are <strong>{{NULL}}</strong> for that slot.</p> <p>Returns nothing.</p> <dd> <p>Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of buffers to retrieve (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - <em>StartSlot</em>).</p> </dd> <dd> <p>Array of constant buffer interface references to be returned by the method.</p> </dd> <dd> <p>A reference to an array that receives the offsets into the buffers that <em>ppConstantBuffers</em> specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 2 indicates that the start of the associated constant buffer is 32 bytes into the constant buffer. The runtime sets <em>pFirstConstant</em> to <strong>{{NULL}}</strong> if the buffers do not have offsets.</p> </dd> <dd> <p>A reference to an array that receives the numbers of constants in the buffers that <em>ppConstantBuffers</em> specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the <em>pFirstConstant</em> array. The runtime sets <em>pNumConstants</em> to <strong>{{NULL}}</strong> if it doesn't specify the numbers of constants in each buffer.</p> </dd> <p>Gets the constant buffers that the pixel shader pipeline stage uses.</p> <p>If no buffer is bound at a slot, <em>pFirstConstant</em> and <em>pNumConstants</em> are <strong>{{NULL}}</strong> for that slot.</p> <p>Returns nothing.</p> <dd> <p>Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of buffers to retrieve (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - <em>StartSlot</em>).</p> </dd> <dd> <p>Array of constant buffer interface references to be returned by the method.</p> </dd> <dd> <p>A reference to an array that receives the offsets into the buffers that <em>ppConstantBuffers</em> specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 2 indicates that the start of the associated constant buffer is 32 bytes into the constant buffer. The runtime sets <em>pFirstConstant</em> to <strong>{{NULL}}</strong> if the buffers do not have offsets.</p> </dd> <dd> <p>A reference to an array that receives the numbers of constants in the buffers that <em>ppConstantBuffers</em> specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the <em>pFirstConstant</em> array. The runtime sets <em>pNumConstants</em> to <strong>{{NULL}}</strong> if it doesn't specify the numbers of constants in each buffer.</p> </dd> <p>Gets the constant buffers that the compute-shader stage uses.</p> <p>If no buffer is bound at a slot, <em>pFirstConstant</em> and <em>pNumConstants</em> are <strong>{{NULL}}</strong> for that slot.</p> <p>Returns nothing.</p> <dd> <p>Index into the device's zero-based array to begin retrieving constant buffers from (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - 1).</p> </dd> <dd> <p>Number of buffers to retrieve (ranges from 0 to {{D3D11_COMMONSHADER_CONSTANT_BUFFER_API_SLOT_COUNT}} - <em>StartSlot</em>).</p> </dd> <dd> <p>Array of constant buffer interface references to be returned by the method.</p> </dd> <dd> <p>A reference to an array that receives the offsets into the buffers that <em>ppConstantBuffers</em> specifies. Each offset specifies where, from the shader's point of view, each constant buffer starts. Each offset is measured in shader constants, which are 16 bytes (4*32-bit components). Therefore, an offset of 2 indicates that the start of the associated constant buffer is 32 bytes into the constant buffer. The runtime sets <em>pFirstConstant</em> to <strong>{{NULL}}</strong> if the buffers do not have offsets.</p> </dd> <dd> <p>A reference to an array that receives the numbers of constants in the buffers that <em>ppConstantBuffers</em> specifies. Each number specifies the number of constants that are contained in the constant buffer that the shader uses. Each number of constants starts from its respective offset that is specified in the <em>pFirstConstant</em> array. The runtime sets <em>pNumConstants</em> to <strong>{{NULL}}</strong> if it doesn't specify the numbers of constants in each buffer.</p> </dd> <p>Activates the given context state object and changes the current device behavior to Direct3D?11, Direct3D?10.1, or Direct3D?10.</p> <p><strong>SwapDeviceContextState</strong> changes device behavior. This device behavior depends on the emulated interface that you passed to the <em>EmulatedInterface</em> parameter of the <strong>{{ID3D11Device1::CreateDeviceContextState}}</strong> method when you created the context state object. </p><p><strong>SwapDeviceContextState</strong> is not supported on a deferred context.</p><p><strong>SwapDeviceContextState</strong> disables the incompatible device interfaces <strong>{{ID3D10Device}}</strong>, <strong>{{ID3D10Device1}}</strong>, <strong>{{ID3D11Device}}</strong>, and <strong>{{ID3D11Device1}}</strong>. When a context state object is active, the runtime disables certain methods on the device and context interfaces. A context state object that is created with <code>__uuidof({{ID3D11Device1}})</code> or <code>__uuidof({{ID3D11Device}})</code> turns off most of the Direct3D?10 device interfaces. A context state object that is created with <code>__uuidof({{ID3D10Device1}})</code> or <code>__uuidof({{ID3D10Device}})</code> turns off most of the <strong>{{ID3D11DeviceContext}}</strong> methods. For more information about this behavior, see <strong>{{ID3D11Device1::CreateDeviceContextState}}</strong>.</p><p><strong>SwapDeviceContextState</strong> activates the context state object specified by <em>pState</em>. This means that the device behaviors that are associated with the context state object's feature level and compatible interface are activated on the Direct3D device until the next call to <strong>SwapDeviceContextState</strong>. In addition, any state that was saved when this context state object was last active is now reactivated, so that the previous state is replaced.</p><p><strong>SwapDeviceContextState</strong> sets <em>ppPreviousState</em> to the most recently activated context state object. The object allows the caller to save and then later restore the previous device state. This behavior is useful in a plug-in architecture such as Direct2D that shares a Direct3D device with its plug-ins. A Direct2D interface can use context state objects to save and restore the application's state.</p><p>If the caller did not previously call the <strong>{{ID3D11Device1::CreateDeviceContextState}}</strong> method to create a previous context state object, <strong>SwapDeviceContextState</strong> sets <em>ppPreviousState</em> to the default context state object. In either case, usage of <strong>SwapDeviceContextState</strong> is the same.</p><p>The feature level that is specified by the application, and that is chosen by the context state object from the acceptable list that the application supplies to <strong>{{ID3D11Device1::CreateDeviceContextState}}</strong>, controls the feature level of the immediate context whenever the context state object is active. Because the Direct3D?11 device is free-threaded, the device methods cannot query the current immediate context feature level. Instead, the device runs at a feature level that is the maximum of all previously created context state objects' feature levels. This means that the device's feature level can increase dynamically.</p><p>The feature level of the context state object controls the functionality available from the immediate context. However, to maintain the free-threaded contract of the Direct3D?11 device methods?the resource-creation methods in particular?the upper-bound feature level of all created context state objects controls the set of resources that the device creates.</p><p>Because the context state object interface is published by the immediate context, the interface requires the same threading model as the immediate context. Specifically, <strong>SwapDeviceContextState</strong> is single-threaded with respect to the other immediate context methods and with respect to the equivalent methods of <strong>{{ID3D10Device}}</strong>.</p><p>Crucially, because only one of the Direct3D?10 or Direct3D?11 ref-count behaviors can be available at a time, one of the Direct3D?10 and Direct3D?11 interfaces must break its ref-count contract. To avoid this situation, the activation of a context state object turns off the incompatible version interface. Also, if you call a method of an incompatible version interface, the call silently fails if the method has return type <strong>void</strong>, returns an <strong>{{HRESULT}}</strong> value of <strong>{{E_INVALIDARG}}</strong>, or sets any out parameter to <strong>{{NULL}}</strong>.</p><p>When you switch from Direct3D?11 mode to either Direct3D?10 mode or Direct3D?10.1 mode, the binding behavior of the device changes. Specifically, the final release of a resource induces unbind in Direct3D?10 mode or Direct3D?10.1 mode. During final release an application releases all of the resource's references, including indirect references such as the linkage from view to resource, and the linkage from context state object to any of the context state object's bound resources. Any bound resource to which the application has no reference is unbound and destroyed, in order to maintain the Direct3D?10 behavior.</p><p><strong>SwapDeviceContextState</strong> does not affect any state that <strong>{{ID3D11VideoContext}}</strong> sets. </p><p>Command lists that are generated by deferred contexts do not hold a reference to context state objects and are not affected by future updates to context state objects.</p><p>No asynchronous objects are affected by <strong>SwapDeviceContextState</strong>. For example, if a query is active before a call to <strong>SwapDeviceContextState</strong>, it is still active after the call.</p> <p>Returns nothing.</p> <dd> <p>A reference to the <strong>{{ID3DDeviceContextState}}</strong> interface for the context state object that was previously created through the <strong>{{ID3D11Device1::CreateDeviceContextState}}</strong> method. If <strong>SwapDeviceContextState</strong> is called with <em>pState</em> set to <strong>{{NULL}}</strong>, the call has no effect.</p> </dd> <dd> <p>A reference to a variable that receives a reference to the <strong>{{ID3DDeviceContextState}}</strong> interface for the previously-activated context state object.</p> </dd> <p>Sets all the elements in a resource view to one value.</p> <p><strong>ClearView</strong> works only on render-target views ({{RTVs}}), depth/stencil views ({{DSVs}}) on depth-only resources (resources with no stencil component), unordered-access views ({{UAVs}}), or any video view of a <strong>Texture2D</strong> surface. The runtime drops invalid calls. Empty rectangles in the <em>pRect</em> array are a no-op. A rectangle is empty if the top value equals the bottom value or the left value equals the right value.</p><p><strong>ClearView</strong> doesn?t support 3D textures.</p><p><strong>ClearView</strong> applies the same color value to all array slices in a view; all rectangles in the <em>pRect</em> array correspond to each array slice. The <em>pRect</em> array of rectangles is a set of areas to clear on a single surface. If the view is an array, <strong>ClearView</strong> clears all the rectangles on each array slice individually.</p><p>When you apply rectangles to buffers, set the top value to 0 and the bottom value to 1 and set the left value and right value to describe the extent within the buffer. When the top value equals the bottom value or the left value equals the right value, the rectangle is empty and a no-op is achieved.</p><p>The driver converts and clamps color values to the destination format as appropriate per Direct3D conversion rules. For example, if the format of the view is <strong>{{DXGI_FORMAT_R8G8B8A8_UNORM}}</strong>, the driver clamps inputs to 0.0f to 1.0f (+{{INF}} -&gt; 1.0f (0XFF)/NaN -&gt; 0.0f).</p><p>If the format is integer, such as <strong>{{DXGI_FORMAT_R8G8B8A8_UINT}}</strong>, the runtime interprets inputs as integral floats. Therefore, 235.0f maps to 235 (rounds to zero, out of range/{{INF}} values clamp to target range, and NaN to 0).</p><p>Here are the color mappings:</p><ul> <li>Color[0]: R (or Y for video)</li> <li>Color[1]: G (or U/Cb for video)</li> <li>Color[2]: B (or V/Cr for video)</li> <li>Color[3]: A</li> </ul><p>For video views with {{YUV}} or {{YCbBr}} formats, <strong>ClearView</strong> doesn't convert color values. In situations where the format name doesn?t indicate _UNORM, _UINT, and so on, <strong>ClearView</strong> assumes _UINT. Therefore, 235.0f maps to 235 (rounds to zero, out of range/{{INF}} values clamp to target range, and NaN to 0).</p> <p>Returns nothing.</p> <dd> <p>A reference to the <strong>{{ID3D11View}}</strong> interface that represents the resource view to clear.</p> </dd> <dd> <p>A 4-component array that represents the color to use to clear the resource view.</p> </dd> <dd> <p>An array of <strong>{{D3D11_RECT}}</strong> structures for the rectangles in the resource view to clear. If <strong>{{NULL}}</strong>, <strong>ClearView</strong> clears the entire surface.</p> </dd> <dd> <p>Number of rectangles in the array that the <em>pRect</em> parameter specifies.</p> </dd> <p>Discards the specified elements in a resource view from the device context.</p> <p><strong>DiscardView1</strong> informs the graphics processing unit ({{GPU}}) that the existing content in the specified elements in the resource view that <em>pResourceView</em> points to is no longer needed. The view can be an {{SRV}}, {{RTV}}, {{UAV}}, or {{DSV}}. <strong>DiscardView1</strong> is a variation on the <strong>DiscardResource</strong> method. <strong>DiscardView1</strong> allows you to discard elements of a subset of a resource that is in a view (such as elements of a single miplevel). More importantly, <strong>DiscardView1</strong> provides a convenience because often views are what are being bound and unbound at the pipeline. Some pipeline bindings do not have views, such as stream output. In that situation, <strong>DiscardResource</strong> can do the job for any resource. </p> <p>Returns nothing</p> <dd> <p> A reference to the <strong>{{ID3D11View}}</strong> interface for the resource view to discard. The resource that underlies the view must have been created with usage <strong>{{D3D11_USAGE_DEFAULT}}</strong> or <strong>{{D3D11_USAGE_DYNAMIC}}</strong>, otherwise the runtime drops the call to <strong>DiscardView1</strong>; if the debug layer is enabled, the runtime returns an error message. </p> </dd> <dd> <p> An array of <strong>{{D3D11_RECT}}</strong> structures for the rectangles in the resource view to discard. If <strong>{{NULL}}</strong>, <strong>DiscardView1</strong> discards the entire view and behaves the same as <strong>DiscardView</strong>. </p> </dd> <dd> <p> Number of rectangles in the array that the <em>pRects</em> parameter specifies. </p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Provides the video functionality of a Microsoft Direct3D?11 device.</p> <p>To get a reference to this interface, call <strong>QueryInterface</strong> with an <strong>{{ID3D11DeviceContext1}}</strong> interface reference.</p> <p>Submits one or more buffers for decoding.</p> <p>This function does not honor any {{D3D11}} predicate that may have been set. <strong>{{D3D11_QUERY_DATA_PIPELINE_STATISTICS}}</strong> will not include this function for any feature level. </p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an {{HRESULT}} error code.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoDecoder}}</strong> interface. To get this reference, call the <strong>{{ID3D11VideoDevice::CreateVideoDecoder}}</strong> method.</p> </dd> <dd> <p>The number of buffers submitted for decoding.</p> </dd> <dd> <p>A reference to an array of <strong>{{D3D11_VIDEO_DECODER_BUFFER_DESC1}}</strong> structures. The <em>NumBuffers</em> parameter specifies the number of elements in the array. Each element in the array describes a compressed buffer for decoding.</p> </dd> <p>Allows the driver to return {{IHV}} specific information used when initializing the new hardware key.</p> <p>This method returns one of the following error codes.</p><table> <tr><td>{{S_OK}}</td><td>The operation completed successfully.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>There is insufficient memory to complete the operation.</td></tr> </table><p>?</p> <dd> <p>A reference to the {{ID3D11CryptoSession}} interface. To get this reference, call <strong>{{ID3D11VideoDevice1::CreateCryptoSession}}</strong>.</p> </dd> <dd> <p>The size of the memory referenced by the <em>pPrivateInputData</em> parameter.</p> </dd> <dd> <p>The private input data. The contents of this parameter is defined by the implementation of the secure execution environment. It may contain data about the license or about the stream properties.</p> </dd> <dd> <p>A reference to the private output data. The return data is defined by the implementation of the secure execution environment. It may contain graphics-specific data to be associated with the underlying hardware key.</p> </dd> <p>Checks the status of a crypto session.</p> <p>This method returns one of the following error codes.</p><table> <tr><td>{{S_OK}}</td><td>The operation completed successfully.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed or this function was called using an invalid calling pattern.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>There is insufficient memory to complete the operation.</td></tr> </table><p>?</p> <dd> <p>Specifies a <strong>{{ID3D11CryptoSession}}</strong> for which status is checked.</p> </dd> <dd> <p>A {{D3D11_CRYPTO_SESSION_STATUS}} that is populated with the crypto session status upon completion.</p> </dd> <p>Indicates that decoder downsampling will be used and that the driver should allocate the appropriate reference frames. </p> <p>This function can only be called once for a specific <strong>{{ID3D11VideoDecoder}}</strong> interface. This method must be called prior to the first call to <strong>DecoderBeginFrame</strong>. To update the downsampling parameters, use <strong>DecoderUpdateDownsampling</strong>.</p> <p>This method returns one of the following error codes.</p><table> <tr><td>{{S_OK}}</td><td>The operation completed successfully.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed or this function was called using an invalid calling pattern.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>There is insufficient memory to complete the operation.</td></tr> </table><p>?</p> <dd> <p>A reference to the <strong>{{ID3D11VideoDecoder}}</strong> interface.</p> </dd> <dd> <p>The color space information of the reference frame data.</p> </dd> <dd> <p>The resolution, format, and colorspace of the output/display frames. This is the destination resolution and format of the downsample operation.</p> </dd> <dd> <p>The number of reference frames to be used in the operation.</p> </dd> <p>Updates the decoder downsampling parameters.</p> <p>This method can only be called after decode downsampling is enabled by calling <strong>DecoderEnableDownsampling</strong>. This method is only supported if the <strong>{{D3D11_VIDEO_DECODER_CAPS_DOWNSAMPLE_DYNAMIC}}</strong> capability is reported.</p> <p>This method returns one of the following error codes.</p><table> <tr><td>{{S_OK}}</td><td>The operation completed successfully.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed or this function was called using an invalid calling pattern.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>There is insufficient memory to complete the operation.</td></tr> </table><p>?</p> <dd> <p>A reference to the <strong>{{ID3D11VideoDecoder}}</strong> interface.</p> </dd> <dd> <p>The resolution, format, and colorspace of the output/display frames. This is the destination resolution and format of the downsample operation.</p> </dd> <p>Sets the color space information for the video processor output surface.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface.</p> </dd> <dd> <p>A <strong>{{DXGI_COLOR_SPACE_TYPE}}</strong> value that specifies the colorspace for the video processor output surface.</p> </dd> <p>Sets a value indicating whether the output surface from a call to <strong>{{ID3D11VideoContext::VideoProcessorBlt}}</strong> will be read by Direct3D shaders.</p> <p>This method does not return a value.</p> <p>Gets the color space information for the video processor output surface.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface.</p> </dd> <dd> <p>A reference to a <strong>{{DXGI_COLOR_SPACE_TYPE}}</strong> value that indicates the colorspace for the video processor output surface.</p> </dd> <p>Gets a value indicating whether the output surface from a call to <strong>{{ID3D11VideoContext::VideoProcessorBlt}}</strong> can be read by Direct3D shaders.</p> <p>This method does not return a value.</p> <p>Sets the color space information for the video processor input stream.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface.</p> </dd> <dd> <p>An index identifying the input stream.</p> </dd> <dd> <p>A <strong>{{DXGI_COLOR_SPACE_TYPE}}</strong> value that specifies the colorspace for the video processor input stream.</p> </dd> <p>Specifies whether the video processor input stream should be flipped vertically or horizontally.</p> <p>When used in combination, transformations on the processor input stream should be applied in the following order:</p><ul> <li>Rotation</li> <li>Mirroring</li> <li>Source clipping</li> </ul> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface.</p> </dd> <dd> <p>An index identifying the input stream.</p> </dd> <dd> <p>True if mirroring should be enabled; otherwise, false.</p> </dd> <dd> <p>True if the stream should be flipped horizontally; otherwise, false.</p> </dd> <dd> <p>True if the stream should be flipped vertically; otherwise, false.</p> </dd> <p>Gets the color space information for the video processor input stream.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface.</p> </dd> <dd> <p>An index identifying the input stream.</p> </dd> <dd> <p>A reference to a <strong>{{DXGI_COLOR_SPACE_TYPE}}</strong> value that specifies the colorspace for the video processor input stream.</p> </dd> <p>Gets values that indicate whether the video processor input stream is being flipped vertically or horizontally.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{ID3D11VideoProcessor}}</strong> interface.</p> </dd> <dd> <p>An index identifying the input stream.</p> </dd> <dd> <p>A reference to a boolean value indicating whether mirroring is enabled. True if mirroring is enabled; otherwise, false.</p> </dd> <dd> <p>A reference to a boolean value indicating whether the stream is being flipped horizontally. True if the stream is being flipped horizontally; otherwise, false.</p> </dd> <dd> <p>A reference to a boolean value indicating whether the stream is being flipped vertically. True if the stream is being flipped vertically; otherwise, false.</p> </dd> <p>Returns driver hints that indicate which of the video processor operations are best performed using multi-plane overlay hardware rather than <strong>{{ID3D11VideoContext::VideoProcessorBlt}}</strong> method.</p> <p>This method computes the behavior hints using the current state of the video processor as set by the "SetOutput" and "SetStream" methods of <strong>{{ID3D11VideoContext}}</strong> and <strong>{{ID3D11VideoContext1}}</strong>. You must set the proper state before calling this method to ensure that the returned hints contain useful data.</p> <p>This method returns one of the following error codes.</p><table> <tr><td>{{S_OK}}</td><td>The operation completed successfully.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed or this function was called using an invalid calling pattern.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>There is insufficient memory to complete the operation.</td></tr> </table><p>?</p> <p>Provides the video decoding and video processing capabilities of a Microsoft Direct3D?11 device. </p> <p>The Direct3D?11 device supports this interface. To get a reference to this interface, call <strong>QueryInterface</strong> with an <strong>{{ID3D11Device1}}</strong> interface reference.</p> <p>Retrieves optional sizes for private driver data. </p> <p>When <em>pKeyExchangeType</em> is <strong>{{D3D11_KEY_EXCHANGE_HW_PROTECTION}}</strong>, the following behavior is expected in the <strong>{{ID3D11VideoContext::NegotiateCryptoSessionKeyExchange}}</strong> method:</p><ul> <li>The <em>DataSize</em> parameter is set to the size of the <strong>{{D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA}}</strong> structure.</li> <li><em>pData</em> points to a <strong>{{D3D11_KEY_EXCHANGE_HW_PROTECTION_DATA}}</strong> structure. <ul> <li>The <strong>pInputData</strong> of this structure points to a <strong>{{D3D11_KEY_EXCHANGE_HW_PROTECTION_INPUT_DATA}}</strong> structure where:<ul> <li><strong>pbInput</strong>[0] ? <strong>pbInput</strong>[N-1] contains memory reserved for use by the driver. The number of bytes (N) reserved for the driver is determined by the <strong>pPrivateInputSize</strong> value returned by the <strong>{{ID3D11VideoDevice1::GetCryptoSessionPrivateDataSize}}</strong> function.</li> <li><strong>pbInput</strong>[N] contains the first byte of the {{DRM}} command packet.</li> </ul> </li> <li>The <strong>pOutputData</strong> of this structure points to a <strong>{{D3D11_KEY_EXCHANGE_HW_PROTECTION_OUTPUT_DATA}}</strong> structure where:<ul> <li><strong>pbOutput</strong>[0] ? <strong>pbOutput</strong>[N-1] contains memory reserved for use by the driver. The number of bytes (N) reserved for the driver is determined by the <strong>pPrivateOutputSize</strong> value returned by the <strong>{{ID3D11VideoDevice1::GetCryptoSessionPrivateDataSize}}</strong> function.</li> <li><strong>pbOutput</strong>[N] contains the first byte of the {{DRM}} command packet.</li> </ul> </li> </ul> </li> </ul> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an {{HRESULT}} error code.</p> <dd> <p>Indicates the crypto type for which the private input and output size is queried.</p> </dd> <dd> <p>Indicates the decoder profile for which the private input and output size is queried.</p> </dd> <dd> <p>Indicates the key exchange type for which the private input and output size is queried.</p> </dd> <dd> <p>Returns the size of private data that the driver needs for input commands.</p> </dd> <dd> <p>Returns the size of private data that the driver needs for output commands.</p> </dd> <p>Retrieves capabilities and limitations of the video decoder.</p> <p>This method returns one of the following error codes.</p><table> <tr><td>{{S_OK}}</td><td>The operation completed successfully.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed or this function was called using an invalid calling pattern.</td></tr> </table><p>?</p> <dd> <p>The decode profile for which the capabilities are queried.</p> </dd> <dd> <p>The video width for which the capabilities are queried.</p> </dd> <dd> <p>The video height for which the capabilities are queried.</p> </dd> <dd> <p>The frame rate of the video content. This information is used by the driver to determine whether the video can be decoded in real-time.</p> </dd> <dd> <p>The bit rate of the video stream. A value of zero indicates that the bit rate can be ignored.</p> </dd> <dd> <p>The type of cryptography used to encrypt the video stream. A value of {{NULL}} indicates that the video stream is not encrypted.</p> </dd> <dd> <p>A reference to a bitwise {{OR}} combination of <strong>{{D3D11_VIDEO_DECODER_CAPS}}</strong> values specifying the decoder capabilities. </p> </dd> <p>Indicates whether the video decoder supports downsampling with the specified input format, and whether real-time downsampling is supported.</p> <p>You should call <strong>GetVideoDecoderCaps</strong> to determine whether decoder downsampling is supported before checking support for a specific configuration.</p> <p>This method returns one of the following error codes.</p><table> <tr><td>{{S_OK}}</td><td>The operation completed successfully.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed or this function was called using an invalid calling pattern.</td></tr> </table><p>?</p> <dd> <p>An object describing the decoding profile, the resolution, and format of the input stream. This is the resolution and format to be downsampled.</p> </dd> <dd> <p>A <strong>{{DXGI_COLOR_SPACE_TYPE}}</strong> value that specifies the colorspace of the reference frame data.</p> </dd> <dd> <p>The configuration data associated with the decode profile.</p> </dd> <dd> <p>The frame rate of the video content. This is used by the driver to determine whether the video can be decoded in real-time. </p> </dd> <dd> <p>An object describing the resolution, format, and colorspace of the output frames. This is the destination resolution and format of the downsample operation.</p> </dd> <dd> <p>Pointer to a boolean value set by the driver that indicates if downsampling is supported with the specified input data. True if the driver supports the requested downsampling; otherwise, false.</p> </dd> <dd> <p>Pointer to a boolean value set by the driver that indicates if real-time decoding is supported with the specified input data. True if the driver supports the requested real-time decoding; otherwise, false. Note that the returned value is based on the current configuration of the video decoder and does not guarantee that real-time decoding will be supported for future downsampling operations.</p> </dd> <p>Allows the driver to recommend optimal output downsample parameters from the input parameters.</p> <p>You should call <strong>GetVideoDecoderCaps</strong> to determine whether decoder downsampling is supported before checking support for a specific configuration.</p> <p>This method returns one of the following error codes.</p><table> <tr><td>{{S_OK}}</td><td>The operation completed successfully.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed or this function was called using an invalid calling pattern.</td></tr> </table><p>?</p> <dd> <p>A <strong>{{D3D11_VIDEO_DECODER_DESC}}</strong> object describing the decoding profile, the resolution, and format of the input stream. This is the resolution and format to be downsampled.</p> </dd> <dd> <p>A <strong>{{DXGI_COLOR_SPACE_TYPE}}</strong> value that specifies the colorspace of the reference frame data.</p> </dd> <dd> <p>The configuration data associated with the decode profile.</p> </dd> <dd> <p>The frame rate of the video content. This is used by the driver to determine whether the video can be decoded in real-time. </p> </dd> <dd> <p>Pointer to a <strong>{{D3D11_VIDEO_SAMPLE_DESC}}</strong> structure that the driver populates with the recommended output buffer parameters for a downsample operation. The driver will attempt to recommend parameters that can support real-time decoding. If it is unable to do so, the driver will recommend values that are as close to the real-time solution as possible.</p> </dd> <p>Enumerates the video processor capabilities of a Microsoft Direct3D?11 device.</p> <p>To get a reference to this interface, call <strong>{{ID3D11VideoDevice::CreateVideoProcessorEnumerator}}</strong>. </p> <p>Indicates whether the driver supports the specified combination of format and colorspace conversions.</p> <p>This method returns one of the following error codes.</p><table> <tr><td>{{S_OK}}</td><td>The operation completed successfully.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed or this function was called using an invalid calling pattern.</td></tr> </table><p>?</p> <dd> <p>The format of the video processor input.</p> </dd> <dd> <p>The colorspace of the video processor input.</p> </dd> <dd> <p>The format of the video processor output.</p> </dd> <dd> <p>The colorspace of the video processor output.</p> </dd> <dd> <p>Pointer to a boolean that is set by the driver to indicate if the specified combination of format and colorspace conversions is supported. True if the conversion is supported; otherwise, false.</p> </dd> <p>The device interface represents a virtual adapter; it is used to create resources. <strong>{{ID3D11Device1}}</strong> adds new methods to those in <strong>{{ID3D11Device}}</strong>.</p> <p>Gets an immediate context, which can play back command lists.</p> <p><strong>GetImmediateContext1</strong> returns an <strong>{{ID3D11DeviceContext1}}</strong> object that represents an immediate context. You can use this immediate context to perform rendering that you want immediately submitted to a device. For most applications, an immediate context is the primary object that is used to draw your scene.</p><p><strong>GetImmediateContext1</strong> increments the reference count of the immediate context by one. So, call <strong>Release</strong> on the returned interface reference when you are done with it to avoid a memory leak. </p> <p>This method does not return a value.</p> <dd> <p>Upon completion of the method, the passed reference to an <strong>{{ID3D11DeviceContext1}}</strong> interface reference is initialized.</p> </dd> <p> Creates a deferred context, which can record command lists. </p> <p> A deferred context is a thread-safe context that you can use to record graphics commands on a thread other than the main rendering thread. By using a deferred context, you can record graphics commands into a command list that is encapsulated by the <strong>{{ID3D11CommandList}}</strong> interface. After you record all scene items, you can then submit them to the main render thread for final rendering. In this manner, you can perform rendering tasks concurrently across multiple threads and potentially improve performance in multi-core {{CPU}} scenarios. </p><p> You can create multiple deferred contexts. </p><strong>Note</strong>?? If you use the <strong>{{D3D11_CREATE_DEVICE_SINGLETHREADED}}</strong> value to create the device that is represented by <strong>{{ID3D11Device1}}</strong>, the <strong>CreateDeferredContext1</strong> method will fail, and you will not be able to create a deferred context.?<p> For more information about deferred contexts, see Immediate and Deferred Rendering. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p> Returns {{S_OK}} if successful; otherwise, returns one of the following: </p><ul> <li> Returns <strong>{{DXGI_ERROR_DEVICE_REMOVED}}</strong> if the graphics adapter has been physically removed from the computer or a driver upgrade for the graphics adapter has occurred. If this error occurs, you should destroy and re-create the device. </li> <li> Returns <strong>{{DXGI_ERROR_INVALID_CALL}}</strong> if the <strong>CreateDeferredContext1</strong> method cannot be called from the current context. For example, if the device was created with the <strong>{{D3D11_CREATE_DEVICE_SINGLETHREADED}}</strong> value, <strong>CreateDeferredContext1</strong> returns <strong>{{DXGI_ERROR_INVALID_CALL}}</strong>. </li> <li> Returns <strong>{{E_INVALIDARG}}</strong> if the <em>ContextFlags</em> parameter is invalid. </li> <li> Returns <strong>{{E_OUTOFMEMORY}}</strong> if the application has exhausted available memory. </li> </ul> <dd> <p> Reserved for future use. Pass 0. </p> </dd> <dd> <p> Upon completion of the method, the passed reference to an <strong>{{ID3D11DeviceContext1}}</strong> interface reference is initialized. </p> </dd> <p>Creates a blend-state object that encapsulates blend state for the output-merger stage and allows the configuration of logic operations.</p> <p>The logical operations (those that enable bitwise logical operations between pixel shader output and render target contents, refer to <strong>{{D3D11_RENDER_TARGET_BLEND_DESC1}}</strong> ) are only available on certain feature levels; call <strong>CheckFeatureSupport</strong> with {{D3D11_FEATURE_D3D11_OPTIONS}} set, to ensure support by checking the boolean field <em>OutputMergerLogicOp</em> of <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS}}</strong>.</p><p>An app can create up to 4096 unique blend-state objects. For each object created, the runtime checks to see if a previous object has the same state. If such a previous object exists, the runtime will return a reference to previous instance instead of creating a duplicate object.</p> <p>This method returns {{E_OUTOFMEMORY}} if there is insufficient memory to create the blend-state object. See Direct3D 11 Return Codes for other possible return values.</p> <p>Creates a rasterizer state object that informs the rasterizer stage how to behave and forces the sample count while {{UAV}} rendering or rasterizing.</p> <p>An app can create up to 4096 unique rasterizer state objects. For each object created, the runtime checks to see if a previous object has the same state. If such a previous object exists, the runtime will return a reference to previous instance instead of creating a duplicate object.</p> <p>This method returns {{E_OUTOFMEMORY}} if there is insufficient memory to create the rasterizer state object. See Direct3D 11 Return Codes for other possible return values.</p> <p> Creates a context state object that holds all Microsoft Direct3D state and some Direct3D behavior. </p> <p> The <strong>{{REFIID}}</strong> value of the emulated interface is a {{GUID}} obtained by use of the <strong>__uuidof</strong> operator. For example, <code>__uuidof({{ID3D11Device}})</code> gets the {{GUID}} of the interface to a Microsoft Direct3D?11 device. </p><p> Call the <strong>{{ID3D11DeviceContext1::SwapDeviceContextState}}</strong> method to activate the context state object. When the context state object is active, the device behaviors that are associated with both the context state object's feature level and its compatible interface are activated on the Direct3D device until the next call to <strong>SwapDeviceContextState</strong>. </p><p> When a context state object is active, the runtime disables certain methods on the device and context interfaces. For example, a context state object that is created with <code>__uuidof({{ID3D11Device}})</code> will cause the runtime to turn off most of the Microsoft Direct3D?10 device interfaces, and a context state object that is created with <code>__uuidof({{ID3D10Device1}})</code> or <code>__uuidof({{ID3D10Device}})</code> will cause the runtime to turn off most of the <strong>{{ID3D11DeviceContext}}</strong> methods. This behavior ensures that a user of either emulated interface cannot set device state that the other emulated interface is unable to express. This restriction helps guarantee that the <strong>{{ID3D10Device1}}</strong> emulated interface accurately reflects the full state of the pipeline and that the emulated interface will not operate contrary to its original interface definition. </p><p> For example, suppose the tessellation stage is made active through the <strong>{{ID3D11DeviceContext}}</strong> interface when you create the device through <strong>{{D3D11CreateDevice}}</strong> or <strong>{{D3D11CreateDeviceAndSwapChain}}</strong>, instead of through the Direct3D?10 equivalents. Because the Direct3D?11 context is active, a Direct3D?10 interface is inactive when you first retrieve it via <strong>QueryInterface</strong>. This means that you cannot immediately pass a Direct3D?10 interface that you retrieved from a Direct3D?11 device to a function. You must first call <strong>SwapDeviceContextState</strong> to activate a Direct3D?10-compatible context state object. </p><p> The following table shows the methods that are active and inactive for each emulated interface.</p><table> <tr><th> Emulated interface </th><th>Active device or immediate context interfaces </th><th>Inactive device or immediate context interfaces</th></tr> <tr><td> <p> <strong>{{ID3D11Device}}</strong> or </p> <p> <strong>{{ID3D11Device1}}</strong> </p> </td><td> <p> <strong>{{ID3D11Device}}</strong> </p> <p> <strong>{{IDXGIDevice}}</strong> + </p> <p> <strong>{{IDXGIDevice1}}</strong> + </p> <p> <strong>{{IDXGIDevice2}}</strong> </p> <p> <strong>{{ID3D10Multithread}}</strong> </p> </td><td> <strong>{{ID3D10Device}}</strong> </td></tr> <tr><td> <p> <strong>{{ID3D10Device1}}</strong> or </p> <p> <strong>{{ID3D10Device}}</strong> </p> </td><td> <p> <strong>{{ID3D10Device}}</strong> </p> <p> <strong>{{ID3D10Device1}}</strong> </p> <p> <strong>{{IDXGIDevice}}</strong> + </p> <p> <strong>{{IDXGIDevice1}}</strong> </p> <p> <strong>{{ID3D10Multithread}}</strong> </p> </td><td> <p> <strong>{{ID3D11Device}}</strong> </p> <p> <strong>{{ID3D11DeviceContext}}</strong> (As published by the immediate context. The Direct3D?10 or Microsoft Direct3D?10.1 emulated interface has no effect on deferred contexts.) </p> </td></tr> </table><p>?</p><p> The following table shows the immediate context methods that the runtime disables when the indicated context state objects are active.</p><table> <tr><th> Methods of <strong>{{ID3D11DeviceContext}}</strong> when <code>__uuidof({{ID3D10Device1}})</code> or <code>__uuidof({{ID3D10Device}})</code> is active </th><th> Methods of <strong>{{ID3D10Device}}</strong> when <code>__uuidof({{ID3D11Device}})</code> is active </th></tr> <tr><td> <p> <strong>ClearDepthStencilView</strong> </p> </td><td> <p> <strong>ClearDepthStencilView</strong> </p> </td></tr> <tr><td> <p> <strong>ClearRenderTargetView</strong> </p> </td><td> <p> <strong>ClearRenderTargetView</strong> </p> </td></tr> <tr><td> <p> <strong>ClearState</strong> </p> </td><td> <p> <strong>ClearState</strong> </p> </td></tr> <tr><td> <p> <strong>ClearUnorderedAccessViewUint</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>ClearUnorderedAccessViewFloat</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>CopyResource</strong> </p> </td><td> <p> <strong>CopyResource</strong> </p> </td></tr> <tr><td> <p> <strong>CopyStructureCount</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>CopySubresourceRegion</strong> </p> </td><td> <p> <strong>CopySubresourceRegion</strong> </p> </td></tr> <tr><td> <p> <strong>{{CSGetConstantBuffers}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{CSGetSamplers}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{CSGetShader}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{CSGetShaderResources}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{CSGetUnorderedAccessViews}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{CSSetConstantBuffers}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{CSSetSamplers}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{CSSetShader}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{CSSetShaderResources}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{CSSetUnorderedAccessViews}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>Dispatch</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>DispatchIndirect</strong> </p> </td><td></td></tr> <tr><td></td><td> <p> <strong>CreateBlendState</strong> </p> </td></tr> <tr><td> <p> <strong>Draw</strong> </p> </td><td> <p> <strong>Draw</strong> </p> </td></tr> <tr><td> <p> <strong>DrawAuto</strong> </p> </td><td> <p> <strong>DrawAuto</strong> </p> </td></tr> <tr><td> <p> <strong>DrawIndexed</strong> </p> </td><td> <p> <strong>DrawIndexed</strong> </p> </td></tr> <tr><td> <p> <strong>DrawIndexedInstanced</strong> </p> </td><td> <p> <strong>DrawIndexedInstanced</strong> </p> </td></tr> <tr><td> <p> <strong>DrawIndexedInstancedIndirect</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>DrawInstanced</strong> </p> </td><td> <p> <strong>DrawInstanced</strong> </p> </td></tr> <tr><td> <p> <strong>DrawInstancedIndirect</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{DSGetConstantBuffers}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{DSGetSamplers}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{DSGetShader}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{DSGetShaderResources}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{DSSetConstantBuffers}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{DSSetSamplers}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{DSSetShader}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{DSSetShaderResources}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>ExecuteCommandList</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>FinishCommandList</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>Flush</strong> </p> </td><td> <p> <strong>Flush</strong> </p> </td></tr> <tr><td> <p> <strong>GenerateMips</strong> </p> </td><td> <p> <strong>GenerateMips</strong> </p> </td></tr> <tr><td> <p> <strong>GetPredication</strong> </p> </td><td> <p> <strong>GetPredication</strong> </p> </td></tr> <tr><td> <p> <strong>GetResourceMinLOD</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>GetType</strong> </p> </td><td></td></tr> <tr><td></td><td> <p> <strong>GetTextFilterSize</strong> </p> </td></tr> <tr><td> <p> <strong>{{GSGetConstantBuffers}}</strong> </p> </td><td> <p> <strong>{{GSGetConstantBuffers}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{GSGetSamplers}}</strong> </p> </td><td> <p> <strong>{{GSGetSamplers}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{GSGetShader}}</strong> </p> </td><td> <p> <strong>{{GSGetShader}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{GSGetShaderResources}}</strong> </p> </td><td> <p> <strong>{{GSGetShaderResources}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{GSSetConstantBuffers}}</strong> </p> </td><td> <p> <strong>{{GSSetConstantBuffers}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{GSSetSamplers}}</strong> </p> </td><td> <p> <strong>{{GSSetSamplers}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{GSSetShader}}</strong> </p> </td><td> <p> <strong>{{GSSetShader}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{GSSetShaderResources}}</strong> </p> </td><td> <p> <strong>{{GSSetShaderResources}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{HSGetConstantBuffers}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{HSGetSamplers}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{HSGetShader}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{HSGetShaderResources}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{HSSetConstantBuffers}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{HSSetSamplers}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{HSSetShader}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{HSSetShaderResources}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{IAGetIndexBuffer}}</strong> </p> </td><td> <p> <strong>{{IAGetIndexBuffer}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{IAGetInputLayout}}</strong> </p> </td><td> <p> <strong>{{IAGetInputLayout}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{IAGetPrimitiveTopology}}</strong> </p> </td><td> <p> <strong>{{IAGetPrimitiveTopology}}</strong> </p> </td></tr> <tr><td> <strong>{{IAGetVertexBuffers}}</strong> </td><td> <p> <strong>{{IAGetVertexBuffers}}</strong> </p> </td></tr> <tr><td> <strong>{{IASetIndexBuffer}}</strong> </td><td> <p> <strong>{{IASetIndexBuffer}}</strong> </p> </td></tr> <tr><td> <strong>{{IASetInputLayout}}</strong> </td><td> <p> <strong>{{IASetInputLayout}}</strong> </p> </td></tr> <tr><td> <strong>{{IASetPrimitiveTopology}}</strong> </td><td> <p> <strong>{{IASetPrimitiveTopology}}</strong> </p> </td></tr> <tr><td> <strong>{{IASetVertexBuffers}}</strong> </td><td> <p> <strong>{{IASetVertexBuffers}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{OMGetBlendState}}</strong> </p> </td><td> <p> <strong>{{OMGetBlendState}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{OMGetDepthStencilState}}</strong> </p> </td><td> <p> <strong>{{OMGetDepthStencilState}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{OMGetRenderTargets}}</strong> </p> </td><td> <p> <strong>{{OMGetRenderTargets}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{OMGetRenderTargetsAndUnorderedAccessViews}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{OMSetBlendState}}</strong> </p> </td><td> <p> <strong>{{OMSetBlendState}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{OMSetDepthStencilState}}</strong> </p> </td><td> <p> <strong>{{OMSetDepthStencilState}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{OMSetRenderTargets}}</strong> </p> </td><td> <p> <strong>{{OMSetRenderTargets}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{OMSetRenderTargetsAndUnorderedAccessViews}}</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>{{PSGetConstantBuffers}}</strong> </p> </td><td> <p> <strong>{{PSGetConstantBuffers}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{PSGetSamplers}}</strong> </p> </td><td> <p> <strong>{{PSGetSamplers}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{PSGetShader}}</strong> </p> </td><td> <p> <strong>{{PSGetShader}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{PSGetShaderResources}}</strong> </p> </td><td> <p> <strong>{{PSGetShaderResources}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{PSSetConstantBuffers}}</strong> </p> </td><td> <p> <strong>{{PSSetConstantBuffers}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{PSSetSamplers}}</strong> </p> </td><td> <p> <strong>{{PSSetSamplers}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{PSSetShader}}</strong> </p> </td><td> <p> <strong>{{PSSetShader}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{PSSetShaderResources}}</strong> </p> </td><td> <p> <strong>{{PSSetShaderResources}}</strong> </p> </td></tr> <tr><td> <p> <strong>ResolveSubresource</strong> </p> </td><td> <p> <strong>ResolveSubresource</strong> </p> </td></tr> <tr><td> <p> <strong>{{RSGetScissorRects}}</strong> </p> </td><td> <p> <strong>{{RSGetScissorRects}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{RSGetState}}</strong> </p> </td><td> <p> <strong>{{RSGetState}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{RSGetViewports}}</strong> </p> </td><td> <p> <strong>{{RSGetViewports}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{RSSetScissorRects}}</strong> </p> </td><td> <p> <strong>{{RSSetScissorRects}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{RSSetState}}</strong> </p> </td><td> <p> <strong>{{RSSetState}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{RSSetViewports}}</strong> </p> </td><td> <p> <strong>{{RSSetViewports}}</strong> </p> </td></tr> <tr><td> <p> <strong>SetPredication</strong> </p> </td><td> <p> <strong>SetPredication</strong> </p> </td></tr> <tr><td> <p> <strong>SetResourceMinLOD</strong> </p> </td><td></td></tr> <tr><td></td><td> <p> <strong>SetTextFilterSize</strong> </p> </td></tr> <tr><td> <p> <strong>{{SOGetTargets}}</strong> </p> </td><td> <p> <strong>{{SOGetTargets}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{SOSetTargets}}</strong> </p> </td><td> <p> <strong>{{SOSetTargets}}</strong> </p> </td></tr> <tr><td> <p> <strong>UpdateSubresource</strong> </p> </td><td> <p> <strong>UpdateSubresource</strong> </p> </td></tr> <tr><td> <p> <strong>{{VSGetConstantBuffers}}</strong> </p> </td><td> <p> <strong>{{VSGetConstantBuffers}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{VSGetSamplers}}</strong> </p> </td><td> <p> <strong>{{VSGetSamplers}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{VSGetShader}}</strong> </p> </td><td> <p> <strong>{{VSGetShader}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{VSGetShaderResources}}</strong> </p> </td><td> <p> <strong>{{VSGetShaderResources}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{VSSetConstantBuffers}}</strong> </p> </td><td> <p> <strong>{{VSSetConstantBuffers}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{VSSetSamplers}}</strong> </p> </td><td> <p> <strong>{{VSSetSamplers}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{VSSetShader}}</strong> </p> </td><td> <p> <strong>{{VSSetShader}}</strong> </p> </td></tr> <tr><td> <p> <strong>{{VSSetShaderResources}}</strong> </p> </td><td> <p> <strong>{{VSSetShaderResources}}</strong> </p> </td></tr> </table><p>?</p><p> The following table shows the immediate context methods that the runtime does not disable when the indicated context state objects are active.</p><table> <tr><th> Methods of <strong>{{ID3D11DeviceContext}}</strong> when <code>__uuidof({{ID3D10Device1}})</code> or <code>__uuidof({{ID3D10Device}})</code> is active </th><th> Methods of <strong>{{ID3D10Device}}</strong> when <code>__uuidof({{ID3D11Device}})</code> is active </th></tr> <tr><td> <p> <strong>Begin</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>End</strong> </p> </td><td></td></tr> <tr><td></td><td> <p> <strong>GetCreationFlags</strong> </p> </td></tr> <tr><td></td><td> <p> <strong>GetPrivateData</strong> </p> </td></tr> <tr><td> <p> <strong>GetContextFlags</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>GetData</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>Map</strong> </p> </td><td></td></tr> <tr><td> <p> <strong>Unmap</strong> </p> </td><td></td></tr> </table><p>?</p><p> The following table shows the <strong>{{ID3D10Device}}</strong> interface methods that the runtime does not disable because they are not immediate context methods.</p><table> <tr><th> Methods of <strong>{{ID3D10Device}}</strong> </th></tr> <tr><td> <p> <strong>CheckCounter</strong> </p> </td></tr> <tr><td> <p> <strong>CheckCounterInfo</strong> </p> </td></tr> <tr><td> <p> Create*, like <strong>CreateQuery</strong> </p> </td></tr> <tr><td> <p> <strong>GetDeviceRemovedReason</strong> </p> </td></tr> <tr><td> <p> <strong>GetExceptionMode</strong> </p> </td></tr> <tr><td> <p> <strong>OpenSharedResource</strong> </p> </td></tr> <tr><td> <p> <strong>SetExceptionMode</strong> </p> </td></tr> <tr><td> <p> <strong>SetPrivateData</strong> </p> </td></tr> <tr><td> <p> <strong>SetPrivateDataInterface</strong> </p> </td></tr> </table><p>?</p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p> This method returns one of the Direct3D 11 Return Codes. </p> <dd> <p> A combination of <strong>{{D3D11_1_CREATE_DEVICE_CONTEXT_STATE_FLAG}}</strong> values that are combined by using a bitwise <strong>{{OR}}</strong> operation. The resulting value specifies how to create the context state object. The <strong>{{D3D11_1_CREATE_DEVICE_CONTEXT_STATE_SINGLETHREADED}}</strong> flag is currently the only defined flag. If the original device was created with <strong>{{D3D11_CREATE_DEVICE_SINGLETHREADED}}</strong>, you must create all context state objects from that device with the <strong>{{D3D11_1_CREATE_DEVICE_CONTEXT_STATE_SINGLETHREADED}}</strong> flag. </p> <p></p> <p>If you set the single-threaded flag for both the context state object and the device, you guarantee that you will call the whole set of context methods and device methods only from one thread. You therefore do not need to use critical sections to synchronize access to the device context, and the runtime can avoid working with those processor-intensive critical sections.</p> </dd> <dd> <p> A reference to an array of <strong>{{D3D_FEATURE_LEVEL}}</strong> values. The array can contain elements from the following list and determines the order of feature levels for which creation is attempted. Unlike <strong>{{D3D11CreateDevice}}</strong>, you can't set <em>pFeatureLevels</em> to <strong>{{NULL}}</strong> because there is no default feature level array. </p> <pre>{ {{D3D_FEATURE_LEVEL_11_1}}, {{D3D_FEATURE_LEVEL_11_0}}, {{D3D_FEATURE_LEVEL_10_1}}, {{D3D_FEATURE_LEVEL_10_0}}, {{D3D_FEATURE_LEVEL_9_3}}, {{D3D_FEATURE_LEVEL_9_2}}, {{D3D_FEATURE_LEVEL_9_1}}, }; </pre> </dd> <dd> <p> The number of elements in <em>pFeatureLevels</em>. Unlike <strong>{{D3D11CreateDevice}}</strong>, you must set <em>FeatureLevels</em> to greater than 0 because you can't set <em>pFeatureLevels</em> to <strong>{{NULL}}</strong>. </p> </dd> <dd> <p> The {{SDK}} version. You must set this parameter to <strong>{{D3D11_SDK_VERSION}}</strong>. </p> </dd> <dd> <p> The globally unique identifier ({{GUID}}) for the emulated interface. This value specifies the behavior of the device when the context state object is active. Valid values are obtained by using the <strong>__uuidof</strong> operator on the <strong>{{ID3D10Device}}</strong>, <strong>{{ID3D10Device1}}</strong>, <strong>{{ID3D11Device}}</strong>, and <strong>{{ID3D11Device1}}</strong> interfaces. See Remarks. </p> </dd> <dd> <p> A reference to a variable that receives a <strong>{{D3D_FEATURE_LEVEL}}</strong> value from the <em>pFeatureLevels</em> array. This is the first array value with which <strong>CreateDeviceContextState</strong> succeeded in creating the context state object. If the call to <strong>CreateDeviceContextState</strong> fails, the variable pointed to by <em>pChosenFeatureLevel</em> is set to zero. </p> </dd> <dd> <p> The address of a reference to an <strong>{{ID3DDeviceContextState}}</strong> object that represents the state of a Direct3D device. </p> </dd> <p>Give a device access to a shared resource created on a different device.</p> <p>The {{REFIID}}, or {{GUID}}, of the interface to the resource can be obtained by using the __uuidof() macro. For example, __uuidof({{ID3D11Buffer}}) will get the {{GUID}} of the interface to a buffer resource.</p><p>The unique handle of the resource is obtained differently depending on the type of device that originally created the resource.</p><p>To share a resource between two Direct3D 11 devices the resource must have been created with the <strong>{{D3D11_RESOURCE_MISC_SHARED}}</strong> flag, if it was created using the {{ID3D11Device}} interface. If it was created using a {{DXGI}} device interface, then the resource is always shared.</p><p>The {{REFIID}}, or {{GUID}}, of the interface to the resource can be obtained by using the __uuidof() macro. For example, __uuidof({{ID3D11Buffer}}) will get the {{GUID}} of the interface to a buffer resource.</p><p>When sharing a resource between two Direct3D 10/11 devices the unique handle of the resource can be obtained by querying the resource for the <strong>{{IDXGIResource}}</strong> interface and then calling <strong>GetSharedHandle</strong>.</p><pre> {{IDXGIResource}}* pOtherResource({{NULL}}); hr = pOtherDeviceResource-&gt;QueryInterface( __uuidof({{IDXGIResource}}), (void**)&amp;pOtherResource ); {{HANDLE}} sharedHandle; pOtherResource-&gt;GetSharedHandle(&amp;sharedHandle); </pre><p>The only resources that can be shared are 2D non-mipmapped textures.</p><p>To share a resource between a Direct3D 9 device and a Direct3D 11 device the texture must have been created using the <em>pSharedHandle</em> argument of <strong>CreateTexture</strong>. The shared Direct3D 9 handle is then passed to OpenSharedResource in the <em>hResource</em> argument.</p><p>The following code illustrates the method calls involved.</p><pre> sharedHandle = {{NULL}}; // must be set to {{NULL}} to create, can use a valid handle here to open in {{D3D9}} pDevice9-&gt;CreateTexture(..., pTex2D_9, &amp;sharedHandle); ... pDevice11-&gt;OpenSharedResource(sharedHandle, __uuidof({{ID3D11Resource}}), (void**)(&amp;tempResource11)); tempResource11-&gt;QueryInterface(__uuidof({{ID3D11Texture2D}}), (void**)(&amp;pTex2D_11)); tempResource11-&gt;Release(); // now use pTex2D_11 with pDevice11 </pre><p>Textures being shared from {{D3D9}} to {{D3D11}} have the following restrictions.</p><ul> <li>Textures must be 2D</li> <li>Only 1 mip level is allowed</li> <li>Texture must have default usage</li> <li>Texture must be write only</li> <li>{{MSAA}} textures are not allowed</li> <li>Bind flags must have {{SHADER_RESOURCE}} and {{RENDER_TARGET}} set</li> <li>Only {{R10G10B10A2_UNORM}}, {{R16G16B16A16_FLOAT}} and {{R8G8B8A8_UNORM}} formats are allowed</li> </ul><p>If a shared texture is updated on one device <strong>{{ID3D11DeviceContext::Flush}}</strong> must be called on that device.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A resource handle. See remarks.</p> </dd> <dd> <p>The globally unique identifier ({{GUID}}) for the resource interface. See remarks.</p> </dd> <dd> <p>Address of a reference to the resource we are gaining access to.</p> </dd> <p>Gives a device access to a shared resource that is referenced by name and that was created on a different device. You must have previously created the resource as shared and specified that it uses {{NT}} handles (that is, you set the <strong>{{D3D11_RESOURCE_MISC_SHARED_NTHANDLE}}</strong> flag).</p> <p>The behavior of <strong>OpenSharedResourceByName</strong> is similar to the behavior of the <strong>{{ID3D11Device1::OpenSharedResource1}}</strong> method; each call to <strong>OpenSharedResourceByName</strong> to access a resource creates a new resource object. In other words, if you call <strong>OpenSharedResourceByName</strong> twice and pass the same resource name to <em>lpName</em>, you receive two resource objects with different <strong>{{IUnknown}}</strong> references.</p><p><strong>To share a resource between two devices</strong></p><ol> <li>Create the resource as shared and specify that it uses {{NT}} handles, by setting the <strong>{{D3D11_RESOURCE_MISC_SHARED_NTHANDLE}}</strong> flag.</li> <li>Obtain the {{REFIID}}, or {{GUID}}, of the interface to the resource by using the __uuidof() macro. For example, __uuidof(<strong>{{ID3D11Texture2D}}</strong>) retrieves the {{GUID}} of the interface to a 2D texture.</li> <li>Query the resource for the <strong>{{IDXGIResource1}}</strong> interface.</li> <li>Call the <strong>{{IDXGIResource1::CreateSharedHandle}}</strong> method to obtain the unique handle to the resource. In this <strong>{{IDXGIResource1::CreateSharedHandle}}</strong> call, you must pass a name for the resource if you want to subsequently call <strong>OpenSharedResourceByName</strong> to access the resource by name. </li> </ol> <p>This method returns one of the Direct3D 11 return codes. This method also returns {{E_ACCESSDENIED}} if the permissions to access the resource aren't valid.</p><p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>OpenSharedResourceByName</strong> fails with {{E_NOTIMPL}} because {{NTHANDLES}} are used. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <p>The <strong>{{ID3DUserDefinedAnnotation}}</strong> interface enables an application to describe conceptual sections and markers within the application's code flow. An appropriately enabled tool, such as Microsoft Visual Studio Ultimate?2012, can display these sections and markers visually along the tool's Microsoft Direct3D time line, while the tool debugs the application. These visual notes allow users of such a tool to navigate to parts of the time line that are of interest, or to understand what set of Direct3D calls are produced by certain sections of the application's code.</p> <p>The methods of <strong>{{ID3DUserDefinedAnnotation}}</strong> have no effect when the calling application is not running under a Direct3D-specific profiling tool like Visual Studio Ultimate?2012. </p><p>The <strong>{{ID3DUserDefinedAnnotation}}</strong> interface is published by Microsoft Direct3D?11 device contexts. Therefore, <strong>{{ID3DUserDefinedAnnotation}}</strong> has the same threading rules as the <strong>{{ID3D11DeviceContext}}</strong> interface, or any other context interface. For more information about Direct3D threading, see MultiThreading. To retrieve the <strong>{{ID3DUserDefinedAnnotation}}</strong> interface for the context, call the <strong>QueryInterface</strong> method for the context (for example, <strong>{{ID3D11DeviceContext::QueryInterface}}</strong>). In this call, you must pass the identifier of <strong>{{ID3DUserDefinedAnnotation}}</strong>. </p><p>The <strong>{{ID3DUserDefinedAnnotation}}</strong> interface is the Microsoft Direct3D?10 and later equivalent of the Direct3D 9 {{PIX}} functions ({{D3DPERF_}}* functions).</p><strong>Note</strong>??Setting the <strong>{{D3D11_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY}}</strong> flag in your app replaces calling {{D3DPerf_SetOptions}}(1). But, to prevent Direct3D debugging tools from hooking your app, your app can also call <strong>{{ID3DUserDefinedAnnotation::GetStatus}}</strong> to determine whether it is running under a Direct3D debugging tool and then exit accordingly.?<p>You must call the <strong>BeginEvent</strong> and <strong>EndEvent</strong> methods in pairs; pairs of calls to these methods can nest within pairs of calls to these methods at a higher level in the application's call stack. In other words, a "Draw World" section can entirely contain another section named "Draw Trees," which can in turn entirely contain a section called "Draw Oaks." You can only associate an <strong>EndEvent</strong> method with the most recent <strong>BeginEvent</strong> method, that is, pairs cannot overlap. You cannot call an <strong>EndEvent</strong> for any <strong>BeginEvent</strong> that preceded the most recent <strong>BeginEvent</strong>. In fact, the runtime interprets the first <strong>EndEvent</strong> as ending the second <strong>BeginEvent</strong>.</p> <p>Marks the beginning of a section of event code.</p> <p>You call the <strong>EndEvent</strong> method to mark the end of the section of event code.</p><p>A user can visualize the event when the calling application is running under an enabled Direct3D profiling tool such as Microsoft Visual Studio Ultimate?2012.</p><p><strong>BeginEvent</strong> has no effect if the calling application is not running under an enabled Direct3D profiling tool.</p> <p>Returns the number of previous calls to <strong>BeginEvent</strong> that have not yet been finalized by calls to the <strong>{{ID3DUserDefinedAnnotation::EndEvent}}</strong> method.</p><p>The return value is ?1 if the calling application is not running under a Direct3D profiling tool.</p> <dd> <p>A <strong>{{NULL}}</strong>-terminated <strong>{{UNICODE}}</strong> string that contains the name of the event. The name is not relevant to the operating system. You can choose a name that is meaningful when the calling application is running under the Direct3D profiling tool. A <strong>{{NULL}}</strong> reference produces undefined results.</p> </dd> <p>Marks the end of a section of event code.</p> <p>You call the <strong>BeginEvent</strong> method to mark the beginning of the section of event code.</p><p>A user can visualize the event when the calling application is running under an enabled Direct3D profiling tool such as Microsoft Visual Studio Ultimate?2012.</p><p><strong>EndEvent</strong> has no effect if the calling application is not running under an enabled Direct3D profiling tool.</p> <p>Returns the number of previous calls to the <strong>{{ID3DUserDefinedAnnotation::BeginEvent}}</strong> method that have not yet been finalized by calls to <strong>EndEvent</strong>.</p><p>The return value is ?1 if the calling application is not running under a Direct3D profiling tool.</p> <p>Marks a single point of execution in code.</p> <p>A user can visualize the marker when the calling application is running under an enabled Direct3D profiling tool such as Microsoft Visual Studio Ultimate?2012.</p><p><strong>SetMarker</strong> has no effect if the calling application is not running under an enabled Direct3D profiling tool.</p> <p>This method returns no values.</p> <dd> <p>A <strong>{{NULL}}</strong>-terminated <strong>{{UNICODE}}</strong> string that contains the name of the marker. The name is not relevant to the operating system. You can choose a name that is meaningful when the calling application is running under the Direct3D profiling tool. A <strong>{{NULL}}</strong> reference produces undefined results.</p> </dd> <p>Determines whether the calling application is running under a Microsoft Direct3D profiling tool.</p> <p>You can call <strong>GetStatus</strong> to determine whether your application is running under a Direct3D profiling tool before you make further calls to other methods of the <strong>{{ID3DUserDefinedAnnotation}}</strong> interface. For example, the <strong>{{ID3DUserDefinedAnnotation::BeginEvent}}</strong> and <strong>{{ID3DUserDefinedAnnotation::EndEvent}}</strong> methods have no effect if the calling application is not running under an enabled Direct3D profiling tool. Therefore, you do not need to call these methods unless your application is running under a Direct3D profiling tool.</p> <p>The return value is nonzero if the calling application is running under a Direct3D profiling tool such as Visual Studio Ultimate?2012, and zero otherwise.</p> <p>Identifies how to perform a tile-mapping operation.</p> <dd> <p>Indicates that no overwriting of tiles occurs in the tile-mapping operation.</p> </dd> <p>Specifies a range of tile mappings to use with <strong>{{ID3D11DeviceContext2::UpdateTiles}}</strong>.</p> <p>Identifies how to check multisample quality levels.</p> <dd> <p>Indicates to check the multisample quality levels of a tiled resource.</p> </dd> <p>Identifies how to copy a tile.</p> <dd> <p>Indicates that the {{GPU}} isn't currently referencing any of the portions of destination memory being written. </p> </dd> <dd> <p>Indicates that the <strong>{{ID3D11DeviceContext2::CopyTiles}}</strong> operation involves copying a linear buffer to a swizzled tiled resource. This means to copy tile data from the specified buffer location, reading tiles sequentially, to the specified tile region (in x,y,z order if the region is a box), swizzling to optimal hardware memory layout as needed. In this <strong>{{ID3D11DeviceContext2::CopyTiles}}</strong> call, you specify the source data with the <em>pBuffer</em> parameter and the destination with the <em>pTiledResource</em> parameter. </p> </dd> <dd> <p>Indicates that the <strong>{{ID3D11DeviceContext2::CopyTiles}}</strong> operation involves copying a swizzled tiled resource to a linear buffer. This means to copy tile data from the tile region, reading tiles sequentially (in x,y,z order if the region is a box), to the specified buffer location, deswizzling to linear memory layout as needed. In this <strong>{{ID3D11DeviceContext2::CopyTiles}}</strong> call, you specify the source data with the <em>pTiledResource</em> parameter and the destination with the <em>pBuffer</em> parameter. </p> </dd> <p>Describes the coordinates of a tiled resource.</p> <dd> <p>The x position of a tiled resource. Used for buffer and 1D, 2D, and 3D textures.</p> </dd> <dd> <p>The y position of a tiled resource. Used for 2D and 3D textures.</p> </dd> <dd> <p>The z position of a tiled resource. Used for 3D textures.</p> </dd> <dd> <p>A subresource index value into mipmaps and arrays. Used for 1D, 2D, and 3D textures. </p> <p>For mipmaps that use nonstandard tiling, or are packed, or both use nonstandard tiling and are packed, any subresource value that indicates any of the packed mipmaps all refer to the same tile.</p> </dd> <p>Describes the size of a tiled region.</p> <dd> <p>The number of tiles in the tiled region.</p> </dd> <dd> <p>Specifies whether the runtime uses the <strong>Width</strong>, <strong>Height</strong>, and <strong>Depth</strong> members to define the region. </p> <p>If <strong>{{TRUE}}</strong>, the runtime uses the <strong>Width</strong>, <strong>Height</strong>, and <strong>Depth</strong> members to define the region. </p> <p>If <strong>{{FALSE}}</strong>, the runtime ignores the <strong>Width</strong>, <strong>Height</strong>, and <strong>Depth</strong> members and uses the <strong>NumTiles</strong> member to traverse tiles in the resource linearly across x, then y, then z (as applicable) and then spills over mipmaps/arrays in subresource order. For example, use this technique to map an entire resource at once.</p> <p>Regardless of whether you specify <strong>{{TRUE}}</strong> or <strong>{{FALSE}}</strong> for <strong>bUseBox</strong>, you use a <strong>{{D3D11_TILED_RESOURCE_COORDINATE}}</strong> structure to specify the starting location for the region within the resource as a separate parameter outside of this structure by using x, y, and z coordinates. </p> <p>When the region includes mipmaps that are packed with nonstandard tiling, <strong>bUseBox</strong> must be <strong>{{FALSE}}</strong> because tile dimensions are not standard and the app only knows a count of how many tiles are consumed by the packed area, which is per array slice. The corresponding (separate) starting location parameter uses x to offset into the flat range of tiles in this case, and y and z coordinates must each be 0.</p> </dd> <dd> <p>The width of the tiled region, in tiles. Used for buffer and 1D, 2D, and 3D textures. </p> </dd> <dd> <p>The height of the tiled region, in tiles. Used for 2D and 3D textures. </p> </dd> <dd> <p>The depth of the tiled region, in tiles. Used for 3D textures or arrays. For arrays, used for advancing in depth jumps to next slice of same mipmap size, which isn't contiguous in the subresource counting space if there are multiple mipmaps.</p> </dd> <p>Describes a tiled subresource volume.</p> <p>Each packed mipmap is individually reported as 0 for <strong>WidthInTiles</strong>, <strong>HeightInTiles</strong> and <strong>DepthInTiles</strong>. </p><p>The total number of tiles in subresources is <strong>WidthInTiles</strong>*<strong>HeightInTiles</strong>*<strong>DepthInTiles</strong>. </p> <dd> <p>The width in tiles of the subresource.</p> </dd> <dd> <p>The height in tiles of the subresource.</p> </dd> <dd> <p>The depth in tiles of the subresource.</p> </dd> <dd> <p>The index of the tile in the overall tiled subresource to start with. </p> <p> <strong>GetResourceTiling</strong> sets <strong>StartTileIndexInOverallResource</strong> to <strong>{{D3D11_PACKED_TILE}}</strong> (0xffffffff) to indicate that the whole <strong>{{D3D11_SUBRESOURCE_TILING}}</strong> structure is meaningless, and the info to which the <em>pPackedMipDesc</em> parameter of <strong>GetResourceTiling</strong> points applies. For packed tiles, the description of the packed mipmaps comes from a <strong>{{D3D11_PACKED_MIP_DESC}}</strong> structure instead. </p> </dd> <p>Describes the shape of a tile by specifying its dimensions.</p> <p>Texels are equivalent to pixels. For untyped buffer resources, a texel is just a byte. For multisample antialiasing ({{MSAA}}) surfaces, the numbers are still in terms of pixels/texels. The values here are independent of the surface dimensions. Even if the surface is smaller than what would fit in a tile, the full tile dimensions are reported here. </p> <dd> <p>The width in texels of the tile.</p> </dd> <dd> <p>The height in texels of the tile.</p> </dd> <dd> <p>The depth in texels of the tile.</p> </dd> <p>Describes the tile structure of a tiled resource with mipmaps. </p> <dd> <p>Number of standard mipmaps in the tiled resource. </p> </dd> <dd> <p>Number of packed mipmaps in the tiled resource. </p> <p>This number starts from the least detailed mipmap (either sharing tiles or using non standard tile layout). This number is 0 if no such packing is in the resource. For array surfaces, this value is the number of mipmaps that are packed for a given array slice where each array slice repeats the same packing. </p> <p>On Tier_2 tiled resources hardware, mipmaps that fill at least one standard shaped tile in all dimensions are not allowed to be included in the set of packed mipmaps. On Tier_1 hardware, mipmaps that are an integer multiple of one standard shaped tile in all dimensions are not allowed to be included in the set of packed mipmaps. Mipmaps with at least one dimension less than the standard tile shape may or may not be packed. When a given mipmap needs to be packed, all coarser mipmaps for a given array slice are considered packed as well. </p> </dd> <dd> <p>Number of tiles for the packed mipmaps in the tiled resource. </p> <p>If there is no packing, this value is meaningless and is set to 0. Otherwise, it is set to the number of tiles that are needed to represent the set of packed mipmaps. The pixel layout within the packed mipmaps is hardware specific. If apps define only partial mappings for the set of tiles in packed mipmaps, read and write behavior is vendor specific and undefined. For arrays, this value is only the count of packed mipmaps within the subresources for each array slice.</p> </dd> <dd> <p>Offset of the first packed tile for the resource in the overall range of tiles. If <strong>NumPackedMips</strong> is 0, this value is meaningless and is 0. Otherwise, it is the offset of the first packed tile for the resource in the overall range of tiles for the resource. A value of 0 for <strong>StartTileIndexInOverallResource</strong> means the entire resource is packed. For array surfaces, this is the offset for the tiles that contain the packed mipmaps for the first array slice. Packed mipmaps for each array slice in arrayed surfaces are at this offset past the beginning of the tiles for each array slice. </p> <strong>Note</strong>??The number of overall tiles, packed or not, for a given array slice is simply the total number of tiles for the resource divided by the resource's array size, so it is easy to locate the range of tiles for any given array slice, out of which <strong>StartTileIndexInOverallResource</strong> identifies which of those are packed. ? </dd> <p>The device context interface represents a device context; it is used to render commands. <strong>{{ID3D11DeviceContext2}}</strong> adds new methods to those in <strong>{{ID3D11DeviceContext1}}</strong>.</p> <p>Updates mappings of tile locations in tiled resources to memory locations in a tile pool.</p> <p>In a single call to <strong>UpdateTileMappings</strong>, you can map one or more ranges of resource tiles to one or more ranges of tile-pool tiles. </p><p>You can organize the parameters of <strong>UpdateTileMappings</strong> in these ways to perform an update:</p><ul> <li><strong>Tiled resource whose mappings are updated.</strong> This is a resource that was created with the <strong>{{D3D11_RESOURCE_MISC_TILED}}</strong> flag. Mappings start off all {{NULL}} when a resource is initially created.</li> <li><strong>Set of tile regions on the tiled resource whose mappings are updated.</strong> You can make one <strong>UpdateTileMappings</strong> call to update many mappings or multiple calls with a bit more {{API}} call overhead as well if that is more convenient. <em>NumTiledResourceRegions</em> specifies how many regions there are, <em>pTiledResourceRegionStartCoordinates</em> and <em>pTiledResourceRegionSizes</em> are each arrays that identify the start location and extend of each region. If <em>NumTiledResourceRegions</em> is 1, for convenience either or both of the arrays that describe the regions can be {{NULL}}. {{NULL}} for <em>pTiledResourceRegionStartCoordinates</em> means the start coordinate is all 0s, and {{NULL}} for <em>pTiledResourceRegionSizes</em> identifies a default region that is the full set of tiles for the entire tiled resource, including all mipmaps, array slices, or both. <p>If <em>pTiledResourceRegionStartCoordinates</em> isn't {{NULL}} and <em>pTiledResourceRegionSizes</em> is {{NULL}}, the region size defaults to 1 tile for all regions. This makes it easy to define mappings for a set of individual tiles each at disparate locations by providing an array of locations in <em>pTiledResourceRegionStartCoordinates</em> without having to send an array of <em>pTiledResourceRegionSizes</em> all set to 1.</p> <p>The updates are applied from first region to last; so, if regions overlap in a single call, the updates later in the list overwrite the areas that overlap with previous updates.</p> </li> <li><strong>Tile pool that provides memory where tile mappings can go.</strong> A tiled resource can point to a single tile pool at a time. If a new tile pool is specified (for the first time or different from the last time a tile pool was specified), all existing tile mappings for the tiled resource are cleared and the new set of mappings in the current <strong>UpdateTileMappings</strong> call are applied for the new tile pool. If no tile pool is specified ({{NULL}}) or the same tile pool as a previous <strong>UpdateTileMappings</strong> call is provided, the <strong>UpdateTileMappings</strong> call just adds the new mappings to existing ones (overwriting on overlap). If <strong>UpdateTileMappings</strong> only defines {{NULL}} mappings, you don't need to specify a tile pool because it is irrelevant. But if you specify a tile pool anyway, it takes the same behavior as previously described when providing a tile pool. </li> <li><strong>Set of tile ranges where mappings are going.</strong> Each given tile range can specify one of a few types of ranges: a range of tiles in a tile pool (default), a count of tiles in the tiled resource to map to a single tile in a tile pool (sharing the tile), a count of tile mappings in the tiled resource to skip and leave as they are, or a count of tiles in the tile pool to map to {{NULL}}.<p><em>NumRanges</em> specifies the number of tile ranges, where the total tiles identified across all ranges must match the total number of tiles in the tile regions from the previously described tiled resource. Mappings are defined by iterating through the tiles in the tile regions in sequential order - x then y then z order for box regions - while walking through the set of tile ranges in sequential order. The breakdown of tile regions doesn't have to line up with the breakdown of tile ranges, but the total number of tiles on both sides must be equal so that each tiled resource tile specified has a mapping specified.</p> <p><em>pRangeFlags</em>, <em>pTilePoolStartOffsets</em>, and <em>pRangeTileCounts</em> are all arrays, of size <em>NumRanges</em>, that describe the tile ranges. If <em>pRangeFlags</em> is {{NULL}}, all ranges are sequential tiles in the tile pool; otherwise, for each range i, pRangeFlags[i] identifies how the mappings in that range of tiles work:</p> <ul> <li>If pRangeFlags[i] is 0, that range defines sequential tiles in the tile pool, with the number of tiles being pRangeTileCounts[i] and the starting location pTilePoolStartOffsets[i]. If <em>NumRanges</em> is 1, <em>pRangeTileCounts</em> can be {{NULL}} and defaults to the total number of tiles specified by all the tile regions.</li> <li>If pRangeFlags[i] is <strong>{{D3D11_TILE_RANGE_REUSE_SINGLE_TILE}}</strong>, pTilePoolStartOffsets[i] identifies the single tile in the tile pool to map to, and pRangeTileCounts[i] specifies how many tiles from the tile regions to map to that tile pool location. If <em>NumRanges</em> is 1, <em>pRangeTileCounts</em> can be {{NULL}} and defaults to the total number of tiles specified by all the tile regions.</li> <li>If pRangeFlags[i] is <strong>{{D3D11_TILE_RANGE_NULL}}</strong>, pRangeTileCounts[i] specifies how many tiles from the tile regions to map to {{NULL}}. If <em>NumRanges</em> is 1, <em>pRangeTileCounts</em> can be {{NULL}} and defaults to the total number of tiles specified by all the tile regions. pTilePoolStartOffsets[i] is ignored for {{NULL}} mappings. </li> <li>If pRangeFlags[i] is <strong>{{D3D11_TILE_RANGE_SKIP}}</strong>, pRangeTileCounts[i] specifies how many tiles from the tile regions to skip over and leave existing mappings unchanged for. This can be useful if a tile region conveniently bounds an area of tile mappings to update except with some exceptions that need to be left the same as whatever they were mapped to before. pTilePoolStartOffsets[i] is ignored for {{SKIP}} mappings.</li> </ul> </li> <li><strong>Flags parameter for overall options.</strong> <strong>{{D3D11_TILE_MAPPING_NO_OVERWRITE}}</strong> means the caller promises that previously submitted commands to the device that may still be executing do not reference any of the tile region being updated. This allows the device to avoid having to flush previously submitted work in order to do the tile mapping update. If the app violates this promise by updating tile mappings for locations in tiled resources still being referenced by outstanding commands, undefined rendering behavior results, which includes the potential for significant slowdowns on some architectures. This is like the "no overwrite" concept that exists elsewhere in the Direct3D {{API}}, except applied to tile mapping data structure itself, which in hardware is a page table. The absence of this flag requires that tile mapping updates specified by this <strong>UpdateTileMappings</strong> call must be completed before any subsequent Direct3D command can proceed.</li> </ul><p>If tile mappings have changed on a tiled resource that the app will render via <strong>RenderTargetView</strong> or <strong>DepthStencilView</strong>, the app must clear, by using the fixed function <strong>Clear</strong> {{APIs}}, the tiles that have changed within the area being rendered (mapped or not). If an app doesn't clear in these situations, the app receives undefined values when it reads from the tiled resource. </p><strong>Note</strong>??In Direct3D 11.2, hardware can now support <strong>ClearView</strong> on depth-only formats. For more info, see <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong>.?<p>If an app needs to preserve existing memory contents of areas in a tiled resource where mappings have changed, the app can first save the contents where tile mappings have changed, by copying them to a temporary surface, for example using <strong>CopyTiles</strong>, issuing the required <strong>Clear</strong>, and then copying the contents back. </p><p>Suppose a tile is mapped into multiple tiled resources at the same time and tile contents are manipulated by any means (render, copy, and so on) via one of the tiled resources. Then, if the same tile is to be rendered via any other tiled resource, the tile must be cleared first as previously described. </p><p>For more info about tiled resources, see Tiled resources.</p><p>Here are some examples of common <strong>UpdateTileMappings</strong> cases:</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the following:</p><ul> <li> Returns <strong>{{E_INVALIDARG}}</strong> if various conditions such as invalid flags result in the call being dropped.<p>The debug layer will emit an error.</p> </li> <li> Returns <strong>{{E_OUTOFMEMORY}}</strong> if the call results in the driver having to allocate space for new page table mappings but running out of memory.<p>If out of memory occurs when this is called in a commandlist and the commandlist is being executed, the device will be removed. Apps can avoid this situation by only doing update calls that change existing mappings from tiled resources within commandlists (so drivers will not have to allocate page table memory, only change the mapping).</p> </li> <li> Returns <strong>{{DXGI_ERROR_DEVICE_REMOVED}}</strong> if the video card has been physically removed from the system, or a driver upgrade for the video card has occurred. </li> </ul> <dd> <p>A reference to the tiled resource.</p> </dd> <dd> <p>The number of tiled resource regions.</p> </dd> <dd> <p> An array of <strong>{{D3D11_TILED_RESOURCE_COORDINATE}}</strong> structures that describe the starting coordinates of the tiled resource regions. The <em>NumTiledResourceRegions</em> parameter specifies the number of <strong>{{D3D11_TILED_RESOURCE_COORDINATE}}</strong> structures in the array. </p> </dd> <dd> <p> An array of <strong>{{D3D11_TILE_REGION_SIZE}}</strong> structures that describe the sizes of the tiled resource regions. The <em>NumTiledResourceRegions</em> parameter specifies the number of <strong>{{D3D11_TILE_REGION_SIZE}}</strong> structures in the array. </p> </dd> <dd> <p>A reference to the tile pool.</p> </dd> <dd> <p>The number of tile-pool ranges.</p> </dd> <dd> <p> An array of <strong>{{D3D11_TILE_RANGE_FLAG}}</strong> values that describe each tile-pool range. The <em>NumRanges</em> parameter specifies the number of values in the array. </p> </dd> <dd> <p>An array of offsets into the tile pool. These are 0-based tile offsets, counting in tiles (not bytes).</p> </dd> <dd> <p>An array of tiles. </p> <p> An array of values that specify the number of tiles in each tile-pool range. The <em>NumRanges</em> parameter specifies the number of values in the array. </p> </dd> <dd> <p> A combination of <strong>{{D3D11_TILE_MAPPING_FLAGS}}</strong> values that are combined by using a bitwise {{OR}} operation. </p> </dd> <p>Copies mappings from a source tiled resource to a destination tiled resource.</p> <p><strong>CopyTileMappings</strong> helps with tasks such as shifting mappings around within and across tiled resources, for example, scrolling tiles. The source and destination regions can overlap; the result of the copy in this situation is as if the source was saved to a temp location and then from there written to the destination.</p><p>For more info about tiled resources, see Tiled resources.</p> <p> Returns {{S_OK}} if successful; otherwise, returns one of the following: </p><ul> <li> Returns <strong>{{E_INVALIDARG}}</strong> if various conditions such as invalid flags or passing in non Tiled Resources result in the call being dropped. <p> The dest and the source regions must each entirely fit in their resource or behavior is undefined (debug layer will emit an error). </p> </li> <li> Returns <strong>{{E_OUTOFMEMORY}}</strong> if the call results in the driver having to allocate space for new page table mappings but running out of memory. <p> If out of memory occurs when this is called in a commandlist and the commandlist is being executed, the device will be removed. Applications can avoid this situation by only doing update calls that change existing mappings from Tiled Resources within commandlists (so drivers will not have to allocate page table memory, only change the mapping). </p> </li> </ul> <dd> <p>A reference to the destination tiled resource.</p> </dd> <dd> <p> A reference to a <strong>{{D3D11_TILED_RESOURCE_COORDINATE}}</strong> structure that describes the starting coordinates of the destination tiled resource. </p> </dd> <dd> <p>A reference to the source tiled resource.</p> </dd> <dd> <p> A reference to a <strong>{{D3D11_TILED_RESOURCE_COORDINATE}}</strong> structure that describes the starting coordinates of the source tiled resource. </p> </dd> <dd> <p> A reference to a <strong>{{D3D11_TILE_REGION_SIZE}}</strong> structure that describes the size of the tiled region. </p> </dd> <dd> <p> A combination of <strong>{{D3D11_TILE_MAPPING_FLAGS}}</strong> values that are combined by using a bitwise {{OR}} operation. The only valid value is <strong>{{D3D11_TILE_MAPPING_NO_OVERWRITE}}</strong>, which indicates that previously submitted commands to the device that may still be executing do not reference any of the tile region being updated. The device can then avoid having to flush previously submitted work to perform the tile mapping update. If the app violates this promise by updating tile mappings for locations in tiled resources that are still being referenced by outstanding commands, undefined rendering behavior results, including the potential for significant slowdowns on some architectures. This is like the "no overwrite" concept that exists elsewhere in the Direct3D {{API}}, except applied to the tile mapping data structure itself (which in hardware is a page table). The absence of the <strong>{{D3D11_TILE_MAPPING_NO_OVERWRITE}}</strong> value requires that tile mapping updates that <strong>CopyTileMappings</strong> specifies must be completed before any subsequent Direct3D command can proceed. </p> </dd> <p>Copies tiles from buffer to tiled resource or vice versa. </p> <p><strong>CopyTiles</strong> drops write operations to unmapped areas and handles read operations from unmapped areas (except on <strong>Tier_1</strong> tiled resources, where reading and writing unmapped areas is invalid). </p><p>If a copy operation involves writing to the same memory location multiple times because multiple locations in the destination resource are mapped to the same tile memory, the resulting write operations to multi-mapped tiles are non-deterministic and non-repeatable; that is, accesses to the tile memory happen in whatever order the hardware happens to execute the copy operation.</p><p> The tiles involved in the copy operation can't include tiles that contain packed mipmaps or results of the copy operation are undefined. To transfer data to and from mipmaps that the hardware packs into one tile, you must use the standard (that is, non-tile specific) copy and update {{APIs}} (like <strong>{{ID3D11DeviceContext1::CopySubresourceRegion1}}</strong> and <strong>{{ID3D11DeviceContext1::UpdateSubresource1}}</strong>) or <strong>{{ID3D11DeviceContext::GenerateMips}}</strong> for the whole mipmap chain. </p><p> The memory layout of the tiles in the non-tiled buffer resource side of the copy operation is linear in memory within 64 {{KB}} tiles, which the hardware and driver swizzle and deswizzle per tile as appropriate when they transfer to and from a tiled resource. For multisample antialiasing ({{MSAA}}) surfaces, the hardware and driver traverse each pixel's samples in sample-index order before they move to the next pixel. For tiles that are partially filled on the right side (for a surface that has a width not a multiple of tile width in pixels), the pitch and stride to move down a row is the full size in bytes of the number pixels that would fit across the tile if the tile was full. So, there can be a gap between each row of pixels in memory. Mipmaps that are smaller than a tile are not packed together in the linear layout, which might seem to be a waste of memory space, but as mentioned you can't use <strong>CopyTiles</strong> or <strong>{{ID3D11DeviceContext2::UpdateTiles}}</strong> to copy to mipmaps that the hardware packs together. You can just use generic copy and update {{APIs}} (like <strong>{{ID3D11DeviceContext1::CopySubresourceRegion1}}</strong> and <strong>{{ID3D11DeviceContext1::UpdateSubresource1}}</strong>) to copy small mipmaps individually. Although in the case of a generic copy {{API}} (like <strong>{{ID3D11DeviceContext1::CopySubresourceRegion1}}</strong>), the linear memory must be the same dimension as the tiled resource; <strong>{{ID3D11DeviceContext1::CopySubresourceRegion1}}</strong> can't copy from a buffer resource to a Texture2D for instance. </p><p> For more info about tiled resources, see Tiled resources. </p> <p>Returns nothing</p> <dd> <p>A reference to a tiled resource.</p> </dd> <dd> <p> A reference to a <strong>{{D3D11_TILED_RESOURCE_COORDINATE}}</strong> structure that describes the starting coordinates of the tiled resource. </p> </dd> <dd> <p> A reference to a <strong>{{D3D11_TILE_REGION_SIZE}}</strong> structure that describes the size of the tiled region. </p> </dd> <dd> <p> A reference to an <strong>{{ID3D11Buffer}}</strong> that represents a default, dynamic, or staging buffer. </p> </dd> <dd> <p> The offset in bytes into the buffer at <em>pBuffer</em> to start the operation. </p> </dd> <dd> <p> A combination of <strong>{{D3D11_TILE_COPY_FLAG}}</strong>-typed values that are combined by using a bitwise {{OR}} operation and that identifies how to copy tiles. </p> </dd> <p>Updates tiles by copying from app memory to the tiled resource. </p> <p><strong>UpdateTiles</strong> drops write operations to unmapped areas (except on <strong>Tier_1</strong> tiled resources, where writing to unmapped areas is invalid). </p><p>If a copy operation involves writing to the same memory location multiple times because multiple locations in the destination resource are mapped to the same tile memory, the resulting write operations to multi-mapped tiles are non-deterministic and non-repeatable; that is, accesses to the tile memory happen in whatever order the hardware happens to execute the copy operation.</p><p>The tiles involved in the copy operation can't include tiles that contain packed mipmaps or results of the copy operation are undefined. To transfer data to and from mipmaps that the hardware packs into one tile, you must use the standard (that is, non-tile specific) copy and update {{APIs}} (like <strong>{{ID3D11DeviceContext1::CopySubresourceRegion1}}</strong> and <strong>{{ID3D11DeviceContext1::UpdateSubresource1}}</strong>) or <strong>{{ID3D11DeviceContext::GenerateMips}}</strong> for the whole mipmap chain.</p><p>The memory layout of the data on the source side of the copy operation is linear in memory within 64 {{KB}} tiles, which the hardware and driver swizzle and deswizzle per tile as appropriate when they transfer to and from a tiled resource. For multisample antialiasing ({{MSAA}}) surfaces, the hardware and driver traverse each pixel's samples in sample-index order before they move to the next pixel. For tiles that are partially filled on the right side (for a surface that has a width not a multiple of tile width in pixels), the pitch and stride to move down a row is the full size in bytes of the number pixels that would fit across the tile if the tile was full. So, there can be a gap between each row of pixels in memory. Mipmaps that are smaller than a tile are not packed together in the linear layout, which might seem to be a waste of memory space, but as mentioned you can't use <strong>{{ID3D11DeviceContext2::CopyTiles}}</strong> or <strong>UpdateTiles</strong> to copy to mipmaps that the hardware packs together. You can just use generic copy and update {{APIs}} (like <strong>{{ID3D11DeviceContext1::CopySubresourceRegion1}}</strong> and <strong>{{ID3D11DeviceContext1::UpdateSubresource1}}</strong>) to copy small mipmaps individually. Although in the case of a generic copy {{API}} (like <strong>{{ID3D11DeviceContext1::CopySubresourceRegion1}}</strong>), the linear memory must be the same dimension as the tiled resource; <strong>{{ID3D11DeviceContext1::CopySubresourceRegion1}}</strong> can't copy from a buffer resource to a Texture2D for instance.</p><p>For more info about tiled resources, see Tiled resources.</p> <p>Returns nothing</p> <dd> <p>A reference to a tiled resource to update.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_TILED_RESOURCE_COORDINATE}}</strong> structure that describes the starting coordinates of the tiled resource.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_TILE_REGION_SIZE}}</strong> structure that describes the size of the tiled region.</p> </dd> <dd> <p>A reference to memory that contains the source tile data that <strong>UpdateTiles</strong> uses to update the tiled resource.</p> </dd> <dd> <p>A combination of <strong>{{D3D11_TILE_COPY_FLAG}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The only valid value is <strong>{{D3D11_TILE_COPY_NO_OVERWRITE}}</strong>. The other values aren't meaningful here, though by definition the <strong>{{D3D11_TILE_COPY_LINEAR_BUFFER_TO_SWIZZLED_TILED_RESOURCE}}</strong> value is basically what <strong>UpdateTiles</strong> does, but sources from app memory. </p> </dd> <p>Resizes a tile pool.</p> <p><strong>ResizeTilePool</strong> increases or decreases the size of the tile pool depending on whether the app needs more or less working set for the tiled resources that are mapped into it. An app can allocate additional tile pools for new tiled resources, but if any single tiled resource needs more space than initially available in its tile pool, the app can increase the size of the resource's tile pool. A tiled resource can't have mappings into multiple tile pools simultaneously. </p><p>When you increase the size of a tile pool, additional tiles are added to the end of the tile pool via one or more new allocations by the driver; your app can't detect the breakdown into the new allocations. Existing memory in the tile pool is left untouched, and existing tiled resource mappings into that memory remain intact.</p><p>When you decrease the size of a tile pool, tiles are removed from the end (this is allowed even below the initial allocation size, down to 0). This means that new mappings can't be made past the new size. But, existing mappings past the end of the new size remain intact and useable. The memory is kept active as long as mappings to any part of the allocations that are being used for the tile pool memory remains. If after decreasing, some memory has been kept active because tile mappings are pointing to it and the tile pool is increased again (by any amount), the existing memory is reused first before any additional allocations occur to service the size of the increase. </p><p>To be able to save memory, an app has to not only decrease a tile pool but also remove and remap existing mappings past the end of the new smaller tile pool size.</p><p>The act of decreasing (and removing mappings) doesn't necessarily produce immediate memory savings. Freeing of memory depends on how granular the driver's underlying allocations for the tile pool are. When a decrease in the size of a tile pool happens to be enough to make a driver allocation unused, the driver can free the allocation. If a tile pool was increased and if you then decrease to previous sizes (and remove and remap tile mappings correspondingly), you will most likely yield memory savings. But, this scenario isn't guaranteed in the case that the sizes don't exactly align with the underlying allocation sizes chosen by the driver. </p><p>For more info about tiled resources, see Tiled resources.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the following:</p><ul> <li>Returns <strong>{{E_INVALIDARG}}</strong> if the new tile pool size isn't a multiple of 64 {{KB}} or 0.</li> <li>Returns <strong>{{E_OUTOFMEMORY}}</strong> if the call results in the driver having to allocate space for new page table mappings but running out of memory.</li> <li>Returns <strong>{{DXGI_ERROR_DEVICE_REMOVED}}</strong> if the video card has been physically removed from the system, or a driver upgrade for the video card has occurred.</li> </ul><p>For <strong>{{E_INVALIDARG}}</strong> or <strong>{{E_OUTOFMEMORY}}</strong>, the existing tile pool remains unchanged, which includes existing mappings. </p> <dd> <p>A reference to an <strong>{{ID3D11Buffer}}</strong> for the tile pool to resize.</p> </dd> <dd> <p>The new size in bytes of the tile pool. The size must be a multiple of 64 {{KB}} or 0.</p> </dd> <p>Specifies a data access ordering constraint between multiple tiled resources. For more info about this constraint, see Remarks.</p> <p>Apps can use tiled resources to reuse tiles in different resources. But, a device and driver might not be able to determine whether some memory in a tile pool that was just rendered to is now being used for reading. </p><p>For example, an app can render to some tiles in a tile pool with one tiled resource but then read from the same tiles by using a different tiled resource. These tiled-resource operations are different from using one resource and then just switching from writing with <strong>{{ID3D11RenderTargetView}}</strong> to reading with <strong>{{ID3D11ShaderResourceView}}</strong>. The runtime already tracks and handles these one resource operations using <strong>{{ID3D11RenderTargetView}}</strong> and <strong>{{ID3D11ShaderResourceView}}</strong>. </p><p>When an app transitions from accessing (reading or writing) some location in a tile pool with one resource to accessing the same memory (read or write) via another tiled resource (with mappings to the same memory), the app must call <strong>TiledResourceBarrier</strong> after the first use of the resource and before the second. The parameters are the <em>pTiledResourceOrViewAccessBeforeBarrier</em> for accesses before the barrier (via rendering, copying), and the <em>pTiledResourceOrViewAccessAfterBarrier</em> for accesses after the barrier by using the same tile pool memory. If the resources are identical, the app doesn't need to call <strong>TiledResourceBarrier</strong> because this kind of hazard is already tracked and handled. </p><p>The barrier call informs the driver that operations issued to the resource before the call must complete before any accesses that occur after the call via a different tiled resource that shares the same memory. </p><p>Either or both of the parameters (before or after the barrier) can be <strong>{{NULL}}</strong>. <strong>{{NULL}}</strong> before the barrier means all tiled resource accesses before the barrier must complete before the resource specified after the barrier can be referenced by the graphics processing unit ({{GPU}}). <strong>{{NULL}}</strong> after the barrier means that any tiled resources accessed after the barrier can only be executed by the {{GPU}} after accesses to the tiled resources before the barrier are finished. Both <strong>{{NULL}}</strong> means all previous tiled resource accesses are complete before any subsequent tiled resource access can proceed. </p><p>An app can pass a view reference, a resource, or <strong>{{NULL}}</strong> for each parameter. Views are allowed not only for convenience but also to allow the app to scope the barrier effect to a relevant portion of a resource. </p><p>For more info about tiled resources, see Tiled resources.</p> <p>Returns nothing</p> <dd> <p>A reference to an <strong>{{ID3D11Resource}}</strong> or <strong>{{ID3D11View}}</strong> for a resource that was created with the <strong>{{D3D11_RESOURCE_MISC_TILED}}</strong> flag. Access operations on this object must complete before the access operations on the object that <em>pTiledResourceOrViewAccessAfterBarrier</em> specifies.</p> </dd> <dd> <p>A reference to an <strong>{{ID3D11Resource}}</strong> or <strong>{{ID3D11View}}</strong> for a resource that was created with the <strong>{{D3D11_RESOURCE_MISC_TILED}}</strong> flag. Access operations on this object must begin after the access operations on the object that <em>pTiledResourceOrViewAccessBeforeBarrier</em> specifies.</p> </dd> <p> Allows apps to determine when either a capture or profiling request is enabled.</p> <p>Returns <strong>{{TRUE}}</strong> if the capture tool is present and capturing or the app is being profiled such that <strong>SetMarkerInt</strong> or <strong>BeginEventInt</strong> will be logged to <strong>{{ETW}}</strong>. Otherwise, it returns <strong>{{FALSE}}</strong>. Apps can use this to turn off self-throttling mechanisms in order to accurately capture what is currently being seen as app output. Apps can also avoid generating event markers and the associated overhead it may entail when there is no benefit to do so. </p><p>If apps detect that capture is being performed, they can prevent the Direct3D debugging tools, such as Microsoft Visual Studio?2013, from capturing them. The purpose of the <strong>{{D3D11_CREATE_DEVICE_PREVENT_ALTERING_LAYER_SETTINGS_FROM_REGISTRY}}</strong> flag prior to Windows?8.1 was to allow the Direct3D runtime to prevent debugging tools from capturing apps.</p> <p>Returns <strong>{{TRUE}}</strong> if capture or profiling is enabled and <strong>{{FALSE}}</strong> otherwise.</p> <p>Allows applications to annotate graphics commands.</p> <p><strong>SetMarkerInt</strong> allows applications to annotate graphics commands, in order to provide more context to what the {{GPU}} is executing. When {{ETW}} logging or a support tool is enabled, an additional marker is correlated between the {{CPU}} and {{GPU}} timelines. The <em>pLabel</em> and <em>Data</em> value are logged to {{ETW}}. When the appropriate {{ETW}} logging is not enabled, this method does nothing.</p> <p>This method does not return a value.</p> <dd> <p>An optional string that will be logged to <strong>{{ETW}}</strong> when {{ETW}} logging is active. If <strong>?#d?</strong> appears in the string, it will be replaced by the value of the <em>Data</em> parameter similar to the way <strong>printf</strong> works.</p> </dd> <dd> <p>A signed data value that will be logged to {{ETW}} when {{ETW}} logging is active.</p> </dd> <p>Allows applications to annotate the beginning of a range of graphics commands.</p> <p><strong>BeginEventInt</strong> allows applications to annotate the beginning of a range of graphics commands, in order to provide more context to what the {{GPU}} is executing. When <strong>{{ETW}}</strong> logging (or a supported tool) is enabled, an additional marker is correlated between the {{CPU}} and {{GPU}} timelines. The <em>pLabel</em> and <em>Data</em> value are logged to {{ETW}}. When the appropriate {{ETW}} logging is not enabled, this method does nothing.</p> <p>This method does not return a value.</p> <dd> <p>An optional string that will be logged to <strong>{{ETW}}</strong> when {{ETW}} logging is active. If <strong>?#d?</strong> appears in the string, it will be replaced by the value of the <em>Data</em> parameter similar to the way <strong>printf</strong> works.</p> </dd> <dd> <p>A signed data value that will be logged to {{ETW}} when {{ETW}} logging is active.</p> </dd> <p>Allows applications to annotate the end of a range of graphics commands.</p> <p><strong>EndEvent</strong> allows applications to annotate the end of a range of graphics commands, in order to provide more context to what the {{GPU}} is executing. When the appropriate <strong>{{ETW}}</strong> logging is not enabled, this method does nothing. When {{ETW}} logging is enabled, an additional marker is correlated between the {{CPU}} and {{GPU}} timelines.</p> <p>This method does not return a value.</p> <p>The device interface represents a virtual adapter; it is used to create resources. <strong>{{ID3D11Device2}}</strong> adds new methods to those in <strong>{{ID3D11Device1}}</strong>.</p> <p>Gets an immediate context, which can play back command lists. </p> <p>The <strong>GetImmediateContext2</strong> method returns an <strong>{{ID3D11DeviceContext2}}</strong> object that represents an immediate context, which is used to perform rendering that you want immediately submitted to a device. For most apps, an immediate context is the primary object that is used to draw your scene.</p><p>The <strong>GetImmediateContext2</strong> method increments the reference count of the immediate context by one. Therefore, you must call <strong>Release</strong> on the returned interface reference when you are done with it to avoid a memory leak. </p> <p>This method does not return a value.</p> <p> Creates a deferred context, which can record command lists. </p> <p> A deferred context is a thread-safe context that you can use to record graphics commands on a thread other than the main rendering thread. By using a deferred context, you can record graphics commands into a command list that is encapsulated by the <strong>{{ID3D11CommandList}}</strong> interface. After you record all scene items, you can then submit them to the main render thread for final rendering. In this manner, you can perform rendering tasks concurrently across multiple threads and potentially improve performance in multi-core {{CPU}} scenarios. </p><p> You can create multiple deferred contexts. </p><strong>Note</strong>?? If you use the <strong>{{D3D11_CREATE_DEVICE_SINGLETHREADED}}</strong> value to create the device, <strong>CreateDeferredContext2</strong> fails with <strong>{{DXGI_ERROR_INVALID_CALL}}</strong>, and you can't create a deferred context.?<p> For more information about deferred contexts, see Immediate and Deferred Rendering. </p> <p> Returns {{S_OK}} if successful; otherwise, returns one of the following: </p><ul> <li> Returns <strong>{{DXGI_ERROR_DEVICE_REMOVED}}</strong> if the video card has been physically removed from the system, or a driver upgrade for the video card has occurred. If this error occurs, you should destroy and recreate the device. </li> <li> Returns <strong>{{DXGI_ERROR_INVALID_CALL}}</strong> if the <strong>CreateDeferredContext2</strong> method can't be called from the current context. For example, if the device was created with the <strong>{{D3D11_CREATE_DEVICE_SINGLETHREADED}}</strong> value, <strong>CreateDeferredContext2</strong> returns <strong>{{DXGI_ERROR_INVALID_CALL}}</strong>. </li> <li> Returns <strong>{{E_INVALIDARG}}</strong> if the <em>ContextFlags</em> parameter is invalid. </li> <li> Returns <strong>{{E_OUTOFMEMORY}}</strong> if the app has exhausted available memory. </li> </ul> <p>Gets info about how a tiled resource is broken into tiles.</p> <p> For more info about tiled resources, see Tiled resources. </p> <p>Returns nothing</p> <dd> <p>A reference to the tiled resource to get info about.</p> </dd> <dd> <p>A reference to a variable that receives the number of tiles needed to store the entire tiled resource. </p> </dd> <dd> <p> A reference to a <strong>{{D3D11_PACKED_MIP_DESC}}</strong> structure that <strong>GetResourceTiling</strong> fills with info about how the tiled resource's mipmaps are packed. </p> </dd> <dd> <p> A reference to a <strong>{{D3D11_TILE_SHAPE}}</strong> structure that <strong>GetResourceTiling</strong> fills with info about the tile shape. This is info about how pixels fit in the tiles, independent of tiled resource's dimensions, not including packed mipmaps. If the entire tiled resource is packed, this parameter is meaningless because the tiled resource has no defined layout for packed mipmaps. In this situation, <strong>GetResourceTiling</strong> sets the members of <strong>{{D3D11_TILE_SHAPE}}</strong> to zeros. </p> </dd> <dd> <p> A reference to a variable that contains the number of tiles in the subresource. On input, this is the number of subresources to query tilings for; on output, this is the number that was actually retrieved at <em>pSubresourceTilingsForNonPackedMips</em> (clamped to what's available). </p> </dd> <dd> <p> The number of the first subresource tile to get. <strong>GetResourceTiling</strong> ignores this parameter if the number that <em>pNumSubresourceTilings</em> points to is 0. </p> </dd> <dd> <p> A reference to a <strong>{{D3D11_SUBRESOURCE_TILING}}</strong> structure that <strong>GetResourceTiling</strong> fills with info about subresource tiles. </p> <p> If subresource tiles are part of packed mipmaps, <strong>GetResourceTiling</strong> sets the members of <strong>{{D3D11_SUBRESOURCE_TILING}}</strong> to zeros, except the <strong>StartTileIndexInOverallResource</strong> member, which <strong>GetResourceTiling</strong> sets to <strong>{{D3D11_PACKED_TILE}}</strong> (0xffffffff). The <strong>{{D3D11_PACKED_TILE}}</strong> constant indicates that the whole <strong>{{D3D11_SUBRESOURCE_TILING}}</strong> structure is meaningless for this situation, and the info that the <em>pPackedMipDesc</em> parameter points to applies. </p> </dd> <p>Get the number of quality levels available during multisampling.</p> <p>When you multisample a texture, the number of quality levels available for an adapter is dependent on the texture format that you use and the number of samples that you request. The maximum number of quality levels is defined by <strong>{{D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT}}</strong> in {{D3D11}}.h. If this method returns 0, the format and sample count combination is not supported for the installed adapter.</p><p>Furthermore, the definition of a quality level is up to each hardware vendor to define, however no facility is provided by Direct3D to help discover this information.</p><p>Note that {{FEATURE_LEVEL_10_1}} devices are required to support 4x {{MSAA}} for all render targets except {{R32G32B32A32}} and {{R32G32B32}}. {{FEATURE_LEVEL_11_0}} devices are required to support 4x {{MSAA}} for all render target formats, and 8x {{MSAA}} for all render target formats except {{R32G32B32A32}} formats.</p> <p>This method returns one of the Direct3D 11 Return Codes.</p> <dd> <p>The texture format during multisampling. </p> </dd> <dd> <p>The number of samples during multisampling.</p> </dd> <dd> <p>A combination of <strong>{{D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_FLAGS}}</strong> values that are combined by using a bitwise {{OR}} operation. Currently, only <strong>{{D3D11_CHECK_MULTISAMPLE_QUALITY_LEVELS_TILED_RESOURCE}}</strong> is supported. </p> </dd> <dd> <p>A reference to a variable the receives the number of quality levels supported by the adapter. See Remarks.</p> </dd> <p>Specifies the context in which a query occurs.</p> <p> This enum is used by the following: </p><ul> <li> <strong>{{D3D11_QUERY_DESC1}}</strong> structure </li> <li> A {{CD3D11_QUERY_DESC1}} constructor.</li> <li> <strong>{{ID3D11DeviceContext3::Flush1}}</strong> method </li> </ul> <dd> <p>The query can occur in all contexts.</p> </dd> <dd> <p>The query occurs in the context of a 3D command queue.</p> </dd> <dd> <p>The query occurs in the context of a 3D compute queue.</p> </dd> <dd> <p>The query occurs in the context of a 3D copy queue.</p> </dd> <dd> <p>The query occurs in the context of video.</p> </dd> <p>Specifies texture layout options.</p> <p>This enumeration controls the swizzle pattern of default textures and enable map support on default textures. Callers must query <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS2}}</strong> to ensure that each option is supported.</p><p>The standard swizzle formats applies within each page-sized chunk, and pages are laid out in linear order with respect to one another. A 16-bit interleave pattern defines the conversion from pre-swizzled intra-page location to the post-swizzled location. </p><p>To demonstrate, consider the 32bpp swizzle format above. This is represented by the following interleave masks, where bits on the left are most-significant.</p><code>{{UINT}} xBytesMask = 1010 1010 1000 1111 {{UINT}} yMask = 0101 0101 0111 0000 </code><p>To compute the swizzled address, the following code could be used (where the _pdep_u32 instruction is supported):</p><code>{{UINT}} swizzledOffset = resourceBaseOffset + _pdep_u32(xOffset, xBytesMask) + _pdep_u32(yOffset, yBytesMask); </code> <dd> <p>The texture layout is undefined, and is selected by the driver.</p> </dd> <dd> <p>Data for the texture is stored in row major (sometimes called pitch-linear) order.</p> </dd> <dd> <p>A default texture uses the standardized swizzle pattern.</p> </dd> <p>Identifies whether conservative rasterization is on or off.</p> <dd> <p>Conservative rasterization is off.</p> </dd> <dd> <p>Conservative rasterization is on.</p> </dd> <p>Device context options.</p> <p>This enumeration is used by <strong>{{ID3D11DeviceContext::GetType}}</strong>.</p> <dd> <p>The device context is an immediate context.</p> </dd> <dd> <p>The device context is a deferred context.</p> </dd> <p>Describes a 2D texture.</p> <p>This structure is used in a call to <strong>{{ID3D11Device3::CreateTexture2D1}}</strong>.</p><p>In addition to this structure, you can also use the <strong>{{CD3D11_TEXTURE2D_DESC1}}</strong> derived structure, which is defined in {{D3D11_3}}.h and behaves like an inherited class, to help create a texture description.</p><p>The device places some size restrictions (must be multiples of a minimum size) for a subsampled, block compressed, or bit-format resource.</p><p>The texture size range is determined by the feature level at which you create the device and not the Microsoft Direct3D interface version. For example, if you use Microsoft Direct3D?10 hardware at feature level 10 (<strong>{{D3D_FEATURE_LEVEL_10_0}}</strong>) and call <strong>{{D3D11CreateDevice}}</strong> to create an <strong>{{ID3D11Device}}</strong>, you must constrain the maximum texture size to {{D3D10_REQ_TEXTURE2D_U_OR_V_DIMENSION}} (8192) when you create your 2D texture.</p> <dd> <p>Texture width (in texels). The range is from 1 to {{D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION}} (16384). For a texture cube-map, the range is from 1 to {{D3D11_REQ_TEXTURECUBE_DIMENSION}} (16384). However, the range is actually constrained by the feature level at which you create the rendering device. For more information about restrictions, see Remarks.</p> </dd> <dd> <p>Texture height (in texels). The range is from 1 to {{D3D11_REQ_TEXTURE2D_U_OR_V_DIMENSION}} (16384). For a texture cube-map, the range is from 1 to {{D3D11_REQ_TEXTURECUBE_DIMENSION}} (16384). However, the range is actually constrained by the feature level at which you create the rendering device. For more information about restrictions, see Remarks.</p> </dd> <dd> <p>The maximum number of mipmap levels in the texture. See the remarks in <strong>{{D3D11_TEX1D_SRV}}</strong>. Use 1 for a multisampled texture; or 0 to generate a full set of subtextures.</p> </dd> <dd> <p>Number of textures in the texture array. The range is from 1 to {{D3D11_REQ_TEXTURE2D_ARRAY_AXIS_DIMENSION}} (2048). For a texture cube-map, this value is a multiple of 6 (that is, 6 times the value in the <strong>NumCubes</strong> member of <strong>{{D3D11_TEXCUBE_ARRAY_SRV}}</strong>), and the range is from 6 to 2046. The range is actually constrained by the feature level at which you create the rendering device. For more information about restrictions, see Remarks.</p> </dd> <dd> <p>Texture format (see <strong>{{DXGI_FORMAT}}</strong>).</p> </dd> <dd> <p>Structure that specifies multisampling parameters for the texture. See <strong>{{DXGI_SAMPLE_DESC}}</strong>.</p> </dd> <dd> <p>Value that identifies how the texture is to be read from and written to. The most common value is {{D3D11_USAGE_DEFAULT}}; see <strong>{{D3D11_USAGE}}</strong> for all possible values.</p> </dd> <dd> <p>Flags (see <strong>{{D3D11_BIND_FLAG}}</strong>) for binding to pipeline stages. The flags can be combined by a logical {{OR}}.</p> </dd> <dd> <p>Flags (see <strong>{{D3D11_CPU_ACCESS_FLAG}}</strong>) to specify the types of {{CPU}} access allowed. Use 0 if {{CPU}} access is not required. These flags can be combined with a logical {{OR}}.</p> </dd> <dd> <p>Flags (see <strong>{{D3D11_RESOURCE_MISC_FLAG}}</strong>) that identify other, less common resource options. Use 0 if none of these flags apply. These flags can be combined by using a logical {{OR}}. For a texture cube-map, set the <strong>{{D3D11_RESOURCE_MISC_TEXTURECUBE}}</strong> flag. Cube-map arrays (that is, <strong>ArraySize</strong> &gt; 6) require feature level <strong>{{D3D_FEATURE_LEVEL_10_1}}</strong> or higher.</p> </dd> <dd> <p>A <strong>{{D3D11_TEXTURE_LAYOUT}}</strong>-typed value that identifies the layout of the texture.</p> <p>The TextureLayout parameter selects both the actual layout of the texture in memory and the layout visible to the application while the texture is mapped. These flags may not be requested without {{CPU}} access also requested.</p> <p>It is illegal to set {{CPU}} access flags on default textures without also setting TextureLayout to a value other than {{D3D11_TEXTURE_LAYOUT_UNDEFINED}}. </p> <p>{{D3D11_TEXTURE_LAYOUT_ROW_MAJOR}} may only be used to create non-multisampled, textures with a single subresource (Planar {{YUV}} textures are supported). These textures may only be used as a source and destination of copy operations, and BindFlags must be zero. </p> <p>{{D3D11_TEXTURE_LAYOUT_64K_STANDARD_SWIZZLE}} may only be used to create non-multisampled, non-depth-stencil textures. </p> </dd> <p>Describes a 3D texture.</p> <p>This structure is used in a call to <strong>{{ID3D11Device3::CreateTexture3D1}}</strong>.</p><p>In addition to this structure, you can also use the <strong>{{CD3D11_TEXTURE3D_DESC1}}</strong> derived structure, which is defined in {{D3D11_3}}.h and behaves like an inherited class, to help create a texture description.</p><p>The device restricts the size of subsampled, block compressed, and bit format resources to be multiples of sizes specific to each format.</p><p>The texture size range is determined by the feature level at which you create the device and not the Microsoft Direct3D interface version. For example, if you use Microsoft Direct3D?10 hardware at feature level 10 (<strong>{{D3D_FEATURE_LEVEL_10_0}}</strong>) and call <strong>{{D3D11CreateDevice}}</strong> to create an <strong>{{ID3D11Device}}</strong>, you must constrain the maximum texture size to {{D3D10_REQ_TEXTURE3D_U_V_OR_W_DIMENSION}} (2048) when you create your 3D texture.</p> <dd> <p>Texture width (in texels). The range is from 1 to {{D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION}} (2048). However, the range is actually constrained by the feature level at which you create the rendering device. For more information about restrictions, see Remarks.</p> </dd> <dd> <p>Texture height (in texels). The range is from 1 to {{D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION}} (2048). However, the range is actually constrained by the feature level at which you create the rendering device. For more information about restrictions, see Remarks.</p> </dd> <dd> <p>Texture depth (in texels). The range is from 1 to {{D3D11_REQ_TEXTURE3D_U_V_OR_W_DIMENSION}} (2048). However, the range is actually constrained by the feature level at which you create the rendering device. For more information about restrictions, see Remarks.</p> </dd> <dd> <p>The maximum number of mipmap levels in the texture. See the remarks in <strong>{{D3D11_TEX1D_SRV}}</strong>. Use 1 for a multisampled texture; or 0 to generate a full set of subtextures.</p> </dd> <dd> <p>Texture format (see <strong>{{DXGI_FORMAT}}</strong>).</p> </dd> <dd> <p>Value that identifies how the texture is to be read from and written to. The most common value is {{D3D11_USAGE_DEFAULT}}; see <strong>{{D3D11_USAGE}}</strong> for all possible values.</p> </dd> <dd> <p>Flags (see <strong>{{D3D11_BIND_FLAG}}</strong>) for binding to pipeline stages. The flags can be combined by a logical {{OR}}.</p> </dd> <dd> <p>Flags (see <strong>{{D3D11_CPU_ACCESS_FLAG}}</strong>) to specify the types of {{CPU}} access allowed. Use 0 if {{CPU}} access is not required. These flags can be combined with a logical {{OR}}.</p> </dd> <dd> <p>Flags (see <strong>{{D3D11_RESOURCE_MISC_FLAG}}</strong>) that identify other, less common resource options. Use 0 if none of these flags apply. These flags can be combined with a logical {{OR}}.</p> </dd> <dd> <p>A <strong>{{D3D11_TEXTURE_LAYOUT}}</strong>-typed value that identifies the layout of the texture.</p> <p>The TextureLayout parameter selects both the actual layout of the texture in memory and the layout visible to the application while the texture is mapped. These flags may not be requested without {{CPU}} access also requested.</p> <p>It is illegal to set {{CPU}} access flags on default textures without also setting Layout to a value other than {{D3D11_TEXTURE_LAYOUT_UNDEFINED}}.</p> <p>{{D3D11_TEXTURE_LAYOUT_ROW_MAJOR}} may not be used with 3D textures. {{D3D11_TEXTURE_LAYOUT_64K_STANDARD_SWIZZLE}} may not be used with 3D textures that have mipmaps.</p> </dd> <p>Describes rasterizer state.</p> <p>Rasterizer state defines the behavior of the rasterizer stage. To create a rasterizer-state object, call <strong>{{ID3D11Device3::CreateRasterizerState2}}</strong>. To set rasterizer state, call <strong>{{ID3D11DeviceContext::RSSetState}}</strong>.</p><p>If you do not specify some rasterizer state, the Direct3D runtime uses the following default values for rasterizer state.</p><table> <tr><th>State</th><th>Default Value</th></tr> <tr><td><strong>FillMode</strong></td><td>Solid</td></tr> <tr><td><strong>CullMode</strong></td><td>Back</td></tr> <tr><td><strong>FrontCounterClockwise</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td><strong>DepthBias</strong></td><td>0</td></tr> <tr><td><strong>SlopeScaledDepthBias</strong></td><td>0.0f</td></tr> <tr><td><strong>DepthBiasClamp</strong></td><td>0.0f</td></tr> <tr><td><strong>DepthClipEnable</strong></td><td><strong>{{TRUE}}</strong></td></tr> <tr><td><strong>ScissorEnable</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td><strong>MultisampleEnable</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td><strong>AntialiasedLineEnable</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td><strong>ForcedSampleCount</strong></td><td>0</td></tr> <tr><td><strong>ConservativeRaster</strong></td><td><strong>{{D3D11_CONSERVATIVE_RASTERIZATION_MODE_OFF}}</strong></td></tr> </table><p>?</p><strong>Note</strong>??For feature levels 9.1, 9.2, 9.3, and 10.0, if you set <strong>MultisampleEnable</strong> to <strong>{{FALSE}}</strong>, the runtime renders all points, lines, and triangles without anti-aliasing even for render targets with a sample count greater than 1. For feature levels 10.1 and higher, the setting of <strong>MultisampleEnable</strong> has no effect on points and triangles with regard to {{MSAA}} and impacts only the selection of the line-rendering algorithm as shown in this table:?<p> </p><table> <tr><th>Line-rendering algorithm</th><th><strong>MultisampleEnable</strong></th><th><strong>AntialiasedLineEnable</strong></th></tr> <tr><td>Aliased</td><td><strong>{{FALSE}}</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>Alpha antialiased</td><td><strong>{{FALSE}}</strong></td><td><strong>{{TRUE}}</strong></td></tr> <tr><td>Quadrilateral</td><td><strong>{{TRUE}}</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>Quadrilateral</td><td><strong>{{TRUE}}</strong></td><td><strong>{{TRUE}}</strong></td></tr> </table><p>?</p><p>The settings of the <strong>MultisampleEnable</strong> and <strong>AntialiasedLineEnable</strong> members apply only to multisample antialiasing ({{MSAA}}) render targets (that is, render targets with sample counts greater than 1). Because of the differences in feature-level behavior and as long as you aren?t performing any line drawing or don?t mind that lines render as quadrilaterals, we recommend that you always set <strong>MultisampleEnable</strong> to <strong>{{TRUE}}</strong> whenever you render on {{MSAA}} render targets.</p> <dd> <p>A <strong>{{D3D11_FILL_MODE}}</strong>-typed value that determines the fill mode to use when rendering.</p> </dd> <dd> <p>A <strong>{{D3D11_CULL_MODE}}</strong>-typed value that indicates that triangles facing the specified direction are not drawn.</p> </dd> <dd> <p>Specifies whether a triangle is front- or back-facing. If <strong>{{TRUE}}</strong>, a triangle will be considered front-facing if its vertices are counter-clockwise on the render target and considered back-facing if they are clockwise. If <strong>{{FALSE}}</strong>, the opposite is true.</p> </dd> <dd> <p>Depth value added to a given pixel. For info about depth bias, see Depth Bias.</p> </dd> <dd> <p>Maximum depth bias of a pixel. For info about depth bias, see Depth Bias.</p> </dd> <dd> <p>Scalar on a given pixel's slope. For info about depth bias, see Depth Bias.</p> </dd> <dd> <p>Specifies whether to enable clipping based on distance.</p> <p>The hardware always performs x and y clipping of rasterized coordinates. When <strong>DepthClipEnable</strong> is set to the default?<strong>{{TRUE}}</strong>, the hardware also clips the z value (that is, the hardware performs the last step of the following algorithm). </p> <code> 0 &lt; w -w &lt;= x &lt;= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden) -w &lt;= y &lt;= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden) 0 &lt;= z &lt;= w </code> <p>When you set <strong>DepthClipEnable</strong> to <strong>{{FALSE}}</strong>, the hardware skips the z clipping (that is, the last step in the preceding algorithm). However, the hardware still performs the "0 &lt; w" clipping. When z clipping is disabled, improper depth ordering at the pixel level might result. However, when z clipping is disabled, stencil shadow implementations are simplified. In other words, you can avoid complex special-case handling for geometry that goes beyond the back clipping plane. </p> </dd> <dd> <p>Specifies whether to enable scissor-rectangle culling. All pixels outside an active scissor rectangle are culled.</p> </dd> <dd> <p>Specifies whether to use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing ({{MSAA}}) render targets. Set to <strong>{{TRUE}}</strong> to use the quadrilateral line anti-aliasing algorithm and to <strong>{{FALSE}}</strong> to use the alpha line anti-aliasing algorithm. For more info about this member, see Remarks.</p> </dd> <dd> <p>Specifies whether to enable line antialiasing; only applies if doing line drawing and <strong>MultisampleEnable</strong> is <strong>{{FALSE}}</strong>. For more info about this member, see Remarks.</p> </dd> <dd> <p>The sample count that is forced while {{UAV}} rendering or rasterizing. Valid values are 0, 1, 2, 4, 8, and optionally 16. 0 indicates that the sample count is not forced.</p> <strong>Note</strong>??<p>If you want to render with <strong>ForcedSampleCount</strong> set to 1 or greater, you must follow these guidelines: </p> <ul> <li>Don't bind depth-stencil views.</li> <li>Disable depth testing.</li> <li>Ensure the shader doesn't output depth.</li> <li>If you have any render-target views bound (<strong>{{D3D11_BIND_RENDER_TARGET}}</strong>) and <strong>ForcedSampleCount</strong> is greater than 1, ensure that every render target has only a single sample.</li> <li>Don't operate the shader at sample frequency. Therefore, <strong>{{ID3D11ShaderReflection::IsSampleFrequencyShader}}</strong> returns <strong>{{FALSE}}</strong>.</li> </ul>Otherwise, rendering behavior is undefined. For info about how to configure depth-stencil, see Configuring Depth-Stencil Functionality. ? </dd> <dd> <p>A <strong>{{D3D11_CONSERVATIVE_RASTERIZATION_MODE}}</strong>-typed value that identifies whether conservative rasterization is on or off.</p> </dd> <p>Describes the subresource from a 2D texture to use in a shader-resource view.</p> <dd> <p> Index of the most detailed mipmap level to use; this number is between 0 and (<strong>MipLevels</strong> (from the original Texture2D for which <strong>{{ID3D11Device3::CreateShaderResourceView1}}</strong> creates a view) - 1 ). </p> </dd> <dd> <p> The maximum number of mipmap levels for the view of the texture. See the remarks in <strong>{{D3D11_TEX1D_SRV}}</strong>. </p> <p> Set to -1 to indicate all the mipmap levels from <strong>MostDetailedMip</strong> on down to least detailed. </p> </dd> <dd> <p>The index (plane slice number) of the plane to use in the texture.</p> </dd> <p>Describes the subresources from an array of 2D textures to use in a shader-resource view.</p> <dd> <p> Index of the most detailed mipmap level to use; this number is between 0 and ( <strong>MipLevels</strong> (from the original Texture2D for which <strong>{{ID3D11Device3::CreateShaderResourceView1}}</strong> creates a view) - 1). </p> </dd> <dd> <p> The maximum number of mipmap levels for the view of the texture. See the remarks in <strong>{{D3D11_TEX1D_SRV}}</strong>. </p> <p> Set to -1 to indicate all the mipmap levels from <strong>MostDetailedMip</strong> on down to least detailed. </p> </dd> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p>Number of textures in the array.</p> </dd> <dd> <p>The index (plane slice number) of the plane to use in an array of textures.</p> </dd> <p>Describes a shader-resource view.</p> <p>A view is a format-specific way to look at the data in a resource. The view determines what data to look at, and how it is cast when read.</p><p>When viewing a resource, the resource-view description must specify a typed format, that is compatible with the resource format. So that means that you cannot create a resource-view description using any format with _TYPELESS in the name. You can however view a typeless resource by specifying a typed format for the view. For example, a {{DXGI_FORMAT_R32G32B32_TYPELESS}} resource can be viewed with one of these typed formats: {{DXGI_FORMAT_R32G32B32_FLOAT}}, {{DXGI_FORMAT_R32G32B32_UINT}}, and {{DXGI_FORMAT_R32G32B32_SINT}}, since these typed formats are compatible with the typeless resource.</p><p>Create a shader-resource-view description by calling <strong>{{ID3D11Device3::CreateShaderResourceView1}}</strong>. To view a shader-resource-view description, call <strong>{{ID3D11ShaderResourceView1::GetDesc1}}</strong>.</p> <dd> <p>A <strong>{{DXGI_FORMAT}}</strong>-typed value that specifies the viewing format. See remarks.</p> </dd> <dd> <p>A <strong>{{D3D11_SRV_DIMENSION}}</strong>-typed value that specifies the resource type of the view. This type is the same as the resource type of the underlying resource. This member also determines which _SRV to use in the union below.</p> </dd> <dd> <p>A <strong>{{D3D11_BUFFER_SRV}}</strong> structure that views the resource as a buffer.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX1D_SRV}}</strong> structure that views the resource as a 1D texture.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX1D_ARRAY_SRV}}</strong> structure that views the resource as a 1D-texture array.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX2D_SRV1}}</strong> structure that views the resource as a 2D-texture.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX2D_ARRAY_SRV1}}</strong> structure that views the resource as a 2D-texture array.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX2DMS_SRV}}</strong> structure that views the resource as a 2D-multisampled texture.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX2DMS_ARRAY_SRV}}</strong> structure that views the resource as a 2D-multisampled-texture array.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX3D_SRV}}</strong> structure that views the resource as a 3D texture.</p> </dd> <dd> <p>A <strong>{{D3D11_TEXCUBE_SRV}}</strong> structure that views the resource as a 3D-cube texture.</p> </dd> <dd> <p>A <strong>{{D3D11_TEXCUBE_ARRAY_SRV}}</strong> structure that views the resource as a 3D-cube-texture array.</p> </dd> <dd> <p>A <strong>{{D3D11_BUFFEREX_SRV}}</strong> structure that views the resource as a raw buffer. For more info about raw viewing of buffers, see Raw Views of Buffers.</p> </dd> <p>Describes the subresource from a 2D texture to use in a render-target view.</p> <dd> <p>The index of the mipmap level to use mip slice.</p> </dd> <dd> <p>The index (plane slice number) of the plane to use in the texture.</p> </dd> <p>Describes the subresources from an array of 2D textures to use in a render-target view.</p> <dd> <p>The index of the mipmap level to use mip slice.</p> </dd> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p>Number of textures in the array to use in the render-target view, starting from <strong>FirstArraySlice</strong>.</p> </dd> <dd> <p>The index (plane slice number) of the plane to use in an array of textures.</p> </dd> <p>Describes the subresources from a resource that are accessible using a render-target view.</p> <p>A render-target-view description is passed into <strong>{{ID3D11Device3::CreateRenderTargetView1}}</strong> to create a render target.</p><p>A render-target-view can't use the following formats:</p><ul> <li>Any typeless format.</li> <li>{{DXGI_FORMAT_R32G32B32}} if the view will be used to bind a buffer (vertex, index, constant, or stream-output).</li> </ul><p>If the format is set to {{DXGI_FORMAT_UNKNOWN}}, then the format of the resource that the view binds to the pipeline will be used.</p> <dd> <p>A <strong>{{DXGI_FORMAT}}</strong>-typed value that specifies the data format. </p> </dd> <dd> <p>A <strong>{{D3D11_RTV_DIMENSION}}</strong>-typed value that specifies the resource type and how the render-target resource will be accessed.</p> </dd> <dd> <p>A <strong>{{D3D11_BUFFER_RTV}}</strong> structure that specifies which buffer elements can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX1D_RTV}}</strong> structure that specifies the subresources in a 1D texture that can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX1D_ARRAY_RTV}}</strong> structure that specifies the subresources in a 1D texture array that can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX2D_RTV1}}</strong> structure that specifies the subresources in a 2D texture that can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX2D_ARRAY_RTV1}}</strong> structure that specifies the subresources in a 2D texture array that can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX2DMS_RTV}}</strong> structure that specifies a single subresource because a multisampled 2D texture only contains one subresource.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX2DMS_ARRAY_RTV}}</strong> structure that specifies the subresources in a multisampled 2D texture array that can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX3D_RTV}}</strong> structure that specifies subresources in a 3D texture that can be accessed.</p> </dd> <p>Describes a unordered-access 2D texture resource.</p> <dd> <p>The mipmap slice index.</p> </dd> <dd> <p>The index (plane slice number) of the plane to use in the texture.</p> </dd> <p>Describes an array of unordered-access 2D texture resources.</p> <dd> <p>The mipmap slice index.</p> </dd> <dd> <p>The zero-based index of the first array slice to be accessed.</p> </dd> <dd> <p>The number of slices in the array.</p> </dd> <dd> <p>The index (plane slice number) of the plane to use in an array of textures.</p> </dd> <p>Describes the subresources from a resource that are accessible using an unordered-access view.</p> <p>An unordered-access-view description is passed into <strong>{{ID3D11Device3::CreateUnorderedAccessView1}}</strong> to create a view.</p> <dd> <p>A <strong>{{DXGI_FORMAT}}</strong>-typed value that specifies the data format.</p> </dd> <dd> <p>A <strong>{{D3D11_UAV_DIMENSION}}</strong>-typed value that specifies the resource type of the view. This type is the same as the resource type of the underlying resource. This member also determines which _UAV to use in the union below.</p> </dd> <dd> <p>A <strong>{{D3D11_BUFFER_UAV}}</strong> structure that specifies which buffer elements can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX1D_UAV}}</strong> structure that specifies the subresources in a 1D texture that can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX1D_ARRAY_UAV}}</strong> structure that specifies the subresources in a 1D texture array that can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX2D_UAV1}}</strong> structure that specifies the subresources in a 2D texture that can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX2D_ARRAY_UAV1}}</strong> structure that specifies the subresources in a 2D texture array that can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D11_TEX3D_UAV}}</strong> structure that specifies subresources in a 3D texture that can be accessed.</p> </dd> <p>Describes a query.</p> <dd> <p>A <strong>{{D3D11_QUERY}}</strong>-typed value that specifies the type of query.</p> </dd> <dd> <p>A combination of <strong>{{D3D11_QUERY_MISC_FLAG}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies query behavior. </p> </dd> <dd> <p>A <strong>{{D3D11_CONTEXT_TYPE}}</strong>-typed value that specifies the context for the query.</p> </dd> <p>A 2D texture interface represents texel data, which is structured memory.</p> <p>To create an empty Texture2D resource, call <strong>{{ID3D11Device3::CreateTexture2D1}}</strong>. For info about how to create a 2D texture, see How to: Create a Texture. </p><p>Textures can't be bound directly to the pipeline; instead, a view must be created and bound. Using a view, texture data can be interpreted at run time within certain restrictions. To use the texture as a render-target or depth-stencil resource, call <strong>{{ID3D11Device3::CreateRenderTargetView1}}</strong>, and <strong>{{ID3D11Device::CreateDepthStencilView}}</strong>, respectively. To use the texture as an input to a shader, call <strong>{{ID3D11Device3::CreateShaderResourceView1}}</strong>.</p> <p>Gets the properties of the texture resource.</p> <p>Returns nothing.</p> <dd> <p>A reference to a <strong>{{D3D11_TEXTURE2D_DESC1}}</strong> structure that receives the description of the 2D texture.</p> </dd> <p>A 3D texture interface represents texel data, which is structured memory.</p> <p>To create an empty Texture3D resource, call <strong>{{ID3D11Device3::CreateTexture3D1}}</strong>. For info about how to create a 2D texture, which is similar to creating a 3D texture, see How to: Create a Texture. </p><p>Textures can't be bound directly to the pipeline; instead, a view must be created and bound. Using a view, texture data can be interpreted at run time within certain restrictions. To use the texture as a render-target or depth-stencil resource, call <strong>{{ID3D11Device3::CreateRenderTargetView1}}</strong>, and <strong>{{ID3D11Device::CreateDepthStencilView}}</strong>, respectively. To use the texture as an input to a shader, call <strong>{{ID3D11Device3::CreateShaderResourceView1}}</strong>.</p> <p>Gets the properties of the texture resource.</p> <p>Returns nothing.</p> <dd> <p>A reference to a <strong>{{D3D11_TEXTURE3D_DESC1}}</strong> structure that receives the description of the 3D texture.</p> </dd> <p>The rasterizer-state interface holds a description for rasterizer state that you can bind to the rasterizer stage. This rasterizer-state interface supports forced sample count and conservative rasterization mode.</p> <p>To create a rasterizer-state object, call <strong>{{ID3D11Device3::CreateRasterizerState2}}</strong>. To bind the rasterizer-state object to the rasterizer stage, call <strong>{{ID3D11DeviceContext::RSSetState}}</strong>.</p> <p>Gets the description for rasterizer state that you used to create the rasterizer-state object.</p> <p>You use the description for rasterizer state in a call to the <strong>{{ID3D11Device3::CreateRasterizerState2}}</strong> method to create the rasterizer-state object.</p> <p>Returns nothing.</p> <dd> <p> A reference to a <strong>{{D3D11_RASTERIZER_DESC2}}</strong> structure that receives a description of the rasterizer state. This rasterizer state can specify forced sample count and conservative rasterization mode. </p> </dd> <p>A shader-resource-view interface represents the subresources a shader can access during rendering. Examples of shader resources include a constant buffer, a texture buffer, and a texture.</p> <p>To create a shader-resource view, call <strong>{{ID3D11Device3::CreateShaderResourceView1}}</strong>.</p><p>A shader-resource view is required when binding a resource to a shader stage; the binding occurs by calling <strong>{{ID3D11DeviceContext::GSSetShaderResources}}</strong>, <strong>{{ID3D11DeviceContext::VSSetShaderResources}}</strong> or <strong>{{ID3D11DeviceContext::PSSetShaderResources}}</strong>.</p> <p>Gets the shader-resource view's description.</p> <p>Returns nothing.</p> <dd> <p>A reference to a <strong>{{D3D11_SHADER_RESOURCE_VIEW_DESC1}}</strong> structure that receives the description of the shader-resource view.</p> </dd> <p>A render-target-view interface represents the render-target subresources that can be accessed during rendering.</p> <p>To create a render-target view, call <strong>{{ID3D11Device3::CreateRenderTargetView1}}</strong>. To bind a render-target view to the pipeline, call <strong>{{ID3D11DeviceContext::OMSetRenderTargets}}</strong>.</p><p>A render target is a resource that can be written by the output-merger stage at the end of a render pass. Each render target can also have a corresponding depth-stencil view.</p> <p>Gets the properties of a render-target view.</p> <p>Returns nothing.</p> <dd> <p>A reference to a <strong>{{D3D11_RENDER_TARGET_VIEW_DESC1}}</strong> structure that receives the description of the render-target view.</p> </dd> <p>An unordered-access-view interface represents the parts of a resource the pipeline can access during rendering.</p> <p>To create a view for an unordered access resource, call <strong>{{ID3D11Device3::CreateUnorderedAccessView1}}</strong>.</p><p>All resources must be bound to the pipeline before they can be accessed. Call <strong>{{ID3D11DeviceContext::CSSetUnorderedAccessViews}}</strong> to bind an unordered access view to a compute shader; call <strong>{{ID3D11DeviceContext::OMSetRenderTargetsAndUnorderedAccessViews}}</strong> to bind an unordered access view to a pixel shader.</p> <p>Gets a description of the resource.</p> <p>Returns nothing.</p> <dd> <p>A reference to a <strong>{{D3D11_UNORDERED_ACCESS_VIEW_DESC1}}</strong> structure that receives the description of the unordered-access resource.</p> </dd> <p>Represents a query object for querying information from the graphics processing unit ({{GPU}}).</p> <p>A query can be created with <strong>{{ID3D11Device3::CreateQuery1}}</strong>.</p><p>Query data is typically gathered by issuing an <strong>{{ID3D11DeviceContext::Begin}}</strong> command, issuing some graphics commands, issuing an <strong>{{ID3D11DeviceContext::End}}</strong> command, and then calling <strong>{{ID3D11DeviceContext::GetData}}</strong> to get data about what happened in between the Begin and End calls. The data returned by <strong>GetData</strong> will be different depending on the type of query.</p><p>There are, however, some queries that do not require calls to <strong>Begin</strong>. For a list of possible queries see <strong>{{D3D11_QUERY}}</strong>.</p><p>When using a query that does not require a call to <strong>Begin</strong>, it still requires a call to <strong>End</strong>. The call to <strong>End</strong> causes the data returned by <strong>GetData</strong> to be accurate up until the last call to <strong>End</strong>.</p> <p>Gets a query description.</p> <p>Returns nothing.</p> <dd> <p>A reference to a <strong>{{D3D11_QUERY_DESC1}}</strong> structure that receives a description of the query.</p> </dd> <p> The device context interface represents a device context; it is used to render commands. <strong>{{ID3D11DeviceContext3}}</strong> adds new methods to those in <strong>{{ID3D11DeviceContext2}}</strong>. </p> <p> Sends queued-up commands in the command buffer to the graphics processing unit ({{GPU}}), with a specified context type and an optional event handle to create an event query. </p> <p><strong>Flush1</strong> has parameters. For more information, see <strong>{{ID3D11DeviceContext::Flush}}</strong>, which doesn't have parameters. </p> <p> This method does not return a value. </p> <dd> <p> A <strong>{{D3D11_CONTEXT_TYPE}}</strong> that specifies the context in which a query occurs, such as a 3D command queue, 3D compute queue, 3D copy queue, video, or image. </p> </dd> <dd> <p> An optional event handle. When specified, this method creates an event query. </p> <p><strong>Flush1</strong> operates asynchronously, therefore it can return either before or after the {{GPU}} finishes executing the queued graphics commands, which will eventually complete. To create an event query, you can call <strong>{{ID3D11Device::CreateQuery}}</strong> with the value <strong>{{D3D11_QUERY_EVENT}}</strong> value. To determine when the {{GPU}} is finished processing the graphics commands, you can then use that event query in a call to <strong>{{ID3D11DeviceContext::GetData}}</strong>. </p> </dd> <p> Sets the hardware protection state. </p> <p> This method does not return a value. </p> <dd> <p> Specifies whether to enable hardware protection. </p> </dd> <p> Gets whether hardware protection is enabled. </p> <p> This method does not return a value. </p> <dd> <p> After this method returns, points to a {{BOOL}} that indicates whether hardware protection is enabled. </p> </dd> <p>The device context interface represents a device context; it is used to render commands. <strong>{{ID3D11DeviceContext1}}</strong> adds new methods to those in <strong>{{ID3D11DeviceContext}}</strong>.</p> <p>The <strong>{{ID3D11DeviceContext}}</strong> interface represents a device context which generates rendering commands.</p><strong>Note</strong>??The latest version of this interface is <strong>{{ID3D11DeviceContext4}}</strong> introduced in the Windows 10 Creators Update. Applications targetting Windows 10 Creators Update should use the <strong>{{ID3D11DeviceContext4}}</strong> interface instead of <strong>{{ID3D11Device}}</strong>.? <p>The device interface represents a virtual adapter; it is used to create resources. <strong>{{ID3D11Device3}}</strong> adds new methods to those in <strong>{{ID3D11Device2}}</strong>.</p> <p>Creates a 2D texture.</p> <p><strong>CreateTexture2D1</strong> creates a 2D texture resource, which can contain a number of 2D subresources. The number of subresources is specified in the texture description. All textures in a resource must have the same format, size, and number of mipmap levels.</p><p>All resources are made up of one or more subresources. To load data into the texture, applications can supply the data initially as an array of <strong>{{D3D11_SUBRESOURCE_DATA}}</strong> structures pointed to by <em>pInitialData</em>, or they can use one of the {{D3DX}} texture functions such as <strong>{{D3DX11CreateTextureFromFile}}</strong>.</p><p>For a 32 x 32 texture with a full mipmap chain, the <em>pInitialData</em> array has the following 6 elements: </p><ul> <li>pInitialData[0] = 32x32</li> <li>pInitialData[1] = 16x16</li> <li>pInitialData[2] = 8x8</li> <li>pInitialData[3] = 4x4 </li> <li>pInitialData[4] = 2x2 </li> <li>pInitialData[5] = 1x1 </li> </ul> <p>If the method succeeds, the return code is <strong>{{S_OK}}</strong>. See Direct3D 11 Return Codes for failing error codes.</p> <p>Creates a 3D texture.</p> <p><strong>CreateTexture3D1</strong> creates a 3D texture resource, which can contain a number of 3D subresources. The number of textures is specified in the texture description. All textures in a resource must have the same format, size, and number of mipmap levels.</p><p>All resources are made up of one or more subresources. To load data into the texture, applications can supply the data initially as an array of <strong>{{D3D11_SUBRESOURCE_DATA}}</strong> structures pointed to by <em>pInitialData</em>, or they can use one of the {{D3DX}} texture functions such as <strong>{{D3DX11CreateTextureFromFile}}</strong>.</p><p>Each element of <em>pInitialData</em> provides all of the slices that are defined for a given miplevel. For example, for a 32 x 32 x 4 volume texture with a full mipmap chain, the array has the following 6 elements:</p><ul> <li>pInitialData[0] = 32x32 with 4 slices</li> <li>pInitialData[1] = 16x16 with 2 slices</li> <li>pInitialData[2] = 8x8 with 1 slice</li> <li>pInitialData[3] = 4x4 with 1 slice</li> <li>pInitialData[4] = 2x2 with 1 slice</li> <li>pInitialData[5] = 1x1 with 1 slice</li> </ul> <p>If the method succeeds, the return code is <strong>{{S_OK}}</strong>. See Direct3D 11 Return Codes for failing error codes.</p> <p>Creates a rasterizer state object that informs the rasterizer stage how to behave and forces the sample count while {{UAV}} rendering or rasterizing.</p> <p>This method returns {{E_OUTOFMEMORY}} if there is insufficient memory to create the rasterizer state object. See Direct3D 11 Return Codes for other possible return values.</p> <p>Creates a shader-resource view for accessing data in a resource.</p> <p>This method returns {{E_OUTOFMEMORY}} if there is insufficient memory to create the shader-resource view. See Direct3D 11 Return Codes for other possible return values.</p> <dd> <p>Pointer to the resource that will serve as input to a shader. This resource must have been created with the <strong> {{D3D11_BIND_SHADER_RESOURCE}}</strong> flag.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_SHADER_RESOURCE_VIEW_DESC1}}</strong> structure that describes a shader-resource view. Set this parameter to <strong>{{NULL}}</strong> to create a view that accesses the entire resource (using the format the resource was created with).</p> </dd> <dd> <p>A reference to a memory block that receives a reference to a <strong>{{ID3D11ShaderResourceView1}}</strong> interface for the created shader-resource view. Set this parameter to <strong>{{NULL}}</strong> to validate the other input parameters (the method will return <strong>{{S_FALSE}}</strong> if the other input parameters pass validation).</p> </dd> <p> Creates a view for accessing an unordered access resource. </p> <p> This method returns {{E_OUTOFMEMORY}} if there is insufficient memory to create the unordered-access view. See Direct3D 11 Return Codes for other possible return values. </p> <p>Creates a render-target view for accessing resource data.</p> <p>A render-target view can be bound to the output-merger stage by calling <strong>{{ID3D11DeviceContext::OMSetRenderTargets}}</strong>.</p> <p>This method returns one of the Direct3D 11 Return Codes.</p> <dd> <p>Pointer to a <strong>{{ID3D11Resource}}</strong> that represents a render target. This resource must have been created with the <strong>{{D3D11_BIND_RENDER_TARGET}}</strong> flag.</p> </dd> <dd> <p>Pointer to a <strong>{{D3D11_RENDER_TARGET_VIEW_DESC1}}</strong> that represents a render-target view description. Set this parameter to <strong>{{NULL}}</strong> to create a view that accesses all of the subresources in mipmap level 0.</p> </dd> <dd> <p>A reference to a memory block that receives a reference to a <strong>{{ID3D11RenderTargetView1}}</strong> interface for the created render-target view. Set this parameter to <strong>{{NULL}}</strong> to validate the other input parameters (the method will return <strong>{{S_FALSE}}</strong> if the other input parameters pass validation).</p> </dd> <p>Creates a query object for querying information from the graphics processing unit ({{GPU}}). </p> <p>This method returns {{E_OUTOFMEMORY}} if there is insufficient memory to create the query object. See Direct3D 11 Return Codes for other possible return values.</p> <dd> <p>Pointer to a <strong>{{D3D11_QUERY_DESC1}}</strong> structure that represents a query description.</p> </dd> <dd> <p>A reference to a memory block that receives a reference to a <strong>{{ID3D11Query1}}</strong> interface for the created query object. Set this parameter to <strong>{{NULL}}</strong> to validate the other input parameters (the method will return <strong>{{S_FALSE}}</strong> if the other input parameters pass validation).</p> </dd> <p> Gets an immediate context, which can play back command lists. </p> <p> The <strong>GetImmediateContext3</strong> method outputs an <strong>{{ID3D11DeviceContext3}}</strong> object that represents an immediate context, which is used to perform rendering that you want immediately submitted to a device. For most apps, an immediate context is the primary object that is used to draw your scene. </p><p> The <strong>GetImmediateContext3</strong> method increments the reference count of the immediate context by one. Therefore, you must call <strong>Release</strong> on the returned interface reference when you are done with it to avoid a memory leak. </p> <p>This method does not return a value.</p> <p> Creates a deferred context, which can record command lists. </p> <p> Returns {{S_OK}} if successful; otherwise, returns one of the following: </p><ul> <li> Returns <strong>{{DXGI_ERROR_DEVICE_REMOVED}}</strong> if the video card has been physically removed from the system, or a driver upgrade for the video card has occurred. If this error occurs, you should destroy and recreate the device. </li> <li> Returns <strong>{{DXGI_ERROR_INVALID_CALL}}</strong> if the <strong>CreateDeferredContext3</strong> method can't be called from the current context. For example, if the device was created with the <strong>{{D3D11_CREATE_DEVICE_SINGLETHREADED}}</strong> value, <strong>CreateDeferredContext3</strong> returns <strong>{{DXGI_ERROR_INVALID_CALL}}</strong>. </li> <li> Returns <strong>{{E_INVALIDARG}}</strong> if the <em>ContextFlags</em> parameter is invalid. </li> <li> Returns <strong>{{E_OUTOFMEMORY}}</strong> if the app has exhausted available memory. </li> </ul> <p> Copies data into a <strong>{{D3D11_USAGE_DEFAULT}}</strong> texture which was mapped using {{ID3D11DeviceContext3::}}<strong>Map</strong> while providing a {{NULL}} <strong>{{D3D11_MAPPED_SUBRESOURCE}}</strong> parameter. </p> <p> The provided resource must be a <strong>{{D3D11_USAGE_DEFAULT}}</strong> texture which was mapped for writing by a previous call to {{ID3D11DeviceContext3::}}<strong>Map</strong> while providing a {{NULL}} <strong>{{D3D11_MAPPED_SUBRESOURCE}}</strong> parameter. </p><p> This {{API}} is intended for calling at high frequency. Callers can reduce memory by making iterative calls that update progressive regions of the texture, while provide a small buffer during each call. It is most efficient to specify large enough regions, though, because this enables {{D3D}} to fill whole cache lines in the texture before returning. </p><p> For efficiency, ensure the bounds and alignment of the extents within the box are ( 64 / [bytes per pixel] ) pixels horizontally. Vertical bounds and alignment should be 2 rows, except when 1-byte-per-pixel formats are used, in which case 4 rows are recommended. Single depth slices per call are handled efficiently. It is recommended but not necessary to provide references and strides which are 128-byte aligned. </p><p> When writing to sub mipmap levels, it is recommended to use larger width and heights than described above. This is because small mipmap levels may actually be stored within a larger block of memory, with an opaque amount of offsetting which can interfere with alignment to cache lines. </p> <p> This method does not return a value. </p> <p> Copies data from a <strong>{{D3D11_USAGE_DEFAULT}}</strong> texture which was mapped using {{ID3D11DeviceContext3::}}<strong>Map</strong> while providing a {{NULL}} <strong>{{D3D11_MAPPED_SUBRESOURCE}}</strong> parameter. </p> <p> The provided resource must be a <strong>{{D3D11_USAGE_DEFAULT}}</strong> texture which was mapped for writing by a previous call to {{ID3D11DeviceContext3::}}<strong>Map</strong> while providing a {{NULL}} <strong>{{D3D11_MAPPED_SUBRESOURCE}}</strong> parameter. </p><p> This {{API}} is intended for calling at high frequency. Callers can reduce memory by making iterative calls that update progressive regions of the texture, while provide a small buffer during each call. It is most efficient to specify large enough regions, though, because this enables {{D3D}} to fill whole cache lines in the texture before returning. </p><p> For efficiency, ensure the bounds and alignment of the extents within the box are ( 64 / [Bytes per pixel] ) pixels horizontally. Vertical bounds and alignment should be 2 rows, except when 1-byte-per-pixel formats are used, in which case 4 rows are recommended. Single depth slices per call are handled efficiently. It is recommended but not necessary to provide references and strides which are 128-byte aligned. </p><p> When reading from sub mipmap levels, it is recommended to use larger width and heights than described above. This is because small mipmap levels may actually be stored within a larger block of memory, with an opaque amount of offseting which can interfere with alignment to cache lines. </p> <p> This method does not return a value. </p> <p>Describes Direct3D 11.4 feature options in the current graphics driver.</p> <p>Use this structure with the {{D3D11_FEATURE_D3D11_OPTIONS4}} member of <strong>{{D3D11_FEATURE}}</strong>. </p><p>Refer to the section on {{NV12}} in Direct3D 11.4 Features.</p> <dd> <p>Specifies a {{BOOL}} that determines if {{NV12}} textures can be shared across processes and {{D3D}} devices.</p> </dd> <p> The device interface represents a virtual adapter; it is used to create resources. <strong>{{ID3D11Device4}}</strong> adds new methods to those in <strong>{{ID3D11Device3}}</strong>, such as <strong>RegisterDeviceRemovedEvent</strong> and <strong>UnregisterDeviceRemoved</strong>. </p> <p> Registers the "device removed" event and indicates when a Direct3D device has become removed for any reason, using an asynchronous notification mechanism. </p> <p>Indicates when a Direct3D device has become removed for any reason, using an asynchronous notification mechanism, rather than as an {{HRESULT}} from <strong>Present</strong>. The reason for device removal can be retrieved using <strong>{{ID3D11Device::GetDeviceRemovedReason}}</strong> after being notified of the occurrence.</p><p> Applications register and un-register a Win32 event handle with a particular device. That event handle will be signaled when the device becomes removed. A poll into the device's <strong>{{ID3D11Device::GetDeviceRemovedReason}}</strong> method indicates that the device is removed. </p><p> <strong>{{ISignalableNotifier}}</strong> or <strong>SetThreadpoolWait</strong> can be used by {{UWP}} apps. </p><p> When the graphics device is lost, the app or title will receive the graphics event, so that the app or title knows that its graphics device is no longer valid and it is safe for the app or title to re-create its DirectX devices. In response to this event, the app or title needs to re-create its rendering device and pass it into a SetRenderingDevice call on the composition graphics device objects. </p><p> After setting this new rendering device, the app or title needs to redraw content of all the pre-existing surfaces after the composition graphics device's <strong>OnRenderingDeviceReplaced</strong> event is fired. </p><p> This method supports Composition for device loss. </p><p> The event is not signaled when it is most ideal to re-create. So, instead, we recommend iterating through the adapter ordinals and creating the first ordinal that will succeed. </p><p> The application can register an event with the device. The application will be signaled when the device becomes removed. </p><p> If the device is already removed, calls to <strong>RegisterDeviceRemovedEvent</strong> will signal the event immediately. No device-removed error code will be returned from <strong>RegisterDeviceRemovedEvent</strong>. </p><p> Each "device removed" event is never signaled, or is signaled only once. These events are not signaled during device destruction. These events are unregistered during destruction. </p><p> The semantics of <strong>RegisterDeviceRemovedEvent</strong> are similar to <strong>{{IDXGIFactory2::RegisterOcclusionStatusEvent}}</strong>. </p> <p> See Direct3D 11 Return Codes. </p> <dd> <p> The handle to the "device removed" event. </p> </dd> <dd> <p> A reference to information about the "device removed" event, which can be used in <strong>UnregisterDeviceRemoved</strong> to unregister the event. </p> </dd> <p> Unregisters the "device removed" event. </p> <p> See <strong>RegisterDeviceRemovedEvent</strong>. </p> <p>This method does not return a value.</p> <dd> <p> Information about the "device removed" event, retrieved during a successful <strong>RegisterDeviceRemovedEvent</strong> call. </p> </dd> <p>The device interface represents a virtual adapter; it is used to create resources.</p><strong>Note</strong>??The latest version of this interface is <strong>{{ID3D11Device5}}</strong> introduced in the Windows 10 Creators Update. Applications targetting Windows 10 Creators Update should use the <strong>{{ID3D11Device5}}</strong> interface instead of <strong>{{ID3D11Device}}</strong>.? <p> A device is created using <strong>{{D3D11CreateDevice}}</strong>. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>The device interface represents a virtual adapter; it is used to create resources. <strong>{{ID3D11Device5}}</strong> adds new methods to those in <strong>{{ID3D11Device4}}</strong>.</p><strong>Note</strong>??This interface, introduced in the Windows 10 Creators Update, is the latest version of the <strong>{{ID3D11Device}}</strong> interface. Applications targetting Windows 10 Creators Update should use this interface instead of earlier versions.? <p>Provides threading protection for critical sections of a multi-threaded application.</p> <p>This interface is obtained by querying it from an immediate device context created with the <strong>{{ID3D11DeviceContext}}</strong> (or later versions of this) interface using {{IUnknown::QueryInterface}}.</p><p>Unlike {{D3D10}}, there is no multithreaded layer in {{D3D11}}. By default, multithread protection is turned off. Use <strong>SetMultithreadProtected</strong> to turn it on, then <strong>Enter</strong> and <strong>Leave</strong> to encapsulate graphics commands that must be executed in a specific order.</p><p>By default in {{D3D11}}, applications can only use one thread with the immediate context at a time. But, applications can use this interface to change that restriction. The interface can turn on threading protection for the immediate context, which will increase the overhead of each immediate context call in order to share one context with multiple threads.</p> <p>Enter a device's critical section.</p> <p>If <strong>SetMultithreadProtected</strong> is set to true, then entering a device's critical section prevents other threads from simultaneously calling that device's methods, calling {{DXGI}} methods, and calling the methods of all resource, view, shader, state, and asynchronous interfaces.</p><p>This function should be used in multithreaded applications when there is a series of graphics commands that must happen in order. This function is typically called at the beginning of the series of graphics commands, and <strong>Leave</strong> is typically called after those graphics commands.</p> <p>This method does not return a value.</p> <p>Leave a device's critical section.</p> <p>This function is typically used in multithreaded applications when there is a series of graphics commands that must happen in order. <strong>Enter</strong> is typically called at the beginning of a series of graphics commands, and this function is typically called after those graphics commands.</p> <p>This method does not return a value.</p> <p>Turns multithread protection on or off.</p> <p>True if multithread protection was already turned on prior to calling this method, false otherwise. </p> <dd> <p>Set to true to turn multithread protection on, false to turn it off.</p> </dd> <p>Find out if multithread protection is turned on or not.</p> <p>Returns true if multithread protection is turned on, false otherwise. </p> <p> Provides the video functionality of a Microsoft Direct3D?11 device. </p> <p>To get a reference to this interface, call <strong>QueryInterface</strong> with an <strong>{{ID3D11DeviceContext}}</strong> interface reference.</p><p>This interface provides access to several areas of Microsoft Direct3D video functionality:</p><ul> <li>Hardware-accelerated video decoding</li> <li>Video processing</li> <li>{{GPU}}-based content protection</li> <li>Video encryption and decryption</li> </ul><p>In Microsoft Direct3D?9, the equivalent functions were distributed across several interfaces:</p><ul> <li> <strong>{{IDirect3DAuthenticatedChannel9}}</strong> </li> <li> <strong>{{IDirect3DCryptoSession9}}</strong> </li> <li> <strong>{{IDirectXVideoDecoder}}</strong> </li> <li> <strong>{{IDirectXVideoProcessor}}</strong> </li> <li> <strong>{{IDXVAHD_VideoProcessor}}</strong> </li> </ul> <p>Specifies the type of a command list.</p> <p>This enum is used by the following methods:</p><ul> <li> <strong>CreateCommandAllocator</strong> </li> <li> <strong>CreateCommandQueue</strong> </li> <li> <strong>CreateCommandList</strong> </li> </ul> <dd> <p>Specifies a command buffer that the {{GPU}} can execute. A direct command list doesn't inherit any {{GPU}} state. </p> </dd> <dd> <p>Specifies a command buffer that can be executed only directly via a direct command list. A bundle command list inherits all {{GPU}} state (except for the currently set pipeline state object and primitive topology).</p> </dd> <dd> <p>Specifies a command buffer for computing. </p> </dd> <dd> <p>Specifies a command buffer for copying (drawing).</p> </dd> <p>Specifies flags to be used when creating a command queue.</p> <p> This enum is used by the <strong>{{D3D12_COMMAND_QUEUE_DESC}}</strong> structure. </p> <dd> <p>Indicates a default command queue.</p> </dd> <dd> <p>Indicates that the {{GPU}} timeout should be disabled for this command queue.</p> </dd> <p>Defines priority levels for a command queue.</p> <p> This enumeration is used by the <strong>Priority</strong> member of the <strong>{{D3D12_COMMAND_QUEUE_DESC}}</strong> structure. </p> <dd> <p>Normal priority.</p> </dd> <dd> <p>High priority.</p> </dd> <p>Specifies how the pipeline interprets geometry or hull shader input primitives.</p> <p>This enum is used by the <strong>{{D3D12_GRAPHICS_PIPELINE_STATE_DESC}}</strong> structure.</p> <dd> <p>The shader has not been initialized with an input primitive type.</p> </dd> <dd> <p>Interpret the input primitive as a point.</p> </dd> <dd> <p>Interpret the input primitive as a line. </p> </dd> <dd> <p>Interpret the input primitive as a triangle. </p> </dd> <dd> <p>Interpret the input primitive as a control point patch.</p> </dd> <p>Identifies the type of data contained in an input slot.</p> <p> Specify one of these values in the member of a <strong>{{D3D12_INPUT_ELEMENT_DESC}}</strong> structure to specify the type of data for the input element of a pipeline state object. </p> <dd> <p>Input data is per-vertex data.</p> </dd> <dd> <p>Input data is per-instance data.</p> </dd> <p>Specifies the fill mode to use when rendering triangles.</p> <p> Fill mode is specified in a <strong>{{D3D12_RASTERIZER_DESC}}</strong> structure. </p> <dd> <p>Draw lines connecting the vertices. Adjacent vertices are not drawn.</p> </dd> <dd> <p>Fill the triangles formed by the vertices. Adjacent vertices are not drawn.</p> </dd> <p>Specifies triangles facing a particular direction are not drawn.</p> <p> Cull mode is specified in a <strong>{{D3D12_RASTERIZER_DESC}}</strong> structure. </p> <dd> <p>Always draw all triangles.</p> </dd> <dd> <p>Do not draw triangles that are front-facing.</p> </dd> <dd> <p>Do not draw triangles that are back-facing.</p> </dd> <p>Specifies comparison options.</p> <p> A comparison option determines how the runtime compares source (new) data against destination (existing) data before storing the new data. The comparison option is declared in a description before an object is created. The {{API}} allows you to set a comparison option for </p><ul> <li> a depth-stencil buffer (<strong>{{D3D12_DEPTH_STENCIL_DESC}}</strong>) </li> <li> depth-stencil operations (<strong>{{D3D12_DEPTH_STENCILOP_DESC}}</strong>) </li> <li> sampler state (<strong>{{D3D12_SAMPLER_DESC}}</strong>) </li> </ul> <dd> <p>Never pass the comparison.</p> </dd> <dd> <p>If the source data is less than the destination data, the comparison passes.</p> </dd> <dd> <p>If the source data is equal to the destination data, the comparison passes.</p> </dd> <dd> <p>If the source data is less than or equal to the destination data, the comparison passes.</p> </dd> <dd> <p>If the source data is greater than the destination data, the comparison passes.</p> </dd> <dd> <p>If the source data is not equal to the destination data, the comparison passes.</p> </dd> <dd> <p>If the source data is greater than or equal to the destination data, the comparison passes.</p> </dd> <dd> <p>Always pass the comparison.</p> </dd> <p>Identifies the portion of a depth-stencil buffer for writing depth data.</p> <p>This enum is used by the <strong>{{D3D12_DEPTH_STENCIL_DESC}}</strong> structure.</p> <dd> <p>Turn off writes to the depth-stencil buffer.</p> </dd> <dd> <p>Turn on writes to the depth-stencil buffer.</p> </dd> <p>Identifies the stencil operations that can be performed during depth-stencil testing.</p> <p>This enum is used by the <strong>{{D3D12_DEPTH_STENCILOP_DESC}}</strong> structure.</p> <dd> <p>Keep the existing stencil data.</p> </dd> <dd> <p>Set the stencil data to 0.</p> </dd> <dd> <p>Set the stencil data to the reference value set by calling <strong>{{ID3D11DeviceContext::OMSetDepthStencilState}}</strong>.</p> </dd> <dd> <p>Increment the stencil value by 1, and clamp the result.</p> </dd> <dd> <p>Decrement the stencil value by 1, and clamp the result.</p> </dd> <dd> <p>Invert the stencil data.</p> </dd> <dd> <p>Increment the stencil value by 1, and wrap the result if necessary.</p> </dd> <dd> <p>Decrement the stencil value by 1, and wrap the result if necessary.</p> </dd> <p>Specifies blend factors, which modulate values for the pixel shader and render target.</p> <p>Source and destination blend operations are specified in a <strong>{{D3D12_RENDER_TARGET_BLEND_DESC}}</strong> structure.</p> <dd> <p>The blend factor is (0, 0, 0, 0). No pre-blend operation.</p> </dd> <dd> <p>The blend factor is (1, 1, 1, 1). No pre-blend operation.</p> </dd> <dd> <p>The blend factor is (R?, G?, B?, A?), that is color data ({{RGB}}) from a pixel shader. No pre-blend operation.</p> </dd> <dd> <p>The blend factor is (1 - R?, 1 - G?, 1 - B?, 1 - A?), that is color data ({{RGB}}) from a pixel shader. The pre-blend operation inverts the data, generating 1 - {{RGB}}.</p> </dd> <dd> <p>The blend factor is (A?, A?, A?, A?), that is alpha data (A) from a pixel shader. No pre-blend operation.</p> </dd> <dd> <p>The blend factor is ( 1 - A?, 1 - A?, 1 - A?, 1 - A?), that is alpha data (A) from a pixel shader. The pre-blend operation inverts the data, generating 1 - A.</p> </dd> <dd> <p>The blend factor is (Ad Ad Ad Ad), that is alpha data from a render target. No pre-blend operation.</p> </dd> <dd> <p>The blend factor is (1 - Ad 1 - Ad 1 - Ad 1 - Ad), that is alpha data from a render target. The pre-blend operation inverts the data, generating 1 - A.</p> </dd> <dd> <p>The blend factor is (Rd, Gd, Bd, Ad), that is color data from a render target. No pre-blend operation.</p> </dd> <dd> <p>The blend factor is (1 - Rd, 1 - Gd, 1 - Bd, 1 - Ad), that is color data from a render target. The pre-blend operation inverts the data, generating 1 - {{RGB}}.</p> </dd> <dd> <p>The blend factor is (f, f, f, 1); where f = min(A?, 1 - Ad). The pre-blend operation clamps the data to 1 or less. </p> </dd> <dd> <p>The blend factor is the blend factor set with <strong>{{ID3D12GraphicsCommandList::OMSetBlendFactor}}</strong>. No pre-blend operation.</p> </dd> <dd> <p>The blend factor is the blend factor set with <strong>{{ID3D12GraphicsCommandList::OMSetBlendFactor}}</strong>. The pre-blend operation inverts the blend factor, generating 1 - blend_factor.</p> </dd> <dd> <p>The blend factor is data sources both as color data output by a pixel shader. There is no pre-blend operation. This blend factor supports dual-source color blending.</p> </dd> <dd> <p>The blend factor is data sources both as color data output by a pixel shader. The pre-blend operation inverts the data, generating 1 - {{RGB}}. This blend factor supports dual-source color blending.</p> </dd> <dd> <p>The blend factor is data sources as alpha data output by a pixel shader. There is no pre-blend operation. This blend factor supports dual-source color blending.</p> </dd> <dd> <p>The blend factor is data sources as alpha data output by a pixel shader. The pre-blend operation inverts the data, generating 1 - A. This blend factor supports dual-source color blending.</p> </dd> <p>Specifies {{RGB}} or alpha blending operations.</p> <p>The runtime implements {{RGB}} blending and alpha blending separately. Therefore, blend state requires separate blend operations for {{RGB}} data and alpha data. These blend operations are specified in a <strong>{{D3D12_RENDER_TARGET_BLEND_DESC}}</strong> structure. The two sources ?source 1 and source 2? are shown in the blending block diagram.</p><p>Blend state is used by the output-merger stage to determine how to blend together two {{RGB}} pixel values and two alpha values. The two {{RGB}} pixel values and two alpha values are the {{RGB}} pixel value and alpha value that the pixel shader outputs and the {{RGB}} pixel value and alpha value already in the output render target. The <strong>{{D3D12_BLEND}}</strong> value controls the data source that the blending stage uses to modulate values for the pixel shader, render target, or both. The <strong>{{D3D12_BLEND_OP}}</strong> value controls how the blending stage mathematically combines these modulated values.</p> <dd> <p>Add source 1 and source 2.</p> </dd> <dd> <p>Subtract source 1 from source 2.</p> </dd> <dd> <p>Subtract source 2 from source 1.</p> </dd> <dd> <p>Find the minimum of source 1 and source 2.</p> </dd> <dd> <p>Find the maximum of source 1 and source 2.</p> </dd> <p>Identifies which components of each pixel of a render target are writable during blending.</p> <p> This enum is used by the <strong>{{D3D12_RENDER_TARGET_BLEND_DESC}}</strong> structure. </p> <dd> <p>Allow data to be stored in the red component.</p> </dd> <dd> <p>Allow data to be stored in the green component.</p> </dd> <dd> <p>Allow data to be stored in the blue component.</p> </dd> <dd> <p>Allow data to be stored in the alpha component.</p> </dd> <dd> <p>Allow data to be stored in all components.</p> </dd> <p>Specifies logical operations to configure for a render target.</p> <p>This enum is used by the <strong>{{D3D12_RENDER_TARGET_BLEND_DESC}}</strong> structure.</p> <dd> <p>Clears the render target.</p> </dd> <dd> <p>Sets the render target.</p> </dd> <dd> <p>Copys the render target.</p> </dd> <dd> <p>Performs an inverted-copy of the render target.</p> </dd> <dd> <p>No operation is performed on the render target.</p> </dd> <dd> <p>Inverts the render target.</p> </dd> <dd> <p>Performs a logical {{AND}} operation on the render target.</p> </dd> <dd> <p>Performs a logical {{NAND}} operation on the render target.</p> </dd> <dd> <p>Performs a logical {{OR}} operation on the render target.</p> </dd> <dd> <p>Performs a logical {{NOR}} operation on the render target.</p> </dd> <dd> <p>Performs a logical {{XOR}} operation on the render target.</p> </dd> <dd> <p>Performs a logical equal operation on the render target.</p> </dd> <dd> <p>Performs a logical {{AND}} and reverse operation on the render target.</p> </dd> <dd> <p>Performs a logical {{AND}} and invert operation on the render target.</p> </dd> <dd> <p>Performs a logical {{OR}} and reverse operation on the render target.</p> </dd> <dd> <p>Performs a logical {{OR}} and invert operation on the render target.</p> </dd> <p>Identifies whether conservative rasterization is on or off.</p> <p>This enum is used by the <strong>{{D3D12_RASTERIZER_DESC}}</strong> structure. </p> <dd> <p>Conservative rasterization is off.</p> </dd> <dd> <p>Conservative rasterization is on.</p> </dd> <p> When using triangle strip primitive topology, vertex positions are interpreted as vertices of a continuous triangle ?strip?. There is a special index value that represents the desire to have a discontinuity in the strip, the cut index value. This enum lists the supported cut values. </p> <p> This enum is used by the <strong>{{D3D12_GRAPHICS_PIPELINE_STATE_DESC}}</strong> structure. </p> <dd> <p> Indicates that there is no cut value. </p> </dd> <dd> <p> Indicates that 0xFFFF should be used as the cut value. </p> </dd> <dd> <p> Indicates that 0xFFFFFFFF should be used as the cut value. </p> </dd> <p> Flags to control pipeline state. </p> <p> This enum is used by the <strong>Flags</strong> member of the <strong>{{D3D12_GRAPHICS_PIPELINE_STATE_DESC}}</strong> and <strong>{{D3D12_COMPUTE_PIPELINE_STATE_DESC}}</strong> structures. </p> <dd> <p> Indicates no flags. </p> </dd> <dd> <p> Indicates that the pipeline state should be compiled with additional information to assist debugging. This can only be set on {{WARP}} devices. </p> </dd> <p>Specifies what to clear from the depth stencil view.</p> <p> This enum is used by <strong>{{ID3D12GraphicsCommandList::ClearDepthStencilView}}</strong>. The flags can be combined to clear all. </p> <dd> <p>Indicates the depth buffer should be cleared.</p> </dd> <dd> <p>Indicates the stencil buffer should be cleared.</p> </dd> <p> Describes minimum precision support options for shaders in the current graphics driver. </p> <p> This enum is used by the <strong>{{D3D12_FEATURE_DATA_D3D12_OPTIONS}}</strong> structure. </p><p> The returned info just indicates that the graphics hardware can perform {{HLSL}} operations at a lower precision than the standard 32-bit float precision, but doesn?t guarantee that the graphics hardware will actually run at a lower precision. </p> <dd> <p>The driver supports only full 32-bit precision for all shader stages.</p> </dd> <dd> <p>The driver supports 10-bit precision.</p> </dd> <dd> <p>The driver supports 16-bit precision.</p> </dd> <p> Identifies the tier level at which tiled resources are supported. </p> <p> This enum is used by the <strong>{{D3D12_FEATURE_DATA_D3D12_OPTIONS}}</strong> structure. </p><p> There are three discrete pieces of functionality bundled together for tiled resource functionality: </p><ul> <li> A tile-based texture layout option where nearby texel addresses contain nearby data coordinates. A tile of texels contains nearly the same amount of texels in each cardinal dimension of the resource. This layout is represented in {{D3D12}} by <strong>{{D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE}}</strong>. </li> <li> Reserve a region of virtual address space for a resource, where each page is initially {{NULL}}-mapped. In {{D3D12}}, this is operation is encapsulated within <strong>{{ID3D12Device::CreateReservedResource}}</strong>, which only works with textures that have the {{D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE}} layout. </li> <li> The ability to change page mappings and manipulate texture data on tile granularities. In {{D3D12}}, these operations are <strong>{{ID3D12CommandQueue::UpdateTileMappings}}</strong>, <strong>{{ID3D12CommandQueue::CopyTileMappings}}</strong>, and <strong>{{ID3D12GraphicsCommandList::CopyTiles}}</strong>. </li> </ul><p> Three significant changes over {{D3D11}} are: </p><ul> <li> Tile pools are replaced by heaps. Heaps provide a superset of capabilities than {{D3D11}} tile pools do. </li> <li> Reserved resources may be mapped to pages from multiple heaps at the same time. The {{D3D11}} restriction that all non-{{NULL}} mapped pages must come from the same heap does not exist. </li> <li> Applications should be aware of {{GPU}} virtual address capabilities, which enable litmus tests for particular usage scenarios. See <strong>{{D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT}}</strong>. </li> </ul> <dd> <p> Indicates that textures cannot be created with the <strong>{{D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE}}</strong> layout. </p> <p> <strong>{{ID3D12Device::CreateReservedResource}}</strong> cannot be used, not even for buffers. </p> </dd> <dd> <p> Indicates that 2D textures can be created with the {{D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE}} layout. Limitations exist for certain resource formats and properties. For more details, see <strong>{{D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE}}</strong>. </p> <p> <strong>{{ID3D12Device::CreateReservedResource}}</strong> can be used. </p> <p> {{GPU}} reads or writes to {{NULL}} mappings are undefined. Applications are encouraged to workaround this limitation by repeatedly mapping the same page to everywhere a {{NULL}} mapping would've been used. </p> <p> When the size of a texture mipmap level is an integer multiple of the standard tile shape for its format, it is guaranteed to be nonpacked. </p> </dd> <dd> <p> Indicates that a superset of Tier_1 functionality is supported, including this additional support: </p> <ul> <li> When the size of a texture mipmap level is at least one standard tile shape for its format, the mipmap level is guaranteed to be nonpacked. For more info, see <strong>{{D3D12_PACKED_MIP_INFO}}</strong>. </li> <li> Shader instructions are available for clamping level-of-detail ({{LOD}}) and for obtaining status about the shader operation. For info about one of these shader instructions, see Sample(S,float,int,float,uint). <strong>Sample(S,float,int,float,uint)</strong>. </li> <li> Reading from <strong>{{NULL}}</strong>-mapped tiles treat that sampled value as zero. Writes to <strong>{{NULL}}</strong>-mapped tiles are discarded. </li> </ul> <p> Adapters that support feature level 12_0 all support {{TIER_2}} or greater. </p> </dd> <dd> <p> Indicates that a superset of Tier 2 is supported, with the addition that 3D textures (Volume Tiled Resources) are supported. </p> </dd> <p>Identifies the tier level of conservative rasterization.</p> <p> This enum is used by the <strong>{{D3D12_FEATURE_DATA_D3D12_OPTIONS}}</strong> structure. </p> <dd> <p>Conservative rasterization is not supported.</p> </dd> <dd> <p>Tier 1 enforces a maximum 1/2 pixel uncertainty region and does not support post-snap degenerates. This is good for tiled rendering, a texture atlas, light map generation and sub-pixel shadow maps.</p> </dd> <dd> <p> Tier 2 reduces the maximum uncertainty region to 1/256 and requires post-snap degenerates not be culled. This tier is helpful for {{CPU}}-based algorithm acceleration (such as voxelization).</p> </dd> <dd> <p> Tier 3 maintains a maximum 1/256 uncertainty region and adds support for inner input coverage. Inner input coverage adds the new value <code>{{SV_InnerCoverage}}</code> to High Level Shading Language ({{HLSL}}). This is a 32-bit scalar integer that can be specified on input to a pixel shader, and represents the underestimated conservative rasterization information (that is, whether a pixel is guaranteed-to-be-fully covered). This tier is helpful for occlusion culling.</p> </dd> <p>Specifies resources that are supported for a provided format.</p> <p>This enum is used by the <strong>{{D3D12_FEATURE_DATA_FORMAT_SUPPORT}}</strong> structure. </p> <dd> <p>No resources are supported.</p> </dd> <dd> <p>Buffer resources supported.</p> </dd> <dd> <p>Vertex buffers supported.</p> </dd> <dd> <p>Index buffers supported.</p> </dd> <dd> <p>Streaming output buffers supported.</p> </dd> <dd> <p>1D texture resources supported.</p> </dd> <dd> <p>2D texture resources supported.</p> </dd> <dd> <p>3D texture resources supported.</p> </dd> <dd> <p>Cube texture resources supported.</p> </dd> <dd> <p>The {{HLSL}} <strong>Load</strong> function for texture objects is supported.</p> </dd> <dd> <p>The {{HLSL}} <strong>Sample</strong> function for texture objects is supported.</p> <strong>Note</strong>??If the device supports the format as a resource (1D, 2D, 3D, or cube map) but doesn't support this option, the resource can still use the Sample method but must use only the point filtering sampler state to perform the sample. ? </dd> <dd> <p>The {{HLSL}} <strong>SampleCmp</strong> and <strong>SampleCmpLevelZero</strong> functions for texture objects are supported.</p> <strong>Note</strong>??Windows?8 and later might provide limited support for these functions on Direct3D feature levels 9_1, 9_2, and 9_3. For more info, see Implementing shadow buffers for Direct3D feature level 9. ? </dd> <dd> <p>Reserved.</p> </dd> <dd> <p>Mipmaps are supported.</p> </dd> <dd> <p>Render targets are supported.</p> </dd> <dd> <p>Blend operations supported.</p> </dd> <dd> <p>Depth stencils supported.</p> </dd> <dd> <p>Multisample antialiasing ({{MSAA}}) resolve operations are supported. For more info, see <strong>{{ID3D12GraphicsCommandList::ResolveSubresource}}</strong>. </p> </dd> <dd> <p>Format can be displayed on screen.</p> </dd> <dd> <p>Format can't be cast to another format.</p> </dd> <dd> <p>Format can be used as a multi-sampled render target.</p> </dd> <dd> <p>Format can be used as a multi-sampled texture and read into a shader with the {{HLSL}} <strong>Load</strong> function.</p> </dd> <dd> <p>Format can be used with the {{HLSL}} gather function. This value is available in DirectX 10.1 or higher.</p> </dd> <dd> <p>Format supports casting when the resource is a back buffer.</p> </dd> <dd> <p>Format can be used for an unordered access view.</p> </dd> <dd> <p>Format can be used with the {{HLSL}} gather with comparison function.</p> </dd> <dd> <p>Format can be used with the decoder output.</p> </dd> <dd> <p>Format can be used with the video processor output.</p> </dd> <dd> <p>Format can be used with the video processor input.</p> </dd> <dd> <p>Format can be used with the video encoder.</p> </dd> <p> Specifies which unordered resource options are supported for a provided format. </p> <p> This enum is used by the <strong>{{D3D12_FEATURE_DATA_FORMAT_SUPPORT}}</strong> structure. </p> <dd> <p>No unordered resource options are supported.</p> </dd> <dd> <p>Format supports atomic add.</p> </dd> <dd> <p>Format supports atomic bitwise operations.</p> </dd> <dd> <p>Format supports atomic compare with store or exchange.</p> </dd> <dd> <p>Format supports atomic exchange.</p> </dd> <dd> <p>Format supports atomic min and max.</p> </dd> <dd> <p>Format supports atomic unsigned min and max.</p> </dd> <dd> <p>Format supports a typed load.</p> </dd> <dd> <p>Format supports a typed store.</p> </dd> <dd> <p>Format supports logic operations in blend state.</p> </dd> <dd> <p> Format supports tiled resources. Refer to Volume Tiled Resources. </p> </dd> <dd> <p> Format supports multi-plane overlays. </p> </dd> <p> Specifies options for determining quality levels. </p> <p> This enum is used by the <strong>{{D3D12_FEATURE_DATA_MULTISAMPLE_QUALITY_LEVELS}}</strong> structure. </p> <dd> <p> No options are supported. </p> </dd> <dd> <p> The number of quality levels can be determined for tiled resources. </p> </dd> <p> Specifies the level of sharing across nodes of an adapter, such as Tier 1 Emulated, Tier 1, or Tier 2. </p> <p> This enum is used by the <strong>CrossNodeSharingTier</strong> member of the <strong>{{D3D12_FEATURE_DATA_D3D12_OPTIONS}}</strong> structure. </p> <dd> <p> If an adapter only has 1 node, then cross-node sharing doesn't apply, so the <strong>CrossNodeSharingTier</strong> member of the <strong>{{D3D12_FEATURE_DATA_D3D12_OPTIONS}}</strong> structure is set to {{D3D12_CROSS_NODE_SHARING_NOT_SUPPORTED}}. </p> </dd> <dd> <p> Tier 1 Emulated. Devices that set the <strong>CrossNodeSharingTier</strong> member of the <strong>{{D3D12_FEATURE_DATA_D3D12_OPTIONS}}</strong> structure to {{D3D12_CROSS_NODE_SHARING_TIER_1_EMULATED}} have Tier 1 support. However, drivers stage these copy operations through a driver-internal system memory allocation. This will cause these copy operations to consume time on the destination {{GPU}} as well as the source. </p> </dd> <dd> <p> Tier 1. Devices that set the <strong>CrossNodeSharingTier</strong> member of the <strong>{{D3D12_FEATURE_DATA_D3D12_OPTIONS}}</strong> structure to {{D3D12_CROSS_NODE_SHARING_TIER_1}} only support the following cross-node copy operations: </p> <ul> <li> <strong>{{ID3D12CommandList::CopyBufferRegion}}</strong> </li> <li> <strong>{{ID3D12CommandList::CopyTextureRegion}}</strong> </li> <li> <strong>{{ID3D12CommandList::CopyResource}}</strong> </li> </ul> <p> Additionally, the cross-node resource must be the destination of the copy operation. </p> </dd> <dd> <p> Tier 2. Devices that set the <strong>CrossNodeSharingTier</strong> member of the <strong>{{D3D12_FEATURE_DATA_D3D12_OPTIONS}}</strong> structure to {{D3D12_CROSS_NODE_SHARING_TIER_2}} support all operations across nodes, except for the following: </p> <ul> <li> Render target views. </li> <li> Depth stencil views. </li> <li> {{UAV}} atomic operations. Similar to {{CPU}}/{{GPU}} interop, shaders may perform {{UAV}} atomic operations; however, no atomicity across adapters is guaranteed. </li> </ul> <p> Applications can retrieve the node where a resource/heap exists from the <strong>{{D3D12_HEAP_DESC}}</strong> structure. These values are retrievable for opened resources. The runtime performs the appropriate re-mapping in case the 2 devices are using different {{UMD}}-specified node re-mappings. </p> </dd> <p> Specifies which resource heap tier the hardware and driver support. </p> <p> This enum is used by the <strong>ResourceHeapTier</strong> member of the <strong>{{D3D12_FEATURE_DATA_D3D12_OPTIONS}}</strong> structure. </p><p> This enum specifies which resource heap tier the hardware and driver support. Lower tiers require more heap attribution than greater tiers. </p><p> Resources can be categorized into the following types: </p><ul> <li>Buffers</li> <li>Non-render target &amp; non-depth stencil textures</li> <li>Render target or depth stencil textures</li> </ul> <dd> <p> Indicates that heaps can only support resources from a single resource category. For the list of resource categories, see Remarks. In tier 1, these resource categories are mutually exclusive and cannot be used with the same heap. The resource category must be declared when creating a heap, using the correct <strong>{{D3D12_HEAP_FLAGS}}</strong> enumeration constant. Applications cannot create heaps with flags that allow all three categories. </p> </dd> <dd> <p> Indicates that heaps can support resources from all three categories. For the list of resource categories, see Remarks. In tier 2, these resource categories can be mixed within the same heap. Applications may create heaps with flags that allow all three categories; but are not required to do so. Applications may be written to support tier 1 and seamlessly run on tier 2. </p> </dd> <p>Specifies what to clear from the depth stencil view.</p> <p> This enum is used by <strong>{{ID3D12GraphicsCommandList::ClearDepthStencilView}}</strong>. The flags can be combined to clear all. </p> <dd> <p>Indicates the depth buffer should be cleared.</p> </dd> <dd> <p>Indicates the stencil buffer should be cleared.</p> </dd> <p>Specifies the version of root signature layout.</p> <p> This enum is used by the following structures and methods.</p><ul> <li> <strong>{{D3D12_VERSIONED_ROOT_SIGNATURE_DESC}}</strong> </li> <li> <strong>{{D3D12_FEATURE_DATA_ROOT_SIGNATURE}}</strong> </li> <li> <strong>GetRootSignatureDescAtVersion</strong> </li> <li> <strong>{{D3D12SerializeRootSignature}}</strong> </li> </ul> <dd> <p>Version one of root signature layout.</p> </dd> <dd> <p>Version one of root signature layout.</p> </dd> <dd> <p>Version 1.1 of root signature layout. Refer to Root Signature Version 1.1.</p> </dd> <p>Specifies a shader model.</p> <p>This enum is used by the <strong>{{D3D12_FEATURE_DATA_SHADER_MODEL}}</strong> structure.</p> <dd> <p>Indicates shader model 5.1.</p> </dd> <dd> <p>Indicates shader model 6.0.</p> </dd> <p>Specifies what to clear from the depth stencil view.</p> <p> This enum is used by <strong>{{ID3D12GraphicsCommandList::ClearDepthStencilView}}</strong>. The flags can be combined to clear all. </p> <dd> <p>Indicates the depth buffer should be cleared.</p> </dd> <dd> <p>Indicates the stencil buffer should be cleared.</p> </dd> <p> Specifies the type of heap. When resident, heaps reside in a particular physical memory pool with certain {{CPU}} cache properties. </p> <p> This enum is used by the following {{API}} items: </p><ul> <li> <strong>{{D3D12_HEAP_DESC}}</strong> </li> <li> <strong>{{D3D12_HEAP_PROPERTIES}}</strong> </li> <li> <strong>GetCustomHeapProperties</strong> </li> </ul><p> The heap types fall into two categories: abstracted heap types, and custom heap types. </p><p> The following are abstracted heap types: </p><ul> <li>{{D3D12_HEAP_TYPE_DEFAULT}}</li> <li>{{D3D12_HEAP_TYPE_UPLOAD}}</li> <li>{{D3D12_HEAP_TYPE_READBACK}}</li> </ul><p> The following is a custom heap type: </p><ul> <li>{{D3D12_HEAP_TYPE_CUSTOM}}</li> </ul><p> The abstracted heap types (_DEFAULT, _UPLOAD, and _READBACK) are useful to simplify writing adapter-neutral applications, because such applications don't need to be aware of the adapter memory architecture. To use an abstracted heap type to simplify writing adapter-neutral applications, the application essentially treats the adapter as if it were a discrete or {{NUMA}} adapter. But, using the heap types enables efficient translation for {{UMA}} adapters. Adapter architecture neutral applications should assume there are two memory pools available, where the pool with the most {{GPU}} bandwidth cannot provide {{CPU}} access. The pool with the least {{GPU}} bandwidth can have {{CPU}} access; but must be either optimized for upload to {{GPU}} or readback from {{GPU}}. </p> <dd> <p> Specifies the default heap. This heap type experiences the most bandwidth for the {{GPU}}, but cannot provide {{CPU}} access. The {{GPU}} can read and write to the memory from this pool, and resource transition barriers may be changed. The majority of heaps and resources are expected to be located here, and are typically populated through resources in upload heaps. </p> </dd> <dd> <p> Specifies a heap used for uploading. This heap type has {{CPU}} access optimized for uploading to the {{GPU}}, but does not experience the maximum amount of bandwidth for the {{GPU}}. This heap type is best for {{CPU}}-write-once, {{GPU}}-read-once data; but {{GPU}}-read-once is stricter than necessary. {{GPU}}-read-once-or-from-cache is an acceptable use-case for the data; but such usages are hard to judge due to differing {{GPU}} cache designs and sizes. If in doubt, stick to the {{GPU}}-read-once definition or profile the difference on many {{GPUs}} between copying the data to a _DEFAULT heap vs. reading the data from an _UPLOAD heap. </p> <p> Resources in this heap must be created with <strong>{{D3D12_RESOURCE_STATE}}</strong>_GENERIC_READ and cannot be changed away from this. The {{CPU}} address for such heaps is commonly not efficient for {{CPU}} reads. </p> <p> The following are typical usages for _UPLOAD heaps: </p> <ul> <li> Initializing resources in a _DEFAULT heap with data from the {{CPU}}. </li> <li> Uploading dynamic data in a constant buffer that is read, repeatedly, by each vertex or pixel. </li> </ul> <p> The following are likely not good usages for _UPLOAD heaps: </p> <ul> <li> Re-initializing the contents of a resource every frame. </li> <li> Uploading constant data which is only used every other Draw call, where each Draw uses a non-trivial amount of other data. </li> </ul> </dd> <dd> <p> Specifies a heap used for reading back. This heap type has {{CPU}} access optimized for reading data back from the {{GPU}}, but does not experience the maximum amount of bandwidth for the {{GPU}}. This heap type is best for {{GPU}}-write-once, {{CPU}}-readable data. The {{CPU}} cache behavior is write-back, which is conducive for multiple sub-cache-line {{CPU}} reads. </p> <p> Resources in this heap must be created with <strong>{{D3D12_RESOURCE_STATE}}</strong>_COPY_DEST, and cannot be changed away from this. </p> </dd> <dd> <p> Specifies a custom heap. The application may specify the memory pool and {{CPU}} cache properties directly, which can be useful for {{UMA}} optimizations, multi-engine, multi-adapter, or other special cases. To do so, the application is expected to understand the adapter architecture to make the right choice. For more details, see <strong>{{D3D12_FEATURE}}</strong>_ARCHITECTURE, <strong>{{D3D12_FEATURE_DATA_ARCHITECTURE}}</strong>, and <strong>GetCustomHeapProperties</strong>. </p> </dd> <p>Specifies the {{CPU}}-page properties for the heap.</p> <p> This enum is used by the <strong>{{D3D12_HEAP_PROPERTIES}}</strong> structure. </p> <dd> <p>The {{CPU}}-page property is unknown.</p> </dd> <dd> <p> The {{CPU}} cannot access the heap, therefore no page properties are available. </p> </dd> <dd> <p>The {{CPU}}-page property is write-combined.</p> </dd> <dd> <p>The {{CPU}}-page property is write-back.</p> </dd> <p>Specifies the memory pool for the heap.</p> <p> This enum is used by the <strong>{{D3D12_HEAP_PROPERTIES}}</strong> structure. </p><p>When the adapter is {{UMA}}, {{D3D12_MEMORY_POOL_L0}} and {{DXGI_MEMORY_SEGMENT_GROUP_LOCAL}} refer to the same memory. When</p><p> the adapter is not {{UMA:}} {{D3D12_MEMORY_POOL_L0}} and {{DXGI_MEMORY_SEGMENT_GROUP_NON_LOCAL}} refer to the same memory. {{D3D12_MEMORY_POOL_L1}} and {{DXGI_MEMORY_SEGMENT_GROUP_LOCAL}} refer to the same memory.</p> <dd> <p> The memory pool is unknown. </p> </dd> <dd> <p> The memory pool is {{L0}}. {{L0}} is the physical system memory pool. When the adapter is discrete/{{NUMA}}, this pool has greater bandwidth for the {{CPU}} and less bandwidth for the {{GPU}}. When the adapter is {{UMA}}, this pool is the only one which is valid. </p> </dd> <dd> <p> The memory pool is {{L1}}. {{L1}} is typically known as the physical video memory pool. {{L1}} is only available when the adapter is discrete/{{NUMA}}, and has greater bandwidth for the {{GPU}} and cannot even be accessed by the {{CPU}}. When the adapter is {{UMA}}, this pool is not available. </p> </dd> <p> Specifies heap options, such as whether the heap can contain textures, and whether resources are shared across adapters. </p> <p> This enum is used by the following {{API}} items: </p><ul> <li> <strong>{{ID3D12Device::CreateHeap}}</strong> </li> <li> <strong>{{ID3D12Device::CreateCommittedResource}}</strong> </li> <li> <strong>{{D3D12_HEAP_DESC}}</strong> structure </li> </ul><p> The following heap flags must be used with <strong>{{ID3D12Device::CreateHeap}}</strong>, but will be set automatically for implicit heaps created by <strong>{{ID3D12Device::CreateCommittedResource}}</strong>. </p><p> Adapters that only support <strong>heap tier 1</strong> must set two out of the three following flags. </p><table> <tr><th>Value</th><th>Description</th></tr> <tr><td>{{D3D12_HEAP_FLAG_DENY_BUFFERS}}</td><td> The heap isn't allowed to contain resources with {{D3D12_RESOURCE_DIMENSION_BUFFER}} (which is a <strong>{{D3D12_RESOURCE_DIMENSION}}</strong> enumeration constant). </td></tr> <tr><td>{{D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES}}</td><td> The heap isn't allowed to contain resources with {{D3D12_RESOURCE_DIMENSION_TEXTURE1D}}, {{D3D12_RESOURCE_DIMENSION_TEXTURE2D}}, or {{D3D12_RESOURCE_DIMENSION_TEXTURE3D}} together with either {{D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET}} or {{D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL}}. (The latter two items are <strong>{{D3D12_RESOURCE_FLAGS}}</strong> enumeration constants.) </td></tr> <tr><td>{{D3D12_HEAP_FLAG_DENY_NON_RT_DS_TEXTURES}}</td><td> The heap isn't allowed to contain resources with {{D3D12_RESOURCE_DIMENSION_TEXTURE1D}}, {{D3D12_RESOURCE_DIMENSION_TEXTURE2D}}, or {{D3D12_RESOURCE_DIMENSION_TEXTURE3D}} unless {{D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET}} and {{D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL}} are absent. </td></tr> </table><p>?</p> <dd> <p> No options are specified. </p> </dd> <dd> <p> The heap is shared. Refer to Shared Heaps.</p> </dd> <dd> <p> The heap isn't allowed to contain buffers. </p> </dd> <dd> <p> The heap is allowed to contain swap-chain surfaces. </p> </dd> <dd> <p> The heap is allowed to share resources across adapters. Refer to Shared Heaps. </p> </dd> <dd> <p> The heap is not allowed to store Render Target ({{RT}}) and/or Depth-Stencil ({{DS}}) textures. </p> </dd> <dd> <p>The heap is not allowed to contain resources with {{D3D12_RESOURCE_DIMENSION_TEXTURE1D}}, {{D3D12_RESOURCE_DIMENSION_TEXTURE2D}}, or {{D3D12_RESOURCE_DIMENSION_TEXTURE3D}} unless either {{D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET}} or {{D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL}} are present. Refer to <strong>{{D3D12_RESOURCE_DIMENSION}}</strong> and <strong>{{D3D12_RESOURCE_FLAGS}}</strong>.</p> </dd> <dd> <p>_</p> </dd> <dd> <p> The heap is allowed to store all types of buffers and/or textures. This is an alias; for more details, see "Aliases" in the Remarks section. </p> </dd> <dd> <p> The heap is only allowed to store buffers. This is an alias; for more details, see "Aliases" in the Remarks section. </p> </dd> <dd> <p> The heap is only allowed to store non-{{RT}}, non-{{DS}} textures. This is an alias; for more details, see "Aliases" in the Remarks section. </p> </dd> <dd> <p> The heap is only allowed to store {{RT}} and/or {{DS}} textures. This is an alias; for more details, see "Aliases" in the Remarks section. </p> </dd> <p>Identifies the type of resource being used.</p> <p> This enum is used by the <strong>{{D3D12_RESOURCE_DESC}}</strong> structure. </p> <dd> <p>Resource is of unknown type.</p> </dd> <dd> <p>Resource is a buffer.</p> </dd> <dd> <p>Resource is a 1D texture.</p> </dd> <dd> <p>Resource is a 2D texture.</p> </dd> <dd> <p>Resource is a 3D texture.</p> </dd> <p> Specifies texture layout options. </p> <p> This enum is used by the <strong>{{D3D12_RESOURCE_DESC}}</strong> structure. </p><p> This enumeration controls the swizzle pattern of default textures and enable map support on default textures. Callers must query <strong>{{D3D12_FEATURE_DATA_D3D12_OPTIONS}}</strong> to ensure that each option is supported. </p><p> The standard swizzle formats applies within each page-sized chunk, and pages are laid out in linear order with respect to one another. A 16-bit interleave pattern defines the conversion from pre-swizzled intra-page location to the post-swizzled location. </p><p> To demonstrate, consider the 2D 32bpp swizzle format above. This is represented by the following interleave masks, where bits on the left are most-significant: </p><code>{{UINT}} xBytesMask = 1010 1010 1000 1111 {{UINT}} yMask = 0101 0101 0111 0000</code><p> To compute the swizzled address, the following code could be used (where the <strong>_pdep_u32</strong> intrinsic instruction is supported): </p><code>{{UINT}} swizzledOffset = resourceBaseOffset + _pdep_u32(xOffset, xBytesMask) + _pdep_u32(yOffset, yBytesMask);</code> <dd> <p> Indicates that the layout is unknown, and is likely adapter-dependent. During creation, the driver chooses the most efficient layout based on other resource properties, especially resource size and flags. Prefer this choice unless certain functionality is required from another texture layout. </p> <p> Zero-copy texture upload optimizations exist for {{UMA}} architectures; see <strong>{{ID3D12Resource::WriteToSubresource}}</strong>. </p> </dd> <dd> <p> Indicates that data for the texture is stored in row-major order (sometimes called "pitch-linear order"). </p> <p> This texture layout locates consecutive texels of a row contiguously in memory, before the texels of the next row. Similarly, consecutive texels of a particular depth or array slice are contiguous in memory before the texels of the next depth or array slice. Padding may exist between rows and between depth or array slices to align collections of data. A stride is the distance in memory between rows, depth, or array slices; and it includes any padding. </p> <p> This texture layout enables sharing of the texture data between multiple adapters, when other layouts aren't available. </p> <p> Many restrictions apply, because this layout is generally not efficient for extensive usage: </p> <ul> <li> The locality of nearby texels is not rotationally invariant. </li> <li> Only the following texture properties are supported: <ul> <li> <strong>{{D3D12_RESOURCE_DIMENSION}}</strong>_TEXTURE_2D. </li> <li> A single mip level. </li> <li> A single array slice. </li> <li> 64KB alignment. </li> <li> Non-{{MSAA}}. </li> <li> No <strong>{{D3D12_RESOURCE_FLAG}}</strong>_ALLOW_DEPTH_STENCIL. </li> <li> The format cannot be a {{YUV}} format. </li> </ul> </li> <li> The texture must be created on a heap with <strong>{{D3D12_HEAP_FLAG}}</strong>_SHARED_CROSS_ADAPTER. </li> </ul> <p> Buffers are created with <strong>{{D3D12_TEXTURE_LAYOUT}}</strong>_ROW_MAJOR, because row-major texture data can be located in them without creating a texture object. This is commonly used for uploading or reading back texture data, especially for discrete/{{NUMA}} adapters. However, <strong>{{D3D12_TEXTURE_LAYOUT}}</strong>_ROW_MAJOR can also be used when marshaling texture data between {{GPUs}} or adapters. For examples of usage with <strong>{{ID3D12GraphicsCommandList::CopyTextureRegion}}</strong>, see some of the following topics: </p> <ul> <li> Default Texture Mapping and Standard Swizzle </li> <li> Predication </li> <li> Synchronization and Multi-Engine </li> <li> Uploading Texture Data </li> </ul> </dd> <dd> <p> Indicates that the layout within 64KB tiles and tail mip packing is up to the driver. No standard swizzle pattern. </p> <p> This texture layout is arranged into contiguous 64KB regions, also known as tiles, containing near equilateral amount of consecutive number of texels along each dimension. Tiles are arranged in row-major order. While there is no padding between tiles, there are typically unused texels within the last tile in each dimension. The layout of texels within the tile is undefined. Each subresource immediately follows where the previous subresource end, and the subresource order follows the same sequence as subresource ordinals. However, tail mip packing is adapter-specific. For more details, see tiled resource tier and <strong>{{ID3D12Device::GetResourceTiling}}</strong>. </p> <p> This texture layout enables partially resident or sparse texture scenarios when used together with virtual memory page mapping functionality. This texture layout must be used together with <strong>{{ID3D12Device::CreateReservedResource}}</strong> to enable the usage of <strong>{{ID3D12CommandQueue::UpdateTileMappings}}</strong>. </p> <p> Some restrictions apply to textures with this layout: </p> <ul> <li> The adapter must support <strong>{{D3D12_TILED_RESOURCES_TIER}}</strong> 1 or greater. </li> <li> 64KB alignment must be used. </li> <li> <strong>{{D3D12_RESOURCE_DIMENSION}}</strong>_TEXTURE1D is not supported, nor are all formats. </li> <li> The tiled resource tier indicates whether textures with <strong>{{D3D12_RESOURCE_DIMENSION}}</strong>_TEXTURE3D is supported. </li> </ul> </dd> <dd> <p> Indicates that a default texture uses the standardized swizzle pattern. </p> <p> This texture layout is arranged the same way that {{D3D12_TEXTURE_LAYOUT_64KB_UNDEFINED_SWIZZLE}} is, except that the layout of texels within the tile is defined. Tail mip packing is adapter-specific. </p> <p> This texture layout enables optimizations when marshaling data between multiple adapters or between the {{CPU}} and {{GPU}}. The amount of copying can be reduced when multiple components understand the texture memory layout. This layout is generally more efficient for extensive usage than row-major layout, due to the rotationally invariant locality of neighboring texels. This layout can typically only be used with adapters that support standard swizzle, but exceptions exist for cross-adapter shared heaps. </p> <p> The restrictions for this layout are that the following aren't supported: </p> <ul> <li> <strong>{{D3D12_RESOURCE_DIMENSION}}</strong>_TEXTURE1D </li> <li> Multi-sample anti-aliasing ({{MSAA}}) </li> <li> <strong>{{D3D12_RESOURCE_FLAG}}</strong>_ALLOW_DEPTH_STENCIL </li> <li> Formats within the <strong>{{DXGI_FORMAT}}</strong>_R32G32B32_TYPELESS group </li> </ul> </dd> <p> Specifies options for working with resources. </p> <p> This enum is used by the <strong>Flags</strong> member of the <strong>{{D3D12_RESOURCE_DESC}}</strong> structure. </p> <dd> <p> No options are specified. </p> </dd> <dd> <p>Allows a render target view to be created for the resource, as well as enables the resource to transition into the state of {{D3D12_RESOURCE_STATE_RENDER_TARGET}}. Some adapter architectures allocate extra memory for textures with this flag to reduce the effective bandwidth during common rendering. This characteristic may not be beneficial for textures that are never rendered to, nor is it available for textures compressed with {{BC}} formats. Applications should avoid setting this flag when rendering will never occur. </p> <p>The following restrictions and interactions apply:</p> <ul> <li> Either the texture format must support render target capabilities at the current feature level. Or, when the format is a typeless format, a format within the same typeless group must support render target capabilities at the current feature level.</li> <li>Cannot be set in conjunction with textures that have {{D3D12_TEXTURE_LAYOUT_ROW_MAJOR}} when <strong>{{D3D12_FEATURE_DATA_D3D12_OPTIONS}}</strong>::<strong>CrossAdapterRowMajorTextureSupported</strong> is {{FALSE}} nor in conjunction with textures that have {{D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE}} when <strong>{{D3D12_FEATURE_DATA_D3D12_OPTIONS}}</strong>::<strong>StandardSwizzle64KBSupported</strong> is {{FALSE}}. </li> <li>Cannot be used with 4KB alignment, {{D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL}}, nor usage with heaps that have {{D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES}}.</li> </ul> </dd> <dd> <p>Allows a depth stencil view to be created for the resource, as well as enables the resource to transition into the state of {{D3D12_RESOURCE_STATE_DEPTH_WRITE}} and/or {{D3D12_RESOURCE_STATE_DEPTH_READ}}. Most adapter architectures allocate extra memory for textures with this flag to reduce the effective bandwidth and maximize optimizations for early depth-test. Applications should avoid setting this flag when depth operations will never occur. </p> <p>The following restrictions and interactions apply:</p> <ul> <li>Either the texture format must support depth stencil capabilities at the current feature level. Or, when the format is a typeless format, a format within the same typeless group must support depth stencil capabilities at the current feature level.</li> <li>Cannot be used with {{D3D12_RESOURCE_DIMENSION_BUFFER}}, 4KB alignment, {{D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET}}, {{D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS}}, {{D3D12_RESOURCE_FLAG_ALLOW_SIMULTANEOUS_ACCESS}}, {{D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE}}, {{D3D12_TEXTURE_LAYOUT_ROW_MAJOR}}, nor used with heaps that have {{D3D12_HEAP_FLAG_DENY_RT_DS_TEXTURES}} or {{D3D12_HEAP_FLAG_ALLOW_DISPLAY}}. </li> <li>Precludes usage of <strong>WriteToSubresource</strong> and <strong>ReadFromSubresource</strong>. </li> <li>Precludes {{GPU}} copying of a subregion. <strong>CopyTextureRegion</strong> must copy a whole subresource to or from resources with this flag.</li> </ul> </dd> <dd> <p>Allows an unordered access view to be created for the resource, as well as enables the resource to transition into the state of {{D3D12_RESOURCE_STATE_UNORDERED_ACCESS}}. Some adapter architectures must resort to less efficient texture layouts in order to provide this functionality. If a texture is rarely used for unordered access, it may be worth having two textures around and copying between them. One texture would have this flag, while the other wouldn't. Applications should avoid setting this flag when unordered access operations will never occur. </p> <p>The following restrictions and interactions apply:</p> <ul> <li>Either the texture format must support unordered access capabilities at the current feature level. Or, when the format is a typeless format, a format within the same typeless group must support unordered access capabilities at the current feature level. </li> <li>Cannot be set in conjunction with textures that have {{D3D12_TEXTURE_LAYOUT_ROW_MAJOR}} when <strong>{{D3D12_FEATURE_DATA_D3D12_OPTIONS}}</strong>::<strong>CrossAdapterRowMajorTextureSupported</strong> is {{FALSE}} nor in conjunction with textures that have {{D3D12_TEXTURE_LAYOUT_64KB_STANDARD_SWIZZLE}} when <strong>{{D3D12_FEATURE_DATA_D3D12_OPTIONS}}</strong>::<strong>StandardSwizzle64KBSupported</strong> is {{FALSE}}, nor when the feature level is less than 11.0. </li> <li>Cannot be used with {{MSAA}} textures. </li> </ul> </dd> <dd> <p>Disallows a shader resource view to be created for the resource, as well as disables the resource to transition into the state of {{D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE}} or {{D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE}}. Some adapter architectures experience increased bandwidth for depth stencil textures when shader resource views are precluded. If a texture is rarely used for shader resource, it may be worth having two textures around and copying between them. One texture would have this flag and the other wouldn't. Applications should set this flag when depth stencil textures will never be used from shader resource views. </p> <p>The following restrictions and interactions apply: </p> <ul> <li>Must be used with {{D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL}}. </li> </ul> </dd> <dd> <p>Allows the resource to be used for cross-adapter data, as well as the same features enabled by {{ALLOW_SIMULTANEOUS_ACCESS}}. Cross adapter resources commonly preclude techniques that reduce effective texture bandwidth during usage, and some adapter architectures may require different caching behavior. Applications should avoid setting this flag when the resource data will never be used with another adapter.</p> <p>The following restrictions and interactions apply: </p> <ul> <li>Must be used with heaps that have {{D3D12_HEAP_FLAG_SHARED_CROSS_ADAPTER}}.</li> <li>Cannot be used with heaps that have {{D3D12_HEAP_FLAG_ALLOW_DISPLAY}}.</li> </ul> </dd> <dd> <p>Allows a resource to be simultaneously accessed by multiple different queues, devices or processes (for example, allows a resource to be used with <strong>ResourceBarrier</strong> transitions performed in more than one command list executing at the same time). </p> <p>Simultaneous access allows multiple readers and one writer, as long as the writer doesn't concurrently modify the texels that other readers are accessing. Some adapter architectures cannot leverage techniques to reduce effective texture bandwidth during usage. </p> <p>However, applications should avoid setting this flag when multiple readers are not required during frequent, non-overlapping writes to textures. Use of this flag can compromise resource fences to perform waits, and prevents any compression being used with a resource.</p> <p>The following restrictions and interactions apply: </p> <ul> <li>Cannot be used with {{D3D12_RESOURCE_DIMENSION_BUFFER}}; but buffers always have the properties represented by this flag. </li> <li>Cannot be used with {{MSAA}} textures.</li> </ul> </dd> <p> Specifies a range of tile mappings. </p> <p> Use these flags with <strong>{{ID3D12CommandQueue::UpdateTileMappings}}</strong>. </p> <dd> <p> No tile-mapping flags are specified. </p> </dd> <dd> <p> The tile range is <strong>{{NULL}}</strong>. </p> </dd> <dd> <p> Skip the tile range. </p> </dd> <dd> <p> Reuse a single tile in the tile range. </p> </dd> <p> Specifies how to perform a tile-mapping operation. </p> <p> This enum is used by the following methods:</p><ul> <li> <strong>CopyTileMappings</strong> </li> <li> <strong>UpdateTileMappings</strong> </li> </ul> <dd> <p> No tile-mapping flags are specified. </p> </dd> <dd> <p>Unsupported, do not use. </p> </dd> <p> Specifies how to copy a tile. </p> <p> This enum is used by the <strong>CopyTiles</strong> method. </p> <dd> <p> No tile-copy flags are specified. </p> </dd> <dd> <p> Indicates that the {{GPU}} isn't currently referencing any of the portions of destination memory being written. </p> </dd> <dd> <p> Indicates that the <strong>{{ID3D12GraphicsCommandList::CopyTiles}}</strong> operation involves copying a linear buffer to a swizzled tiled resource. This means to copy tile data from the specified buffer location, reading tiles sequentially, to the specified tile region (in x,y,z order if the region is a box), swizzling to optimal hardware memory layout as needed. In this <strong>{{ID3D12GraphicsCommandList::CopyTiles}}</strong> call, you specify the source data with the <em>pBuffer</em> parameter and the destination with the <em>pTiledResource</em> parameter. </p> </dd> <dd> <p> Indicates that the <strong>{{ID3D12GraphicsCommandList::CopyTiles}}</strong> operation involves copying a swizzled tiled resource to a linear buffer. This means to copy tile data from the tile region, reading tiles sequentially (in x,y,z order if the region is a box), to the specified buffer location, deswizzling to linear memory layout as needed. In this <strong>{{ID3D12GraphicsCommandList::CopyTiles}}</strong> call, you specify the source data with the <em>pTiledResource</em> parameter and the destination with the <em>pBuffer</em> parameter. </p> </dd> <p> Specifies the state of a resource regarding how the resource is being used. </p> <p> This enum is used by the following methods: </p><ul> <li> <strong>CreateCommittedResource</strong> </li> <li> <strong>CreatePlacedResource</strong> </li> <li> <strong>CreateReservedResource</strong> </li> </ul> <dd> <p>Applications should only transition to this state for accessing a resource across different graphics engine types.</p> <p>Specifically, a resource must be in the {{COMMON}} state before being used on a {{COPY}} queue (when previous used on {{DIRECT}}/{{COMPUTE}}), and before being used on {{DIRECT}}/{{COMPUTE}} (when previously used on {{COPY}}). This restriction does not exist when accessing data between {{DIRECT}} and {{COMPUTE}} queues.</p> <p>The {{COMMON}} state can be used for all usages on a Copy queue using the implicit state transitions. For more information, in Synchronization and Multi-Engine, find "common". </p> <p>Additionally, textures must be in the {{COMMON}} state for {{CPU}} access to be legal, assuming the texture was created in a {{CPU}}-visible heap in the first place.</p> </dd> <dd> <p> A subresource must be in this state when it is accessed by the 3D pipeline as a vertex buffer or constant buffer. This is a read-only state. </p> </dd> <dd> <p> A subresource must be in this state when it is accessed by the 3D pipeline as an index buffer. This is a read-only state. </p> </dd> <dd> <p> The resource is used as a render target. A subresource must be in this state when it is rendered to or when it is cleared with <strong>{{ID3D12GraphicsCommandList::ClearRenderTargetView}}</strong>. This is a write-only state. To read from a render target as a shader resource the resource must be in either {{D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE}} or {{D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE}}.</p> </dd> <dd> <p> The resource is used for unordered access. A subresource must be in this state when it is accessed by the 3D pipeline via an unordered access view. A subresource must also be in this state when it is cleared with <strong>{{ID3D12GraphicsCommandList::ClearUnorderedAccessViewInt}}</strong> or <strong>{{ID3D12GraphicsCommandList::ClearUnorderedAccessViewFloat}}</strong>. This is a read/write state. </p> </dd> <dd> <p>{{DEPTH_WRITE}} is a state which is mutually exclusive with other states. It should be used for <strong>{{ID3D12GraphicsCommandList::ClearDepthStencilView}}</strong> when the flags (see <strong>{{D3D12_CLEAR_FLAGS}}</strong>) indicate a given subresource should be cleared (otherwise the subresource state doesn't matter), or when using it in a writable depth stencil view (see <strong>{{D3D12_DSV_FLAGS}}</strong>) when the {{PSO}} has depth write enabled (see <strong>{{D3D12_DEPTH_STENCIL_DESC}}</strong>). </p> </dd> <dd> <p>{{DEPTH_READ}} is a state which can be combined with other states. It should be used when the subresource is in a read-only depth stencil view, or when the <em>DepthEnable</em> parameter of <strong>{{D3D12_DEPTH_STENCIL_DESC}}</strong> is false. It can be combined with other read states (for example, {{D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE}}), such that the resource can be used for the depth or stencil test, and accessed by a shader within the same draw call. Using it when depth will be written by a draw call or clear command is invalid.</p> </dd> <dd> <p> The resource is used with a shader other than the pixel shader. A subresource must be in this state before being read by any stage (except for the pixel shader stage) via a shader resource view. You can still use the resource in a pixel shader with this flag as long as it also has the flag {{D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE}} set. This is a read-only state. </p> </dd> <dd> <p> The resource is used with a pixel shader. A subresource must be in this state before being read by the pixel shader via a shader resource view. This is a read-only state. </p> </dd> <dd> <p> The resource is used with stream output. A subresource must be in this state when it is accessed by the 3D pipeline as a stream-out target. This is a write-only state. </p> </dd> <dd> <p> The resource is used as an indirect argument. Subresources must be in this state when they are used as the argument buffer passed to the indirect drawing method <strong>{{ID3D12GraphicsCommandList::ExecuteIndirect}}</strong>. This is a read-only state. </p> </dd> <dd> <p> The resource is used as the destination in a copy operation. Subresources must be in this state when they are used as the destination of copy operation, or a blt operation. This is a write-only state. </p> </dd> <dd> <p> The resource is used as the source in a copy operation. Subresources must be in this state when they are used as the source of copy operation, or a blt operation. This is a read-only state. </p> </dd> <dd> <p> The resource is used as the destination in a resolve operation. </p> </dd> <dd> <p> The resource is used as the source in a resolve operation. </p> </dd> <dd> <p>This is the required starting state for upload heaps. Applications should generally avoid this state when possible, and instead transition resources to only the actually-used states.</p> </dd> <dd> <p> Synonymous with {{D3D12_RESOURCE_STATE_COMMON}}. </p> </dd> <dd> <p> The resource is used for Predication. </p> </dd> <p>Specifies a type of resource barrier (transition in resource use) description.</p> <p>This enum is used in the <strong>{{D3D12_RESOURCE_BARRIER_TYPE}}</strong> structure. Use these values with the <strong>{{ID3D12GraphicsCommandList::ResourceBarrier}}</strong> method.</p> <dd> <p>A transition barrier that indicates a transition of a set of subresources between different usages. The caller must specify the before and after usages of the subresources. </p> </dd> <dd> <p>An aliasing barrier that indicates a transition between usages of 2 different resources that have mappings into the same tile pool. The caller can specify both the before and the after resource. Note that one or both resources can be <strong>{{NULL}}</strong>, which indicates that any tiled resource could cause aliasing.</p> </dd> <dd> <p>An unordered access view ({{UAV}}) barrier that indicates all {{UAV}} accesses (reads or writes) to a particular resource must complete before any future {{UAV}} accesses (read or write) can begin. </p> </dd> <p> Flags for setting split resource barriers. </p> <p>Split barriers allow a single transition to be split into begin and end halves (refer to Synchronization and Multi-Engine).</p><p> This enum is used by the <em>Flags</em> member of the <strong>{{D3D12_RESOURCE_BARRIER}}</strong> structure. </p> <dd> <p> No flags. </p> </dd> <dd> <p> This starts a barrier transition in a new state, putting a resource in a temporary no-access condition. </p> </dd> <dd> <p> This barrier completes a transition, setting a new state and restoring active access to a resource.</p> </dd> <p>Specifies what type of texture copy is to take place.</p> <p>This enum is used by the <strong>{{D3D12_TEXTURE_COPY_LOCATION}}</strong> structure.</p> <dd> <p>Indicates a subresource, identified by an index, is to be copied.</p> </dd> <dd> <p>Indicates a place footprint, identified by a <strong>{{D3D12_PLACED_SUBRESOURCE_FOOTPRINT}}</strong> structure, is to be copied.</p> </dd> <p>Specifies a resolve operation.</p> <p>This enum is used by the <strong>{{ID3D12GraphicsCommandList1::ResolveSubresourceRegion}}</strong> function.</p> <dd> <p>Resolves compressed source samples to their uncompressed values. When using this operation, the source and destination resources must have the same sample count, unlike the min, max, and average operations that require the destination to have a sample count of 1.</p> </dd> <dd> <p>Resolves the source samples to their minimum value. It can be used with any render target or depth stencil format.</p> </dd> <dd> <p>Resolves the source samples to their maximum value. It can be used with any render target or depth stencil format.</p> </dd> <dd> <p>Resolves the source samples to their average value. It can be used with any non-integer render target format, including the depth plane. It can't be used with integer render target formats, including the stencil plane.</p> </dd> <p> Specifies how memory gets routed by a shader resource view ({{SRV}}). </p> <p> This enum allows the {{SRV}} to select how memory gets routed to the four return components in a shader after a memory fetch. The options for each shader component [0..3] (corresponding to {{RGBA}}) are: component 0..3 from the {{SRV}} fetch result or force 0 or force 1. </p><p> The default 1:1 mapping can be indicated by specifying {{D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING}}, otherwise an arbitrary mapping can be specified using the macro {{D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING}}. See below. </p><p>Note the following defines:</p><code>#define {{D3D12_SHADER_COMPONENT_MAPPING_MASK}} 0x7 #define {{D3D12_SHADER_COMPONENT_MAPPING_SHIFT}} 3 #define {{D3D12_SHADER_COMPONENT_MAPPING_ALWAYS_SET_BIT_AVOIDING_ZEROMEM_MISTAKES}} (1&lt;&lt;({{D3D12_SHADER_COMPONENT_MAPPING_SHIFT}}*4)) #define {{D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING}}(Src0,Src1,Src2,Src3) ((((Src0)&amp;{{D3D12_SHADER_COMPONENT_MAPPING_MASK}})| \ (((Src1)&amp;{{D3D12_SHADER_COMPONENT_MAPPING_MASK}})&lt;&lt;{{D3D12_SHADER_COMPONENT_MAPPING_SHIFT}})| \ (((Src2)&amp;{{D3D12_SHADER_COMPONENT_MAPPING_MASK}})&lt;&lt;({{D3D12_SHADER_COMPONENT_MAPPING_SHIFT}}*2))| \ (((Src3)&amp;{{D3D12_SHADER_COMPONENT_MAPPING_MASK}})&lt;&lt;({{D3D12_SHADER_COMPONENT_MAPPING_SHIFT}}*3))| \ {{D3D12_SHADER_COMPONENT_MAPPING_ALWAYS_SET_BIT_AVOIDING_ZEROMEM_MISTAKES}})) #define {{D3D12_DECODE_SHADER_4_COMPONENT_MAPPING}}(ComponentToExtract,Mapping) (({{D3D12_SHADER_COMPONENT_MAPPING}})(Mapping &gt;&gt; ({{D3D12_SHADER_COMPONENT_MAPPING_SHIFT}}*ComponentToExtract) &amp; {{D3D12_SHADER_COMPONENT_MAPPING_MASK}})) #define {{D3D12_DEFAULT_SHADER_4_COMPONENT_MAPPING}} {{D3D12_ENCODE_SHADER_4_COMPONENT_MAPPING}}(0,1,2,3) </code> <dd> <p> Indicates return component 0 (red). </p> </dd> <dd> <p> Indicates return component 1 (green). </p> </dd> <dd> <p> Indicates return component 2 (blue). </p> </dd> <dd> <p> Indicates return component 3 (alpha). </p> </dd> <dd> <p> Indicates forcing the resulting value to 0. </p> </dd> <dd> <p> Indicates forcing the resulting value 1. The value of forcing 1 is either 0x1 or 1.0f depending on the format type for that component in the source format. </p> </dd> <p>Identifies how to view a buffer resource.</p> <p> This enumeration is used by <strong>{{D3D12_BUFFER_SRV}}</strong>. </p> <dd> <p> Indicates a default view. </p> </dd> <dd> <p> View the buffer as raw. For more info about raw viewing of buffers, see Raw Views of Buffers. </p> </dd> <p>Identifies the type of resource that will be viewed as a shader resource.</p> <p>These values are used by a shader-resource-view description, <strong>{{D3D12_SHADER_RESOURCE_VIEW_DESC}}</strong>.</p> <dd> <p>The type is unknown.</p> </dd> <dd> <p>The resource is a buffer.</p> </dd> <dd> <p>The resource is a 1D texture.</p> </dd> <dd> <p>The resource is an array of 1D textures.</p> </dd> <dd> <p>The resource is a 2D texture.</p> </dd> <dd> <p>The resource is an array of 2D textures.</p> </dd> <dd> <p>The resource is a multisampling 2D texture.</p> </dd> <dd> <p>The resource is an array of multisampling 2D textures.</p> </dd> <dd> <p>The resource is a 3D texture.</p> </dd> <dd> <p>The resource is a cube texture.</p> </dd> <dd> <p>The resource is an array of cube textures.</p> </dd> <p>Specifies filtering options during texture sampling.</p> <p>This enum is used by the <strong>{{D3D12_SAMPLER_DESC}}</strong> structure.</p><strong>Note</strong>??If you use different filter types for min versus mag filter, undefined behavior occurs in certain cases where the choice between whether magnification or minification happens is ambiguous. To prevent this undefined behavior, use filter modes that use similar filter operations for both min and mag (or use anisotropic filtering, which avoids the issue as well).?<p>During texture sampling, one or more texels are read and combined (this is calling filtering) to produce a single value. Point sampling reads a single texel while linear sampling reads two texels (endpoints) and linearly interpolates a third value between the endpoints.</p><p>Microsoft High Level Shader Language ({{HLSL}}) texture-sampling functions also support comparison filtering during texture sampling. Comparison filtering compares each sampled texel against a comparison value. The boolean result is blended the same way that normal texture filtering is blended.</p><p>You can use {{HLSL}} intrinsic texture-sampling functions that implement texture filtering only or companion functions that use texture filtering with comparison filtering.</p><p>Also note the following defines:</p><code>#define {{D3D12_FILTER_REDUCTION_TYPE_MASK}} ( 0x3 ) #define {{D3D12_FILTER_REDUCTION_TYPE_SHIFT}} ( 7 ) #define {{D3D12_FILTER_TYPE_MASK}} ( 0x3 ) #define {{D3D12_MIN_FILTER_SHIFT}} ( 4 ) #define {{D3D12_MAG_FILTER_SHIFT}} ( 2 ) #define {{D3D12_MIP_FILTER_SHIFT}} ( 0 ) #define {{D3D12_ANISOTROPIC_FILTERING_BIT}} ( 0x40 ) #define {{D3D12_ENCODE_BASIC_FILTER}}( min, mag, mip, reduction ) \ ( ( {{D3D12_FILTER}} ) ( \ ( ( ( min ) &amp; {{D3D12_FILTER_TYPE_MASK}} ) &lt;&lt; {{D3D12_MIN_FILTER_SHIFT}} ) | \ ( ( ( mag ) &amp; {{D3D12_FILTER_TYPE_MASK}} ) &lt;&lt; {{D3D12_MAG_FILTER_SHIFT}} ) | \ ( ( ( mip ) &amp; {{D3D12_FILTER_TYPE_MASK}} ) &lt;&lt; {{D3D12_MIP_FILTER_SHIFT}} ) | \ ( ( ( reduction ) &amp; {{D3D12_FILTER_REDUCTION_TYPE_MASK}} ) &lt;&lt; {{D3D12_FILTER_REDUCTION_TYPE_SHIFT}} ) ) ) #define {{D3D12_ENCODE_ANISOTROPIC_FILTER}}( reduction ) \ ( ( {{D3D12_FILTER}} ) ( \ {{D3D12_ANISOTROPIC_FILTERING_BIT}} | \ {{D3D12_ENCODE_BASIC_FILTER}}( {{D3D12_FILTER_TYPE_LINEAR}}, \ {{D3D12_FILTER_TYPE_LINEAR}}, \ {{D3D12_FILTER_TYPE_LINEAR}}, \ reduction ) ) ) #define {{D3D12_DECODE_MIN_FILTER}}( {{D3D12Filter}} ) \ ( ( {{D3D12_FILTER_TYPE}} ) \ ( ( ( {{D3D12Filter}} ) &gt;&gt; {{D3D12_MIN_FILTER_SHIFT}} ) &amp; {{D3D12_FILTER_TYPE_MASK}} ) ) #define {{D3D12_DECODE_MAG_FILTER}}( {{D3D12Filter}} ) \ ( ( {{D3D12_FILTER_TYPE}} ) \ ( ( ( {{D3D12Filter}} ) &gt;&gt; {{D3D12_MAG_FILTER_SHIFT}} ) &amp; {{D3D12_FILTER_TYPE_MASK}} ) ) #define {{D3D12_DECODE_MIP_FILTER}}( {{D3D12Filter}} ) \ ( ( {{D3D12_FILTER_TYPE}} ) \ ( ( ( {{D3D12Filter}} ) &gt;&gt; {{D3D12_MIP_FILTER_SHIFT}} ) &amp; {{D3D12_FILTER_TYPE_MASK}} ) ) #define {{D3D12_DECODE_FILTER_REDUCTION}}( {{D3D12Filter}} ) \ ( ( {{D3D12_FILTER_REDUCTION_TYPE}} ) \ ( ( ( {{D3D12Filter}} ) &gt;&gt; {{D3D12_FILTER_REDUCTION_TYPE_SHIFT}} ) &amp; {{D3D12_FILTER_REDUCTION_TYPE_MASK}} ) ) #define {{D3D12_DECODE_IS_COMPARISON_FILTER}}( {{D3D12Filter}} ) \ ( {{D3D12_DECODE_FILTER_REDUCTION}}( {{D3D12Filter}} ) == {{D3D12_FILTER_REDUCTION_TYPE_COMPARISON}} ) #define {{D3D12_DECODE_IS_ANISOTROPIC_FILTER}}( {{D3D12Filter}} ) \ ( ( ( {{D3D12Filter}} ) &amp; {{D3D12_ANISOTROPIC_FILTERING_BIT}} ) &amp;&amp; \ ( {{D3D12_FILTER_TYPE_LINEAR}} == {{D3D12_DECODE_MIN_FILTER}}( {{D3D12Filter}} ) ) &amp;&amp; \ ( {{D3D12_FILTER_TYPE_LINEAR}} == {{D3D12_DECODE_MAG_FILTER}}( {{D3D12Filter}} ) ) &amp;&amp; \ ( {{D3D12_FILTER_TYPE_LINEAR}} == {{D3D12_DECODE_MIP_FILTER}}( {{D3D12Filter}} ) ) ) </code><table> <tr><th>Texture Sampling Function</th><th>Texture Sampling Function with Comparison Filtering</th></tr> <tr><td> <strong>Sample</strong> </td><td> <strong>SampleCmp</strong> or <strong>SampleCmpLevelZero</strong> </td></tr> </table><p>?</p><p>Comparison filters only work with textures that have the following formats: <strong>{{DXGI_FORMAT_R32_FLOAT_X8X24_TYPELESS}}</strong>, <strong>{{DXGI_FORMAT_R32_FLOAT}}</strong>, <strong>{{DXGI_FORMAT_R24_UNORM_X8_TYPELESS}}</strong>, <strong>{{DXGI_FORMAT_R16_UNORM}}</strong>.</p> <dd> <p>Use point sampling for minification, magnification, and mip-level sampling.</p> </dd> <dd> <p>Use point sampling for minification and magnification; use linear interpolation for mip-level sampling.</p> </dd> <dd> <p>Use point sampling for minification; use linear interpolation for magnification; use point sampling for mip-level sampling.</p> </dd> <dd> <p>Use point sampling for minification; use linear interpolation for magnification and mip-level sampling.</p> </dd> <dd> <p>Use linear interpolation for minification; use point sampling for magnification and mip-level sampling.</p> </dd> <dd> <p>Use linear interpolation for minification; use point sampling for magnification; use linear interpolation for mip-level sampling.</p> </dd> <dd> <p>Use linear interpolation for minification and magnification; use point sampling for mip-level sampling.</p> </dd> <dd> <p>Use linear interpolation for minification, magnification, and mip-level sampling.</p> </dd> <dd> <p>Use anisotropic interpolation for minification, magnification, and mip-level sampling.</p> </dd> <dd> <p>Use point sampling for minification, magnification, and mip-level sampling. Compare the result to the comparison value.</p> </dd> <dd> <p>Use point sampling for minification and magnification; use linear interpolation for mip-level sampling. Compare the result to the comparison value.</p> </dd> <dd> <p>Use point sampling for minification; use linear interpolation for magnification; use point sampling for mip-level sampling. Compare the result to the comparison value.</p> </dd> <dd> <p>Use point sampling for minification; use linear interpolation for magnification and mip-level sampling. Compare the result to the comparison value.</p> </dd> <dd> <p>Use linear interpolation for minification; use point sampling for magnification and mip-level sampling. Compare the result to the comparison value.</p> </dd> <dd> <p>Use linear interpolation for minification; use point sampling for magnification; use linear interpolation for mip-level sampling. Compare the result to the comparison value.</p> </dd> <dd> <p>Use linear interpolation for minification and magnification; use point sampling for mip-level sampling. Compare the result to the comparison value.</p> </dd> <dd> <p>Use linear interpolation for minification, magnification, and mip-level sampling. Compare the result to the comparison value.</p> </dd> <dd> <p>Use anisotropic interpolation for minification, magnification, and mip-level sampling. Compare the result to the comparison value.</p> </dd> <dd> <p>Fetch the same set of texels as <strong>{{D3D12_FILTER_MIN_MAG_MIP_POINT}}</strong> and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as <strong>{{D3D12_FILTER_MIN_MAG_POINT_MIP_LINEAR}}</strong> and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as <strong>{{D3D12_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT}}</strong> and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as <strong>{{D3D12_FILTER_MIN_POINT_MAG_MIP_LINEAR}}</strong> and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as <strong>{{D3D12_FILTER_MIN_LINEAR_MAG_MIP_POINT}}</strong> and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as <strong>{{D3D12_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR}}</strong> and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as <strong>{{D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT}}</strong> and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as <strong>{{D3D12_FILTER_MIN_MAG_MIP_LINEAR}}</strong> and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as <strong>{{D3D12_FILTER_ANISOTROPIC}}</strong> and instead of filtering them return the minimum of the texels. Texels that are weighted 0 during filtering aren't counted towards the minimum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as <strong>{{D3D12_FILTER_MIN_MAG_MIP_POINT}}</strong> and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as <strong>{{D3D12_FILTER_MIN_MAG_POINT_MIP_LINEAR}}</strong> and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as <strong>{{D3D12_FILTER_MIN_POINT_MAG_LINEAR_MIP_POINT}}</strong> and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as <strong>{{D3D12_FILTER_MIN_POINT_MAG_MIP_LINEAR}}</strong> and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as <strong>{{D3D12_FILTER_MIN_LINEAR_MAG_MIP_POINT}}</strong> and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as <strong>{{D3D12_FILTER_MIN_LINEAR_MAG_POINT_MIP_LINEAR}}</strong> and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as <strong>{{D3D12_FILTER_MIN_MAG_LINEAR_MIP_POINT}}</strong> and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as <strong>{{D3D12_FILTER_MIN_MAG_MIP_LINEAR}}</strong> and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <dd> <p>Fetch the same set of texels as <strong>{{D3D12_FILTER_ANISOTROPIC}}</strong> and instead of filtering them return the maximum of the texels. Texels that are weighted 0 during filtering aren't counted towards the maximum. You can query support for this filter type from the <strong>MinMaxFiltering</strong> member in the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS1}}</strong> structure.</p> </dd> <p>Specifies the type of magnification or minification sampler filters. </p> <p>This enum is used by the <strong>{{D3D12_SAMPLER_DESC}}</strong> structure. Also, refer to the remarks for <strong>{{D3D12_FILTER}}</strong>.</p> <dd> <p>Point filtering is used as a texture magnification or minification filter. The texel with coordinates nearest to the desired pixel value is used. The texture filter to be used between mipmap levels is nearest-point mipmap filtering. The rasterizer uses the color from the texel of the nearest mipmap texture.</p> </dd> <dd> <p>Bilinear interpolation filtering is used as a texture magnification or minification filter. A weighted average of a 2 x 2 area of texels surrounding the desired pixel is used. The texture filter to use between mipmap levels is trilinear mipmap interpolation. The rasterizer linearly interpolates pixel color, using the texels of the two nearest mipmap textures. </p> </dd> <p>Specifies the type of filter reduction. </p> <p>This enum is used by the <strong>{{D3D12_SAMPLER_DESC}}</strong> structure. Also, refer to the remarks for <strong>{{D3D12_FILTER}}</strong>.</p> <dd> <p>The filter type is standard.</p> </dd> <dd> <p>The filter type is comparison.</p> </dd> <dd> <p>The filter type is minimum.</p> </dd> <dd> <p>The filter type is maximum.</p> </dd> <p> Identifies a technique for resolving texture coordinates that are outside of the boundaries of a texture. </p> <p> This enum is used by the <strong>{{D3D12_SAMPLER_DESC}}</strong> structure. </p> <dd> <p> Tile the texture at every (u,v) integer junction. For example, for u values between 0 and 3, the texture is repeated three times. </p> </dd> <dd> <p> Flip the texture at every (u,v) integer junction. For u values between 0 and 1, for example, the texture is addressed normally; between 1 and 2, the texture is flipped (mirrored); between 2 and 3, the texture is normal again; and so on. </p> </dd> <dd> <p> Texture coordinates outside the range [0.0, 1.0] are set to the texture color at 0.0 or 1.0, respectively. </p> </dd> <dd> <p> Texture coordinates outside the range [0.0, 1.0] are set to the border color specified in <strong>{{D3D12_SAMPLER_DESC}}</strong> or {{HLSL}} code. </p> </dd> <dd> <p> Similar to <strong>{{D3D12_TEXTURE_ADDRESS_MODE_MIRROR}}</strong> and <strong>{{D3D12_TEXTURE_ADDRESS_MODE_CLAMP}}</strong>. Takes the absolute value of the texture coordinate (thus, mirroring around 0), and then clamps to the maximum value. </p> </dd> <p>Identifies unordered-access view options for a buffer resource.</p> <p> This enum is used in the <strong>{{D3D12_BUFFER_UAV}}</strong> structure. </p> <dd> <p> Indicates a default view. </p> </dd> <dd> <p> Resource contains raw, unstructured data. Requires the {{UAV}} format to be <strong>{{DXGI_FORMAT_R32_TYPELESS}}</strong>. For more info about raw viewing of buffers, see Raw Views of Buffers. </p> </dd> <p>Identifies unordered-access view options.</p> <p> Specify one of the values in this enumeration in the <strong>ViewDimension</strong> member of a <strong>{{D3D12_UNORDERED_ACCESS_VIEW_DESC}}</strong> structure. </p> <dd> <p>The view type is unknown.</p> </dd> <dd> <p>View the resource as a buffer.</p> </dd> <dd> <p>View the resource as a 1D texture.</p> </dd> <dd> <p>View the resource as a 1D texture array.</p> </dd> <dd> <p>View the resource as a 2D texture.</p> </dd> <dd> <p>View the resource as a 2D texture array.</p> </dd> <dd> <p>View the resource as a 3D texture array.</p> </dd> <p>Identifies the type of resource to view as a render target.</p> <p>Specify one of the values in this enumeration in the <strong>ViewDimension</strong> member of a <strong>{{D3D12_RENDER_TARGET_VIEW_DESC}}</strong> structure.</p> <dd> <p>Do not use this value, as it will cause <strong>{{ID3D12Device::CreateRenderTargetView}}</strong> to fail.</p> </dd> <dd> <p>The resource will be accessed as a buffer.</p> </dd> <dd> <p>The resource will be accessed as a 1D texture.</p> </dd> <dd> <p>The resource will be accessed as an array of 1D textures.</p> </dd> <dd> <p>The resource will be accessed as a 2D texture.</p> </dd> <dd> <p>The resource will be accessed as an array of 2D textures.</p> </dd> <dd> <p>The resource will be accessed as a 2D texture with multisampling.</p> </dd> <dd> <p>The resource will be accessed as an array of 2D textures with multisampling.</p> </dd> <dd> <p>The resource will be accessed as a 3D texture.</p> </dd> <p>Specifies depth-stencil view options.</p> <p> Specify a combination of the values in this enumeration in the <strong>Flags</strong> member of a <strong>{{D3D12_DEPTH_STENCIL_VIEW_DESC}}</strong> structure. The values are combined by using a bitwise {{OR}} operation. </p><p> Limiting a depth-stencil buffer to read-only access allows more than one depth-stencil view to be bound to the pipeline simultaneously, since it is not possible to have read/write conflicts between separate views. </p> <dd> <p> Indicates a default view. </p> </dd> <dd> <p>Indicates that depth values are read only.</p> </dd> <dd> <p>Indicates that stencil values are read only.</p> </dd> <p>Specifies how to access a resource used in a depth-stencil view.</p> <p>Specify one of the values in this enumeration in the <strong>ViewDimension</strong> member of a <strong>{{D3D12_DEPTH_STENCIL_VIEW_DESC}}</strong> structure.</p> <dd> <p><strong>{{D3D12_DSV_DIMENSION_UNKNOWN}}</strong> is not a valid value for <strong>{{D3D12_DEPTH_STENCIL_VIEW_DESC}}</strong> and is not used.</p> </dd> <dd> <p>The resource will be accessed as a 1D texture.</p> </dd> <dd> <p>The resource will be accessed as an array of 1D textures.</p> </dd> <dd> <p>The resource will be accessed as a 2D texture.</p> </dd> <dd> <p>The resource will be accessed as an array of 2D textures.</p> </dd> <dd> <p>The resource will be accessed as a 2D texture with multi sampling.</p> </dd> <dd> <p>The resource will be accessed as an array of 2D textures with multi sampling.</p> </dd> <p>Specifies what to clear from the depth stencil view.</p> <p> This enum is used by <strong>{{ID3D12GraphicsCommandList::ClearDepthStencilView}}</strong>. The flags can be combined to clear all. </p> <dd> <p>Indicates the depth buffer should be cleared.</p> </dd> <dd> <p>Indicates the stencil buffer should be cleared.</p> </dd> <p> Specifies fence options. </p> <p> This enum is used by the <strong>{{ID3D12Device::CreateFence}}</strong> method. </p> <dd> <p> No options are specified. </p> </dd> <dd> <p> The fence is shared. </p> </dd> <dd> <p> The fence is shared with another {{GPU}} adapter. </p> </dd> <p> Specifies a type of descriptor heap. </p> <p> This enum is used by the <strong>{{D3D12_DESCRIPTOR_HEAP_DESC}}</strong> structure, and the following methods:</p><ul> <li> <strong>CopyDescriptors</strong> </li> <li> <strong>CopyDescriptorsSimple</strong> </li> <li> <strong>GetDescriptorHandleIncrementSize</strong> </li> </ul> <dd> <p> The descriptor heap for the combination of constant-buffer, shader-resource, and unordered-access views. </p> </dd> <dd> <p> The descriptor heap for the sampler. </p> </dd> <dd> <p> The descriptor heap for the render-target view. </p> </dd> <dd> <p> The descriptor heap for the depth-stencil view. </p> </dd> <dd> <p> The number of types of descriptor heaps. </p> </dd> <p>Specifies options for a heap.</p> <p> This enum is used by the <strong>{{D3D12_DESCRIPTOR_HEAP_DESC}}</strong> structure. </p> <dd> <p>Indicates default usage of a heap.</p> </dd> <dd> <p>The flag {{D3D12_DESCRIPTOR_HEAP_FLAG_SHADER_VISIBLE}} can optionally be set on a descriptor heap to indicate it is be bound on a command list for reference by shaders. Descriptor heaps created <em>without</em> this flag allow applications the option to stage descriptors in {{CPU}} memory before copying them to a shader visible descriptor heap, as a convenience. But it is also fine for applications to directly create descriptors into shader visible descriptor heaps with no requirement to stage anything on the {{CPU}}.</p> <p>This flag only applies to {{CBV}}, {{SRV}}, {{UAV}} and samplers. It does not apply to other descriptor heap types since shaders do not directly reference the other types. </p> </dd> <p> Specifies a range so that, for example, if part of a descriptor table has 100 shader-resource views ({{SRVs}}) that range can be declared in one entry rather than 100. </p> <p> This enum is used by the <strong>{{D3D12_DESCRIPTOR_RANGE}}</strong> structure. </p> <dd> <p> Specifies a range of {{SRVs}}. </p> </dd> <dd> <p> Specifies a range of unordered-access views ({{UAVs}}). </p> </dd> <dd> <p> Specifies a range of constant-buffer views ({{CBVs}}). </p> </dd> <dd> <p> Specifies a range of samplers. </p> </dd> <p>Specifies the shaders that can access the contents of a given root signature slot.</p> <p>This enum is used by the <strong>{{D3D12_ROOT_PARAMETER}}</strong> structure.</p><p>The compute queue always uses <strong>{{D3D12_SHADER_VISIBILITY_ALL}}</strong> because it has only one active stage. The 3D queue can choose values, but if it uses <strong>{{D3D12_SHADER_VISIBILITY_ALL}}</strong>, all shader stages can access whatever is bound at the root signature slot.</p> <dd> <p>Specifies that all shader stages can access whatever is bound at the root signature slot.</p> </dd> <dd> <p>Specifies that the vertex shader stage can access whatever is bound at the root signature slot.</p> </dd> <dd> <p>Specifies that the hull shader stage can access whatever is bound at the root signature slot.</p> </dd> <dd> <p>Specifies that the domain shader stage can access whatever is bound at the root signature slot.</p> </dd> <dd> <p>Specifies that the geometry shader stage can access whatever is bound at the root signature slot.</p> </dd> <dd> <p>Specifies that the pixel shader stage can access whatever is bound at the root signature slot.</p> </dd> <p> Specifies the type of root signature slot. </p> <p> This enum is used by the <strong>{{D3D12_ROOT_PARAMETER}}</strong> structure. </p> <dd> <p> The slot is for a descriptor table. </p> </dd> <dd> <p> The slot is for root constants. </p> </dd> <dd> <p> The slot is for a constant-buffer view ({{CBV}}). </p> </dd> <dd> <p> The slot is for a shader-resource view ({{SRV}}). </p> </dd> <dd> <p> The slot is for a unordered-access view ({{UAV}}). </p> </dd> <p> Specifies options for root signature layout. </p> <p> This enum is used in the <strong>{{D3D12_ROOT_SIGNATURE_DESC}}</strong> structure. </p><p>The value in denying access to shader stages is a minor optimization on some hardware. If, for example, the <strong>{{D3D12_SHADER_VISIBILITY_ALL}}</strong> flag has been set to broadcast the root signature to all shader stages, then denying access can overrule this and save the hardware some work. Alternatively if the shader is so simple that no root signature resources are needed, then denying access could be used here too.</p> <dd> <p> Indicates default behavior. </p> </dd> <dd> <p> The app is opting in to using the Input Assembler (requiring an input layout that defines a set of vertex buffer bindings). Omitting this flag can result in one root argument space being saved on some hardware. Omit this flag if the Input Assembler is not required, though the optimization is minor. </p> </dd> <dd> <p> Denies the vertex shader access to the root signature. </p> </dd> <dd> <p> Denies the hull shader access to the root signature. </p> </dd> <dd> <p> Denies the domain shader access to the root signature. </p> </dd> <dd> <p> Denies the geometry shader access to the root signature. </p> </dd> <dd> <p> Denies the pixel shader access to the root signature. </p> </dd> <dd> <p> The root signature allows stream output. This flag can be specified for root signatures authored in {{HLSL}}, similar to how the other flags are specified. <strong>{{ID3D12Device::CreateGraphicsPipelineState}}</strong> will fail if the geometry shader contains stream output but the root signature does not have this flag set. Omit this flag if stream output is not required.</p> </dd> <p> Specifies the border color for a static sampler. </p> <p> This enum is used by the <strong>{{D3D12_STATIC_SAMPLER_DESC}}</strong> structure. </p> <dd> <p> Indicates black, with the alpha component as fully transparent. </p> </dd> <dd> <p> Indicates black, with the alpha component as fully opaque. </p> </dd> <dd> <p> Indicates white, with the alpha component as fully opaque. </p> </dd> <p>Specifies the volatility of both descriptors and the data they reference in a Root Signature 1.1 description, which can enable some driver optimizations.</p> <p>This enum is used by the <strong>{{D3D12_DESCRIPTOR_RANGE1}}</strong> structure.</p><p>To specify the volatility of just the data referenced by descriptors, refer to <strong>{{D3D12_ROOT_DESCRIPTOR_FLAGS}}</strong>.</p> <dd> <p>Default behavior. Descriptors are static, and default assumptions are made for data (for {{SRV}}/{{CBV:}} {{DATA_STATIC_WHILE_SET_AT_EXECUTE}}, and for {{UAV:}} {{DATA_VOLATILE}}). </p> </dd> <dd> <p>If this is the only flag set, then descriptors are volatile and default assumptions are made about data (for {{SRV}}/{{CBV:}} {{DATA_STATIC_WHILE_SET_AT_EXECUTE}}, and for {{UAV:}} {{DATA_VOLATILE}}). </p> <p>If this flag is combined with {{DATA_VOLATILE}}, then both descriptors and data are volaille, which is equivalent to Root Signature Version 1.0.</p> <p>If this flag is combined with {{DATA_STATIC_WHILE_SET_AT_EXECUTE}}, then descriptors are volatile. This still doesn?t allow them to change during command list execution so it is valid to combine the additional declaration that data is static while set via root descriptor table during execution ? the underlying descriptors are effectively static for longer than the data is being promised to be static.</p> </dd> <dd> <p>Descriptors are static and the data is volatile.</p> </dd> <dd> <p>Descriptors are static and data is static while set at execute.</p> </dd> <dd> <p>Both descriptors and data are static. This maximizes the potential for driver optimization.</p> </dd> <p>Specifies the volatility of the data referenced by descriptors in a Root Signature 1.1 description, which can enable some driver optimizations.</p> <p>This enum is used by the <strong>{{D3D12_ROOT_DESCRIPTOR1}}</strong> structure.</p><p>To specify the volatility of both descriptors and data, refer to <strong>{{D3D12_DESCRIPTOR_RANGE_FLAGS}}</strong>. </p> <dd> <p>Default assumptions are made for data (for {{SRV}}/{{CBV:}} {{DATA_STATIC_WHILE_SET_AT_EXECUTE}}, and for {{UAV:}} {{DATA_VOLATILE}}). </p> </dd> <dd> <p>Data is volatile. Equivalent to Root Signature Version 1.0.</p> </dd> <dd> <p>Data is static while set at execute.</p> </dd> <dd> <p>Data is static. The best potential for driver optimization.</p> </dd> <p>Specifies the type of query heap to create.</p> <p>This enum is used by the <strong>{{D3D12_QUERY_HEAP_DESC}}</strong> structure.</p> <dd> <p>This returns a binary 0/1 result: 0 indicates that no samples passed depth and stencil testing, 1 indicates that at least one sample passed depth and stencil testing. This enables occlusion queries to not interfere with any {{GPU}} performance optimization associated with depth/stencil testing. </p> </dd> <dd> <p>Indicates that the heap is for high-performance timing data. </p> </dd> <dd> <p>Indicates the heap is to contain pipeline data. Refer to <strong>{{D3D12_QUERY_DATA_PIPELINE_STATISTICS}}</strong>.</p> </dd> <dd> <p>Indicates the heap is to contain stream output data. Refer to <strong>{{D3D12_QUERY_DATA_SO_STATISTICS}}</strong>.</p> </dd> <p>Specifies the type of query.</p> <p>This enum is used by <strong>BeginQuery</strong>, <strong>EndQuery</strong> and <strong>ResolveQueryData.</strong> </p> <dd> <p>Indicates the query is for depth/stencil occlusion counts.</p> </dd> <dd> <p>Indicates the query is for a binary depth/stencil occlusion statistics. </p> <p>This new query type acts like {{D3D12_QUERY_TYPE_OCCLUSION}} except that it returns simply a binary 0/1 result: 0 indicates that no samples passed depth and stencil testing, 1 indicates that at least one sample passed depth and stencil testing. This enables occlusion queries to not interfere with any {{GPU}} performance optimization associated with depth/stencil testing. </p> </dd> <dd> <p>Indicates the query is for high definition {{GPU}} and {{CPU}} timestamps.</p> </dd> <dd> <p>Indicates the query type is for graphics pipeline statistics, refer to <strong>{{D3D12_QUERY_DATA_PIPELINE_STATISTICS}}</strong>.</p> </dd> <dd> <p>Stream 0 output statistics. In Direct3D 12 there is no single stream output ({{SO}}) overflow query for all the output streams. Apps need to issue multiple single-stream queries, and then correlate the results. Stream output is the ability of the {{GPU}} to write vertices to a buffer. The stream output counters monitor progress.</p> </dd> <dd> <p>Stream 1 output statistics.</p> </dd> <dd> <p>Stream 2 output statistics.</p> </dd> <dd> <p>Stream 3 output statistics.</p> </dd> <p> Specifies the predication operation to apply. </p> <p> This enum is used by <strong>SetPredication</strong>. </p><p> Predication is decoupled from queries. Predication can be set based on the value of 64-bits within a buffer. </p> <dd> <p> Enables predication if all 64-bits are zero. </p> </dd> <dd> <p> Enables predication if at least one of the 64-bits are not zero. </p> </dd> <p> Specifies the type of the indirect parameter. </p> <p> This enum is used by the <strong>{{D3D12_INDIRECT_ARGUMENT_DESC}}</strong> structure. </p> <dd> <p>Indicates the type is a Draw call.</p> </dd> <dd> <p>Indicates the type is a DrawIndexed call.</p> </dd> <dd> <p>Indicates the type is a Dispatch call.</p> </dd> <dd> <p>Indicates the type is a vertex buffer view.</p> </dd> <dd> <p>Indicates the type is an index buffer view.</p> </dd> <dd> <p>Indicates the type is a constant.</p> </dd> <dd> <p>Indicates the type is a constant buffer view ({{CBV}}).</p> </dd> <dd> <p>Indicates the type is a shader resource view ({{SRV}}).</p> </dd> <dd> <p>Indicates the type is an unordered access view ({{UAV}}).</p> </dd> <p>Specifies multiple wait flags for multiple fences.</p> <p>This enum is used by the <strong>SetEventOnMultipleFenceCompletion</strong> method.</p> <dd> <p>Indicates that none of the fences need to be waited on.</p> </dd> <dd> <p>Indicates that any one of the fences need to be waited on.</p> </dd> <dd> <p>Indicates that all the fences need to be waited on.</p> </dd> <p>Specifies a residence priority.</p> <p>This enum is used by the <strong>SetResidencyPriority</strong> method.</p> <dd> <p>Indicates a minimum priority.</p> </dd> <dd> <p>Indicates a low priority.</p> </dd> <dd> <p>Indicates a normal, medium, priority.</p> </dd> <dd> <p>Indicates a high priority, the default.</p> </dd> <dd> <p>Indicates a maximum priority.</p> </dd> <p>Describes a command queue.</p> <p> This structure is passed into <strong>CreateCommandQueue</strong>. </p><p> This structure is returned by <strong>{{ID3D12CommandQueue::GetDesc}}</strong>. </p> <dd> <p> Specifies one member of <strong>{{D3D12_COMMAND_LIST_TYPE}}</strong>. </p> </dd> <dd> <p> The priority for the command queue, as a <strong>{{D3D12_COMMAND_QUEUE_PRIORITY}}</strong> enumeration constant to select normal or high priority. </p> </dd> <dd> <p> Specifies any flags from the <strong>{{D3D12_COMMAND_QUEUE_FLAGS}}</strong> enumeration. </p> </dd> <dd> <p> For single {{GPU}} operation, set this to zero. If there are multiple {{GPU}} nodes, set a bit to identify the node (the device's physical adapter) to which the command queue applies. Each bit in the mask corresponds to a single node. Only 1 bit must be set. Refer to Multi-Adapter.</p> </dd> <p>Describes a single element for the input-assembler stage of the graphics pipeline.</p> <p>This structure is a member of the <strong>{{D3D12_INPUT_LAYOUT_DESC}}</strong> structure. A pipeline state object contains a input-layout structure that defines one element being read from an input slot.</p> <dd> <p>The {{HLSL}} semantic associated with this element in a shader input-signature.</p> </dd> <dd> <p>The semantic index for the element. A semantic index modifies a semantic, with an integer index number. A semantic index is only needed in a case where there is more than one element with the same semantic. For example, a 4x4 matrix would have four components each with the semantic name <strong>matrix</strong>, however each of the four component would have different semantic indices (0, 1, 2, and 3).</p> </dd> <dd> <p>A <strong>{{DXGI_FORMAT}}</strong>-typed value that specifies the format of the element data.</p> </dd> <dd> <p>An integer value that identifies the input-assembler. For more info, see Input Slots. Valid values are between 0 and 15. </p> </dd> <dd> <p>Optional. Offset, in bytes, between each element. Use {{D3D12_APPEND_ALIGNED_ELEMENT}} (0xffffffff) for convenience to define the current element directly after the previous one, including any packing if necessary.</p> </dd> <dd> <p>A value that identifies the input data class for a single input slot.</p> </dd> <dd> <p>The number of instances to draw using the same per-instance data before advancing in the buffer by one element. This value must be 0 for an element that contains per-vertex data (the slot class is set to the {{D3D12_INPUT_PER_VERTEX_DATA}} member of <strong>{{D3D12_INPUT_CLASSIFICATION}}</strong>).</p> </dd> <p>Describes a vertex element in a vertex buffer in an output slot.</p> <p>Specify an array of <strong>{{D3D12_SO_DECLARATION_ENTRY}}</strong> structures in the <strong>pSODeclaration</strong> member of a <strong>{{D3D12_STREAM_OUTPUT_DESC}}</strong> structure. </p> <dd> <p>Zero-based, stream number.</p> </dd> <dd> <p>Type of output element; possible values include: <strong>"{{POSITION}}"</strong>, <strong>"{{NORMAL}}"</strong>, or <strong>"{{TEXCOORD0}}"</strong>. Note that if <strong>SemanticName</strong> is <strong>{{NULL}}</strong> then <strong>ComponentCount</strong> can be greater than 4 and the described entry will be a gap in the stream out where no data will be written. </p> </dd> <dd> <p>Output element's zero-based index. Use, for example, if you have more than one texture coordinate stored in each vertex.</p> </dd> <dd> <p>The component of the entry to begin writing out to. Valid values are 0 to 3. For example, if you only wish to output to the y and z components of a position, <strong>StartComponent</strong> is 1 and <strong>ComponentCount</strong> is 2.</p> </dd> <dd> <p>The number of components of the entry to write out to. Valid values are 1 to 4. For example, if you only wish to output to the y and z components of a position, <strong>StartComponent</strong> is 1 and <strong>ComponentCount</strong> is 2. Note that if <strong>SemanticName</strong> is <strong>{{NULL}}</strong> then <strong>ComponentCount</strong> can be greater than 4 and the described entry will be a gap in the stream out where no data will be written.</p> </dd> <dd> <p>The associated stream output buffer that is bound to the pipeline. The valid range for <strong>OutputSlot</strong> is 0 to 3.</p> </dd> <p>Describes the dimensions of a viewport.</p> <p>Pass an array of these structures to the <em>pViewports</em> parameter in a call to <strong>{{ID3D12GraphicsCommandList::RSSetViewports}}</strong> to set viewports for the display.</p> <dd> <p>X position of the left hand side of the viewport. </p> </dd> <dd> <p>Y position of the top of the viewport. </p> </dd> <dd> <p>Width of the viewport.</p> </dd> <dd> <p>Height of the viewport.</p> </dd> <dd> <p>Minimum depth of the viewport. Ranges between 0 and 1.</p> </dd> <dd> <p>Maximum depth of the viewport. Ranges between 0 and 1.</p> </dd> <p>Describes a 3D box.</p> <p> This structure is used by the methods <strong>WriteToSubresource</strong>, <strong>ReadFromSubresource</strong> and <strong>CopyTextureRegion</strong>. </p> <dd> <p>The x position of the left hand side of the box.</p> </dd> <dd> <p>The y position of the top of the box.</p> </dd> <dd> <p>The z position of the front of the box.</p> </dd> <dd> <p>The x position of the right hand side of the box, plus 1. This means that <code>right - left</code> equals the width of the box.</p> </dd> <dd> <p>The y position of the bottom of the box, plus 1. This means that <code>top - bottom</code> equals the height of the box.</p> </dd> <dd> <p>The z position of the back of the box, plus 1. This means that <code>front - back</code> equals the depth of the box.</p> </dd> <p>Describes stencil operations that can be performed based on the results of stencil test.</p> <p>All stencil operations are specified as a <strong>{{D3D12_STENCIL_OP}}</strong>-typed value. Each stencil operation can be set differently based on the outcome of the stencil test, which is referred to as <strong>StencilFunc</strong>, in the stencil test portion of depth-stencil testing.</p><p>Members of <strong>{{D3D12_DEPTH_STENCIL_DESC}}</strong> have this structure for their data type. </p> <dd> <p>A <strong>{{D3D12_STENCIL_OP}}</strong>-typed value that identifies the stencil operation to perform when stencil testing fails.</p> </dd> <dd> <p>A <strong>{{D3D12_STENCIL_OP}}</strong>-typed value that identifies the stencil operation to perform when stencil testing passes and depth testing fails.</p> </dd> <dd> <p>A <strong>{{D3D12_STENCIL_OP}}</strong>-typed value that identifies the stencil operation to perform when stencil testing and depth testing both pass.</p> </dd> <dd> <p>A <strong>{{D3D12_COMPARISON_FUNC}}</strong>-typed value that identifies the function that compares stencil data against existing stencil data. </p> </dd> <p>Describes depth-stencil state.</p> <p> A <strong>{{D3D12_GRAPHICS_PIPELINE_STATE_DESC}}</strong> object contains a depth-stencil-state structure that controls how depth-stencil testing is performed by the output-merger stage. </p><p>This table shows the default values of depth-stencil states.</p><table> <tr><th>State</th><th>Default Value</th></tr> <tr><td>DepthEnable</td><td>{{TRUE}}</td></tr> <tr><td>DepthWriteMask</td><td>{{D3D12_DEPTH_WRITE_MASK_ALL}}</td></tr> <tr><td>DepthFunc</td><td>{{D3D12_COMPARISON_LESS}}</td></tr> <tr><td>StencilEnable</td><td>{{FALSE}}</td></tr> <tr><td>StencilReadMask</td><td>{{D3D12_DEFAULT_STENCIL_READ_MASK}}</td></tr> <tr><td>StencilWriteMask</td><td>{{D3D12_DEFAULT_STENCIL_WRITE_MASK}}</td></tr> <tr><td> <p>FrontFace.StencilFunc</p> <p>and</p> <p>BackFace.StencilFunc</p> </td><td>{{D3D12_COMPARISON_ALWAYS}}</td></tr> <tr><td> <p>FrontFace.StencilDepthFailOp</p> <p>and</p> <p>BackFace.StencilDepthFailOp</p> </td><td>{{D3D12_STENCIL_OP_KEEP}}</td></tr> <tr><td> <p>FrontFace.StencilPassOp</p> <p>and</p> <p>BackFace.StencilPassOp</p> </td><td>{{D3D12_STENCIL_OP_KEEP}}</td></tr> <tr><td> <p>FrontFace.StencilFailOp</p> <p>and</p> <p>BackFace.StencilFailOp</p> </td><td>{{D3D12_STENCIL_OP_KEEP}}</td></tr> </table><p>?</p><p>The formats that support stenciling are {{DXGI_FORMAT_D24_UNORM_S8_UINT}} and {{DXGI_FORMAT_D32_FLOAT_S8X24_UINT}}.</p> <dd> <p> Specifies whether to enable depth testing. Set this member to <strong>{{TRUE}}</strong> to enable depth testing. </p> </dd> <dd> <p> A <strong>{{D3D12_DEPTH_WRITE_MASK}}</strong>-typed value that identifies a portion of the depth-stencil buffer that can be modified by depth data. </p> </dd> <dd> <p> A <strong>{{D3D12_COMPARISON_FUNC}}</strong>-typed value that identifies a function that compares depth data against existing depth data. </p> </dd> <dd> <p> Specifies whether to enable stencil testing. Set this member to <strong>{{TRUE}}</strong> to enable stencil testing. </p> </dd> <dd> <p>Identify a portion of the depth-stencil buffer for reading stencil data.</p> </dd> <dd> <p>Identify a portion of the depth-stencil buffer for writing stencil data.</p> </dd> <dd> <p> A <strong>{{D3D12_DEPTH_STENCILOP_DESC}}</strong> structure that describes how to use the results of the depth test and the stencil test for pixels whose surface normal is facing towards the camera. </p> </dd> <dd> <p> A <strong>{{D3D12_DEPTH_STENCILOP_DESC}}</strong> structure that describes how to use the results of the depth test and the stencil test for pixels whose surface normal is facing away from the camera. </p> </dd> <p>Describes depth-stencil state.</p> <p>Pass a reference to <strong>{{D3D11_DEPTH_STENCIL_DESC}}</strong> to the <strong>{{ID3D11Device::CreateDepthStencilState}}</strong> method to create the depth-stencil state object.</p><p>Depth-stencil state controls how depth-stencil testing is performed by the output-merger stage.</p><p>The following table shows the default values of depth-stencil states.</p><table> <tr><th>State</th><th>Default Value</th></tr> <tr><td>DepthEnable</td><td>{{TRUE}}</td></tr> <tr><td>DepthWriteMask</td><td>{{D3D11_DEPTH_WRITE_MASK_ALL}}</td></tr> <tr><td>DepthFunc</td><td>{{D3D11_COMPARISON_LESS}}</td></tr> <tr><td>StencilEnable</td><td>{{FALSE}}</td></tr> <tr><td>StencilReadMask</td><td>{{D3D11_DEFAULT_STENCIL_READ_MASK}}</td></tr> <tr><td>StencilWriteMask</td><td>{{D3D11_DEFAULT_STENCIL_WRITE_MASK}}</td></tr> <tr><td> <p>FrontFace.StencilFunc</p> <p>and</p> <p>BackFace.StencilFunc</p> </td><td>{{D3D11_COMPARISON_ALWAYS}}</td></tr> <tr><td> <p>FrontFace.StencilDepthFailOp</p> <p>and</p> <p>BackFace.StencilDepthFailOp</p> </td><td>{{D3D11_STENCIL_OP_KEEP}}</td></tr> <tr><td> <p>FrontFace.StencilPassOp</p> <p>and</p> <p>BackFace.StencilPassOp</p> </td><td>{{D3D11_STENCIL_OP_KEEP}}</td></tr> <tr><td> <p>FrontFace.StencilFailOp</p> <p>and</p> <p>BackFace.StencilFailOp</p> </td><td>{{D3D11_STENCIL_OP_KEEP}}</td></tr> </table><p>?</p><p>The formats that support stenciling are {{DXGI_FORMAT_D24_UNORM_S8_UINT}} and {{DXGI_FORMAT_D32_FLOAT_S8X24_UINT}}.</p> <dd> <p>Enable depth testing.</p> </dd> <dd> <p>Identify a portion of the depth-stencil buffer that can be modified by depth data (see <strong>{{D3D11_DEPTH_WRITE_MASK}}</strong>).</p> </dd> <dd> <p>A function that compares depth data against existing depth data. The function options are listed in <strong>{{D3D11_COMPARISON_FUNC}}</strong>.</p> </dd> <dd> <p>Enable stencil testing.</p> </dd> <dd> <p>Identify a portion of the depth-stencil buffer for reading stencil data.</p> </dd> <dd> <p>Identify a portion of the depth-stencil buffer for writing stencil data.</p> </dd> <dd> <p>Identify how to use the results of the depth test and the stencil test for pixels whose surface normal is facing towards the camera (see <strong>{{D3D11_DEPTH_STENCILOP_DESC}}</strong>).</p> </dd> <dd> <p>Identify how to use the results of the depth test and the stencil test for pixels whose surface normal is facing away from the camera (see <strong>{{D3D11_DEPTH_STENCILOP_DESC}}</strong>).</p> </dd> <p>Describes the blend state for a render target.</p> <p>You specify an array of <strong>{{D3D12_RENDER_TARGET_BLEND_DESC}}</strong> structures in the <strong>RenderTarget</strong> member of the <strong>{{D3D12_BLEND_DESC}}</strong> structure to describe the blend states for render targets; you can bind up to eight render targets to the output-merger stage at one time.</p><p>For info about how blending is done, see the output-merger stage.</p><p>Here are the default values for blend state.</p><table> <tr><th>State</th><th>Default Value</th></tr> <tr><td>BlendEnable</td><td>{{FALSE}}</td></tr> <tr><td>LogicOpEnable</td><td>{{FALSE}}</td></tr> <tr><td>SrcBlend</td><td>{{D3D12_BLEND_ONE}}</td></tr> <tr><td>DestBlend</td><td>{{D3D12_BLEND_ZERO}}</td></tr> <tr><td>BlendOp</td><td>{{D3D12_BLEND_OP_ADD}}</td></tr> <tr><td>SrcBlendAlpha</td><td>{{D3D12_BLEND_ONE}}</td></tr> <tr><td>DestBlendAlpha</td><td>{{D3D12_BLEND_ZERO}}</td></tr> <tr><td>BlendOpAlpha</td><td>{{D3D12_BLEND_OP_ADD}}</td></tr> <tr><td>LogicOp</td><td>{{D3D12_LOGIC_OP_NOOP}}</td></tr> <tr><td>RenderTargetWriteMask</td><td>{{D3D12_COLOR_WRITE_ENABLE_ALL}}</td></tr> </table><p>?</p> <dd> <p>Specifies whether to enable (or disable) blending. Set to <strong>{{TRUE}}</strong> to enable blending.</p> </dd> <dd> <p>Specifies whether to enable (or disable) a logical operation. Set to <strong>{{TRUE}}</strong> to enable a logical operation.</p> </dd> <dd> <p>A <strong>{{D3D12_BLEND}}</strong>-typed value that specifies the operation to perform on the {{RGB}} value that the pixel shader outputs. The <strong>BlendOp</strong> member defines how to combine the <strong>SrcBlend</strong> and <strong>DestBlend</strong> operations.</p> </dd> <dd> <p>A <strong>{{D3D12_BLEND}}</strong>-typed value that specifies the operation to perform on the current {{RGB}} value in the render target. The <strong>BlendOp</strong> member defines how to combine the <strong>SrcBlend</strong> and <strong>DestBlend</strong> operations.</p> </dd> <dd> <p>A <strong>{{D3D12_BLEND_OP}}</strong>-typed value that defines how to combine the <strong>SrcBlend</strong> and <strong>DestBlend</strong> operations.</p> </dd> <dd> <p>A <strong>{{D3D12_BLEND}}</strong>-typed value that specifies the operation to perform on the alpha value that the pixel shader outputs. Blend options that end in _COLOR are not allowed. The <strong>BlendOpAlpha</strong> member defines how to combine the <strong>SrcBlendAlpha</strong> and <strong>DestBlendAlpha</strong> operations.</p> </dd> <dd> <p>A <strong>{{D3D12_BLEND}}</strong>-typed value that specifies the operation to perform on the current alpha value in the render target. Blend options that end in _COLOR are not allowed. The <strong>BlendOpAlpha</strong> member defines how to combine the <strong>SrcBlendAlpha</strong> and <strong>DestBlendAlpha</strong> operations.</p> </dd> <dd> <p>A <strong>{{D3D12_BLEND_OP}}</strong>-typed value that defines how to combine the <strong>SrcBlendAlpha</strong> and <strong>DestBlendAlpha</strong> operations.</p> </dd> <dd> <p>A <strong>{{D3D12_LOGIC_OP}}</strong>-typed value that specifies the logical operation to configure for the render target.</p> </dd> <dd> <p>A combination of <strong>{{D3D12_COLOR_WRITE_ENABLE}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies a write mask.</p> </dd> <p>Describes the blend state.</p> <p> A <strong>{{D3D12_GRAPHICS_PIPELINE_STATE_DESC}}</strong> object contains a blend-state structure that controls blending by the output-merger stage. </p><p> Here are the default values for blend state. </p><table> <tr><th>State</th><th>Default Value</th></tr> <tr><td>AlphaToCoverageEnable</td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>IndependentBlendEnable</td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>RenderTarget[0].BlendEnable</td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>RenderTarget[0].LogicOpEnable</td><td><strong>{{FALSE}}</strong></td></tr> <tr><td>RenderTarget[0].SrcBlend</td><td>{{D3D12_BLEND_ONE}}</td></tr> <tr><td>RenderTarget[0].DestBlend</td><td>{{D3D12_BLEND_ZERO}}</td></tr> <tr><td>RenderTarget[0].BlendOp</td><td>{{D3D12_BLEND_OP_ADD}}</td></tr> <tr><td>RenderTarget[0].SrcBlendAlpha</td><td>{{D3D12_BLEND_ONE}}</td></tr> <tr><td>RenderTarget[0].DestBlendAlpha</td><td>{{D3D12_BLEND_ZERO}}</td></tr> <tr><td>RenderTarget[0].BlendOpAlpha</td><td>{{D3D12_BLEND_OP_ADD}}</td></tr> <tr><td>RenderTarget[0].LogicOp</td><td>{{D3D12_LOGIC_OP_NOOP}}</td></tr> <tr><td>RenderTarget[0].RenderTargetWriteMask</td><td>{{D3D12_COLOR_WRITE_ENABLE_ALL}}</td></tr> </table><p>?</p><p> When you set the <strong>LogicOpEnable</strong> member of the first element of the <strong>RenderTarget</strong> array (<strong>RenderTarget</strong>[0]) to <strong>{{TRUE}}</strong>, you must also set the <strong>BlendEnable</strong> member of <strong>RenderTarget</strong>[0] to <strong>{{FALSE}}</strong>, and the <strong>IndependentBlendEnable</strong> member of this structure to <strong>{{FALSE}}</strong>. This reflects the limitation in hardware that you can't mix logic operations with blending across multiple render targets, and that when you use a logic operation, you must apply the same logic operation to all render targets. </p><p> Note the helper structure, <strong>{{CD3DX12_BLEND_DESC}}</strong>. </p> <dd> <p> Specifies whether to use alpha-to-coverage as a multisampling technique when setting a pixel to a render target. For more info about using alpha-to-coverage, see Alpha-To-Coverage. </p> </dd> <dd> <p> Specifies whether to enable independent blending in simultaneous render targets. Set to <strong>{{TRUE}}</strong> to enable independent blending. If set to <strong>{{FALSE}}</strong>, only the <strong>RenderTarget</strong>[0] members are used; <strong>RenderTarget</strong>[1..7] are ignored. </p> </dd> <dd> <p> An array of <strong>{{D3D12_RENDER_TARGET_BLEND_DESC}}</strong> structures that describe the blend states for render targets; these correspond to the eight render targets that can be bound to the output-merger stage at one time. </p> </dd> <p>Describes rasterizer state.</p> <p> A <strong>{{D3D12_GRAPHICS_PIPELINE_STATE_DESC}}</strong> contains a rasterizer-state structure. </p><p> Rasterizer state defines the behavior of the rasterizer stage. </p><p> If you do not specify some rasterizer state, the Direct3D runtime uses the following default values for rasterizer state. </p><table> <tr><th>State</th><th>Default Value</th></tr> <tr><td><strong>FillMode</strong></td><td>{{D3D12_FILL_MODE_SOLID}}</td></tr> <tr><td><strong>CullMode</strong></td><td>{{D3D12_CULL_MODE_BACK}}</td></tr> <tr><td><strong>FrontCounterClockwise</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td><strong>DepthBias</strong></td><td>0</td></tr> <tr><td><strong>DepthBiasClamp</strong></td><td>0.0f</td></tr> <tr><td><strong>SlopeScaledDepthBias</strong></td><td>0.0f</td></tr> <tr><td><strong>DepthClipEnable</strong></td><td><strong>{{TRUE}}</strong></td></tr> <tr><td><strong>MultisampleEnable</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td><strong>AntialiasedLineEnable</strong></td><td><strong>{{FALSE}}</strong></td></tr> <tr><td><strong>ForcedSampleCount</strong></td><td>0</td></tr> <tr><td><strong>ConservativeRaster</strong></td><td><strong>{{D3D12_CONSERVATIVE_RASTERIZATION_MODE_OFF}}</strong></td></tr> </table><p>?</p> <dd> <p> A <strong>{{D3D12_FILL_MODE}}</strong>-typed value that specifies the fill mode to use when rendering. </p> </dd> <dd> <p> A <strong>{{D3D12_CULL_MODE}}</strong>-typed value that specifies that triangles facing the specified direction are not drawn. </p> </dd> <dd> <p> Determines if a triangle is front- or back-facing. If this member is <strong>{{TRUE}}</strong>, a triangle will be considered front-facing if its vertices are counter-clockwise on the render target and considered back-facing if they are clockwise. If this parameter is <strong>{{FALSE}}</strong>, the opposite is true. </p> </dd> <dd> <p> Depth value added to a given pixel. For info about depth bias, see Depth Bias. </p> </dd> <dd> <p> Maximum depth bias of a pixel. For info about depth bias, see Depth Bias. </p> </dd> <dd> <p> Scalar on a given pixel's slope. For info about depth bias, see Depth Bias. </p> </dd> <dd> <p> Specifies whether to enable clipping based on distance. </p> <p> The hardware always performs x and y clipping of rasterized coordinates. When <strong>DepthClipEnable</strong> is set to the default?<strong>{{TRUE}}</strong>, the hardware also clips the z value (that is, the hardware performs the last step of the following algorithm). </p> <code> 0 &lt; w -w &lt;= x &lt;= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden) -w &lt;= y &lt;= w (or arbitrarily wider range if implementation uses a guard band to reduce clipping burden) 0 &lt;= z &lt;= w </code> <p> When you set <strong>DepthClipEnable</strong> to <strong>{{FALSE}}</strong>, the hardware skips the z clipping (that is, the last step in the preceding algorithm). However, the hardware still performs the "0 &lt; w" clipping. When z clipping is disabled, improper depth ordering at the pixel level might result. However, when z clipping is disabled, stencil shadow implementations are simplified. In other words, you can avoid complex special-case handling for geometry that goes beyond the back clipping plane. </p> </dd> <dd> <p> Specifies whether to use the quadrilateral or alpha line anti-aliasing algorithm on multisample antialiasing ({{MSAA}}) render targets. Set to <strong>{{TRUE}}</strong> to use the quadrilateral line anti-aliasing algorithm and to <strong>{{FALSE}}</strong> to use the alpha line anti-aliasing algorithm. For more info about this member, see Remarks. </p> </dd> <dd> <p> Specifies whether to enable line antialiasing; only applies if doing line drawing and <strong>MultisampleEnable</strong> is <strong>{{FALSE}}</strong>. For more info about this member, see Remarks. </p> </dd> <dd> <p> The sample count that is forced while {{UAV}} rendering or rasterizing. Valid values are 0, 1, 2, 4, 8, and optionally 16. 0 indicates that the sample count is not forced. </p> </dd> <dd> <p> A <strong>{{D3D12_CONSERVATIVE_RASTERIZATION_MODE}}</strong>-typed value that identifies whether conservative rasterization is on or off. </p> </dd> <p>Describes shader data.</p> <p> The <strong>{{D3D12_GRAPHICS_PIPELINE_STATE_DESC}}</strong> and <strong>{{D3D12_COMPUTE_PIPELINE_STATE_DESC}}</strong> objects contain <strong>{{D3D12_SHADER_BYTECODE}}</strong> structures that describe various shader types. </p> <dd> <p> A reference to a memory block that contains the shader data. </p> </dd> <dd> <p> The size, in bytes, of the shader data that the <strong>pShaderBytecode</strong> member points to. </p> </dd> <p>Describes a streaming output buffer.</p> <p> A <strong>{{D3D12_GRAPHICS_PIPELINE_STATE_DESC}}</strong> object contains a <strong>{{D3D12_STREAM_OUTPUT_DESC}}</strong> structure. </p> <dd> <p> An array of <strong>{{D3D12_SO_DECLARATION_ENTRY}}</strong> structures. Can't be <strong>{{NULL}}</strong> if <strong>NumEntries</strong> &gt; 0. </p> </dd> <dd> <p> The number of entries in the stream output declaration array that the <strong>pSODeclaration</strong> member points to. </p> </dd> <dd> <p> An array of buffer strides; each stride is the size of an element for that buffer. </p> </dd> <dd> <p> The number of strides (or buffers) that the <strong>pBufferStrides</strong> member points to. </p> </dd> <dd> <p> The index number of the stream to be sent to the rasterizer stage. </p> </dd> <p>Describes the input-buffer data for the input-assembler stage.</p> <p> This structure is a member of the <strong>{{D3D12_GRAPHICS_PIPELINE_STATE_DESC}}</strong> structure.</p> <dd> <p> An array of <strong>{{D3D12_INPUT_ELEMENT_DESC}}</strong> structures that describe the data types of the input-assembler stage. </p> </dd> <dd> <p> The number of input-data types in the array of input elements that the <strong>pInputElementDescs</strong> member points to. </p> </dd> <p>Stores a pipeline state.</p> <p> This structure is used by the <strong>{{D3D12_GRAPHICS_PIPELINE_STATE_DESC}}</strong> structure, and the <strong>{{D3D12_COMPUTE_PIPELINE_STATE_DESC}}</strong> structure.</p><p>This structure is intended to be filled with the data retrieved from <strong>{{ID3D12PipelineState::GetCachedBlob}}</strong>. This cached {{PSO}} contains data specific to the hardware, driver, and machine that it was retrieved from. Compilation using this data should be faster than compilation without. The rest of the data in the {{PSO}} needs to still be valid, and needs to match the cached {{PSO}}, otherwise {{E_INVALIDARG}} might be returned.</p><p>If the driver has been upgraded to a {{D3D12}} driver after the {{PSO}} was cached, you might see a {{D3D12_ERROR_DRIVER_VERSION_MISMATCH}} return code, or if you?re running on a different {{GPU}}, the {{D3D12_ERROR_ADAPTER_NOT_FOUND}} return code.</p> <dd> <p> Specifies reference that references the memory location of the cache. </p> </dd> <dd> <p> Specifies the size of the cache in bytes. </p> </dd> <p>Describes a compute pipeline state object.</p> <p> This structure is used by <strong>CreateComputePipelineState</strong>. </p> <dd> <p> A reference to the <strong>{{ID3D12RootSignature}}</strong> object. </p> </dd> <dd> <p> A <strong>{{D3D12_SHADER_BYTECODE}}</strong> structure that describes the compute shader. </p> </dd> <dd> <p> For single {{GPU}} operation, set this to zero. If there are multiple {{GPU}} nodes, set bits to identify the nodes (the device's physical adapters) for which the compute pipeline state is to apply. Each bit in the mask corresponds to a single node. Refer to Multi-Adapter.</p> </dd> <dd> <p> A cached pipeline state object, as a <strong>{{D3D12_CACHED_PIPELINE_STATE}}</strong> structure. </p> </dd> <dd> <p> A <strong>{{D3D12_PIPELINE_STATE_FLAGS}}</strong> enumeration constant such as for "tool debug". </p> </dd> <p>Describes the slot of a root signature version 1.0.</p> <p> A <strong>{{D3D12_ROOT_SIGNATURE_DESC}}</strong> can contain descriptor tables and inline constants. More capable hardware could support inline descriptors in the root signature as well. The number of bind slots in the root signature are most efficient if kept below a certain size, and can have an upper bound as well. </p> <dd> <p> A <strong>{{D3D12_ROOT_PARAMETER_TYPE}}</strong>-typed value that specifies the type of root signature slot. This member determines which type to use in the union below. </p> </dd> <dd> <p> A <strong>{{D3D12_ROOT_DESCRIPTOR_TABLE}}</strong> structure that describes the layout of a descriptor table as a collection of descriptor ranges that appear one after the other in a descriptor heap. </p> </dd> <dd> <p> A <strong>{{D3D12_ROOT_CONSTANTS}}</strong> structure that describes constants inline in the root signature that appear in shaders as one constant buffer. </p> </dd> <dd> <p> A <strong>{{D3D12_ROOT_DESCRIPTOR}}</strong> structure that describes descriptors inline in the root signature that appear in shaders. </p> </dd> <dd> <p> A <strong>{{D3D12_SHADER_VISIBILITY}}</strong>-typed value that specifies the shaders that can access the contents of the root signature slot. </p> </dd> <p> Describes the layout of a root signature version 1.0. </p> <p> This structure is used by the <strong>{{D3D12SerializeRootSignature}}</strong> function and is returned by the <strong>{{ID3D12RootSignatureDeserializer::GetRootSignatureDesc}}</strong> method. </p><p> There is one graphics root signature, and one compute root signature. </p> <dd> <p> The number of slots in the root signature. This number is also the number of elements in the <em>pParameters</em> array. </p> </dd> <dd> <p> An array of <strong>{{D3D12_ROOT_PARAMETER}}</strong> structures for the slots in the root signature. </p> </dd> <dd> <p>Specifies the number of static samplers.</p> </dd> <dd> <p> Pointer to one or more <strong>{{D3D12_STATIC_SAMPLER_DESC}}</strong> structures. </p> </dd> <dd> <p> A combination of <strong>{{D3D12_ROOT_SIGNATURE_FLAGS}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies options for the root signature layout. </p> </dd> <p> Describes Direct3D 12 feature options in the current graphics driver. </p> <p> See <strong>{{D3D12_FEATURE}}</strong>. </p> <dd> <p> Specifies whether <strong>double</strong> types are allowed for shader operations. If <strong>{{TRUE}}</strong>, double types are allowed; otherwise <strong>{{FALSE}}</strong>. The supported operations are equivalent to Direct3D 11's <strong>ExtendedDoublesShaderInstructions</strong> member of the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS}}</strong> structure. </p> <p> To use any {{HLSL}} shader that is compiled with a <strong>double</strong> type, the runtime must set <strong>DoublePrecisionFloatShaderOps</strong> to <strong>{{TRUE}}</strong>. </p> </dd> <dd> <p> Specifies whether logic operations are available in blend state. The runtime sets this member to <strong>{{TRUE}}</strong> if logic operations are available in blend state and <strong>{{FALSE}}</strong> otherwise. This member is <strong>{{FALSE}}</strong> for feature level 9.1, 9.2, and 9.3. This member is optional for feature level 10, 10.1, and 11. This member is <strong>{{TRUE}}</strong> for feature level 11.1 and 12. </p> </dd> <dd> <p> A combination of <strong>{{D3D12_SHADER_MIN_PRECISION_SUPPORT}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies minimum precision levels that the driver supports for shader stages. A value of zero indicates that the driver supports only full 32-bit precision for all shader stages. </p> </dd> <dd> <p> Specifies whether the hardware and driver support tiled resources. The runtime sets this member to a <strong>{{D3D12_TILED_RESOURCES_TIER}}</strong>-typed value that indicates if the hardware and driver support tiled resources and at what tier level. </p> </dd> <dd> <p> Specifies the level at which the hardware and driver support resource binding. The runtime sets this member to a <strong>{{D3D12_RESOURCE_BINDING_TIER}}</strong>-typed value that indicates the tier level. </p> </dd> <dd> <p> Specifies whether pixel shader stencil ref is supported. If <strong>{{TRUE}}</strong>, it's supported; otherwise <strong>{{FALSE}}</strong>. </p> </dd> <dd> <p> Specifies whether the loading of additional formats for typed unordered-access views ({{UAVs}}) is supported. If <strong>{{TRUE}}</strong>, it's supported; otherwise <strong>{{FALSE}}</strong>. </p> </dd> <dd> <p> Specifies whether <em>Rasterizer Order Views</em> ({{ROVs}}) are supported. If <strong>{{TRUE}}</strong>, they're supported; otherwise <strong>{{FALSE}}</strong>. </p> </dd> <dd> <p> Specifies the level at which the hardware and driver support conservative rasterization. The runtime sets this member to a <strong>{{D3D12_CONSERVATIVE_RASTERIZATION_TIER}}</strong>-typed value that indicates the tier level. </p> </dd> <dd> <p> Don't use this field; instead, use the <strong>{{D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT}}</strong> query (a structure with a <strong>MaxGPUVirtualAddressBitsPerResource</strong> member), which is more accurate. </p> </dd> <dd> <p> {{TRUE}} if the hardware supports textures with the 64KB standard swizzle pattern. Support for this pattern enables zero-copy texture optimizations while providing near-equilateral locality for each dimension within the texture. For texture swizzle options and restrictions, see <strong>{{D3D12_TEXTURE_LAYOUT}}</strong>. </p> </dd> <dd> <p> A <strong>{{D3D12_CROSS_NODE_SHARING_TIER}}</strong> enumeration constant that specifies the level of sharing across nodes of an adapter that has multiple nodes, such as Tier 1 Emulated, Tier 1, or Tier 2. </p> </dd> <dd> <p> {{FALSE}} means the device only supports copy operations to and from cross-adapter row-major textures. {{TRUE}} means the device supports shader resource views, unordered access views, and render target views of cross-adapter row-major textures. "Cross-adapter" means between multiple adapters (even from different {{IHVs}}). </p> </dd> <dd> <p> Whether the viewport ({{VP}}) and Render Target ({{RT}}) array index from any shader feeding the rasterizer are supported without geometry shader emulation. Compare the <strong>{{VPAndRTArrayIndexFromAnyShaderFeedingRasterizer}}</strong> member of the <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS3}}</strong> structure. In <strong>{{ID3D12ShaderReflection::GetRequiresFlags}}</strong>, see the #define {{D3D_SHADER_REQUIRES_VIEWPORT_AND_RT_ARRAY_INDEX_FROM_ANY_SHADER_FEEDING_RASTERIZER}}. </p> </dd> <dd> <p> Specifies the level at which the hardware and driver require heap attribution related to resource type. The runtime sets this member to a <strong>{{D3D12_RESOURCE_HEAP_TIER}}</strong> enumeration constant. </p> </dd> <p>Describes the level of support for {{HLSL}} 6.0 wave operations.</p> <p>A "lane" is single thread of execution. The shader models before version 6.0 expose only one of these at the language level, leaving expansion to parallel {{SIMD}} processing entirely up to the implementation. A "wave" is set of lanes (threads) executed simultaneously in the processor. No explicit barriers are required to guarantee that they execute in parallel. Similar concepts include "warp" and "wavefront". </p><p> This structure is used with the {{D3D12_FEATURE_D3D12_OPTIONS1}} member of <strong>{{D3D12_FEATURE}}</strong>. </p> <dd> <p>True if the driver supports {{HLSL}} 6.0 wave operations.</p> </dd> <dd> <p>Specifies the baseline number of lanes in the {{SIMD}} wave that this implementation can support. This term is sometimes known as "wavefront size" or "warp width". Currently apps should rely only on this minimum value for sizing workloads. </p> </dd> <dd> <p>Specifies the maximum number of lanes in the {{SIMD}} wave that this implementation can support. This capability is reserved for future expansion, and is not expected to be used by current applications. </p> </dd> <dd> <p>Specifies the total number of {{SIMD}} lanes on the hardware.</p> </dd> <dd> <p>Indicates transitions are possible in and out of the {{CBV}}, and indirect argument states, on compute command lists. If <strong>CheckFeatureSupport</strong> succeeds this value will always be true. </p> </dd> <dd> <p>Indicates that 64bit integer operations are supported.</p> </dd> <p> Describes the {{DXGI}} data format. </p> <p> See <strong>{{D3D12_FEATURE}}</strong>. </p> <dd> <p> A <strong>{{DXGI_FORMAT}}</strong>-typed value for the format to return info about. </p> </dd> <dd> <p> The number of planes to provide information about. </p> </dd> <p>Pass this structure to <strong>CheckFeatureSupport</strong> to check for root signature version support.</p> <p>Provide detail about the adapter architecture, helping applications better optimize for certain adapter properties.</p> <dd> <p> In multi-adapter operation, this indicates which physical adapter of the device is relevant. See Multi-Adapter. <strong>NodeIndex</strong> is filled out by the application before calling <strong>CheckFeatureSupport</strong>, as the application can retrieve details about the architecture of each adapter. </p> </dd> <dd> <p> Specifies whether the hardware and driver support a tile-based renderer. The runtime sets this member to <strong>{{TRUE}}</strong> if the hardware and driver support a tile-based renderer. </p> </dd> <dd> <p> Specifies whether the hardware and driver support {{UMA}}. The runtime sets this member to <strong>{{TRUE}}</strong> if the hardware and driver support {{UMA}}. </p> </dd> <dd> <p> Specifies whether the hardware and driver support cache-coherent {{UMA}}. The runtime sets this member to <strong>{{TRUE}}</strong> if the hardware and driver support cache-coherent {{UMA}}. </p> </dd> <p> Describes the {{DXGI}} data format. </p> <p> See <strong>{{D3D12_FEATURE}}</strong>. </p> <dd> <p> A <strong>{{DXGI_FORMAT}}</strong>-typed value for the format to return info about. </p> </dd> <dd> <p> The number of planes to provide information about. </p> </dd> <p>Contains the supported shader model.</p> <p> Refer to the enumeration constant {{D3D12_FEATURE_SHADER_MODEL}} in the <strong>{{D3D12_FEATURE}}</strong> enumeration. </p> <dd> <p>Specifies one member of <strong>{{D3D_SHADER_MODEL}}</strong> that indicates the maximum supported shader model.</p> </dd> <p> Describes which resources are supported by the current graphics driver for a given format. </p> <p> Refer to the enum <strong>{{D3D12_FEATURE}}</strong>. </p> <dd> <p> A <strong>{{DXGI_FORMAT}}</strong>-typed value for the format to return info about. </p> </dd> <dd> <p> A combination of <strong>{{D3D12_FORMAT_SUPPORT1}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies which resources are supported. </p> </dd> <dd> <p> A combination of <strong>{{D3D12_FORMAT_SUPPORT2}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies which unordered resource options are supported. </p> </dd> <p> Describes the image quality levels for a given format and sample count. </p> <p> See <strong>{{D3D12_FEATURE}}</strong>. </p> <dd> <p> A <strong>{{DXGI_FORMAT}}</strong>-typed value for the format to return info about. </p> </dd> <dd> <p> The number of multi-samples per pixel to return info about. </p> </dd> <dd> <p> Flags to control quality levels, as a bitwise-{{OR}}'d combination of <strong>{{D3D12_MULTISAMPLE_QUALITY_LEVEL_FLAGS}}</strong> enumeration constants. The resulting value specifies options for determining quality levels. </p> </dd> <dd> <p> The number of quality levels. </p> </dd> <p> Describes the {{DXGI}} data format. </p> <p> See <strong>{{D3D12_FEATURE}}</strong>. </p> <dd> <p> A <strong>{{DXGI_FORMAT}}</strong>-typed value for the format to return info about. </p> </dd> <dd> <p> The number of planes to provide information about. </p> </dd> <p> Details the adapter's {{GPU}} virtual address space limitations, including maximum address bits per resource and per process. </p> <p> See the enumeration constant {{D3D12_FEATURE_GPU_VIRTUAL_ADDRESS_SUPPORT}} in the <strong>{{D3D12_FEATURE}}</strong> enumeration. </p> <dd> <p>The maximum {{GPU}} virtual address bits per resource.</p> <p>Some adapters have significantly less bits available per resource than per process, while other adapters have significantly greater bits available per resource than per process. The latter scenario tends to happen in less common scenarios, like when running a 32-bit process on certain {{UMA}} adapters. When per resource capabilities are greater than per process, the greater per resource capabilities can only be leveraged by reserved resources or {{NULL}} mapped pages. </p> </dd> <dd> <p> The maximum {{GPU}} virtual address bits per process.</p> <p>When this value is nearly equal to the available residency budget, <strong>Evict</strong> will not be a feasible option to manage residency. See <strong>MakeResident</strong> for more details.</p> </dd> <p> Describes the layout of a root signature version 1.0. </p> <p> This structure is used by the <strong>{{D3D12SerializeRootSignature}}</strong> function and is returned by the <strong>{{ID3D12RootSignatureDeserializer::GetRootSignatureDesc}}</strong> method. </p><p> There is one graphics root signature, and one compute root signature. </p> <dd> <p> The number of slots in the root signature. This number is also the number of elements in the <em>pParameters</em> array. </p> </dd> <dd> <p> An array of <strong>{{D3D12_ROOT_PARAMETER}}</strong> structures for the slots in the root signature. </p> </dd> <dd> <p>Specifies the number of static samplers.</p> </dd> <dd> <p> Pointer to one or more <strong>{{D3D12_STATIC_SAMPLER_DESC}}</strong> structures. </p> </dd> <dd> <p> A combination of <strong>{{D3D12_ROOT_SIGNATURE_FLAGS}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies options for the root signature layout. </p> </dd> <p> Describes the {{DXGI}} data format. </p> <p> See <strong>{{D3D12_FEATURE}}</strong>. </p> <dd> <p> A <strong>{{DXGI_FORMAT}}</strong>-typed value for the format to return info about. </p> </dd> <dd> <p> The number of planes to provide information about. </p> </dd> <p>Describes parameters needed to allocate resources.</p> <p> This structure is used by the <strong>GetResourceAllocationInfo</strong> method. </p> <dd> <p>The size, in bytes, of the resource.</p> </dd> <dd> <p>The alignment value for the resource; one of 4KB (4096), 64KB (65536) and 4MB (4194304) alignment.</p> </dd> <p>Describes heap properties.</p> <p> This structure is used by the following: </p><ul> <li> <strong>{{D3D12_HEAP_DESC}}</strong> structure </li> <li> <strong>{{ID3D12Resource::GetHeapProperties}}</strong> </li> <li> <strong>{{ID3D12Device::GetCustomHeapProperties}}</strong> </li> <li> <strong>{{ID3D12Device::CreateCommittedResource}}</strong> </li> </ul><p> Valid combinations of struct member values: </p><ul> <li> When <strong>Type</strong> is <strong>{{D3D12_HEAP_TYPE}}</strong>_CUSTOM, <strong>{{CPUPageProperty}}</strong> and <strong>MemoryPoolPreference</strong> must not be ..._UNKNOWN. </li> <li> When <strong>Type</strong> is not {{D3D12_HEAP_TYPE_CUSTOM}}, <strong>{{CPUPageProperty}}</strong> and <strong>MemoryPoolPreference</strong> must be ..._UNKNOWN. </li> <li> When using {{D3D12_HEAP_TYPE_CUSTOM}} and <strong>{{D3D12_MEMORY_POOL}}</strong>_L1, on {{NUMA}} adapters, <strong>{{CPUPageProperty}}</strong> must be <strong>{{D3D12_CPU_PAGE_PROPERTY}}</strong>_NOT_AVAILABLE. To differentiate {{NUMA}} from {{UMA}} adapters, see <strong>{{D3D12_FEATURE}}</strong>_ARCHITECTURE and <strong>{{D3D12_FEATURE_DATA_ARCHITECTURE}}</strong>. </li> </ul> <dd> <p> A <strong>{{D3D12_HEAP_TYPE}}</strong>-typed value that specifies the type of heap. </p> </dd> <dd> <p> A <strong>{{D3D12_CPU_PAGE_PROPERTY}}</strong>-typed value that specifies the {{CPU}}-page properties for the heap. </p> </dd> <dd> <p> A <strong>{{D3D12_MEMORY_POOL}}</strong>-typed value that specifies the memory pool for the heap. </p> </dd> <dd> <p> For multi-adapter operation, this indicates the node where the resource should be created. Exactly one bit of this {{UINT}} must be set. See Multi-Adapter. </p> <p> Passing zero is equivalent to passing one, in order to simplify the usage of single-{{GPU}} adapters. </p> </dd> <dd> <p> For multi-adapter operation, this indicates the set of nodes where the resource is visible. <em>VisibleNodeMask</em> must have the same bits set as <em>CreationNodeMask</em> has. See Multi-Adapter. </p> <p> Passing zero is equivalent to passing one, in order to simplify the usage of single-{{GPU}} adapters. </p> </dd> <p>Describes a heap.</p> <p> This structure is used by the <strong>CreateHeap</strong> method, and returned by the <strong>GetDesc</strong> method. </p> <dd> <p> The size, in bytes, of the heap. To avoid wasting memory, applications should pass <em>SizeInBytes</em> values which are multiples of the effective <em>Alignment</em>; but non-aligned <em>SizeInBytes</em> is also supported, for convenience. To find out how large a heap must be to support textures with undefined layouts and adapter-specific sizes, call <strong>{{ID3D12Device::GetResourceAllocationInfo}}</strong>. </p> </dd> <dd> <p> A <strong>{{D3D12_HEAP_PROPERTIES}}</strong> structure that describes the heap properties. </p> </dd> <dd> <p> The alignment value for the heap. Valid values: </p> <table> <tr><th>Value</th><th>Description</th></tr> <tr><td> 0 </td><td> An alias for 64KB. </td></tr> <tr><td> {{D3D12_DEFAULT_RESOURCE_PLACEMENT_ALIGNMENT}} </td><td> #defined as 64KB. </td></tr> <tr><td> {{D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT}} </td><td> #defined as 4MB. An application must decide whether the heap will contain multi-sample anti-aliasing ({{MSAA}}), in which case, the application must choose {{D3D12_DEFAULT_MSAA_RESOURCE_PLACEMENT_ALIGNMENT}}. </td></tr> </table> <p>?</p> </dd> <dd> <p> A combination of <strong>{{D3D12_HEAP_FLAGS}}</strong>-typed values that are combined by using a bitwise-{{OR}} operation. The resulting value identifies heap options. When creating heaps to support adapters with resource heap tier 1, an application must choose some flags. </p> </dd> <p> Describes a resource, such as a texture. This structure is used extensively. </p> <p> Use this structure with:</p><ul> <li> <strong>{{ID3D12Resource::GetDesc}}</strong> </li> <li> <strong>{{ID3D12Device::GetResourceAllocationInfo}}</strong> </li> <li> <strong>{{ID3D12Device::CreateCommittedResource}}</strong> </li> <li> <strong>{{ID3D12Device::CreatePlacedResource}}</strong> </li> <li> <strong>{{ID3D12Device::CreateReservedResource}}</strong> </li> <li> <strong>{{ID3D12Device::GetCopyableFootprints}}</strong> </li> <li> A number of the helper functions, refer to Helper Structures and Functions for {{D3D12}}.</li> </ul><p>Two common resources are buffers and textures, which both use this structure, but with quite different uses of the fields.</p> <dd> <p> One member of <strong>{{D3D12_RESOURCE_DIMENSION}}</strong>, specifying the dimensions of the resource (for example, {{D3D12_RESOURCE_DIMENSION_TEXTURE1D}}), or whether it is a buffer (({{D3D12_RESOURCE_DIMENSION_BUFFER}}). </p> </dd> <dd> <p> Specifies the alignment. </p> </dd> <dd> <p> Specifies the width of the resource. </p> </dd> <dd> <p> Specifies the height of the resource. </p> </dd> <dd> <p> Specifies the depth of the resource, if it is 3D, or the array size if it is an array of 1D or 2D resources. </p> </dd> <dd> <p> Specifies the number of {{MIP}} levels. </p> </dd> <dd> <p> Specifies one member of <strong>{{DXGI_FORMAT}}</strong>. </p> </dd> <dd> <p> Specifies a <strong>{{DXGI_SAMPLE_DESC}}</strong> structure. </p> </dd> <dd> <p> Specifies one member of <strong>{{D3D12_TEXTURE_LAYOUT}}</strong>. </p> </dd> <dd> <p> Bitwise-{{OR}}'d flags, as <strong>{{D3D12_RESOURCE_FLAGS}}</strong> enumeration constants. </p> </dd> <p>Specifies a depth and stencil value.</p> <p>This structure is used in the <strong>{{D3D12_CLEAR_VALUE}}</strong> structure.</p> <dd> <p>Specifies the depth value.</p> </dd> <dd> <p>Specifies the stencil value.</p> </dd> <p>Describes a value used to optimize clear operations for a particular resource.</p> <p> This structure is optionally passed into the following methods: </p><ul> <li> <strong>{{ID3D12Device::CreateCommittedResource}}</strong> </li> <li> <strong>{{ID3D12Device::CreatePlacedResource}}</strong> </li> <li> <strong>{{ID3D12Device::CreateReservedResource}}</strong> </li> </ul> <dd> <p>Specifies one member of the <strong>{{DXGI_FORMAT}}</strong> enum.</p> <p>The format of the commonly cleared color follows the same validation rules as a view/ descriptor creation. In general, the format of the clear color can be any format in the same typeless group that the resource format belongs to.</p> <p>This <em>Format</em> must match the format of the view used during the clear operation. It indicates whether the <em>Color</em> or the <em>DepthStencil</em> member is valid and how to convert the values for usage with the resource.</p> </dd> <dd> <p>Specifies a 4-entry array of float values (each value in the range 0.0 to 1.0), determining the {{RGBA}} value. The order of {{RGBA}} matches the order used with <strong>ClearRenderTargetView</strong>.</p> </dd> <dd> <p>Specifies one member of <strong>{{D3D12_DEPTH_STENCIL_VALUE}}</strong>. These values match the semantics of <em>Depth</em> and <em>Stencil</em> in <strong>ClearDepthStencilView</strong>.</p> </dd> <p>Describes a memory range.</p> <p><strong>End</strong> is one-past-the-end. When <strong>Begin</strong> equals <strong>End</strong>, the range is empty. The size of the range is (<strong>End</strong> - <strong>Begin</strong>). </p><p> This structure is used by the <strong>Map</strong> and <strong>Unmap</strong> methods. </p> <dd> <p> The offset, in bytes, denoting the beginning of a memory range. </p> </dd> <dd> <p> The offset, in bytes, denoting the end of a memory range. <strong>End</strong> is one-past-the-end. </p> </dd> <p> Describes the layout of a root signature version 1.0. </p> <p> This structure is used by the <strong>{{D3D12SerializeRootSignature}}</strong> function and is returned by the <strong>{{ID3D12RootSignatureDeserializer::GetRootSignatureDesc}}</strong> method. </p><p> There is one graphics root signature, and one compute root signature. </p> <dd> <p> The number of slots in the root signature. This number is also the number of elements in the <em>pParameters</em> array. </p> </dd> <dd> <p> An array of <strong>{{D3D12_ROOT_PARAMETER}}</strong> structures for the slots in the root signature. </p> </dd> <dd> <p>Specifies the number of static samplers.</p> </dd> <dd> <p> Pointer to one or more <strong>{{D3D12_STATIC_SAMPLER_DESC}}</strong> structures. </p> </dd> <dd> <p> A combination of <strong>{{D3D12_ROOT_SIGNATURE_FLAGS}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies options for the root signature layout. </p> </dd> <p>Describes a subresource memory range.</p> <p> This structure is used by the <strong>AtomicCopyBufferUINT</strong> and <strong>AtomicCopyBufferUINT64</strong> methods. </p> <dd> <p>The index of the subresource.</p> </dd> <dd> <p>A memory range within the subresource.</p> </dd> <p>Describes subresource data.</p> <dd> <p>Offset, in bytes, between the start of the parent resource and this subresource.</p> </dd> <dd> <p>The row pitch, or width, or physical size, in bytes, of the subresource data.</p> </dd> <dd> <p>The depth pitch, or width, or physical size, in bytes, of the subresource data.</p> </dd> <p>Describes the coordinates of a tiled resource.</p> <p> This structure is used by the <strong>CopyTiles</strong>, <strong>CopyTileMappings</strong> and <strong>UpdateTileMappings</strong> methods. </p> <dd> <p>The x-coordinate of the tiled resource.</p> </dd> <dd> <p>The y-coordinate of the tiled resource.</p> </dd> <dd> <p>The z-coordinate of the tiled resource.</p> </dd> <dd> <p>The index of the subresource for the tiled resource.</p> </dd> <p>Describes the size of a tiled region.</p> <p> This structure is used by the <strong>CopyTiles</strong>, <strong>CopyTileMappings</strong> and <strong>UpdateTileMappings</strong> methods. </p> <dd> <p>The number of tiles in the tiled region.</p> </dd> <dd> <p> Specifies whether the runtime uses the <strong>Width</strong>, <strong>Height</strong>, and <strong>Depth</strong> members to define the region. </p> <p> If <strong>{{TRUE}}</strong>, the runtime uses the <strong>Width</strong>, <strong>Height</strong>, and <strong>Depth</strong> members to define the region. In this case, <strong>NumTiles</strong> should be equal to <strong>Width</strong> * <strong>Height</strong> * <strong>Depth</strong>.</p> <p> If <strong>{{FALSE}}</strong>, the runtime ignores the <strong>Width</strong>, <strong>Height</strong>, and <strong>Depth</strong> members and uses the <strong>NumTiles</strong> member to traverse tiles in the resource linearly across x, then y, then z (as applicable) and then spills over mipmaps/arrays in subresource order. For example, use this technique to map an entire resource at once. </p> <p> Regardless of whether you specify <strong>{{TRUE}}</strong> or <strong>{{FALSE}}</strong> for <strong>UseBox</strong>, you use a <strong>{{D3D12_TILED_RESOURCE_COORDINATE}}</strong> structure to specify the starting location for the region within the resource as a separate parameter outside of this structure by using x, y, and z coordinates. </p> <p> When the region includes mipmaps that are packed with nonstandard tiling, <strong>UseBox</strong> must be <strong>{{FALSE}}</strong> because tile dimensions are not standard and the app only knows a count of how many tiles are consumed by the packed area, which is per array slice. The corresponding (separate) starting location parameter uses x to offset into the flat range of tiles in this case, and y and z coordinates must each be 0. </p> </dd> <dd> <p> The width of the tiled region, in tiles. Used for buffer and 1D, 2D, and 3D textures. For more info, see Tile and toast image sizes. </p> </dd> <dd> <p> The height of the tiled region, in tiles. Used for 2D and 3D textures. For more info, see Tile and toast image sizes. </p> </dd> <dd> <p>The depth of the tiled region, in tiles. Used for 3D textures or arrays. For arrays, used for advancing in depth jumps to next slice of same mipmap size, which isn't contiguous in the subresource counting space if there are multiple mipmaps.</p> </dd> <p>Describes a tiled subresource volume.</p> <p> This structure is used by the <strong>GetResourceTiling</strong> method. </p> <dd> <p>The width in tiles of the subresource.</p> </dd> <dd> <p>The height in tiles of the subresource.</p> </dd> <dd> <p>The depth in tiles of the subresource.</p> </dd> <dd> <p>The index of the tile in the overall tiled subresource to start with. </p> </dd> <p>Describes the shape of a tile by specifying its dimensions.</p> <p> This structure is used by the <strong>GetResourceTiling</strong> method. </p> <dd> <p>The width in texels of the tile.</p> </dd> <dd> <p>The height in texels of the tile.</p> </dd> <dd> <p>The depth in texels of the tile.</p> </dd> <p> Describes the tile structure of a tiled resource with mipmaps. </p> <p> This structure is used by the <strong>GetResourceTiling</strong> method. </p> <dd> <p> The number of standard mipmaps in the tiled resource. </p> </dd> <dd> <p> The number of packed mipmaps in the tiled resource. </p> <p> This number starts from the least detailed mipmap (either sharing tiles or using non standard tile layout). This number is 0 if no such packing is in the resource. For array surfaces, this value is the number of mipmaps that are packed for a given array slice where each array slice repeats the same packing. </p> <p> On Tier_2 tiled resources hardware, mipmaps that fill at least one standard shaped tile in all dimensions are not allowed to be included in the set of packed mipmaps. On Tier_1 hardware, mipmaps that are an integer multiple of one standard shaped tile in all dimensions are not allowed to be included in the set of packed mipmaps. Mipmaps with at least one dimension less than the standard tile shape may or may not be packed. When a given mipmap needs to be packed, all coarser mipmaps for a given array slice are considered packed as well. </p> </dd> <dd> <p> The number of tiles for the packed mipmaps in the tiled resource. </p> <p> If there is no packing, this value is meaningless and is set to 0. Otherwise, it is set to the number of tiles that are needed to represent the set of packed mipmaps. The pixel layout within the packed mipmaps is hardware specific. If apps define only partial mappings for the set of tiles in packed mipmaps, read and write behavior is vendor specific and undefined. For arrays, this value is only the count of packed mipmaps within the subresources for each array slice. </p> </dd> <dd> <p> The offset of the first packed tile for the resource in the overall range of tiles. If <strong>NumPackedMips</strong> is 0, this value is meaningless and is 0. Otherwise, it is the offset of the first packed tile for the resource in the overall range of tiles for the resource. A value of 0 for <strong>StartTileIndexInOverallResource</strong> means the entire resource is packed. For array surfaces, this is the offset for the tiles that contain the packed mipmaps for the first array slice. Packed mipmaps for each array slice in arrayed surfaces are at this offset past the beginning of the tiles for each array slice. </p> <strong>Note</strong>?? The number of overall tiles, packed or not, for a given array slice is simply the total number of tiles for the resource divided by the resource's array size, so it is easy to locate the range of tiles for any given array slice, out of which <strong>StartTileIndexInOverallResource</strong> identifies which of those are packed. ? </dd> <p> Describes the transition of subresources between different usages. </p> <p> This struct is used by the <strong>Transition</strong> member of the <strong>{{D3D12_RESOURCE_BARRIER}}</strong> struct. </p> <dd> <p> A reference to the <strong>{{ID3D12Resource}}</strong> object that represents the resource used in the transition. </p> </dd> <dd> <p> The index of the subresource for the transition. Use the <strong>{{D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES}}</strong> flag ( 0xffffffff ) to transition all subresources in a resource at the same time. </p> </dd> <dd> <p> The "before" usages of the subresources, as a bitwise-{{OR}}'d combination of <strong>{{D3D12_RESOURCE_STATES}}</strong> enumeration constants. </p> </dd> <dd> <p> The "after" usages of the subresources, as a bitwise-{{OR}}'d combination of <strong>{{D3D12_RESOURCE_STATES}}</strong> enumeration constants. </p> </dd> <p> Describes the transition between usages of two different resources that have mappings into the same heap. </p> <p> This structure is a member of the <strong>{{D3D12_RESOURCE_BARRIER}}</strong> structure. </p><p> Both the before and the after resources can be specified or one or both resources can be <strong>{{NULL}}</strong>, which indicates that any placed or reserved resource could cause aliasing. </p><p>Refer to the usage models described in <strong>CreatePlacedResource</strong>.</p> <dd> <p> A reference to the <strong>{{ID3D12Resource}}</strong> object that represents the before resource used in the transition. </p> </dd> <dd> <p> A reference to the <strong>{{ID3D12Resource}}</strong> object that represents the after resource used in the transition. </p> </dd> <p> Represents a resource in which all {{UAV}} accesses must complete before any future {{UAV}} accesses can begin. </p> <p> This struct represents a resource in which all unordered access view ({{UAV}}) accesses (reads or writes) must complete before any future {{UAV}} accesses (read or write) can begin. </p><p> This structure is a member of the <strong>{{D3D12_RESOURCE_BARRIER}}</strong> structure. </p><p> You don't need to insert a {{UAV}} barrier between 2 draw or dispatch calls that only read a {{UAV}}. Additionally, you don't need to insert a {{UAV}} barrier between 2 draw or dispatch calls that write to the same {{UAV}} if you know that it's safe to execute the {{UAV}} accesses in any order. The resource can be <strong>{{NULL}}</strong>, which indicates that any {{UAV}} access could require the barrier. </p> <dd> <p> The resource used in the transition, as a reference to <strong>{{ID3D12Resource}}</strong>. </p> </dd> <p> Describes a resource barrier (transition in resource use). </p> <p> This structure is used by the <strong>{{ID3D12GraphicsCommandList::ResourceBarrier}}</strong> method. </p> <dd> <p> A <strong>{{D3D12_RESOURCE_BARRIER_TYPE}}</strong>-typed value that specifies the type of resource barrier. This member determines which type to use in the union below. </p> </dd> <dd> <p> Specifies a <strong>{{D3D12_RESOURCE_BARRIER_FLAGS}}</strong> enumeration constant such as for "begin only" or "end only". </p> </dd> <dd> <p> A <strong>{{D3D12_RESOURCE_TRANSITION_BARRIER}}</strong> structure that describes the transition of subresources between different usages. Members specify the before and after usages of the subresources. </p> </dd> <dd> <p> A <strong>{{D3D12_RESOURCE_ALIASING_BARRIER}}</strong> structure that describes the transition between usages of two different resources that have mappings into the same heap. </p> </dd> <dd> <p> A <strong>{{D3D12_RESOURCE_UAV_BARRIER}}</strong> structure that describes a resource in which all {{UAV}} accesses (reads or writes) must complete before any future {{UAV}} accesses (read or write) can begin. </p> </dd> <p> Describes the format, width, height, depth, and row-pitch of the subresource into the parent resource. </p> <p> Use this structure in the <strong>{{D3D12_PLACED_SUBRESOURCE_FOOTPRINT}}</strong> structure. </p><p> The helper structure is <strong>{{CD3DX12_SUBRESOURCE_FOOTPRINT}}</strong>. </p> <dd> <p> A <strong>{{DXGI_FORMAT}}</strong>-typed value that specifies the viewing format. </p> </dd> <dd> <p> The width of the subresource. </p> </dd> <dd> <p> The height of the subresource. </p> </dd> <dd> <p> The depth of the subresource. </p> </dd> <dd> <p> The row pitch, or width, or physical size, in bytes, of the subresource data. This must be a multiple of {{D3D12_TEXTURE_DATA_PITCH_ALIGNMENT}} (256), and must be greater than or equal to the size of the data within a row. </p> </dd> <p> Describes the footprint of a placed subresource, including the offset and the {{D3D12_SUBRESOURCE_FOOTPRINT}}. </p> <p> This structure is used in the <strong>{{D3D12_TEXTURE_COPY_LOCATION}}</strong> structure, and by <strong>{{ID3D12Device::GetCopyableFootprints}}</strong>. </p><p> All the data referenced by the footprint structure must fit within the bounds of the parent resource. If you use <strong>GetCopyableFootprints</strong> to fill out the structure, the <em>pTotalBytes</em> output field indicates the required size of the resource.</p><p> This structure is also used a number of helper functions (refer to Helper Structures and Functions for {{D3D12}}).</p><p> When copying textures, use this structure along with <strong>{{D3D12_TEXTURE_COPY_LOCATION}}</strong>. </p> <dd> <p> The offset of the subresource within the parent resource, in bytes. The offset between the start of the parent resource and this subresource. </p> </dd> <dd> <p> The format, width, height, depth, and row-pitch of the subresource, as a <strong>{{D3D12_SUBRESOURCE_FOOTPRINT}}</strong> structure. </p> </dd> <p>Describes a portion of a texture for the purpose of texture copies. </p> <p> Use this structure with <strong>CopyTextureRegion</strong>. </p> <dd> <p> Specifies the resource which will be used for the copy operation.</p>? When <strong>Type</strong> is {{D3D12_TEXTURE_COPY_TYPE_PLACED_FOOTPRINT}}, <strong>pResource</strong> must point to a buffer resource.? When <strong>Type</strong> is {{D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX}}, <strong>pResource</strong> must point to a texture resource. </dd> <dd> <p> Specifies which type of resource location this is: a subresource of a texture, or a description of a texture layout which can be applied to a buffer. This <strong>{{D3D12_TEXTURE_COPY_TYPE}}</strong> enum indicates which union member to use. </p> </dd> <dd> <p> Specifies a texture layout, with offset, dimensions, and pitches, for the hardware to understand how to treat a section of a buffer resource as a multi-dimensional texture. To fill-in the correct data for a <strong>CopyTextureRegion</strong> call, see <strong>{{D3D12_PLACED_SUBRESOURCE_FOOTPRINT}}</strong>. </p> </dd> <dd> <p> Specifies the index of the subresource of an arrayed, mip-mapped, or planar texture should be used for the copy operation. </p> </dd> <p>This section provides code for sample scenarios. Many of the walk-throughs provide details on what coding is required to be added to a basic sample, to avoid repeating the basic component code for each scenario.</p><p>For the most basic component, refer to the Creating a Basic Direct3D 12 Component section. The following walk-throughs describe more advanced scenarios.</p><p> </p> <p>Describes the elements in a buffer resource to use in a shader-resource view.</p> <p> This structure is used by <strong>{{D3D12_SHADER_RESOURCE_VIEW_DESC}}</strong> to create a view of a buffer. </p> <dd> <p>The index of the first element to be accessed by the view.</p> </dd> <dd> <p>The number of elements in the resource.</p> </dd> <dd> <p>The size of each element in the buffer structure (in bytes) when the buffer represents a structured buffer.</p> </dd> <dd> <p> A <strong>{{D3D12_BUFFER_SRV_FLAGS}}</strong>-typed value that identifies view options for the buffer. Currently, the only option is to identify a raw view of the buffer. For more info about raw viewing of buffers, see Raw Views of Buffers. </p> </dd> <p>Specifies the subresource from a 1D texture to use in a shader-resource view.</p> <p>This structure is one member of a shader-resource-view description, <strong>{{D3D12_SHADER_RESOURCE_VIEW_DESC}}</strong>.</p><p>As an example, assuming <strong>MostDetailedMip</strong> = 6 and <strong>MipLevels</strong> = 2, the view will have access to 2 mipmap levels, 6 and 7, of the original texture for which <strong>{{ID3D12Device::CreateShaderResourceView}}</strong> creates the view. In this situation, <strong>MostDetailedMip</strong> is greater than the <strong>MipLevels</strong> in the view. However, <strong>MostDetailedMip</strong> is not greater than the <strong>MipLevels</strong> in the original resource.</p> <dd> <p>Index of the most detailed mipmap level to use; this number is between 0 and <strong>MipLevels</strong> (from the original Texture1D for which <strong>{{ID3D12Device::CreateShaderResourceView}}</strong> creates a view) -1.</p> </dd> <dd> <p>The maximum number of mipmap levels for the view of the texture. See the remarks.</p> <p>Set to -1 to indicate all the mipmap levels from <strong>MostDetailedMip</strong> on down to least detailed.</p> </dd> <dd> <p>A value to clamp sample {{LOD}} values to. For example, if you specify 2.0f for the clamp value, you ensure that no individual sample accesses a mip level less than 2.0f.</p> </dd> <p>Describes the subresources from an array of 1D textures to use in a shader-resource view.</p> <p>This structure is one member of a shader-resource-view description, <strong>{{D3D12_SHADER_RESOURCE_VIEW_DESC}}</strong>.</p> <dd> <p>Index of the most detailed mipmap level to use; this number is between 0 and <strong>MipLevels</strong> (from the original Texture1D for which <strong>{{ID3D12Device::CreateShaderResourceView}}</strong> creates a view) -1.</p> </dd> <dd> <p>The maximum number of mipmap levels for the view of the texture. See the remarks in <strong>{{D3D12_TEX1D_SRV}}</strong>.</p> <p>Set to -1 to indicate all the mipmap levels from <strong>MostDetailedMip</strong> on down to least detailed.</p> </dd> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p>Number of textures in the array.</p> </dd> <dd> <p>A value to clamp sample {{LOD}} values to. For example, if you specify 2.0f for the clamp value, you ensure that no individual sample accesses a mip level less than 2.0f.</p> </dd> <p>Describes the subresource from a 2D texture to use in a shader-resource view.</p> <p> This structure is one member of a shader-resource-view description, <strong>{{D3D12_SHADER_RESOURCE_VIEW_DESC}}</strong>. </p> <dd> <p> Index of the most detailed mipmap level to use; this number is between 0 and <strong>MipLevels</strong> (from the original Texture2D for which <strong>{{ID3D12Device::CreateShaderResourceView}}</strong> creates a view) -1. </p> </dd> <dd> <p> The maximum number of mipmap levels for the view of the texture. See the remarks in <strong>{{D3D12_TEX1D_SRV}}</strong>. </p> <p> Set to -1 to indicate all the mipmap levels from <strong>MostDetailedMip</strong> on down to least detailed. </p> </dd> <dd> <p> The index (plane slice number) of the plane to use in the texture. </p> </dd> <dd> <p>A value to clamp sample {{LOD}} values to. For example, if you specify 2.0f for the clamp value, you ensure that no individual sample accesses a mip level less than 2.0f.</p> </dd> <p>Describes the subresources from an array of 2D textures to use in a shader-resource view.</p> <p> This structure is one member of a shader-resource-view description, <strong>{{D3D12_SHADER_RESOURCE_VIEW_DESC}}</strong>. </p> <dd> <p> Index of the most detailed mipmap level to use; this number is between 0 and <strong>MipLevels</strong> -1 (where <strong>MipLevels</strong> is from the original Texture2D for which <strong>{{ID3D12Device::CreateShaderResourceView}}</strong> creates a view). </p> </dd> <dd> <p> The maximum number of mipmap levels for the view of the texture. See the remarks in <strong>{{D3D12_TEX1D_SRV}}</strong>. </p> <p> Set to -1 to indicate all the mipmap levels from <strong>MostDetailedMip</strong> on down to least detailed. </p> </dd> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p>Number of textures in the array.</p> </dd> <dd> <p> The index (plane slice number) of the plane to use in an array of textures. </p> </dd> <dd> <p>A value to clamp sample {{LOD}} values to. For example, if you specify 2.0f for the clamp value, you ensure that no individual sample accesses a mip level less than 2.0f.</p> </dd> <p>Describes the subresources from a 3D texture to use in a shader-resource view.</p> <p>This structure is one member of a shader-resource-view description, <strong>{{D3D12_SHADER_RESOURCE_VIEW_DESC}}</strong>.</p> <dd> <p>Index of the most detailed mipmap level to use; this number is between 0 and <strong>MipLevels</strong> (from the original Texture3D for which <strong>{{ID3D12Device::CreateShaderResourceView}}</strong> creates a view) -1.</p> </dd> <dd> <p>The maximum number of mipmap levels for the view of the texture. See the remarks in <strong>{{D3D12_TEX1D_SRV}}</strong>.</p> <p>Set to -1 to indicate all the mipmap levels from <strong>MostDetailedMip</strong> on down to least detailed.</p> </dd> <dd> <p>A value to clamp sample {{LOD}} values to. For example, if you specify 2.0f for the clamp value, you ensure that no individual sample accesses a mip level less than 2.0f.</p> </dd> <p>Describes the subresource from a cube texture to use in a shader-resource view.</p> <p>This structure is one member of a shader-resource-view description, <strong>{{D3D12_SHADER_RESOURCE_VIEW_DESC}}</strong>.</p> <dd> <p>Index of the most detailed mipmap level to use; this number is between 0 and <strong>MipLevels</strong> (from the original TextureCube for which <strong>{{ID3D12Device::CreateShaderResourceView}}</strong> creates a view) -1.</p> </dd> <dd> <p>The maximum number of mipmap levels for the view of the texture. See the remarks in <strong>{{D3D12_TEX1D_SRV}}</strong>.</p> <p>Set to -1 to indicate all the mipmap levels from <strong>MostDetailedMip</strong> on down to least detailed.</p> </dd> <dd> <p>A value to clamp sample {{LOD}} values to. For example, if you specify 2.0f for the clamp value, you ensure that no individual sample accesses a mip level less than 2.0f.</p> </dd> <p>Describes the subresources from an array of cube textures to use in a shader-resource view.</p> <p>This structure is one member of a shader-resource-view description, <strong>{{D3D12_SHADER_RESOURCE_VIEW_DESC}}</strong>.</p> <dd> <p>Index of the most detailed mipmap level to use; this number is between 0 and <strong>MipLevels</strong> (from the original TextureCube for which <strong>{{ID3D12Device::CreateShaderResourceView}}</strong> creates a view) -1.</p> </dd> <dd> <p>The maximum number of mipmap levels for the view of the texture. See the remarks in <strong>{{D3D12_TEX1D_SRV}}</strong>.</p> <p>Set to -1 to indicate all the mipmap levels from <strong>MostDetailedMip</strong> on down to least detailed.</p> </dd> <dd> <p>Index of the first 2D texture to use.</p> </dd> <dd> <p>Number of cube textures in the array.</p> </dd> <dd> <p>A value to clamp sample {{LOD}} values to. For example, if you specify 2.0f for the clamp value, you ensure that no individual sample accesses a mip level less than 2.0f.</p> </dd> <p>Describes the subresources from a multi sampled 2D texture to use in a shader-resource view.</p> <p>This structure is a member of the <strong>{{D3D12_SHADER_RESOURCE_VIEW_DESC}}</strong> structure.</p><p>Since a multi sampled 2D texture contains a single subresource, there is actually nothing to specify in <strong>{{D3D12_TEX2DMS_SRV}}</strong>. Consequently, <strong>UnusedField_NothingToDefine</strong> is included so that this structure will compile in C.</p> <dd> <p>Integer of any value. See remarks.</p> </dd> <p>Describes the subresources from an array of multi sampled 2D textures to use in a shader-resource view.</p> <p>This structure is one member of a shader-resource-view description, <strong>{{D3D12_SHADER_RESOURCE_VIEW_DESC}}</strong>.</p> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p>Number of textures to use.</p> </dd> <p>Describes a shader-resource view.</p> <p> A view is a format-specific way to look at the data in a resource. The view determines what data to look at, and how it is cast when read. </p><p> When viewing a resource, the resource-view description must specify a typed format, that is compatible with the resource format. So that means that you can't create a resource-view description using any format with _TYPELESS in the name. You can however view a typeless resource by specifying a typed format for the view. For example, a {{DXGI_FORMAT_R32G32B32_TYPELESS}} resource can be viewed with one of these typed formats: {{DXGI_FORMAT_R32G32B32_FLOAT}}, {{DXGI_FORMAT_R32G32B32_UINT}}, and {{DXGI_FORMAT_R32G32B32_SINT}}, since these typed formats are compatible with the typeless resource. </p><p> Create a shader-resource-view description by calling <strong>{{ID3D12Device::CreateShaderResourceView}}</strong>.</p> <dd> <p> A <strong>{{DXGI_FORMAT}}</strong>-typed value that specifies the viewing format. See remarks. </p> </dd> <dd> <p> A <strong>{{D3D12_SRV_DIMENSION}}</strong>-typed value that specifies the resource type of the view. This type is the same as the resource type of the underlying resource. This member also determines which _SRV to use in the union below. </p> </dd> <dd> <p> A <strong>{{D3D12_SHADER_COMPONENT_MAPPING}}</strong> enumeration constant, such as return component 0 (red) from memory, or force the resulting value to 0. This mapping enables the shader resource view ({{SRV}}) to choose how memory gets routed to the 4 return components in a shader after a memory fetch. </p> </dd> <dd> <p> A <strong>{{D3D12_BUFFER_SRV}}</strong> structure that views the resource as a buffer. </p> </dd> <dd> <p> A <strong>{{D3D12_TEX1D_SRV}}</strong> structure that views the resource as a 1D texture. </p> </dd> <dd> <p> A <strong>{{D3D12_TEX1D_ARRAY_SRV}}</strong> structure that views the resource as a 1D-texture array. </p> </dd> <dd> <p> A <strong>{{D3D12_TEX2D_SRV}}</strong> structure that views the resource as a 2D-texture. </p> </dd> <dd> <p> A <strong>{{D3D12_TEX2D_ARRAY_SRV}}</strong> structure that views the resource as a 2D-texture array. </p> </dd> <dd> <p> A <strong>{{D3D12_TEX2DMS_SRV}}</strong> structure that views the resource as a 2D-multisampled texture. </p> </dd> <dd> <p> A <strong>{{D3D12_TEX2DMS_ARRAY_SRV}}</strong> structure that views the resource as a 2D-multisampled-texture array. </p> </dd> <dd> <p> A <strong>{{D3D12_TEX3D_SRV}}</strong> structure that views the resource as a 3D texture. </p> </dd> <dd> <p> A <strong>{{D3D12_TEXCUBE_SRV}}</strong> structure that views the resource as a 3D-cube texture. </p> </dd> <dd> <p> A <strong>{{D3D12_TEXCUBE_ARRAY_SRV}}</strong> structure that views the resource as a 3D-cube-texture array. </p> </dd> <p>Describes a constant buffer to view.</p> <p>This structure is used by <strong>CreateConstantBufferView</strong>.</p> <dd> <p> The {{D3D12_GPU_VIRTUAL_ADDRESS}} of the constant buffer. {{D3D12_GPU_VIRTUAL_ADDRESS}} is a typedef'd alias of {{UINT64}}. </p> </dd> <dd> <p>The size in bytes of the constant buffer.</p> </dd> <p>Describes a sampler state.</p> <p>This structure is used by <strong>CreateSampler</strong>.</p> <dd> <p> A <strong>{{D3D12_FILTER}}</strong>-typed value that specifies the filtering method to use when sampling a texture. </p> </dd> <dd> <p> A <strong>{{D3D12_TEXTURE_ADDRESS_MODE}}</strong>-typed value that specifies the method to use for resolving a u texture coordinate that is outside the 0 to 1 range. </p> </dd> <dd> <p> A <strong>{{D3D12_TEXTURE_ADDRESS_MODE}}</strong>-typed value that specifies the method to use for resolving a v texture coordinate that is outside the 0 to 1 range. </p> </dd> <dd> <p> A <strong>{{D3D12_TEXTURE_ADDRESS_MODE}}</strong>-typed value that specifies the method to use for resolving a w texture coordinate that is outside the 0 to 1 range. </p> </dd> <dd> <p> Offset from the calculated mipmap level. For example, if the runtime calculates that a texture should be sampled at mipmap level 3 and <strong>MipLODBias</strong> is 2, the texture will be sampled at mipmap level 5. </p> </dd> <dd> <p> Clamping value used if <strong>{{D3D12_FILTER_ANISOTROPIC}}</strong> or <strong>{{D3D12_FILTER_COMPARISON_ANISOTROPIC}}</strong> is specified in <strong>Filter</strong>. Valid values are between 1 and 16. </p> </dd> <dd> <p> A <strong>{{D3D12_COMPARISON_FUNC}}</strong>-typed value that specifies a function that compares sampled data against existing sampled data. </p> </dd> <dd> <p> Border color to use if <strong>{{D3D12_TEXTURE_ADDRESS_MODE_BORDER}}</strong> is specified for <strong>AddressU</strong>, <strong>AddressV</strong>, or <strong>AddressW</strong>. Range must be between 0.0 and 1.0 inclusive. </p> </dd> <dd> <p>Lower end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed.</p> </dd> <dd> <p> Upper end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed. This value must be greater than or equal to <strong>MinLOD</strong>. To have no upper limit on {{LOD}}, set this member to a large value. </p> </dd> <p>Describes the elements in a buffer to use in a unordered-access view.</p> <p> Use this structure with a <strong>{{D3D12_UNORDERED_ACCESS_VIEW_DESC}}</strong> structure to view the resource as a buffer. </p> <dd> <p>The zero-based index of the first element to be accessed.</p> </dd> <dd> <p>The number of elements in the resource. For structured buffers, this is the number of structures in the buffer.</p> </dd> <dd> <p>The size of each element in the buffer structure (in bytes) when the buffer represents a structured buffer.</p> </dd> <dd> <p> The counter offset, in bytes. </p> </dd> <dd> <p> A <strong>{{D3D12_BUFFER_UAV_FLAGS}}</strong>-typed value that specifies the view options for the resource. </p> </dd> <p>Describes a unordered-access 1D texture resource.</p> <p>Use this structure with a <strong>{{D3D12_UNORDERED_ACCESS_VIEW_DESC}}</strong> structure to view the resource as a 1D texture.</p> <dd> <p>The mipmap slice index.</p> </dd> <p>Describes an array of unordered-access 1D texture resources. </p> <p>Use this structure with a <strong>{{D3D12_UNORDERED_ACCESS_VIEW_DESC}}</strong> structure to view the resource as an array of 1D textures.</p> <dd> <p>The mipmap slice index.</p> </dd> <dd> <p>The zero-based index of the first array slice to be accessed.</p> </dd> <dd> <p>The number of slices in the array.</p> </dd> <p>Describes a unordered-access 2D texture resource.</p> <p> Use this structure with a <strong>{{D3D12_UNORDERED_ACCESS_VIEW_DESC}}</strong> structure to view the resource as a 2D texture. </p> <dd> <p>The mipmap slice index.</p> </dd> <dd> <p> The index (plane slice number) of the plane to use in the texture. </p> </dd> <p> Describes an array of unordered-access 2D texture resources. </p> <p> Use this structure with a <strong>{{D3D12_UNORDERED_ACCESS_VIEW_DESC}}</strong> structure to view the resource as an array of 2D textures. </p> <dd> <p>The mipmap slice index.</p> </dd> <dd> <p>The zero-based index of the first array slice to be accessed.</p> </dd> <dd> <p>The number of slices in the array.</p> </dd> <dd> <p> The index (plane slice number) of the plane to use in an array of textures. </p> </dd> <p>Describes a unordered-access 3D texture resource.</p> <p>Use this structure with a <strong>{{D3D12_UNORDERED_ACCESS_VIEW_DESC}}</strong> structure to view the resource as a 3D texture.</p> <dd> <p>The mipmap slice index.</p> </dd> <dd> <p>The zero-based index of the first depth slice to be accessed.</p> </dd> <dd> <p>The number of depth slices.</p> </dd> <p>Describes the subresources from a resource that are accessible by using an unordered-access view.</p> <p>Pass an unordered-access-view description into <strong>{{ID3D12Device::CreateUnorderedAccessView}}</strong> to create a view.</p> <dd> <p>A <strong>{{DXGI_FORMAT}}</strong>-typed value that specifies the viewing format.</p> </dd> <dd> <p>A <strong>{{D3D12_UAV_DIMENSION}}</strong>-typed value that specifies the resource type of the view. This type specifies how the resource will be accessed. This member also determines which _UAV to use in the union below.</p> </dd> <dd> <p>A <strong>{{D3D12_BUFFER_UAV}}</strong> structure that specifies which buffer elements can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D12_TEX1D_UAV}}</strong> structure that specifies the subresources in a 1D texture that can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D12_TEX1D_ARRAY_UAV}}</strong> structure that specifies the subresources in a 1D texture array that can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D12_TEX2D_UAV}}</strong> structure that specifies the subresources in a 2D texture that can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D12_TEX2D_ARRAY_UAV}}</strong> structure that specifies the subresources in a 2D texture array that can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D12_TEX3D_UAV}}</strong> structure that specifies subresources in a 3D texture that can be accessed.</p> </dd> <p>Describes the elements in a buffer resource to use in a render-target view.</p> <p>Use this structure with a <strong>{{D3D12_RENDER_TARGET_VIEW_DESC}}</strong> structure to view the resource as a buffer.</p> <dd> <p>Number of bytes between the beginning of the buffer and the first element to access.</p> </dd> <dd> <p>The total number of elements in the view.</p> </dd> <p>Describes the subresource from a 1D texture to use in a render-target view.</p> <p>Use this structure with a <strong>{{D3D12_RENDER_TARGET_VIEW_DESC}}</strong> structure to view the resource as a 1D texture.</p> <dd> <p>The index of the mipmap level to use mip slice.</p> </dd> <p>Describes the subresources from an array of 1D textures to use in a render-target view.</p> <p>Use this structure with a <strong>{{D3D12_RENDER_TARGET_VIEW_DESC}}</strong> structure to view the resource as an array of 1D textures.</p> <dd> <p>The index of the mipmap level to use mip slice.</p> </dd> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p>Number of textures to use.</p> </dd> <p>Describes the subresource from a 2D texture to use in a render-target view.</p> <p> Use this structure with a <strong>{{D3D12_RENDER_TARGET_VIEW_DESC}}</strong> structure to view the resource as a 2D texture. </p> <dd> <p>The index of the mipmap level to use.</p> </dd> <dd> <p> The index (plane slice number) of the plane to use in the texture. </p> </dd> <p>Describes the subresource from a multi sampled 2D texture to use in a render-target view.</p> <p>This structure is a member of the <strong>{{D3D12_RENDER_TARGET_VIEW_DESC}}</strong> structure.</p><p>Because a multi sampled 2D texture contains a single subresource, there is actually nothing to specify in <strong>{{D3D12_TEX2DMS_RTV}}</strong>. Consequently, <strong>UnusedField_NothingToDefine</strong> is included so that this structure will compile in C. </p> <dd> <p>Integer of any value. See remarks.</p> </dd> <p>Describes the subresources from an array of 2D textures to use in a render-target view.</p> <p> Use this structure with a <strong>{{D3D12_RENDER_TARGET_VIEW_DESC}}</strong> structure to view the resource as an array of 2D textures. </p> <dd> <p>The index of the mipmap level to use mip slice.</p> </dd> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p> Number of textures in the array to use in the render target view, starting from <strong>FirstArraySlice</strong>. </p> </dd> <dd> <p> The index (plane slice number) of the plane to use in an array of textures. </p> </dd> <p> Describes the subresources from an array of multi sampled 2D textures to use in a render-target view. </p> <p> Use this structure with a <strong>{{D3D12_RENDER_TARGET_VIEW_DESC}}</strong> structure to view the resource as an array of multi sampled 2D textures. </p> <dd> <p> The index of the first texture to use in an array of textures. </p> </dd> <dd> <p> The number of textures to use. </p> </dd> <p>Describes the subresources from a 3D texture to use in a render-target view.</p> <p>Use this structure with a <strong>{{D3D12_RENDER_TARGET_VIEW_DESC}}</strong> structure to view the resource as a 3D texture.</p> <dd> <p>The index of the mipmap level to use mip slice.</p> </dd> <dd> <p>First depth level to use.</p> </dd> <dd> <p>Number of depth levels to use in the render-target view, starting from <strong>FirstWSlice</strong>. A value of -1 indicates all of the slices along the w axis, starting from <strong>FirstWSlice</strong>.</p> </dd> <p>Describes the subresources from a resource that are accessible by using a render-target view.</p> <p>Pass a render-target-view description into <strong>{{ID3D12Device::CreateRenderTargetView}}</strong> to create a render-target view.</p><p>A render-target view can't use the following formats:</p><ul> <li>Any typeless format.</li> <li>{{DXGI_FORMAT_R32G32B32}} if the view will be used to bind a buffer (vertex, index, constant, or stream-output).</li> </ul><p>If the format is set to {{DXGI_FORMAT_UNKNOWN}}, then the format of the resource that the view binds to the pipeline will be used.</p> <dd> <p>A <strong>{{DXGI_FORMAT}}</strong>-typed value that specifies the viewing format.</p> </dd> <dd> <p>A <strong>{{D3D12_RTV_DIMENSION}}</strong>-typed value that specifies how the render-target resource will be accessed. This type specifies how the resource will be accessed. This member also determines which _RTV to use in the following union.</p> </dd> <dd> <p>A <strong>{{D3D12_BUFFER_RTV}}</strong> structure that specifies which buffer elements can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D12_TEX1D_RTV}}</strong> structure that specifies the subresources in a 1D texture that can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D12_TEX1D_ARRAY_RTV}}</strong> structure that specifies the subresources in a 1D texture array that can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D12_TEX2D_RTV}}</strong> structure that specifies the subresources in a 2D texture that can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D12_TEX2D_ARRAY_RTV}}</strong> structure that specifies the subresources in a 2D texture array that can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D12_TEX2DMS_RTV}}</strong> structure that specifies a single subresource because a multisampled 2D texture only contains one subresource.</p> </dd> <dd> <p>A <strong>{{D3D12_TEX2DMS_ARRAY_RTV}}</strong> structure that specifies the subresources in a multisampled 2D texture array that can be accessed.</p> </dd> <dd> <p>A <strong>{{D3D12_TEX3D_RTV}}</strong> structure that specifies subresources in a 3D texture that can be accessed.</p> </dd> <p>Describes the subresource from a 1D texture that is accessible to a depth-stencil view.</p> <p>Use this structure with a <strong>{{D3D12_DEPTH_STENCIL_VIEW_DESC}}</strong> structure to view the resource as a 1D texture.</p> <dd> <p>The index of the first mipmap level to use.</p> </dd> <p>Describes the subresources from an array of 1D textures to use in a depth-stencil view.</p> <p>Use this structure with a <strong>{{D3D12_DEPTH_STENCIL_VIEW_DESC}}</strong> structure to view the resource as an array of 1D textures.</p> <dd> <p>The index of the first mipmap level to use.</p> </dd> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p>Number of textures to use.</p> </dd> <p>Describes the subresource from a 2D texture that is accessible to a depth-stencil view.</p> <p>Use this structure with a <strong>{{D3D12_DEPTH_STENCIL_VIEW_DESC}}</strong> structure to view the resource as a 2D texture.</p> <dd> <p>The index of the first mipmap level to use.</p> </dd> <p>Describes the subresources from an array of 2D textures that are accessible to a depth-stencil view.</p> <p>Use this structure with a <strong>{{D3D12_DEPTH_STENCIL_VIEW_DESC}}</strong> structure to view the resource as an array of 2D textures.</p> <dd> <p>The index of the first mipmap level to use.</p> </dd> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p>Number of textures to use.</p> </dd> <p>Describes the subresource from a multi sampled 2D texture that is accessible to a depth-stencil view.</p> <p>This structure is a member of the <strong>{{D3D12_DEPTH_STENCIL_VIEW_DESC}}</strong> structure.</p><p>Because a multi sampled 2D texture contains a single subresource, there is nothing to specify in <strong>{{D3D12_TEX2DMS_DSV}}</strong>. Consequently, <strong>UnusedField_NothingToDefine</strong> is included so that this structure will compile in C. </p> <dd> <p>Unused.</p> </dd> <p>Describes the subresources from an array of multi sampled 2D textures for a depth-stencil view.</p> <p>Use this structure with a <strong>{{D3D12_DEPTH_STENCIL_VIEW_DESC}}</strong> structure to view the resource as an array of multi sampled 2D textures.</p> <dd> <p>The index of the first texture to use in an array of textures.</p> </dd> <dd> <p>Number of textures to use.</p> </dd> <p>Describes the subresources of a texture that are accessible from a depth-stencil view.</p> <p> These are valid formats for a depth-stencil view: </p><ul> <li>{{DXGI_FORMAT_D16_UNORM}}</li> <li>{{DXGI_FORMAT_D24_UNORM_S8_UINT}}</li> <li>{{DXGI_FORMAT_D32_FLOAT}}</li> <li>{{DXGI_FORMAT_D32_FLOAT_S8X24_UINT}}</li> <li>{{DXGI_FORMAT_UNKNOWN}}</li> </ul><p> A depth-stencil view can't use a typeless format. If the format chosen is {{DXGI_FORMAT_UNKNOWN}}, the format of the parent resource is used. </p><p> Pass a depth-stencil-view description into <strong>{{ID3D12Device::CreateDepthStencilView}}</strong> to create a depth-stencil view. </p> <dd> <p> A <strong>{{DXGI_FORMAT}}</strong>-typed value that specifies the viewing format. For allowable formats, see Remarks. </p> </dd> <dd> <p> A <strong>{{D3D12_DSV_DIMENSION}}</strong>-typed value that specifies how the depth-stencil resource will be accessed. This member also determines which _DSV to use in the following union. </p> </dd> <dd> <p> A combination of <strong>{{D3D12_DSV_FLAGS}}</strong> enumeration constants that are combined by using a bitwise {{OR}} operation. The resulting value specifies whether the texture is read only. Pass 0 to specify that it isn't read only; otherwise, pass one or more of the members of the <strong>{{D3D12_DSV_FLAGS}}</strong> enumerated type. </p> </dd> <dd> <p> A <strong>{{D3D12_TEX1D_DSV}}</strong> structure that specifies a 1D texture subresource. </p> </dd> <dd> <p> A <strong>{{D3D12_TEX1D_ARRAY_DSV}}</strong> structure that specifies an array of 1D texture subresources. </p> </dd> <dd> <p> A <strong>{{D3D12_TEX2D_DSV}}</strong> structure that specifies a 2D texture subresource. </p> </dd> <dd> <p> A <strong>{{D3D12_TEX2D_ARRAY_DSV}}</strong> structure that specifies an array of 2D texture subresources. </p> </dd> <dd> <p> A <strong>{{D3D12_TEX2DMS_DSV}}</strong> structure that specifies a multisampled 2D texture. </p> </dd> <dd> <p> A <strong>{{D3D12_TEX2DMS_ARRAY_DSV}}</strong> structure that specifies an array of multisampled 2D textures. </p> </dd> <p>Describes the descriptor heap.</p> <p> This structure is used by the following: </p><ul> <li> <strong>{{ID3D12DescriptorHeap::GetDesc}}</strong> </li> <li> <strong>{{ID3D12Device::CreateDescriptorHeap}}</strong> </li> </ul> <dd> <p> A <strong>{{D3D12_DESCRIPTOR_HEAP_TYPE}}</strong>-typed value that specifies the types of descriptors in the heap. </p> </dd> <dd> <p> The number of descriptors in the heap. </p> </dd> <dd> <p> A combination of <strong>{{D3D12_DESCRIPTOR_HEAP_FLAGS}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies options for the heap. </p> </dd> <dd> <p> For single-adapter operation, set this to zero. If there are multiple adapter nodes, set a bit to identify the node (one of the device's physical adapters) to which the descriptor heap applies. Each bit in the mask corresponds to a single node. Only one bit must be set. See Multi-Adapter. </p> </dd> <p>Describes a descriptor range.</p> <p> This structure is a member of the <strong>{{D3D12_ROOT_DESCRIPTOR_TABLE}}</strong> structure. </p> <dd> <p> A <strong>{{D3D12_DESCRIPTOR_RANGE_TYPE}}</strong>-typed value that specifies the type of descriptor range. </p> </dd> <dd> <p> The number of descriptors in the range. Use -1 or {{UINT_MAX}} to specify unbounded size. Only the last entry in a table can have unbounded size. </p> </dd> <dd> <p> The base shader register in the range. For example, for shader-resource views ({{SRVs}}), 3 maps to ": register(t3);" in {{HLSL}}. </p> </dd> <dd> <p> The register space. Can typically be 0, but allows multiple descriptor arrays of unknown size to not appear to overlap. For example, for {{SRVs}}, by extending the example in the <strong>BaseShaderRegister</strong> member description, 5 maps to ": register(t3,space5);" in {{HLSL}}. </p> </dd> <dd> <p> The offset in descriptors from the start of the root signature. This value can be <strong>{{D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND}}</strong>, which indicates this range should immediately follow the preceding range.</p> </dd> <p> Describes the root signature 1.0 layout of a descriptor table as a collection of descriptor ranges that appear one after the other in a descriptor heap. </p> <p> Samplers are not allowed in the same descriptor table as constant-buffer views ({{CBVs}}), unordered-access views ({{UAVs}}), and shader-resource views ({{SRVs}}). </p><p><strong>{{D3D12_ROOT_DESCRIPTOR_TABLE}}</strong> is the data type of the <strong>DescriptorTable</strong> member of <strong>{{D3D12_ROOT_PARAMETER}}</strong>. Use a <strong>{{D3D12_ROOT_DESCRIPTOR_TABLE}}</strong> when you set <strong>{{D3D12_ROOT_PARAMETER}}</strong>'s <strong>SlotType</strong> member to <strong>{{D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE}}</strong>. </p> <dd> <p> The number of descriptor ranges in the table layout. </p> </dd> <dd> <p> An array of <strong>{{D3D12_DESCRIPTOR_RANGE}}</strong> structures that describe the descriptor ranges. </p> </dd> <p> Describes constants inline in the root signature that appear in shaders as one constant buffer. </p> <p>Refer to Resource Binding in {{HLSL}} for more information on shader registers and spaces. </p><p><strong>{{D3D12_ROOT_CONSTANTS}}</strong> is the data type of the <strong>Constants</strong> member of <strong>{{D3D12_ROOT_PARAMETER}}</strong>. Use a <strong>{{D3D12_ROOT_CONSTANTS}}</strong> when you set <strong>{{D3D12_ROOT_PARAMETER}}</strong>'s <strong>SlotType</strong> field to the {{D3D12_ROOT_PARAMETER_TYPE_32BIT_CONSTANTS}} member of <strong>{{D3D12_ROOT_PARAMETER_TYPE}}</strong>. </p> <dd> <p> The shader register. </p> </dd> <dd> <p> The register space. </p> </dd> <dd> <p> The number of constants that occupy a single shader slot (these constants appear like a single constant buffer). All constants occupy a single root signature bind slot. </p> </dd> <p> Describes descriptors inline in the root signature version 1.0 that appear in shaders. </p> <p><strong>{{D3D12_ROOT_DESCRIPTOR}}</strong> is the data type of the <strong>Descriptor</strong> member of <strong>{{D3D12_ROOT_PARAMETER}}</strong>. Use a <strong>{{D3D12_ROOT_DESCRIPTOR}}</strong> when you set <strong>{{D3D12_ROOT_PARAMETER}}</strong>'s <strong>SlotType</strong> field to the {{D3D12_ROOT_PARAMETER_TYPE_CBV}}, {{D3D12_ROOT_PARAMETER_TYPE_SRV}}, or {{D3D12_ROOT_PARAMETER_TYPE_UAV}} members of <strong>{{D3D12_ROOT_PARAMETER_TYPE}}</strong>. </p> <dd> <p>The shader register.</p> </dd> <dd> <p>The register space.</p> </dd> <p>Describes the slot of a root signature version 1.0.</p> <p> A <strong>{{D3D12_ROOT_SIGNATURE_DESC}}</strong> can contain descriptor tables and inline constants. More capable hardware could support inline descriptors in the root signature as well. The number of bind slots in the root signature are most efficient if kept below a certain size, and can have an upper bound as well. </p> <dd> <p> A <strong>{{D3D12_ROOT_PARAMETER_TYPE}}</strong>-typed value that specifies the type of root signature slot. This member determines which type to use in the union below. </p> </dd> <dd> <p> A <strong>{{D3D12_ROOT_DESCRIPTOR_TABLE}}</strong> structure that describes the layout of a descriptor table as a collection of descriptor ranges that appear one after the other in a descriptor heap. </p> </dd> <dd> <p> A <strong>{{D3D12_ROOT_CONSTANTS}}</strong> structure that describes constants inline in the root signature that appear in shaders as one constant buffer. </p> </dd> <dd> <p> A <strong>{{D3D12_ROOT_DESCRIPTOR}}</strong> structure that describes descriptors inline in the root signature that appear in shaders. </p> </dd> <dd> <p> A <strong>{{D3D12_SHADER_VISIBILITY}}</strong>-typed value that specifies the shaders that can access the contents of the root signature slot. </p> </dd> <p> Describes a static sampler. </p> <p> Use this structure with the <strong>{{D3D12_ROOT_SIGNATURE_DESC}}</strong> structure. </p> <dd> <p> The filtering method to use when sampling a texture, as a <strong>{{D3D12_FILTER}}</strong> enumeration constant. </p> </dd> <dd> <p> Specifies the <strong>{{D3D12_TEXTURE_ADDRESS_MODE}}</strong> mode to use for resolving a <em>u</em> texture coordinate that is outside the 0 to 1 range. </p> </dd> <dd> <p> Specifies the <strong>{{D3D12_TEXTURE_ADDRESS_MODE}}</strong> mode to use for resolving a <em>v</em> texture coordinate that is outside the 0 to 1 range. </p> </dd> <dd> <p> Specifies the <strong>{{D3D12_TEXTURE_ADDRESS_MODE}}</strong> mode to use for resolving a <em>w</em> texture coordinate that is outside the 0 to 1 range. </p> </dd> <dd> <p> Offset from the calculated mipmap level. For example, if Direct3D calculates that a texture should be sampled at mipmap level 3 and MipLODBias is 2, then the texture will be sampled at mipmap level 5. </p> </dd> <dd> <p> Clamping value used if {{D3D12_FILTER_ANISOTROPIC}} or {{D3D12_FILTER_COMPARISON_ANISOTROPIC}} is specified as the filter. Valid values are between 1 and 16. </p> </dd> <dd> <p> A function that compares sampled data against existing sampled data. The function options are listed in <strong>{{D3D12_COMPARISON_FUNC}}</strong>. </p> </dd> <dd> <p> One member of <strong>{{D3D12_STATIC_BORDER_COLOR}}</strong>, the border color to use if {{D3D12_TEXTURE_ADDRESS_MODE_BORDER}} is specified for AddressU, AddressV, or AddressW. Range must be between 0.0 and 1.0 inclusive. </p> </dd> <dd> <p> Lower end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed. </p> </dd> <dd> <p> Upper end of the mipmap range to clamp access to, where 0 is the largest and most detailed mipmap level and any level higher than that is less detailed. This value must be greater than or equal to MinLOD. To have no upper limit on {{LOD}} set this to a large value such as {{D3D12_FLOAT32_MAX}}. </p> </dd> <dd> <p> The <em>ShaderRegister</em> and <em>RegisterSpace</em> parameters correspond to the binding syntax of {{HLSL}}. For example, in {{HLSL:}} </p> <code>Texture2D&lt;float4&gt; a : register(t2, space3);</code> <p> This corresponds to a <em>ShaderRegister</em> of 2 (indicating the type is {{SRV}}), and <em>RegisterSpace</em> is 3. </p> <p> The <em>ShaderRegister</em> and <em>RegisterSpace</em> pair is needed to establish correspondence between shader resources and runtime heap descriptors, using the root signature data structure. </p> </dd> <dd> <p> See the description for <em>ShaderRegister</em>. Register space is optional; the default register space is 0. </p> </dd> <dd> <p> Specifies the visibility of the sampler to the pipeline shaders, one member of <strong>{{D3D12_SHADER_VISIBILITY}}</strong>. </p> </dd> <p> Describes the layout of a root signature version 1.0. </p> <p> This structure is used by the <strong>{{D3D12SerializeRootSignature}}</strong> function and is returned by the <strong>{{ID3D12RootSignatureDeserializer::GetRootSignatureDesc}}</strong> method. </p><p> There is one graphics root signature, and one compute root signature. </p> <dd> <p> The number of slots in the root signature. This number is also the number of elements in the <em>pParameters</em> array. </p> </dd> <dd> <p> An array of <strong>{{D3D12_ROOT_PARAMETER}}</strong> structures for the slots in the root signature. </p> </dd> <dd> <p>Specifies the number of static samplers.</p> </dd> <dd> <p> Pointer to one or more <strong>{{D3D12_STATIC_SAMPLER_DESC}}</strong> structures. </p> </dd> <dd> <p> A combination of <strong>{{D3D12_ROOT_SIGNATURE_FLAGS}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies options for the root signature layout. </p> </dd> <p>Describes a descriptor range, with flags to determine their volatility.</p> <p> This structure is a member of the <strong>{{D3D12_ROOT_DESCRIPTOR_TABLE1}}</strong> structure. </p><p>Refer to the helper structure <strong>{{CD3DX12_DESCRIPTOR_RANGE1}}</strong>.</p> <dd> <p> A <strong>{{D3D12_DESCRIPTOR_RANGE_TYPE}}</strong>-typed value that specifies the type of descriptor range. </p> </dd> <dd> <p> The number of descriptors in the range. Use -1 or {{UINT_MAX}} to specify unbounded size. Only the last entry in a table can have unbounded size. </p> </dd> <dd> <p> The base shader register in the range. For example, for shader-resource views ({{SRVs}}), 3 maps to ": register(t3);" in {{HLSL}}. </p> </dd> <dd> <p> The register space. Can typically be 0, but allows multiple descriptor arrays of unknown size to not appear to overlap. For example, for {{SRVs}}, by extending the example in the <strong>BaseShaderRegister</strong> member description, 5 maps to ": register(t3,space5);" in {{HLSL}}. </p> </dd> <dd> <p>Specifies the <strong>{{D3D12_DESCRIPTOR_RANGE_FLAGS}}</strong> that determine descriptor and data volatility.</p> </dd> <dd> <p> The offset in descriptors from the start of the root signature. This value can be <strong>{{D3D12_DESCRIPTOR_RANGE_OFFSET_APPEND}}</strong>, which indicates this range should immediately follow the preceding range.</p> </dd> <p> Describes the root signature 1.1 layout of a descriptor table as a collection of descriptor ranges that appear one after the other in a descriptor heap. </p> <p> Samplers are not allowed in the same descriptor table as constant-buffer views ({{CBVs}}), unordered-access views ({{UAVs}}), and shader-resource views ({{SRVs}}). </p><p><strong>{{D3D12_ROOT_DESCRIPTOR_TABLE1}}</strong> is the data type of the <strong>DescriptorTable</strong> member of <strong>{{D3D12_ROOT_PARAMETER1}}</strong>. Use a <strong>{{D3D12_ROOT_DESCRIPTOR_TABLE1}}</strong> when you set <strong>{{D3D12_ROOT_PARAMETER1}}</strong>'s <strong>SlotType</strong> member to <strong>{{D3D12_ROOT_PARAMETER_TYPE_DESCRIPTOR_TABLE}}</strong>. </p><p>Refer to the helper structure <strong>{{CD3DX12_ROOT_DESCRIPTOR_TABLE1}}</strong>.</p> <dd> <p> The number of descriptor ranges in the table layout. </p> </dd> <dd> <p> An array of <strong>{{D3D12_DESCRIPTOR_RANGE1}}</strong> structures that describe the descriptor ranges. </p> </dd> <p> Describes descriptors inline in the root signature version 1.1 that appear in shaders. </p> <p><strong>{{D3D12_ROOT_DESCRIPTOR1}}</strong> is the data type of the <strong>Descriptor</strong> member of <strong>{{D3D12_ROOT_PARAMETER1}}</strong>. Use a <strong>{{D3D12_ROOT_DESCRIPTOR1}}</strong> when you set <strong>{{D3D12_ROOT_PARAMETER1}}</strong>'s <strong>SlotType</strong> field to the {{D3D12_ROOT_PARAMETER_TYPE_CBV}}, {{D3D12_ROOT_PARAMETER_TYPE_SRV}}, or {{D3D12_ROOT_PARAMETER_TYPE_UAV}} members of <strong>{{D3D12_ROOT_PARAMETER_TYPE}}</strong>. </p><p>Refer to the helper structure <strong>{{CD3DX12_ROOT_DESCRIPTOR1}}</strong>.</p> <dd> <p>The shader register.</p> </dd> <dd> <p>The register space.</p> </dd> <dd> <p>Specifies the <strong>{{D3D12_ROOT_DESCRIPTOR_FLAGS}}</strong> that determine the volatility of descriptors and the data they reference.</p> </dd> <p>Describes the slot of a root signature version 1.1.</p> <p>Use this structure with the <strong>{{D3D12_ROOT_SIGNATURE_DESC1}}</strong> structure.</p><p>Refer to the helper structure <strong>{{CD3DX12_ROOT_PARAMETER1}}</strong>.</p> <dd> <p> A <strong>{{D3D12_ROOT_PARAMETER_TYPE}}</strong>-typed value that specifies the type of root signature slot. This member determines which type to use in the union below. </p> </dd> <dd> <p> A <strong>{{D3D12_ROOT_DESCRIPTOR_TABLE1}}</strong> structure that describes the layout of a descriptor table as a collection of descriptor ranges that appear one after the other in a descriptor heap. </p> </dd> <dd> <p> A <strong>{{D3D12_ROOT_CONSTANTS}}</strong> structure that describes constants inline in the root signature that appear in shaders as one constant buffer. </p> </dd> <dd> <p> A <strong>{{D3D12_ROOT_DESCRIPTOR1}}</strong> structure that describes descriptors inline in the root signature that appear in shaders. </p> </dd> <dd> <p> A <strong>{{D3D12_SHADER_VISIBILITY}}</strong>-typed value that specifies the shaders that can access the contents of the root signature slot. </p> </dd> <p>Describes the layout of a root signature version 1.1.</p> <p>Use this structure with the <strong>{{D3D12_VERSIONED_ROOT_SIGNATURE_DESC}}</strong> structure.</p> <dd> <p> The number of slots in the root signature. This number is also the number of elements in the <em>pParameters</em> array. </p> </dd> <dd> <p> An array of <strong>{{D3D12_ROOT_PARAMETER1}}</strong> structures for the slots in the root signature. </p> </dd> <dd> <p>Specifies the number of static samplers.</p> </dd> <dd> <p> Pointer to one or more <strong>{{D3D12_STATIC_SAMPLER_DESC}}</strong> structures. </p> </dd> <dd> <p>Specifies the <strong>{{D3D12_ROOT_SIGNATURE_FLAGS}}</strong> that determine the data volatility.</p> </dd> <p>Holds any version of a root signature description, and is designed to be used with serialization/deserialization functions.</p> <p>Use this structure with the following methods.</p><ul> <li> <strong>GetRootSignatureDescAtVersion</strong> </li> <li> <strong>GetUnconvertedRootSignatureDesc</strong> </li> <li> <strong>{{D3D12SerializeVersionedRootSignature}}</strong> </li> </ul><p>Refer to the helper structure <strong>{{CD3DX12_VERSIONED_ROOT_SIGNATURE_DESC}}</strong>. </p> <dd> <p>Specifies one member of {{D3D_ROOT_SIGNATURE_VERSION}} that determines the contents of the union.</p> </dd> <dd> <p>Specifies a <strong>{{D3D12_ROOT_SIGNATURE_DESC}}</strong> (version 1.0).</p> </dd> <dd> <p>Specifies a <strong>{{D3D12_ROOT_SIGNATURE_DESC1}}</strong> (version 1.1).</p> </dd> <p> Describes a {{CPU}} descriptor handle. </p> <p> This structure is returned by the following methods: </p><ul> <li> <strong>{{ID3D12DescriptorHeap::GetCPUDescriptorHandleForHeapStart}}</strong> </li> </ul><p> This structure is passed into the following methods: </p><ul> <li> <strong>{{ID3D12Device::CopyDescriptors}}</strong> </li> <li> <strong>{{ID3D12Device::CopyDescriptorsSimple}}</strong> </li> <li> <strong>{{ID3D12Device::CreateConstantBufferView}}</strong> </li> <li> <strong>{{ID3D12Device::CreateShaderResourceView}}</strong> </li> <li> <strong>{{ID3D12Device::CreateUnorderedAccessView}}</strong> </li> <li> <strong>{{ID3D12Device::CreateRenderTargetView}}</strong> </li> <li> <strong>{{ID3D12Device::CreateDepthStencilView}}</strong> </li> <li> <strong>{{ID3D12Device::CreateSampler}}</strong> </li> <li> <strong>{{ID3D12GraphicsCommandList::ClearDepthStencilView}}</strong> </li> <li> <strong>{{ID3D12GraphicsCommandList::ClearRenderTargetView}}</strong> </li> <li> <strong>{{ID3D12GraphicsCommandList::ClearUnorderedAccessViewUint}}</strong> </li> <li> <strong>{{ID3D12GraphicsCommandList::ClearUnorderedAccessViewFloat}}</strong> </li> <li> <strong>{{ID3D12GraphicsCommandList::OMSetRenderTargets}}</strong> </li> </ul> <dd> <p> The address of the descriptor. </p> </dd> <p> Describes a {{GPU}} descriptor handle. </p> <p> This structure is returned by <strong>{{ID3D12DescriptorHeap::GetGPUDescriptorHandleForHeapStart}}</strong>. </p><p> This structure is passed into the following methods: </p><ul> <li> <strong>{{ID3D12GraphicsCommandList::ClearUnorderedAccessViewFloat}}</strong> </li> <li> <strong>{{ID3D12GraphicsCommandList::ClearUnorderedAccessViewUint}}</strong> </li> <li> <strong>{{ID3D12GraphicsCommandList:SetComputeRootDescriptorTable}}</strong> </li> <li> <strong>{{ID3D12GraphicsCommandList::SetGraphicsRootDescriptorTable}}</strong> </li> </ul> <dd> <p> The address of the descriptor. </p> </dd> <p> Describes details for the discard-resource operation. </p> <p> This structure is used by the <strong>{{ID3D12GraphicsCommandList::DiscardResource}}</strong> method. </p><p> If rectangles are supplied in this structure, the resource must have 2D subresources with all specified subresources the same dimension. </p> <dd> <p> The number of rectangles in the array that the <strong>pRects</strong> member specifies. </p> </dd> <dd> <p> An array of <strong>{{D3D12_RECT}}</strong> structures for the rectangles in the resource to discard. If <strong>{{NULL}}</strong>, <strong>DiscardResource</strong> discards the entire resource. </p> </dd> <dd> <p> Index of the first subresource in the resource to discard. </p> </dd> <dd> <p> The number of subresources in the resource to discard. </p> </dd> <p> Describes the purpose of a query heap. A query heap contains an array of individual queries. </p> <p> Use this structure with <strong>CreateQueryHeap</strong>. </p> <dd> <p> Specifies one member of <strong>{{D3D12_QUERY_HEAP_TYPE}}</strong>. </p> </dd> <dd> <p> Specifies the number of queries the heap should contain. </p> </dd> <dd> <p> For single {{GPU}} operation, set this to zero. If there are multiple {{GPU}} nodes, set a bit to identify the node (the device's physical adapter) to which the query heap applies. Each bit in the mask corresponds to a single node. Only 1 bit must be set. Refer to Multi-Adapter.</p> </dd> <p>Query information about graphics-pipeline activity in between calls to <strong>BeginQuery</strong> and <strong>EndQuery</strong>.</p> <p>Use this structure with <strong>{{D3D12_QUERY_HEAP_TYPE}}</strong> and <strong>CreateQueryHeap</strong>.</p> <p>Describes query data for stream output.</p> <p>Use this structure with <strong>{{D3D12_QUERY_HEAP_TYPE}}</strong> and <strong>CreateQueryHeap</strong>.</p> <dd> <p>Specifies the number of primitives written.</p> </dd> <dd> <p>Specifies the total amount of storage needed by the primitives.</p> </dd> <p>Describes parameters for drawing instances.</p> <p>The members of this structure serve the same purpose as the parameters of <strong>DrawInstanced</strong>.</p> <dd> <p>Specifies the number of vertices to draw, per instance.</p> </dd> <dd> <p>Specifies the number of instances.</p> </dd> <dd> <p>Specifies an index to the first vertex to start drawing from.</p> </dd> <dd> <p>Specifies an index to the first instance to start drawing from.</p> </dd> <p>Describes parameters for drawing indexed instances.</p> <p>The members of this structure serve the same purpose as the parameters of <strong>DrawIndexedInstanced</strong>. </p> <dd> <p>The number of indices read from the index buffer for each instance.</p> </dd> <dd> <p> The number of instances to draw.</p> </dd> <dd> <p>The location of the first index read by the {{GPU}} from the index buffer.</p> </dd> <dd> <p>A value added to each index before reading a vertex from the vertex buffer.</p> </dd> <dd> <p> A value added to each index before reading per-instance data from a vertex buffer.</p> </dd> <p>Describes dispatch parameters, for use by the compute shader.</p> <p>The members of this structure serve the same purpose as the parameters of <strong>Dispatch</strong>.</p><p> A compiled compute shader defines the set of instructions to execute per thread and the number of threads to run per group. The thread-group parameters indicate how many thread groups to execute. Each thread group contains the same number of threads, as defined by the compiled compute shader. The thread groups are organized in a three-dimensional grid. The total number of thread groups that the compiled compute shader executes is determined by the following calculation:</p><code>ThreadGroupCountX * ThreadGroupCountY * ThreadGroupCountZ</code><p>In particular, if any of the values in the thread-group parameters are 0, nothing will happen. </p><p>The maximum size of any dimension is 65535.</p> <dd> <p>The size, in thread groups, of the x-dimension of the thread-group grid. </p> </dd> <dd> <p>The size, in thread groups, of the y-dimension of the thread-group grid.</p> </dd> <dd> <p>The size, in thread groups, of the z-dimension of the thread-group grid. </p> </dd> <p> Describes an indirect argument (an indirect parameter), for use with a command signature. </p> <p> Use this structure with the <strong>{{D3D12_COMMAND_SIGNATURE_DESC}}</strong> structure. </p> <dd> <p> A single <strong>{{D3D12_INDIRECT_ARGUMENT_TYPE}}</strong> enumeration constant. </p> </dd> <dd> <dl> <dt><strong>Slot</strong></dt> <dd> <p> Specifies the slot containing the vertex buffer address. </p> </dd> </dl> </dd> <dd> <dl> <dt><strong>RootParameterIndex</strong></dt> <dd> <p> Specifies the root index of the constant. </p> </dd> <dt><strong>DestOffsetIn32BitValues</strong></dt> <dd> <p> The offset, in 32-bit values, to set the first constant of the group. Supports multi-value constants at a given root index. Root constant entries must be sorted from smallest to largest DestOffsetIn32BitValues. </p> </dd> <dt><strong>Num32BitValuesToSet</strong></dt> <dd> <p> The number of 32-bit constants that are set at the given root index. Supports multi-value constants at a given root index. </p> </dd> </dl> </dd> <dd> <dl> <dt><strong>RootParameterIndex</strong></dt> <dd> <p> Specifies the root index of the {{CBV}}. </p> </dd> </dl> </dd> <dd> <dl> <dt><strong>RootParameterIndex</strong></dt> <dd> <p> Specifies the root index of the {{SRV}}. </p> </dd> </dl> </dd> <dd> <dl> <dt><strong>RootParameterIndex</strong></dt> <dd> <p> Specifies the root index of the {{UAV}}. </p> </dd> </dl> </dd> <p> Describes the arguments (parameters) of a command signature. </p> <p> Use this structure by <strong>CreateCommandSignature</strong>. </p> <dd> <p> Specifies the size of each argument of a command signature, in bytes. </p> </dd> <dd> <p> Specifies the number of arguments in the command signature. </p> </dd> <dd> <p> An array of <strong>{{D3D12_INDIRECT_ARGUMENT_DESC}}</strong> structures, containing details of the arguments, including whether the argument is a vertex buffer, constant, constant buffer view, shader resource view, or unordered access view. </p> </dd> <dd> <p> For single {{GPU}} operation, set this to zero. If there are multiple {{GPU}} nodes, set bits to identify the nodes (the device's physical adapters) for which the command signature is to apply. Each bit in the mask corresponds to a single node. Refer to Multi-Adapter.</p> </dd> <p> Describes subresource data. </p> <p>This structure is used by a number of the helper functions, refer to Helper Structures and Functions for {{D3D12}}.</p> <dd> <p> A reference to a memory block that contains the subresource data. </p> </dd> <dd> <p> The row pitch, or width, or physical size, in bytes, of the subresource data. </p> </dd> <dd> <p> The depth pitch, or width, or physical size, in bytes, of the subresource data. </p> </dd> <p> Describes the destination of a memory copy operation. </p> <p>This structure is used by a number of helper methods, refer to Helper Structures and Functions for {{D3D12}}.</p> <dd> <p> A reference to a memory block that receives the copied data. </p> </dd> <dd> <p> The row pitch, or width, or physical size, in bytes, of the subresource data. </p> </dd> <dd> <p> The slice pitch, or width, or physical size, in bytes, of the subresource data. </p> </dd> <p>An interface from which <strong>{{ID3D12Device}}</strong> and <strong>{{ID3D12DeviceChild}}</strong> inherit from. It provides methods to associate private data and annotate object names.</p> <p>Gets application-defined data from a device object.</p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> The <strong>{{GUID}}</strong> that is associated with the data. </p> </dd> <dd> <p> A reference to a variable that on input contains the size, in bytes, of the buffer that <em>pData</em> points to, and on output contains the size, in bytes, of the amount of data that <strong>GetPrivateData</strong> retrieved. </p> </dd> <dd> <p> A reference to a memory block that receives the data from the device object if <em>pDataSize</em> points to a value that specifies a buffer large enough to hold the data. </p> </dd> <p> Sets application-defined data to a device object and associates that data with an application-defined <strong>{{GUID}}</strong>. </p> <p> Rather than using the Direct3D 11 debug object naming scheme of calling <strong>{{ID3D12Object::SetPrivateData}}</strong> using <strong>{{WKPDID_D3DDebugObjectName}}</strong> with an {{ASCII}} name, call <strong>{{ID3D12Object::SetName}}</strong> with a {{UNICODE}} name. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> The <strong>{{GUID}}</strong> to associate with the data. </p> </dd> <dd> <p> The size in bytes of the data. </p> </dd> <dd> <p> A reference to a memory block that contains the data to be stored with this device object. If <em>pData</em> is <strong>{{NULL}}</strong>, <em>DataSize</em> must also be 0, and any data that was previously associated with the <strong>{{GUID}}</strong> specified in <em>guid</em> will be destroyed. </p> </dd> <p> Associates an <strong>{{IUnknown}}</strong>-derived interface with the device object and associates that interface with an application-defined <strong>{{GUID}}</strong>. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <p> Associates a name with the device object. This name is for use in debug diagnostics and tools. </p> <p> This method takes {{UNICODE}} names. The older Direct3D 11 debug object naming system through <strong>{{ID3D12Object::SetPrivateData}}</strong> with <strong>{{WKPDID_D3DDebugObjectName}}</strong> used {{ASCII}}. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> A <strong>{{NULL}}</strong>-terminated <strong>{{UNICODE}}</strong> string that contains the name to associate with the device object. </p> </dd> <p>An interface from which other core interfaces inherit from, including <strong>{{ID3D12PipelineLibrary}}</strong>, <strong>{{ID3D12CommandList}}</strong>, <strong>{{ID3D12Pageable}}</strong>, and <strong>{{ID3D12RootSignature}}</strong>. It provides a method to get back to the device object it was created against.</p> <p>Gets a reference to the device that created this interface. </p> <p> Any returned interfaces have their reference count incremented by one, so be sure to call ::release() on the returned references before they are freed or else you will have a memory leak. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> The globally unique identifier (<strong>{{GUID}}</strong>) for the device interface. The <strong>{{REFIID}}</strong>, or <strong>{{GUID}}</strong>, of the interface to the device can be obtained by using the __uuidof() macro. For example, __uuidof(<strong>{{ID3D12Device}}</strong>) will get the <strong>{{GUID}}</strong> of the interface to a device. </p> </dd> <dd> <p> A reference to a memory block that receives a reference to the <strong>{{ID3D12Device}}</strong> interface for the device. </p> </dd> <p>The root signature defines what resources are bound to the graphics pipeline. A root signature is configured by the app and links command lists to the resources the shaders require. Currently, there is one graphics and one compute root signature per app.</p> <p>Contains a method to return the deserialized <strong>{{D3D12_ROOT_SIGNATURE_DESC}}</strong> data structure, of a serialized root signature version 1.0. </p> <p>This interface has been superceded by <strong>{{ID3D12VersionedRootSignatureDeserializer}}</strong>.</p> <p> Gets the layout of the root signature. </p> <p> This method returns a deserialized root signature in a <strong>{{D3D12_ROOT_SIGNATURE_DESC}}</strong> structure that describes the layout of the root signature. </p> <p>Contains methods to return the deserialized <strong>{{D3D12_ROOT_SIGNATURE_DESC1}}</strong> data structure, of any version of a serialized root signature. </p> <p>This interface supercedes <strong>{{ID3D12RootSignatureDeserializer}}</strong>.</p> <p>Converts root signature description structures to a requested version.</p> <p>This method allocates additional storage if needed for the converted root signature (memory owned by the deserializer interface). If conversion is done, the deserializer interface doesn?t free the original deserialized root signature memory ? all versions the interface has been asked to convert to are available until the deserializer is destroyed. </p><p>Converting a root signature from 1.1 to 1.0 will drop all <strong>{{D3D12_DESCRIPTOR_RANGE_FLAGS}}</strong> and <strong>{{D3D12_ROOT_DESCRIPTOR_FLAGS}}</strong> can be useful for generating compatible root signatures that need to run on old operating systems, though does lose optimization opportunities. For instance, multiple root signature versions can be serialized and stored with application assets, with the appropriate version used at runtime based on the operating system capabilities. </p><p>Converting a root signature from 1.0 to 1.1 just adds the appropriate flags to match 1.0 semantics.</p> <p>This method returns an {{HRESULT}} success or error code. The method can fail with {{E_OUTOFMEMORY}}.</p> <dd> <p>Specifies the required <strong>{{D3D_ROOT_SIGNATURE_VERSION}}</strong>.</p> </dd> <dd> <p>Contains the deserialized root signature in a <strong>{{D3D12_VERSIONED_ROOT_SIGNATURE_DESC}}</strong> structure.</p> </dd> <p> Gets the layout of the root signature, without converting between root signature versions. </p> <p>This method returns a deserialized root signature in a <strong>{{D3D12_VERSIONED_ROOT_SIGNATURE_DESC}}</strong> structure that describes the layout of the root signature.</p> <p>An interface from which many other core interfaces inherit from. It indicates that the object type encapsulates some amount of {{GPU}}-accessible memory; but does not strongly indicate whether the application can manipulate the object's residency. </p> <p>For more details, refer to Memory Management in Direct3D 12 and the <strong>MakeResident</strong> method reference. </p> <p>A heap is an abstraction of contiguous memory allocation, used to manage physical memory. This heap can be used with <strong>{{ID3D12Resource}}</strong> objects to support placed resources or reserved resources.</p> <p>Gets the heap description.</p> <p>Returns the <strong>{{D3D12_HEAP_DESC}}</strong> structure that describes the heap.</p> <p>Invalidates the {{CPU}} reference to the specified subresource in the resource. <strong>Unmap</strong> also flushes the {{CPU}} cache, when necessary, so that {{GPU}} reads to this address reflect any modifications made by the {{CPU}}. </p> <p>Refer to the extensive Remarks and Examples for the <strong>Map</strong> method.</p> <p>This method does not return a value.</p> <dd> <p>Specifies the index of the subresource.</p> </dd> <dd> <p>A reference to a <strong>{{D3D12_RANGE}}</strong> structure that describes the range of memory to unmap.</p> <p>This indicates the region the {{CPU}} might have modified, and the coordinates are subresource-relative. A null reference indicates the entire subresource might have been modified by the {{CPU}}. It is valid to specify the {{CPU}} didn't write any data by passing a range where <strong>End</strong> is less than or equal to <strong>Begin</strong>.</p> </dd> <p>Gets the resource description.</p> <p>A Direct3D 12 resource description structure.</p> <p> This method returns the {{GPU}} virtual address of a buffer resource. </p> <p>This method is only useful for buffer resources, it will return zero for all texture resources.</p><p> For more information on the use of {{GPU}} virtual addresses, refer to Indirect Drawing. </p> <p> This method returns the {{GPU}} virtual address. {{D3D12_GPU_VIRTUAL_ADDRESS}} is a typedef'd synonym of {{UINT64}}. </p> <p>Uses the {{CPU}} to copy data into a subresource, enabling the {{CPU}} to modify the contents of most textures with undefined layouts.</p> <p>The resource should first be mapped using <strong>Map</strong>. Textures must be in the <strong>{{D3D12_RESOURCE_STATE_COMMON}}</strong> state for {{CPU}} access through <strong>WriteToSubresource</strong> and <strong>ReadFromSubresource</strong> to be legal; but buffers do not.</p><p> For efficiency, ensure the bounds and alignment of the extents within the box are ( 64 / [bytes per pixel] ) pixels horizontally. Vertical bounds and alignment should be 2 rows, except when 1-byte-per-pixel formats are used, in which case 4 rows are recommended. Single depth slices per call are handled efficiently. It is recommended but not necessary to provide references and strides which are 128-byte aligned. </p><p> When writing to sub mipmap levels, it is recommended to use larger width and heights than described above. This is because small mipmap levels may actually be stored within a larger block of memory, with an opaque amount of offsetting which can interfere with alignment to cache lines. </p><p><strong>WriteToSubresource</strong> and <strong>ReadFromSubresource</strong> enable near zero-copy optimizations for {{UMA}} adapters, but can prohibitively impair the efficiency of discrete/ {{NUMA}} adapters as the texture data cannot reside in local video memory. Typical applications should stick to discrete-friendly upload techniques, unless they recognize the adapter architecture is {{UMA}}. For more details on uploading, refer to <strong>CopyTextureRegion</strong>, and for more details on {{UMA}}, refer to <strong>{{D3D12_FEATURE_DATA_ARCHITECTURE}}</strong>. </p><p>On {{UMA}} systems, this routine can be used to minimize the cost of memory copying through the loop optimization known as loop tiling. By breaking up the upload into chucks that comfortably fit in the {{CPU}} cache, the effective bandwidth between the {{CPU}} and main memory more closely achieves theoretical maximums. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> Specifies the index of the subresource. </p> </dd> <dd> <p> A reference to a box that defines the portion of the destination subresource to copy the resource data into. If {{NULL}}, the data is written to the destination subresource with no offset. The dimensions of the source must fit the destination (see <strong>{{D3D12_BOX}}</strong>). </p> <p> An empty box results in a no-op. A box is empty if the top value is greater than or equal to the bottom value, or the left value is greater than or equal to the right value, or the front value is greater than or equal to the back value. When the box is empty, this method doesn't perform any operation. </p> </dd> <dd> <p> A reference to the source data in memory. </p> </dd> <dd> <p>The distance from one row of source data to the next row. </p> </dd> <dd> <p> The distance from one depth slice of source data to the next. </p> </dd> <p> Uses the {{CPU}} to copy data from a subresource, enabling the {{CPU}} to read the contents of most textures with undefined layouts. </p> <p> See the Remarks section for <strong>WriteToSubresource</strong>. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> A reference to the destination data in memory. </p> </dd> <dd> <p> The distance from one row of destination data to the next row. </p> </dd> <dd> <p> The distance from one depth slice of destination data to the next. </p> </dd> <dd> <p> Specifies the index of the subresource to read from. </p> </dd> <dd> <p> A reference to a box that defines the portion of the destination subresource to copy the resource data from. If {{NULL}}, the data is read from the destination subresource with no offset. The dimensions of the destination must fit the destination (see <strong>{{D3D12_BOX}}</strong>). </p> <p> An empty box results in a no-op. A box is empty if the top value is greater than or equal to the bottom value, or the left value is greater than or equal to the right value, or the front value is greater than or equal to the back value. When the box is empty, this method doesn't perform any operation. </p> </dd> <p> Retrieves the properties of the resource heap, for placed and committed resources. </p> <p> This method only works on placed and committed resources, not on reserved resources. If the resource was created as reserved, {{E_INVALIDARG}} is returned. The pages could be mapped to none, one, or more heaps. </p><p> For more information, refer to Memory Management in Direct3D 12. </p> <p> This method returns one of the Direct3D 12 Return Codes. If the resource was created as reserved, {{E_INVALIDARG}} is returned. </p> <dd> <p> Pointer to a <strong>{{D3D12_HEAP_PROPERTIES}}</strong> structure, that on successful completion of the method will contain the resource heap properties. </p> </dd> <dd> <p> Specifies a <strong>{{D3D12_HEAP_FLAGS}}</strong> variable, that on successful completion of the method will contain any miscellaneous heap flags. </p> </dd> <p>Represents the allocations of storage for graphics processing unit ({{GPU}}) commands.</p> <p>Use <strong>{{ID3D12Device::CreateCommandAllocator}}</strong> to create a command allocator object. </p><p>The command allocator object corresponds to the underlying allocations in which {{GPU}} commands are stored. The command allocator object applies to both direct command lists and bundles. You must use a command allocator object in a DirectX 12 app.</p> <p>Indicates to re-use the memory that is associated with the command allocator.</p> <p>Apps call <strong>Reset</strong> to re-use the memory that is associated with a command allocator. From this call to <strong>Reset</strong>, the runtime and driver determine that the graphics processing unit ({{GPU}}) is no longer executing any command lists that have recorded commands with the command allocator.</p><p>Unlike <strong>{{ID3D12GraphicsCommandList::Reset}}</strong>, it is not recommended that you call <strong>Reset</strong> on the command allocator while a command list is still being executed. </p><p>The debug layer will issue a warning if it can't prove that there are no pending {{GPU}} references to command lists that have recorded commands in the allocator.</p><p>The debug layer will issue an error if <strong>Reset</strong> is called concurrently by multiple threads (on the same allocator object).</p> <p>This method returns <strong>{{E_FAIL}}</strong> if there is an actively recording command list referencing the command allocator. The debug layer will also issue an error in this case. See Direct3D 12 Return Codes for other possible return values.</p> <p>Gets the current value of the fence.</p> <p>Returns the current value of the fence. </p> <p>Gets the current value of the fence.</p> <p>Returns the current value of the fence. </p> <p>Sets the fence to the specified value.</p> <p>Use this method to set a fence value from the {{CPU}} side. Use <strong>{{ID3D12CommandQueue::Signal}}</strong> to set a fence from the {{GPU}} side.</p> <p>This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p>The value to set the fence to.</p> </dd> <p>Represents the state of all currently set shaders as well as certain fixed function state objects.</p> <p>Use <strong>{{ID3D12Device::CreateGraphicsPipelineState}}</strong> or <strong>{{ID3D12Device::CreateComputePipelineState}}</strong> to create a pipeline state object ({{PSO}}). </p><p>A pipeline state object corresponds to a significant portion of the state of the graphics processing unit ({{GPU}}). This state includes all currently set shaders and certain fixed function state objects. The only way to change states contained within the pipeline object is to change the currently bound pipeline object.</p> <p> Gets the cached blob representing the pipeline state. </p> <p>Refer to the remarks for <strong>{{D3D12_CACHED_PIPELINE_STATE}}</strong>.</p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> After this method returns, points to the cached blob representing the pipeline state. </p> </dd> <p>A descriptor heap is a collection of contiguous allocations of descriptors, one allocation for every descriptor. Descriptor heaps contain many object types that are not part of a Pipeline State Object ({{PSO}}), such as Shader Resource Views ({{SRVs}}), Unordered Access Views ({{UAVs}}), Constant Buffer Views ({{CBVs}}), and Samplers.</p> <p> Gets the descriptor heap description. </p> <p> The description of the descriptor heap, as a <strong>{{D3D12_DESCRIPTOR_HEAP_DESC}}</strong> structure. </p> <p>Gets the {{CPU}} descriptor handle that represents the start of the heap.</p> <p>Returns the {{CPU}} descriptor handle that represents the start of the heap.</p> <p>Gets the {{GPU}} descriptor handle that represents the start of the heap.</p> <p>Returns the {{GPU}} descriptor handle that represents the start of the heap.</p> <p>Manages a query heap. A query heap holds an array of queries, referenced by indexes.</p> <p>For more information, refer to Queries.</p> <p> A command signature object enables apps to specify indirect drawing, including the buffer format, command type and resource bindings to be used.</p> <p> To create a command signature, call <strong>{{ID3D12Device::CreateCommandSignature}}</strong>, as described in Indirect Drawing. </p> <p> Gets the type of the command list, such as direct, bundle, compute, or copy. </p> <p> This method returns the type of the command list, as a <strong>{{D3D12_COMMAND_LIST_TYPE}}</strong> enumeration constant, such as direct, bundle, compute, or copy. </p> <p> Indicates that recording to the command list has finished. </p> <p> The runtime will validate that the command list has not previously been closed. If an error was encountered during recording, the error code is returned here. The runtime won't call the close device driver interface ({{DDI}}) in this case. </p> <p> Returns <strong>{{S_OK}}</strong> if successful; otherwise, returns one of the following values: </p><ul> <li><strong>{{E_FAIL}}</strong> if the command list has already been closed, or an invalid {{API}} was called during command list recording. </li> <li><strong>{{E_OUTOFMEMORY}}</strong> if the operating system ran out of memory during recording. </li> <li><strong>{{E_INVALIDARG}}</strong> if an invalid argument was passed to the command list {{API}} during recording. </li> </ul><p> See Direct3D 12 Return Codes for other possible return values. </p> <p> Resets a command list back to its initial state as if a new command list was just created. </p> <p> By using <strong>Reset</strong>, you can re-use command list tracking structures without any allocations. Unlike <strong>{{ID3D12CommandAllocator::Reset}}</strong>, you can call <strong>Reset</strong> while the command list is still being executed. A typical pattern is to submit a command list and then immediately reset it to reuse the allocated memory for another command list. </p><p> You can use <strong>Reset</strong> for both direct command lists and bundles. </p><p> The command allocator that <strong>Reset</strong> takes as input can be associated with no more than one recording command list at a time. The allocator type, direct command list or bundle, must match the type of command list that is being created. </p><p> If a bundle doesn't specify a resource heap, it can't make changes to which descriptor tables are bound. Either way, bundles can't change the resource heap within the bundle. If a heap is specified for a bundle, the heap must match the calling 'parent' command list?s heap. </p> <p> Returns <strong>{{S_OK}}</strong> if successful; otherwise, returns one of the following values: </p><ul> <li><strong>{{E_FAIL}}</strong> if the command list was not in the "closed" state when the <strong>Reset</strong> call was made, or the per-device limit would have been exceeded. </li> <li><strong>{{E_OUTOFMEMORY}}</strong> if the operating system ran out of memory. </li> <li><strong>{{E_INVALIDARG}}</strong> if the allocator is currently being used with another command list in the "recording" state or if the specified allocator was created with the wrong type. </li> </ul><p> See Direct3D 12 Return Codes for other possible return values. </p> <dd> <p> A reference to the <strong>{{ID3D12CommandAllocator}}</strong> object that the device creates command lists from. </p> </dd> <dd> <p>A reference to the <strong>{{ID3D12PipelineState}}</strong> object that contains the initial pipeline state for the command list. This is optional and can be {{NULL}}. If {{NULL}}, the runtime sets a dummy initial pipeline state so that drivers don't have to deal with undefined state. The overhead for this is low, particularly for a command list, for which the overall cost of recording the command list likely dwarfs the cost of one initial state setting. So there is little cost in not setting the initial pipeline state parameter if it isn't convenient. </p> <p>For bundles on the other hand, it might make more sense to try to set the initial state parameter since bundles are likely smaller overall and can be reused frequently.</p> </dd> <p>Resets the state of a direct command list back to the state it was in when the command list was created. </p> <p> It is invalid to call <strong>ClearState</strong> on a bundle. If an app calls <strong>ClearState</strong> on a bundle, the call to <strong>Close</strong> will return <strong>{{E_FAIL}}</strong>. </p><p> When <strong>ClearState</strong> is called, all currently bound resources are unbound. The primitive topology is set to <strong>{{D3D_PRIMITIVE_TOPOLOGY_UNDEFINED}}</strong>. Viewports, scissor rectangles, stencil reference value, and the blend factor are set to empty values (all zeros). Predication is disabled. </p><p> The app-provided pipeline state object becomes bound as the currently set pipeline state object. </p> <p> Returns nothing. </p> <dd> <p> A reference to the <strong>{{ID3D12PipelineState}}</strong> object that contains the initial pipeline state for the command list. </p> </dd> <p> Draws non-indexed, instanced primitives. </p> <p> A draw {{API}} submits work to the rendering pipeline. </p><p> Instancing might extend performance by reusing the same geometry to draw multiple objects in a scene. One example of instancing could be to draw the same object with different positions and colors. </p><p> The vertex data for an instanced draw call typically comes from a vertex buffer that is bound to the pipeline. But, you could also provide the vertex data from a shader that has instanced data identified with a system-value semantic ({{SV_InstanceID}}). </p> <p>Returns nothing</p> <dd> <p> Number of vertices to draw. </p> </dd> <dd> <p> Number of instances to draw. </p> </dd> <dd> <p> Index of the first vertex. </p> </dd> <dd> <p> A value added to each index before reading per-instance data from a vertex buffer. </p> </dd> <p> Draws indexed, instanced primitives. </p> <p>A draw {{API}} submits work to the rendering pipeline.</p><p>Instancing might extend performance by reusing the same geometry to draw multiple objects in a scene. One example of instancing could be to draw the same object with different positions and colors. Instancing requires multiple vertex buffers: at least one for per-vertex data and a second buffer for per-instance data.</p> <p>Returns nothing.</p> <dd> <p>Number of indices read from the index buffer for each instance.</p> </dd> <dd> <p>Number of instances to draw.</p> </dd> <dd> <p>The location of the first index read by the {{GPU}} from the index buffer.</p> </dd> <dd> <p>A value added to each index before reading a vertex from the vertex buffer.</p> </dd> <dd> <p>A value added to each index before reading per-instance data from a vertex buffer.</p> </dd> <p>Executes a command list from a thread group.</p> <p> You call the <strong>Dispatch</strong> method to execute commands in a compute shader. A compute shader can be run on many threads in parallel, within a thread group. Index a particular thread, within a thread group using a 3D vector given by (x,y,z). </p> <p>Returns nothing.</p> <dd> <p> The number of groups dispatched in the x direction. <em>ThreadGroupCountX</em> must be less than or equal to {{D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION}} (65535). </p> </dd> <dd> <p> The number of groups dispatched in the y direction. <em>ThreadGroupCountY</em> must be less than or equal to {{D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION}} (65535). </p> </dd> <dd> <p> The number of groups dispatched in the z direction. <em>ThreadGroupCountZ</em> must be less than or equal to {{D3D11_CS_DISPATCH_MAX_THREAD_GROUPS_PER_DIMENSION}} (65535). In feature level 10 the value for <em>ThreadGroupCountZ</em> must be 1. </p> </dd> <p> Copies a region of a buffer from one resource to another. </p> <p> Consider using the <strong>CopyResource</strong> method when copying an entire resource, and use this method for copying regions of a resource. </p><p><strong>CopyBufferRegion</strong> may be used to initialize resources which alias the same heap memory. See <strong>CreatePlacedResource</strong> for more details.</p> <p> This method does not return a value. </p> <dd> <p> Specifies the destination <strong>{{ID3D12Resource}}</strong>. </p> </dd> <dd> <p> Specifies a {{UINT64}} offset (in bytes) into the destination resource. </p> </dd> <dd> <p> Specifies the source <strong>{{ID3D12Resource}}</strong>. </p> </dd> <dd> <p> Specifies a {{UINT64}} offset (in bytes) into the source resource, to start the copy from. </p> </dd> <dd> <p> Specifies the number of bytes to copy. </p> </dd> <p> This method uses the {{GPU}} to copy texture data between two locations. Both the source and the destination may reference texture data located within either a buffer resource or a texture resource.</p> <p> The source box must be within the size of the source resource. The destination offsets, (x, y, and z), allow the source box to be offset when writing into the destination resource; however, the dimensions of the source box and the offsets must be within the size of the resource. If you try and copy outside the destination resource or specify a source box that is larger than the source resource, the behavior of <strong>CopyTextureRegion</strong> is undefined. If you created a device that supports the debug layer, the debug output reports an error on this invalid <strong>CopyTextureRegion</strong> call. Invalid parameters to <strong>CopyTextureRegion</strong> cause undefined behavior and might result in incorrect rendering, clipping, no copy, or even the removal of the rendering device. </p><p>If the resources are buffers, all coordinates are in bytes; if the resources are textures, all coordinates are in texels. </p><p><strong>CopyTextureRegion</strong> performs the copy on the {{GPU}} (similar to a <code>memcpy</code> by the {{CPU}}). As a consequence, the source and destination resources: </p><ul> <li>Must be different subresources (although they can be from the same resource).</li> <li>Must have compatible <strong>{{DXGI_FORMAT}}</strong>s (identical or from the same type group). For example, a {{DXGI_FORMAT_R32G32B32_FLOAT}} texture can be copied to an {{DXGI_FORMAT_R32G32B32_UINT}} texture since both of these formats are in the {{DXGI_FORMAT_R32G32B32_TYPELESS}} group. <strong>CopyTextureRegion</strong> can copy between a few format types. For more info, see Format Conversion using Direct3D 10.1.</li> </ul><p><strong>CopyTextureRegion</strong> only supports copy; it does not support any stretch, color key, or blend. <strong>CopyTextureRegion</strong> can reinterpret the resource data between a few format types. </p><p> If your app needs to copy an entire resource, we recommend to use <strong>CopyResource</strong> instead. </p><strong>Note</strong>?? If you use <strong>CopyTextureRegion</strong> with a depth-stencil buffer or a multisampled resource, you must copy the whole subresource. In this situation, you must pass 0 to the <em>DstX</em>, <em>DstY</em>, and <em>DstZ</em> parameters and <strong>{{NULL}}</strong> to the <em>pSrcBox</em> parameter. In addition, source and destination resources, which are represented by the <em>pSrcResource</em> and <em>pDstResource</em> parameters, should have identical sample count values.?<p><strong>CopyTextureRegion</strong> may be used to initialize resources which alias the same heap memory. See <strong>CreatePlacedResource</strong> for more details.</p> <p> This method does not return a value. </p> <dd> <p>Specifies the destination <strong>{{D3D12_TEXTURE_COPY_LOCATION}}</strong>. The subresource referred to must be in the {{D3D12_RESOURCE_STATE_COPY_DEST}} state. </p> </dd> <dd> <p> The x-coordinate of the upper left corner of the destination region. </p> </dd> <dd> <p> The y-coordinate of the upper left corner of the destination region. For a 1D subresource, this must be zero. </p> </dd> <dd> <p> The z-coordinate of the upper left corner of the destination region. For a 1D or 2D subresource, this must be zero. </p> </dd> <dd> <p> Specifies the source <strong>{{D3D12_TEXTURE_COPY_LOCATION}}</strong>. The subresource referred to must be in the {{D3D12_RESOURCE_STATE_COPY_SOURCE}} state.</p> </dd> <dd> <p> Specifies an optional {{D3D12_BOX}} that sets the size of the source texture to copy. </p> </dd> <p> Copies tiles from buffer to tiled resource or vice versa. </p> <p><strong>CopyTiles</strong> drops write operations to unmapped areas and handles read operations from unmapped areas (except on Tier_1 tiled resources, where reading and writing unmapped areas is invalid - refer to <strong>{{D3D12_TILED_RESOURCES_TIER}}</strong>). </p><p>If a copy operation involves writing to the same memory location multiple times because multiple locations in the destination resource are mapped to the same tile memory, the resulting write operations to multi-mapped tiles are non-deterministic and non-repeatable; that is, accesses to the tile memory happen in whatever order the hardware happens to execute the copy operation. </p><p> The tiles involved in the copy operation can't include tiles that contain packed mipmaps or results of the copy operation are undefined. To transfer data to and from mipmaps that the hardware packs into one tile, you must use the standard (that is, non-tile specific) copy {{APIs}} like <strong>CopyTextureRegion</strong>.</p><p><strong>CopyTiles</strong> does copy data in a slightly different pattern than the standard copy methods.</p><p> The memory layout of the tiles in the non-tiled buffer resource side of the copy operation is linear in memory within 64 {{KB}} tiles, which the hardware and driver swizzle and de-swizzle per tile as appropriate when they transfer to and from a tiled resource. For multisample antialiasing ({{MSAA}}) surfaces, the hardware and driver traverse each pixel's samples in sample-index order before they move to the next pixel. For tiles that are partially filled on the right side (for a surface that has a width not a multiple of tile width in pixels), the pitch and stride to move down a row is the full size in bytes of the number pixels that would fit across the tile if the tile was full. So, there can be a gap between each row of pixels in memory. Mipmaps that are smaller than a tile are not packed together in the linear layout, which might seem to be a waste of memory space, but as mentioned you can't use <strong>CopyTiles</strong> to copy to mipmaps that the hardware packs together. You can just use generic copy {{APIs}}, like <strong>CopyTextureRegion</strong>, to copy small mipmaps individually.</p> <p> This method does not return a value. </p> <dd> <p>A reference to a tiled resource.</p> </dd> <dd> <p> A reference to a <strong>{{D3D12_TILED_RESOURCE_COORDINATE}}</strong> structure that describes the starting coordinates of the tiled resource. </p> </dd> <dd> <p> A reference to a <strong>{{D3D12_TILE_REGION_SIZE}}</strong> structure that describes the size of the tiled region. </p> </dd> <dd> <p> A reference to an <strong>{{ID3D12Resource}}</strong> that represents a default, dynamic, or staging buffer. </p> </dd> <dd> <p> The offset in bytes into the buffer at <em>pBuffer</em> to start the operation. </p> </dd> <dd> <p> A combination of <strong>{{D3D12_TILE_COPY_FLAGS}}</strong>-typed values that are combined by using a bitwise {{OR}} operation and that identifies how to copy tiles. </p> </dd> <p>Copy a multi-sampled resource into a non-multi-sampled resource.</p> <p> This method does not return a value. </p> <dd> <p> Destination resource. Must be a created with the <strong>{{D3D11_USAGE_DEFAULT}}</strong> flag and be single-sampled. See <strong>{{ID3D12Resource}}</strong>. </p> </dd> <dd> <p> A zero-based index, that identifies the destination subresource. Use <strong>{{D3D12CalcSubresource}}</strong> to calculate the subresource index if the parent resource is complex. </p> </dd> <dd> <p> Source resource. Must be multisampled. </p> </dd> <dd> <p> The source subresource of the source resource. </p> </dd> <dd> <p> A <strong>{{DXGI_FORMAT}}</strong> that indicates how the multisampled resource will be resolved to a single-sampled resource. See remarks. </p> </dd> <p>Bind information about the primitive type, and data order that describes input data for the input assembler stage.</p> <p> This method does not return a value. </p> <dd> <p> The type of primitive and ordering of the primitive data (see <strong>{{D3D_PRIMITIVE_TOPOLOGY}}</strong>). </p> </dd> <p> Bind an array of viewports to the rasterizer stage of the pipeline. </p> <p> All viewports must be set atomically as one operation. Any viewports not defined by the call are disabled. </p><p> Which viewport to use is determined by the {{SV_ViewportArrayIndex}} semantic output by a geometry shader; if a geometry shader does not specify the semantic, Direct3D will use the first viewport in the array. </p><strong>Note</strong>?? Even though you specify float values to the members of the <strong>{{D3D12_VIEWPORT}}</strong> structure for the <em>pViewports</em> array in a call to <strong>{{RSSetViewports}}</strong> for feature levels 9_x, <strong>{{RSSetViewports}}</strong> uses {{DWORDs}} internally. Because of this behavior, when you use a negative top left corner for the viewport, the call to <strong>{{RSSetViewports}}</strong> for feature levels 9_x fails. This failure occurs because <strong>{{RSSetViewports}}</strong> for 9_x casts the floating point values into unsigned integers without validation, which results in integer overflow.? <p> This method does not return a value. </p> <dd> <p> Number of viewports to bind. The range of valid values is (0, {{D3D12_VIEWPORT_AND_SCISSORRECT_OBJECT_COUNT_PER_PIPELINE}}). </p> </dd> <dd> <p> An array of <strong>{{D3D12_VIEWPORT}}</strong> structures to bind to the device. </p> </dd> <p>Sets the blend factor that modulate values for a pixel shader, render target, or both.</p> <p> If you created the blend-state object with {{D3D11_BLEND_BLEND_FACTOR}} or {{D3D11_BLEND_INV_BLEND_FACTOR}}, the blending stage uses the non-{{NULL}} array of blend factors. </p><p> If you didn't create the blend-state object with {{D3D11_BLEND_BLEND_FACTOR}} or {{D3D11_BLEND_INV_BLEND_FACTOR}}, the blending stage does not use the non-{{NULL}} array of blend factors; the runtime stores the blend factors. </p><p> If you pass {{NULL}}, the runtime uses or stores a blend factor equal to { 1, 1, 1, 1 }. </p><p> {{D3D11_BLEND_BLEND_FACTOR}} and {{D3D11_BLEND_INV_BLEND_FACTOR}} are <strong>{{D3D12_BLEND}}</strong> enumeration constants. </p> <p> This method does not return a value. </p> <dd> <p> Array of blend factors, one for each {{RGBA}} component. </p> </dd> <p>Sets the reference value for depth stencil tests.</p> <p> This method does not return a value. </p> <dd> <p> Reference value to perform against when doing a depth-stencil test. </p> </dd> <p> Sets all shaders and programs most of the fixed-function state of the graphics processing unit ({{GPU}}) pipeline. </p> <p> This method does not return a value. </p> <dd> <p> Pointer to the <strong>{{ID3D12PipelineState}}</strong> containing the pipeline state data. </p> </dd> <p> Notifies the driver that it needs to synchronize multiple accesses to resources. </p> <p>There are three types of barrier descriptions:</p><ul> <li> <strong>{{D3D12_RESOURCE_TRANSITION_BARRIER}}</strong> - Transition barriers indicate that a set of subresources transition between different usages. The caller must specify the <em>before</em> and <em>after</em> usages of the subresources. The {{D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES}} flag is used to transition all subresources in a resource at the same time. </li> <li> <strong>{{D3D12_RESOURCE_ALIASING_BARRIER}}</strong> - Aliasing barriers indicate a transition between usages of two different resources which have mappings into the same heap. The application can specify both the before and the after resource. Note that one or both resources can be {{NULL}} (indicating that any tiled resource could cause aliasing). </li> <li> <strong>{{D3D12_RESOURCE_UAV_BARRIER}}</strong> - Unordered access view barriers indicate all {{UAV}} accesses (read or writes) to a particular resource must complete before any future {{UAV}} accesses (read or write) can begin. The specified resource may be {{NULL}}. It is not necessary to insert a {{UAV}} barrier between two draw or dispatch calls which only read a {{UAV}}. Additionally, it is not necessary to insert a {{UAV}} barrier between two draw or dispatch calls which write to the same {{UAV}} if the application knows that it is safe to execute the {{UAV}} accesses in any order. The resource can be {{NULL}} (indicating that any {{UAV}} access could require the barrier). </li> </ul><p> When <strong>{{ID3D12GraphicsCommandList::ResourceBarrier}}</strong> is passed an array of resource barrier descriptions, the {{API}} behaves as if it was called N times (1 for each array element), in the specified order. Transitions should be batched together into a single {{API}} call when possible, as a performance optimization.</p><p> For descriptions of the usage states a subresource can be in, see the <strong>{{D3D12_RESOURCE_STATES}}</strong> enumeration and the Using Resource Barriers to Synchronize Resource States in Direct3D 12 section. </p><p> All subresources in a resource must be in the {{RENDER_TARGET}} state, or {{DEPTH_WRITE}} state, for render targets/depth-stencil resources respectively, when <strong>{{ID3D12GraphicsCommandList::DiscardResource}}</strong> is called. </p><p> When a back buffer is presented, it must be in the {{D3D12_RESOURCE_STATE_PRESENT}} state. If <strong>{{IDXGISwapChain1::Present1}}</strong> is called on a resource which is not in the {{PRESENT}} state, a debug layer warning will be emitted. </p><p>The resource usage bits are group into two categories, read-only and read/write.</p><p> The following usage bits are read-only: </p><ul> <li>{{D3D12_RESOURCE_STATE_VERTEX_AND_CONSTANT_BUFFER}}</li> <li>{{D3D12_RESOURCE_STATE_INDEX_BUFFER}}</li> <li>{{D3D12_RESOURCE_STATE_NON_PIXEL_SHADER_RESOURCE}}</li> <li>{{D3D12_RESOURCE_STATE_PIXEL_SHADER_RESOURCE}}</li> <li>{{D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT}}</li> <li>{{D3D12_RESOURCE_STATE_COPY_SOURCE}}</li> <li>{{D3D12_RESOURCE_STATE_DEPTH_READ}}</li> </ul><p>The following usage bits are read/write:</p><ul> <li>{{D3D12_RESOURCE_STATE_UNORDERED_ACCESS}}</li> <li>{{D3D12_RESOURCE_STATE_DEPTH_WRITE}}</li> </ul><p>The following usage bits are write-only:</p><ul> <li>{{D3D12_RESOURCE_STATE_COPY_DEST}}</li> <li>{{D3D12_RESOURCE_STATE_RENDER_TARGET}}</li> <li>{{D3D12_RESOURCE_STATE_STREAM_OUT}}</li> </ul><p> At most one write bit can be set. If any write bit is set, then no read bit may be set. If no write bit is set, then any number of read bits may be set. </p><p> At any given time, a subresource is in exactly one state (determined by a set of flags). The application must ensure that the states are matched when making a sequence of <strong>ResourceBarrier</strong> calls. In other words, the before and after states in consecutive calls to <strong>ResourceBarrier</strong> must agree. </p><p>To transition all subresources within a resource, the application can set the subresource index to {{D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES}}, which implies that all subresources are changed.</p><p> For improved performance, applications should use split barriers (refer to Synchronization and Multi-Engine). Applications should also batch multiple transitions into a single call whenever possible. </p> <p> This method does not return a value. </p> <dd> <p> The number of submitted barrier descriptions. </p> </dd> <dd> <p> Pointer to an array of barrier descriptions. </p> </dd> <p> Executes a bundle. </p> <p> Bundles inherit all state from the parent command list on which <strong>ExecuteBundle</strong> is called, except the pipeline state object and primitive topology. All of the state that is set in a bundle will affect the state of the parent command list. Note that <strong>ExecuteBundle</strong> is not a predicated operation. </p> <p> This method does not return a value. </p> <dd> <p> Specifies the <strong>{{ID3D12GraphicsCommandList}}</strong> that determines the bundle to be executed. </p> </dd> <p> Changes the currently bound descriptor heaps that are associated with a command list. </p> <p><strong>SetDescriptorHeaps</strong> can be called on a bundle, but the bundle descriptor heaps must match the calling command list descriptor heap. For more information on bundle restrictions, refer to Creating and Recording Command Lists and Bundles.</p> <p> This method does not return a value. </p> <dd> <p> Number of descriptor heaps to bind. </p> </dd> <dd> <p> A reference to an array of <strong>{{ID3D12DescriptorHeap}}</strong> objects for the heaps to set on the command list. </p> </dd> <p> Sets the layout of the compute root signature. </p> <p> This method does not return a value. </p> <dd> <p> A reference to the <strong>{{ID3D12RootSignature}}</strong> object. </p> </dd> <p> Sets the layout of the graphics root signature. </p> <p> This method does not return a value. </p> <dd> <p> A reference to the <strong>{{ID3D12RootSignature}}</strong> object. </p> </dd> <p> Sets a descriptor table into the compute root signature.</p> <p> This method does not return a value. </p> <dd> <p> The slot number for binding. </p> </dd> <dd> <p> A {{GPU_descriptor_handle}} object for the base descriptor to set. </p> </dd> <p> Sets a descriptor table into the graphics root signature. </p> <p> This method does not return a value. </p> <dd> <p> The slot number for binding. </p> </dd> <dd> <p> A {{GPU_descriptor_handle}} object for the base descriptor to set. </p> </dd> <p> Sets a constant in the compute root signature. </p> <p>This method does not return a value.</p> <dd> <p> The slot number for binding. </p> </dd> <dd> <p> The source data for the constant to set. </p> </dd> <dd> <p> The offset, in 32-bit values, to set the constant in the root signature. </p> </dd> <p> Sets a constant in the graphics root signature. </p> <p> This method does not return a value. </p> <dd> <p> The slot number for binding. </p> </dd> <dd> <p> The source data for the constant to set. </p> </dd> <dd> <p> The offset, in 32-bit values, to set the constant in the root signature. </p> </dd> <p> Sets a group of constants in the compute root signature. </p> <p> This method does not return a value. </p> <dd> <p>The slot number for binding.</p> </dd> <dd> <p>The number of constants to set in the root signature.</p> </dd> <dd> <p>The source data for the group of constants to set.</p> </dd> <dd> <p>The offset, in 32-bit values, to set the first constant of the group in the root signature.</p> </dd> <p> Sets a group of constants in the graphics root signature. </p> <p> This method does not return a value. </p> <dd> <p> The slot number for binding. </p> </dd> <dd> <p> The number of constants to set in the root signature. </p> </dd> <dd> <p> The source data for the group of constants to set. </p> </dd> <dd> <p> The offset, in 32-bit values, to set the first constant of the group in the root signature. </p> </dd> <p> Sets a {{CPU}} descriptor handle for the constant buffer in the compute root signature. </p> <p> This method does not return a value. </p> <dd> <p> The slot number for binding. </p> </dd> <dd> <p> Specifies the {{D3D12_GPU_VIRTUAL_ADDRESS}} of the constant buffer. </p> </dd> <p> Sets a {{CPU}} descriptor handle for the constant buffer in the graphics root signature. </p> <p> This method does not return a value. </p> <dd> <p> The slot number for binding. </p> </dd> <dd> <p> The {{GPU}} virtual address of the constant buffer. {{D3D12_GPU_VIRTUAL_ADDRESS}} is a typedef'd alias of {{UINT64}}. </p> </dd> <p> Sets a {{CPU}} descriptor handle for the shader resource in the compute root signature. </p> <p> This method does not return a value. </p> <dd> <p> The slot number for binding. </p> </dd> <dd> <p> The {{GPU}} virtual address of the buffer. {{D3D12_GPU_VIRTUAL_ADDRESS}} is a typedef'd alias of {{UINT64}}. </p> </dd> <p> Sets a {{CPU}} descriptor handle for the shader resource in the graphics root signature. </p> <p> This method does not return a value. </p> <dd> <p> The slot number for binding. </p> </dd> <dd> <p> The {{GPU}} virtual address of the Buffer. Textures are not supported. {{D3D12_GPU_VIRTUAL_ADDRESS}} is a typedef'd alias of {{UINT64}}. </p> </dd> <p> Sets a {{CPU}} descriptor handle for the unordered-access-view resource in the compute root signature. </p> <p> This method does not return a value. </p> <dd> <p> The slot number for binding. </p> </dd> <dd> <p> The {{GPU}} virtual address of the buffer. {{D3D12_GPU_VIRTUAL_ADDRESS}} is a typedef'd alias of {{UINT64}}. </p> </dd> <p> Sets a {{CPU}} descriptor handle for the unordered-access-view resource in the graphics root signature. </p> <p> This method does not return a value. </p> <dd> <p> The slot number for binding. </p> </dd> <dd> <p> The {{GPU}} virtual address of the buffer. {{D3D12_GPU_VIRTUAL_ADDRESS}} is a typedef'd alias of {{UINT64}}. </p> </dd> <p> Sets the view for the index buffer. </p> <p>Only one index buffer can be bound to the graphics pipeline at any one time.</p> <p> This method does not return a value. </p> <dd> <p> The view specifies the index buffer's address, size, and <strong>{{DXGI_FORMAT}}</strong>, as a reference to a <strong>{{D3D12_INDEX_BUFFER_VIEW}}</strong> structure. </p> </dd> <p>Sets a {{CPU}} descriptor handle for the vertex buffers.</p> <p> This method does not return a value. </p> <dd> <p> Index into the device's zero-based array to begin setting vertex buffers. </p> </dd> <dd> <p> The number of views in the <em>pViews</em> array. </p> </dd> <dd> <p> Specifies the vertex buffer views in an array of <strong>{{D3D12_VERTEX_BUFFER_VIEW}}</strong> structures. </p> </dd> <p> Sets the stream output buffer views. </p> <p> This method does not return a value. </p> <dd> <p> Index into the device's zero-based array to begin setting stream output buffers. </p> </dd> <dd> <p> The number of entries in the <em>pViews</em> array. </p> </dd> <dd> <p> Specifies an array of <strong>{{D3D12_STREAM_OUTPUT_BUFFER_VIEW}}</strong> structures. </p> </dd> <p> Sets {{CPU}} descriptor handles for the render targets and depth stencil. </p> <p> This method does not return a value. </p> <dd> <p> The number of entries in the <em>pRenderTargetDescriptors</em> array. </p> </dd> <dd> <p> Specifies an array of <strong>{{D3D12_CPU_DESCRIPTOR_HANDLE}}</strong> structures that describe the {{CPU}} descriptor handles that represents the start of the heap of render target descriptors. </p> </dd> <dd> <p><strong>True</strong> means the handle passed in is the reference to a contiguous range of <em>NumRenderTargetDescriptors</em> descriptors. This case is useful if the set of descriptors to bind already happens to be contiguous in memory (so all that?s needed is a handle to the first one). For example, if <em>NumRenderTargetDescriptors</em> is 3 then the memory layout is taken as follows:</p><p>In this case the driver dereferences the handle and then increments the memory being pointed to.</p> <p><strong>False</strong> means that the handle is the first of an array of <em>NumRenderTargetDescriptors</em> handles. The false case allows an application to bind a set of descriptors from different locations at once. Again assuming that <em>NumRenderTargetDescriptors</em> is 3, the memory layout is taken as follows:</p><p>In this case the driver dereferences three handles that are expected to be adjacent to each other in memory.</p> </dd> <dd> <p> A reference to a <strong>{{D3D12_CPU_DESCRIPTOR_HANDLE}}</strong> structure that describes the {{CPU}} descriptor handle that represents the start of the heap that holds the depth stencil descriptor. </p> </dd> <p>Clears the depth-stencil resource.</p> <p><strong>ClearDepthStencilView</strong> may be used to initialize resources which alias the same heap memory. See <strong>CreatePlacedResource</strong> for more details.</p> <p> Returns nothing. </p> <dd> <p> Describes the {{CPU}} descriptor handle that represents the start of the heap for the depth stencil to be cleared. </p> </dd> <dd> <p> A combination of <strong>{{D3D12_CLEAR_FLAGS}}</strong> values that are combined by using a bitwise {{OR}} operation. The resulting value identifies the type of data to clear (depth buffer, stencil buffer, or both). </p> </dd> <dd> <p> A value to clear the depth buffer with. This value will be clamped between 0 and 1. </p> </dd> <dd> <p> A value to clear the stencil buffer with. </p> </dd> <dd> <p> The number of rectangles in the array that the <em>pRects</em> parameter specifies. </p> </dd> <dd> <p> An array of <strong>{{D3D12_RECT}}</strong> structures for the rectangles in the resource view to clear. If <strong>{{NULL}}</strong>, <strong>ClearDepthStencilView</strong> clears the entire resource view. </p> </dd> <p> Sets all the elements in a render target to one value. </p> <p><strong>ClearRenderTargetView</strong> may be used to initialize resources which alias the same heap memory. See <strong>CreatePlacedResource</strong> for more details.</p> <p> This method does not return a value. </p> <dd> <p> Specifies a {{D3D12_CPU_DESCRIPTOR_HANDLE}} structure that describes the {{CPU}} descriptor handle that represents the start of the heap for the render target to be cleared. </p> </dd> <dd> <p> A 4-component array that represents the color to fill the render target with. </p> </dd> <dd> <p> The number of rectangles in the array that the <em>pRects</em> parameter specifies. </p> </dd> <dd> <p> An array of <strong>{{D3D12_RECT}}</strong> structures for the rectangles in the resource view to clear. If <strong>{{NULL}}</strong>, <strong>ClearRenderTargetView</strong> clears the entire resource view. </p> </dd> <p> Sets all the elements in a unordered-access view to the specified integer values. </p> <p> This method does not return a value. </p> <dd> <p> A <strong>{{D3D12_GPU_DESCRIPTOR_HANDLE}}</strong> structure that describes the {{GPU}} descriptor handle that represents the start of the heap for the unordered-access view to clear. </p> </dd> <dd> <p> A <strong>{{D3D12_CPU_DESCRIPTOR_HANDLE}}</strong> structure that describes the {{CPU}} descriptor handle that represents the start of the heap for the render target to clear. </p> </dd> <dd> <p> A reference to the <strong>{{ID3D12Resource}}</strong> interface that represents the unordered-access-view resource to clear. </p> </dd> <dd> <p> A 4-component array that containing the values to fill the unordered-access-view resource with. </p> </dd> <dd> <p> The number of rectangles in the array that the <em>pRects</em> parameter specifies. </p> </dd> <dd> <p> An array of <strong>{{D3D12_RECT}}</strong> structures for the rectangles in the resource view to clear. If <strong>{{NULL}}</strong>, <strong>ClearUnorderedAccessViewUint</strong> clears the entire resource view. </p> </dd> <p>Sets all the elements in a unordered access view to the specified float values.</p> <p> This method does not return a value. </p> <dd> <p> Describes the {{GPU}} descriptor handle that represents the start of the heap for the unordered-access view to clear. </p> </dd> <dd> <p> Describes the {{CPU}} descriptor handle that represents the start of the heap for the render target to clear. </p> </dd> <dd> <p> A reference to the <strong>{{ID3D12Resource}}</strong> interface that represents the unordered-access-view resource to clear. </p> </dd> <dd> <p> A 4-component array that containing the values to fill the unordered-access-view resource with. </p> </dd> <dd> <p> The number of rectangles in the array that the <em>pRects</em> parameter specifies. </p> </dd> <dd> <p> An array of <strong>{{D3D12_RECT}}</strong> structures for the rectangles in the resource view to clear. If <strong>{{NULL}}</strong>, <strong>ClearUnorderedAccessViewFloat</strong> clears the entire resource view. </p> </dd> <p>Discards a resource.</p> <p>The semantics of <strong>DiscardResource</strong> change based on the command list type.</p><p> For <strong>{{D3D12_COMMAND_LIST_TYPE_DIRECT}}</strong>, the following two rules apply: </p><ul> <li>When a resource has the <strong>{{D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET}}</strong> flag, <strong>DiscardResource</strong> must be called when the discarded subresource regions are in the <strong>{{D3D12_RESOURCE_STATE_RENDER_TARGET}}</strong> resource barrier state.</li> <li>When a resource has the <strong>{{D3D12_RESOURCE_FLAG}} _ALLOW_DEPTH_STENCIL</strong> flag, <strong>DiscardResource</strong> must be called when the discarded subresource regions are in the <strong>{{D3D12_RESOURCE_STATE_DEPTH_WRITE}}</strong>. </li> </ul><p>For <strong>{{D3D12_COMMAND_LIST_TYPE_COMPUTE}}</strong>, the following rule applies: </p><ul> <li>The resource must have the <strong>{{D3D12_RESOURCE_FLAG_ALLOW_UNORDERED_ACCESS}}</strong> flag, and <strong>DiscardResource</strong> must be called when the discarded subresource regions are in the <strong>{{D3D12_RESOURCE_STATE_UNORDERED_ACCESS}}</strong> resource barrier state.</li> </ul><p><strong>DiscardResource</strong> is not supported on command lists with either <strong>{{D3D12_COMMAND_LIST_TYPE_BUNDLE}}</strong> nor <strong>{{D3D12_COMMAND_LIST_TYPE_COPY}}</strong>.</p> <p> This method does not return a value. </p> <dd> <p> A reference to the <strong>{{ID3D12Resource}}</strong> interface for the resource to discard. </p> </dd> <dd> <p> A reference to a <strong>{{D3D12_DISCARD_REGION}}</strong> structure that describes details for the discard-resource operation. </p> </dd> <p>Starts a query running.</p> <p> In Direct3D 12, the usage of queries is more restricted than Direct3D 11. The following scenarios are no longer supported: </p><ul> <li> A call to <strong>BeginQuery</strong> followed by another call to <strong>BeginQuery</strong> without an intervening call to <strong>EndQuery</strong>. </li> <li> A call to <strong>EndQuery</strong> followed by <strong>EndQuery</strong> without an intervening call to <strong>BeginQuery</strong>. </li> </ul><p> Given these restrictions, there are 3 states that a query can be in: </p><ul> <li>Inactive (this is the initial state of all queries)</li> <li>Querying</li> <li>Predicating</li> </ul><p><strong>BeginQuery</strong> transitions a query from the inactive state to the querying state. <strong>EndQuery</strong> transitions a query from the querying state to the inactive state. <strong>SetPredication</strong> transitions the previous set query from the predicating state to the inactive state and transitions the newly set query from the inactive state to the predicating state. </p> <p> This method does not return a value. </p> <dd> <p> Specifies the <strong>{{ID3D12QueryHeap}}</strong> containing the query. </p> </dd> <dd> <p> Specifies one member of <strong>{{D3D12_QUERY_TYPE}}</strong>. </p> </dd> <dd> <p> Specifies the index of the query within the query heap. </p> </dd> <p> Ends a running query. </p> <p> Refer to the remarks for <strong>BeginQuery</strong>, and to Queries. </p> <p> This method does not return a value. </p> <dd> <p> Specifies the <strong>{{ID3D12QueryHeap}}</strong> containing the query. </p> </dd> <dd> <p> Specifies one member of <strong>{{D3D12_QUERY_TYPE}}</strong>. </p> </dd> <dd> <p> Specifies the index of the query in the query heap. </p> </dd> <p> </p><p> Extracts data from a query. <strong>ResolveQueryData</strong> works with all heap types (default, upload, and readback).? </p> <p><strong>ResolveQueryData</strong> performs a batched operation which writes query data into a destination buffer. Query data is written contiguously to the destination buffer, and the parameter. </p><p> Binary occlusion queries write 64-bits per query. The least significant bit is either 0 or 1. The rest of the bits are 0. </p><p>The core runtime will validate the following:</p><ul> <li><em>StartIndex</em> and <em>NumQueries</em> are within range. </li> <li><em>AlignedDestinationBufferOffset</em> is a multiple of 8 bytes. </li> <li><em>DestinationBuffer</em> is a buffer. </li> <li> The written data will not overflow the output buffer. </li> <li> The query type must be supported by the command list type. </li> <li> The query type must be supported by the query heap. </li> </ul><p> The debug layer will issue a warning if the destination buffer is not in the {{D3D12_RESOURCE_STATE_COPY_DEST}} state. </p> <p> This method does not return a value. </p> <dd> <p> Specifies the <strong>{{ID3D12QueryHeap}}</strong> containing the queries to resolve. </p> </dd> <dd> <p> Specifies the type of query, one member of <strong>{{D3D12_QUERY_TYPE}}</strong>. </p> </dd> <dd> <p> Specifies an index of the first query to resolve. </p> </dd> <dd> <p> Specifies the number of queries to resolve. </p> </dd> <dd> <p> Specifies an <strong>{{ID3D12Resource}}</strong> destination buffer, which must be in the state <strong>{{D3D12_RESOURCE_STATE_COPY_DEST}}</strong>. </p> </dd> <dd> <p> Specifies an alignment offset into the destination buffer. Must be a multiple of 8 bytes. </p> </dd> <p> Not intended to be called directly.? Use the {{PIX}} event runtime to insert events into a command list.</p> <p>This is a support method used internally by the {{PIX}} event runtime.? It is not intended to be called directly.</p><p>To insert instrumentation markers at the current location within a {{D3D12}} command list, use the <strong>{{PIXSetMarker}}</strong> function.? This is provided by the WinPixEventRuntime NuGet package.</p> <p> This method does not return a value. </p> <p> Not intended to be called directly.? Use the {{PIX}} event runtime to insert events into a command list.</p> <p>This is a support method used internally by the {{PIX}} event runtime.? It is not intended to be called directly.</p><p>To mark the end of an instrumentation region at the current location within a {{D3D12}} command list, use the <strong>{{PIXEndEvent}}</strong> function or <strong>{{PIXScopedEvent}}</strong> macro.? These are provided by the WinPixEventRuntime NuGet package.</p> <p> This method does not return a value. </p> <p> Apps perform indirect draws/dispatches using the <strong>ExecuteIndirect</strong> method. </p> <p>The semantics of this {{API}} are defined with the following pseudo-code:</p><p>Non-{{NULL}} pCountBuffer:</p><code>// Read draw count out of count buffer {{UINT}} CommandCount = pCountBuffer-&gt;ReadUINT32(CountBufferOffset); CommandCount = min(CommandCount, MaxCommandCount) // Get reference to first Commanding argument {{BYTE}}* Arguments = pArgumentBuffer-&gt;GetBase() + ArgumentBufferOffset; for({{UINT}} CommandIndex = 0; CommandIndex &lt; CommandCount; CommandIndex++) { // Interpret the data contained in *Arguments // according to the command signature pCommandSignature-&gt;Interpret(Arguments); Arguments += pCommandSignature -&gt;GetByteStride(); } </code><p>{{NULL}} pCountBuffer:</p><code>// Get reference to first Commanding argument {{BYTE}}* Arguments = pArgumentBuffer-&gt;GetBase() + ArgumentBufferOffset; for({{UINT}} CommandIndex = 0; CommandIndex &lt; MaxCommandCount; CommandIndex++) { // Interpret the data contained in *Arguments // according to the command signature pCommandSignature-&gt;Interpret(Arguments); Arguments += pCommandSignature -&gt;GetByteStride(); } </code><p>The debug layer will issue an error if either the count buffer or the argument buffer are not in the {{D3D12_RESOURCE_STATE_INDIRECT_ARGUMENT}} state. The core runtime will validate:</p><ul> <li><em>CountBufferOffset</em> and <em>ArgumentBufferOffset</em> are 4-byte aligned </li> <li><em>pCountBuffer</em> and <em>pArgumentBuffer</em> are buffer resources (any heap type) </li> <li> The offset implied by <em>MaxCommandCount</em>, <em>ArgumentBufferOffset</em>, and the drawing program stride do not exceed the bounds of <em>pArgumentBuffer</em> (similarly for count buffer) </li> <li>The command list is a direct command list or a compute command list (not a copy or {{JPEG}} decode command list)</li> <li>The root signature of the command list matches the root signature of the command signature</li> </ul><p> The functionality of two {{APIs}} from earlier versions of Direct3D, <code>DrawInstancedIndirect</code> and <code>DrawIndexedInstancedIndirect</code>, are encompassed by <strong>ExecuteIndirect</strong>. </p> <p> This method does not return a value. </p> <dd> <p> Specifies a <strong>{{ID3D12CommandSignature}}</strong>. The data referenced by <em>pArgumentBuffer</em> will be interpreted depending on the contents of the command signature. Refer to Indirect Drawing for the {{APIs}} that are used to create a command signature. </p> </dd> <dd> <p>There are two ways that command counts can be specified:</p> <ul> <li> If <em>pCountBuffer</em> is not {{NULL}}, then <em>MaxCommandCount</em> specifies the maximum number of operations which will be performed. The actual number of operations to be performed are defined by the minimum of this value, and a 32-bit unsigned integer contained in <em>pCountBuffer</em> (at the byte offset specified by <em>CountBufferOffset</em>). </li> <li> If <em>pCountBuffer</em> is {{NULL}}, the <em>MaxCommandCount</em> specifies the exact number of operations which will be performed. </li> </ul> </dd> <dd> <p> Specifies one or more <strong>{{ID3D12Resource}}</strong> objects, containing the command arguments. </p> </dd> <dd> <p> Specifies an offset into <em>pArgumentBuffer</em> to identify the first command argument. </p> </dd> <dd> <p> Specifies a reference to a <strong>{{ID3D12Resource}}</strong>. </p> </dd> <dd> <p> Specifies a {{UINT64}} that is the offset into <em>pCountBuffer</em>, identifying the argument count. </p> </dd> <p>Represents a virtual adapter; it is used to create command allocators, command lists, command queues, fences, resources, pipeline state objects, heaps, root signatures, samplers, and many resource views.</p><strong>Note</strong>??The latest version of this interface is <strong>{{ID3D12Device2}}</strong> introduced in the Windows 10 Creators Update. Applications targetting Windows 10 Creators Update should use the <strong>{{ID3D12Device2}}</strong> interface instead of <strong>{{ID3D12Device}}</strong>.? <p>Use <strong>{{D3D12CreateDevice}}</strong> to create a device. </p><p>For Windows 10 Anniversary some additional functionality is available through <strong>{{ID3D12Device1}}</strong>.</p> <p>This method configures the sample positions used by subsequent draw, copy, resolve, and similar operations.</p> <p>The operational semantics of sample positions are determined by the various draw, copy, resolve, and other operations that can occur.</p><p><strong>CommandList:</strong> In the absense of any prior calls to SetSamplePositions in a CommandList, samples assume the default position based on the Pipeline State Object ({{PSO}}). The default positions are determined either by the {{SAMPLE_DESC}} portion of the {{PSO}} if it is present, or by the standard sample positions if the {{RASTERIZER_DESC}} portion of the {{PSO}} has ForcedSampleCount set to a value greater than 0.</p><p>After SetSamplePosition has been called, subsequent draw calls must use a {{PSO}} that specifies a matching sample count either using the {{SAMPLE_DESC}} portion of the {{PSO}}, or ForcedSampleCount in the {{RASTERIZER_DESC}} portion of the {{PSO}}.</p><p>SetSamplePositions can only be called on a graphics CommandList. It can't be called in a bundle; bundles inherit sample position state from the calling CommandList and don't modify it.</p><p>Calling SetSamplePositions(0, 0, {{NULL}}) reverts the sample positions to their default values.</p><p><strong>Clear RenderTarget:</strong> Sample positions are ignored when clearing a render target.</p><p><strong>Clear DepthStencil:</strong> When clearing the depth portion of a depth-stencil surface or any region of it, the sample positions must be set to match those of future rendering to the cleared surface or region; the contents of any uncleared regions produced using different sample positions become undefined.</p><p>When clearing the stencil portion of a depth-stencil surface or any region of it, the sample positions are ignored.</p><p><strong>Draw to RenderTarget:</strong> When drawing to a render target the sample positions can be changed for each draw call, even when drawing to a region that overlaps previous draw calls. The current sample positions determine the operational semantics of each draw call and samples are taken from taken from the stored contents of the render target, even if the contents were produced using different sample positions.</p><p><strong>Draw using DepthStencil:</strong> When drawing to a depth-stencil surface (read or write) or any region of it, the sample positions must be set to match those used to clear the affected region previously. To use a different sample position, the target region must be cleared first. The pixels outside the clear region are unaffected.</p><p>Hardware may store the depth portion or a depth-stencil surface as plane equations, and evaluate them to produce depth values when the application issues a read. Only the rasterizer and output-merger are required to suport programmable sample positions of the depth portion of a depth-stencil surface. Any other read or write of the depth portion that has been rendered with sample positions set may ignore them and instead sample at the standard positions.</p><p><strong>Resolve RenderTarget:</strong> When resolving a render target or any region of it, the sample positions are ignored; these {{APIs}} operate only on stored color values.</p><p><strong>Resolve DepthStencil:</strong> When resolving the depth portion of a depth-stencil surface or any region of it, the sample positions must be set to match those of past rendering to the resolved surface or region. To use a different sample position, the target region must be cleared first.</p><p>When resolving the stencil portion of a depth-stencil surface or any region of it, the sample positions are ignored; stencil resolves operate only on stored stencil values.</p><p><strong>Copy RenderTarget:</strong> When copying from a render target, the sample positions are ignored regardless of whether it is a full or partial copy.</p><p><strong>Copy DepthStencil (Full Subresource):</strong> When copying a full subresource from a depth-stencil surface, the sample positions must be set to match the sample positions used to generate the source surface. To use a different sample position, the target region must be cleared first.</p><p>On some hardware properties of the source surface (such as stored plane equations for depth values) transfer to the destination. Therefore, if the destination surface is subsequently drawn to, the sample positions originally used to generate the source content need to be used with the destination surface. The {{API}} requires this on all hardware for consistency even if it may only apply to some.</p><p><strong>Copy DepthStencil (Partial Subresource):</strong> When copying a partial subresource from a depth-stencil surface, the sample positions must be set to match the sample positions used to generate the source surface, similarly to copying a full subresource. However, if the content of an affected destination subresources is only partially covered by the copy, the contents of the uncovered portion within those subresources becomes undefined unless all of it was generated using the same sample positions as the copy source. To use a different sample position, the target region must be cleared first.</p><p>When copying a partial subresource from the stencil portion of a depth-stencil surface, the sample postions are ignored. It doesn?t matter what sample positions were used to generate content for any other areas of the destination buffer not covered by the copy ? those contents remain valid.</p><p><strong>Shader SamplePos:</strong> The {{HLSL}} SamplePos intrinsic is not aware of programmable sample positions and results returned to shaders calling this on a surface rendered with programmable positions is undefined. Applications must pass coordinates into their shader manually if needed. Similarly evaluating attributes by sample index is undefined with programmable sample positions.</p><p><strong>Transitioning out of {{DEPTH_READ}} or {{DEPTH_WRITE}} state:</strong> If a subresource in {{DEPTH_READ}} or {{DEPTH_WRITE}} state is transitioned to any other state, including {{COPY_SOURCE}} or {{RESOLVE_SOURCE}}, some hardware might need to decompress the surface. Therefore, the sample positions must be set on the command list to match those used to generate the content in the source surface. Furthermore, for any subsequent transitions of the surface while the same depth data remains in it, the sample positions must continue to match those set on the command list. To use a different sample position, the target region must be cleared first.</p><p>If an application wants to minimize the decompressed area when only a portion needs to be used, or just to preserve compression, ResolveSubresourceRegion() can be called in {{DECOMPRESS}} mode with a rect specified. This will decompress just the relevant area to a separate resource leaving the source intact on some hardware, though on other hardware even the source area is decompressed. The separate explicitly decompressed resource can then be transitioned to the desired state (such as {{SHADER_RESOURCE}}).</p><p><strong>Transitioning out of {{RENDER_TARGET}} state:</strong> If a subresource in {{RENDER_TARGET}} state is transitioned to anything other than {{COPY_SOURCE}} or {{RESOLVE_SOURCE}}, some implementations may need to decompress the surface. This decompression is agnostic to sample positions.</p><p>If an application wants to minimize the decompressed area when only a portion needs to be used, or just to preserve compression, ResolveSubresourceRegion() can be called in {{DECOMPRESS}} mode with a rect specified. This will decompress just the relevant area to a separate resource leaving the source intact on some hardware, though on other hardware even the source area is decompressed. The separate explicitly decompressed resource can then be transitioned to the desired state (such as {{SHADER_RESOURCE}}).</p> <p>This method does not return a value.</p> <dd> <p>{{SAL:}} <code>_In_</code></p> <p>Specifies the number of samples to take, per pixel. This value can be 1, 2, 4, 8, or 16, otherwise the SetSamplePosition call is dropped. The number of samples must match the sample count configured in the {{PSO}} at draw time, otherwise the behavior is undefined.</p> </dd> <dd> <p>{{SAL:}} <code>_In_</code></p> <p>Specifies the number of pixels that sample patterns are being specified for. This value can be either 1 or 4, otherwise the SetSamplePosition call is dropped. A value of 1 configures a single sample pattern to be used for each pixel; a value of 4 configures separate sample patterns for each pixel in a 2x2 pixel grid which is repeated over the render-target or viewport space, aligned to even coordintes.</p> <p>Note that the maximum number of combined samples can't exceed 16, otherwise the call is dropped. If NumPixels is set to 4, NumSamplesPerPixel can specify no more than 4 samples.</p> </dd> <dd> <p>{{SAL:}} <code>_In_reads_(NumSamplesPerPixel*NumPixels)</code></p> <p>Specifies an array of {{D3D12_SAMPLE_POSITION}} elements. The size of the array is NumPixels * NumSamplesPerPixel. If NumPixels is set to 4, then the first group of sample positions corresponds to the upper-left pixel in the 2x2 grid of pixels; the next group of sample positions corresponds to the upper-right pixel, the next group to the lower-left pixel, and the final group to the lower-right pixel.</p> <p>If centroid interpolation is used during rendering, the order of positions for each pixel determines centroid-sampling prioritiy. That is, the first covered sample in the order specified is chosen as the centroid sample location.</p> </dd> <p> Updates mappings of tile locations in reserved resources to memory locations in a resource heap. </p> <p>Use <strong>UpdateTileMappings</strong> to map the virtual pages of a reserved resource to the physical pages of a heap. The mapping does not have to be in order. The operation is similar to <strong>{{ID3D11DeviceContext2::UpdateTileMappings}}</strong> with the one key difference that {{D3D12}} allows a reserved resource to have tiles from multiple heaps.</p><p> In a single call to <strong>UpdateTileMappings</strong>, you can map one or more ranges of resource tiles to one or more ranges of heap tiles. </p><p> You can organize the parameters of <strong>UpdateTileMappings</strong> in these ways to perform an update: </p><ul> <li><strong>Reserved resource whose mappings are updated.</strong> Mappings start off all {{NULL}} when a resource is initially created. </li> <li><strong>Set of tile regions on the reserved resource whose mappings are updated.</strong> You can make one <strong>UpdateTileMappings</strong> call to update many mappings or multiple calls with a bit more {{API}} call overhead as well if that is more convenient. <ul> <li><em>NumResourceRegions</em> specifies how many regions there are.</li> <li><em>pResourceRegionStartCoordinates</em> and <em>pResourceRegionSizes</em> are each arrays that identify the start location and extend of each region. If <em>NumResourceRegions</em> is 1, for convenience either or both of the arrays that describe the regions can be {{NULL}}. {{NULL}} for <em>pResourceRegionStartCoordinates</em> means the start coordinate is all 0s, and {{NULL}} for <em>pResourceRegionSizes</em> identifies a default region that is the full set of tiles for the entire reserved resource, including all mipmaps, array slices, or both. </li> <li> <p> If <em>pResourceRegionStartCoordinates</em> isn't {{NULL}} and <em>pResourceRegionSizes</em> is {{NULL}}, the region size defaults to 1 tile for all regions. This makes it easy to define mappings for a set of individual tiles each at disparate locations by providing an array of locations in <em>pResourceRegionStartCoordinates</em> without having to send an array of <em>pResourceRegionSizes</em> all set to 1. </p> </li> </ul> <p>The updates are applied from first region to last; so, if regions overlap in a single call, the updates later in the list overwrite the areas that overlap with previous updates.</p> </li> <li><strong>Heap that provides memory where tile mappings can go.</strong> If <strong>UpdateTileMappings</strong> only defines {{NULL}} mappings, you don't need to specify a heap.</li> <li><strong>Set of tile ranges where mappings are going.</strong> Each given tile range can specify one of a few types of ranges: a range of tiles in a heap (default), a count of tiles in the reserved resource to map to a single tile in a heap (sharing the tile), a count of tile mappings in the reserved resource to skip and leave as they are, or a count of tiles in the heap to map to {{NULL}}.<p><em>NumRanges</em> specifies the number of tile ranges, where the total tiles identified across all ranges must match the total number of tiles in the tile regions from the previously described reserved resource. Mappings are defined by iterating through the tiles in the tile regions in sequential order - x then y then z order for box regions - while walking through the set of tile ranges in sequential order. The breakdown of tile regions doesn't have to line up with the breakdown of tile ranges, but the total number of tiles on both sides must be equal so that each reserved resource tile specified has a mapping specified. </p> <p><em>pRangeFlags</em>, <em>pHeapRangeStartOffsets</em>, and <em>pRangeTileCounts</em> are all arrays, of size <em>NumRanges</em>, that describe the tile ranges. If <em>pRangeFlags</em> is {{NULL}}, all ranges are sequential tiles in the heap; otherwise, for each range i,<em>pRangeFlags[i]</em> identifies how the mappings in that range of tiles work: </p> <ul> <li> If <em>pRangeFlags[i]</em> is <strong>{{D3D12_TILE_RANGE_FLAG_NONE}}</strong>, that range defines sequential tiles in the heap, with the number of tiles being <em>pRangeTileCounts[i]</em> and the starting location <em>pHeapRangeStartOffsets[i]</em>. If <em>NumRanges</em> is 1, <em>pRangeTileCounts</em> can be {{NULL}} and defaults to the total number of tiles specified by all the tile regions. </li> <li> If <em>pRangeFlags[i]</em> is <strong>{{D3D12_TILE_RANGE_FLAG_REUSE_SINGLE_TILE}}</strong>, <em>pHeapRangeStartOffsets[i]</em> identifies the single tile in the heap to map to, and <em>pRangeTileCounts[i]</em> specifies how many tiles from the tile regions to map to that heap location. If <em>NumRanges</em> is 1, <em>pRangeTileCounts</em> can be {{NULL}} and defaults to the total number of tiles specified by all the tile regions. </li> <li> If <em>pRangeFlags[i]</em> is <strong>{{D3D12_TILE_RANGE_FLAG_NULL}}</strong>, <em>pRangeTileCounts[i]</em> specifies how many tiles from the tile regions to map to {{NULL}}. If <em>NumRanges</em> is 1, <em>pRangeTileCounts</em> can be {{NULL}} and defaults to the total number of tiles specified by all the tile regions. <em>pHeapRangeStartOffsets[i]</em> is ignored for {{NULL}} mappings. </li> <li> If <em>pRangeFlags[i]</em> is <strong>{{D3D12_TILE_RANGE_FLAG_SKIP}}</strong>, <em>pRangeTileCounts[i]</em> specifies how many tiles from the tile regions to skip over and leave existing mappings unchanged for. This can be useful if a tile region conveniently bounds an area of tile mappings to update except with some exceptions that need to be left the same as whatever they were mapped to before. <em>pHeapRangeStartOffsets[i]</em> is ignored for {{SKIP}} mappings. </li> </ul> </li> <li><strong>Flags parameter for overall options.</strong> <strong>{{D3D12_TILE_MAPPING_FLAG_NO_HAZARD}}</strong>. Refer to the description of this flag in <strong>{{D3D12_TILE_MAPPING_FLAGS}}</strong>.</li> </ul><p> Reserved resources must follow the same rules for tile aliasing, initialization, and data inheritance as placed resources. See <strong>CreatePlacedResource</strong> for more details.</p><p> Here are some examples of common <strong>UpdateTileMappings</strong> cases: </p> <p>This method does not return a value.</p> <dd> <p> A reference to the reserved resource. </p> </dd> <dd> <p> The number of reserved resource regions. </p> </dd> <dd> <p> An array of <strong>{{D3D12_TILED_RESOURCE_COORDINATE}}</strong> structures that describe the starting coordinates of the reserved resource regions. The <em>NumResourceRegions</em> parameter specifies the number of <strong>{{D3D12_TILED_RESOURCE_COORDINATE}}</strong> structures in the array. </p> </dd> <dd> <p> An array of <strong>{{D3D12_TILE_REGION_SIZE}}</strong> structures that describe the sizes of the reserved resource regions. The <em>NumResourceRegions</em> parameter specifies the number of <strong>{{D3D12_TILE_REGION_SIZE}}</strong> structures in the array. </p> </dd> <dd> <p> A reference to the resource heap. </p> </dd> <dd> <p> The number of tile ranges. </p> </dd> <dd> <p> A reference to an array of <strong>{{D3D12_TILE_RANGE_FLAGS}}</strong> values that describes each tile range. The <em>NumRanges</em> parameter specifies the number of values in the array. </p> </dd> <dd> <p> An array of offsets into the resource heap. These are 0-based tile offsets, counting in tiles (not bytes). </p> </dd> <dd> <p> An array of tiles. An array of values that specify the number of tiles in each tile range. The <em>NumRanges</em> parameter specifies the number of values in the array. </p> </dd> <dd> <p> A combination of <strong>{{D3D12_TILE_MAPPING_FLAGS}}</strong> values that are combined by using a bitwise {{OR}} operation. </p> </dd> <p>Copies mappings from a source reserved resource to a destination reserved resource.</p> <p>Use <strong>CopyTileMappings</strong> to copy the tile mappings from one reserved resource to another, either to duplicate a resource mapping, or to initialize a new mapping before modifying it using <strong>UpdateTileMappings</strong>.</p><p><strong>CopyTileMappings</strong> helps with tasks such as shifting mappings around within and across reserved resources, for example, scrolling tiles. The source and destination regions can overlap; the result of the copy in this situation is as if the source was saved to a temporary location and from there written to the destination. </p><p>The destination and the source regions must each entirely fit in their resource or behavior is undefined and the debug layer will emit an error.</p><p> For more info on tiled resources, refer to the "DirectX tiled resources" section within DirectX programming. </p> <p>This method does not return a value. If an {{E_OUTOFMEMORY}} occurs, the device is removed.</p> <dd> <p>A reference to the destination reserved resource.</p> </dd> <dd> <p> A reference to a <strong>{{D3D12_TILED_RESOURCE_COORDINATE}}</strong> structure that describes the starting coordinates of the destination reserved resource. </p> </dd> <dd> <p>A reference to the source reserved resource.</p> </dd> <dd> <p> A reference to a <strong>{{D3D12_TILED_RESOURCE_COORDINATE}}</strong> structure that describes the starting coordinates of the source reserved resource. </p> </dd> <dd> <p> A reference to a <strong>{{D3D12_TILE_REGION_SIZE}}</strong> structure that describes the size of the reserved region. </p> </dd> <dd> <p> One member of <strong>{{D3D12_TILE_MAPPING_FLAGS}}</strong>. </p> </dd> <p>Submits an array of command lists for execution.</p> <p> The driver is free to patch the submitted command lists. It is the calling application?s responsibility to ensure that the graphics processing unit ({{GPU}}) is not currently reading the any of the submitted command lists from a previous execution. </p><p> Applications are encouraged to batch together command list executions to reduce fixed costs associated with submitted commands to the {{GPU}}. </p> <p>This method does not return a value.</p> <dd> <p> The number of command lists to be executed. </p> </dd> <dd> <p> The array of <strong>{{ID3D12CommandList}}</strong> command lists to be executed. </p> </dd> <p> Not intended to be called directly.? Use the {{PIX}} event runtime to insert events into a command queue.</p> <p>This is a support method used internally by the {{PIX}} event runtime.? It is not intended to be called directly.</p><p>To insert instrumentation markers at the current location within a {{D3D12}} command queue, use the <strong>{{PIXSetMarker}}</strong> function.? This is provided by the WinPixEventRuntime NuGet package.</p> <p> This method does not return a value. </p> <p> Not intended to be called directly.? Use the {{PIX}} event runtime to insert events into a command queue.</p> <p>This is a support method used internally by the {{PIX}} event runtime.? It is not intended to be called directly.</p><p>To mark the start of an instrumentation region at the current location within a {{D3D12}} command queue, use the <strong>{{PIXBeginEvent}}</strong> function or <strong>{{PIXScopedEvent}}</strong> macro.? These are provided by the WinPixEventRuntime NuGet package.</p> <p> This method does not return a value. </p> <p> Not intended to be called directly.? Use the {{PIX}} event runtime to insert events into a command queue.</p> <p>This is a support method used internally by the {{PIX}} event runtime.? It is not intended to be called directly.</p><p>To mark the end of an instrumentation region at the current location within a {{D3D12}} command queue, use the <strong>{{PIXEndEvent}}</strong> function or <strong>{{PIXScopedEvent}}</strong> macro.? These are provided by the WinPixEventRuntime NuGet package.</p> <p> This method does not return a value. </p> <p>Waits until the specified fence reaches or exceeds the specified value.</p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> A reference to the <strong>{{ID3D12Fence}}</strong> object. </p> </dd> <dd> <p>The value that the command queue is waiting for the fence to reach or exceed. So when <strong>{{ID3D12Fence::GetCompletedValue}}</strong> is greater than or equal to <em>Value</em>, the wait is terminated.</p> </dd> <p>This method is used to determine the rate at which the {{GPU}} timestamp counter increments.</p> <p>For more information, refer to Timing.</p> <p> This method returns one of the Direct3D 12 Return Codes.</p> <dd> <p>The {{GPU}} timestamp counter frequency (in ticks/second).</p> </dd> <p>This method samples the {{CPU}} and {{GPU}} timestamp counters at the same moment in time. </p> <p>For more information, refer to Timing.</p> <p> This method returns one of the Direct3D 12 Return Codes.</p> <dd> <p>The value of the {{GPU}} timestamp counter.</p> </dd> <dd> <p>The value of the {{CPU}} timestamp counter.</p> </dd> <p> Gets the description of the command queue. </p> <p> The description of the command queue, as a <strong>{{D3D12_COMMAND_QUEUE_DESC}}</strong> structure. </p> <p>Represents a virtual adapter; it is used to create command allocators, command lists, command queues, fences, resources, pipeline state objects, heaps, root signatures, samplers, and many resource views.</p> <p>Use <strong>{{D3D12CreateDevice}}</strong> to create a device. </p><p>For Windows 10 Anniversary some additional functionality is available through <strong>{{ID3D12Device1}}</strong>.</p> <p> Reports the number of physical adapters (nodes) that are associated with this device. </p> <p> The number of physical adapters (nodes) that this device has. </p> <p>Creates a command queue.</p> <p> The <strong>{{REFIID}}</strong>, or <strong>{{GUID}}</strong>, of the interface to the command queue can be obtained by using the __uuidof() macro. For example, __uuidof({{ID3D12CommandQueue}}) will get the <strong>{{GUID}}</strong> of the interface to a command queue. </p> <p> This method returns <strong>{{E_OUTOFMEMORY}}</strong> if there is insufficient memory to create the command queue. See Direct3D 12 Return Codes for other possible return values. </p> <dd> <p> Specifies a {{D3D12_COMMAND_QUEUE_DESC}} that describes the command queue. </p> </dd> <dd> <p> The globally unique identifier ({{GUID}}) for the command queue interface. See remarks. An input parameter. </p> </dd> <dd> <p> A reference to a memory block that receives a reference to the <strong>{{ID3D12CommandQueue}}</strong> interface for the command queue. </p> </dd> <p>Creates a command allocator object.</p> <p> The device creates command lists from the command allocator. </p> <p> This method returns <strong>{{E_OUTOFMEMORY}}</strong> if there is insufficient memory to create the command allocator. See Direct3D 12 Return Codes for other possible return values. </p> <dd> <p> A <strong>{{D3D12_COMMAND_LIST_TYPE}}</strong>-typed value that specifies the type of command allocator to create. The type of command allocator can be the type that records either direct command lists or bundles. </p> </dd> <dd> <p> The globally unique identifier (<strong>{{GUID}}</strong>) for the command allocator interface (<strong>{{ID3D12CommandAllocator}}</strong>). The <strong>{{REFIID}}</strong>, or <strong>{{GUID}}</strong>, of the interface to the command allocator can be obtained by using the __uuidof() macro. For example, __uuidof({{ID3D12CommandAllocator}}) will get the <strong>{{GUID}}</strong> of the interface to a command allocator. </p> </dd> <dd> <p> A reference to a memory block that receives a reference to the <strong>{{ID3D12CommandAllocator}}</strong> interface for the command allocator. </p> </dd> <p>Creates a compute pipeline state object.</p> <p> This method returns <strong>{{E_OUTOFMEMORY}}</strong> if there is insufficient memory to create the pipeline state object. See Direct3D 12 Return Codes for other possible return values. </p> <dd> <p> A reference to a <strong>{{D3D12_COMPUTE_PIPELINE_STATE_DESC}}</strong> structure that describes compute pipeline state. </p> </dd> <dd> <p> The globally unique identifier (<strong>{{GUID}}</strong>) for the pipeline state interface (<strong>{{ID3D12PipelineState}}</strong>). The <strong>{{REFIID}}</strong>, or <strong>{{GUID}}</strong>, of the interface to the pipeline state can be obtained by using the __uuidof() macro. For example, __uuidof({{ID3D12PipelineState}}) will get the <strong>{{GUID}}</strong> of the interface to a pipeline state. </p> </dd> <dd> <p> A reference to a memory block that receives a reference to the <strong>{{ID3D12PipelineState}}</strong> interface for the pipeline state object. The pipeline state object is an immutable state object. It contains no methods. </p> </dd> <p> Gets information about the features that are supported by the current graphics driver.</p> <p>Refer to Capability Querying.</p> <p> Returns <strong>{{S_OK}}</strong> if successful; otherwise, returns <strong>{{E_INVALIDARG}}</strong> if an unsupported data type is passed to the <em>pFeatureSupportData</em> parameter or a size mismatch is detected for the <em>FeatureSupportDataSize</em> parameter. </p> <dd> <p> A <strong>{{D3D12_FEATURE}}</strong>-typed value that describes the feature to query for support. </p> </dd> <dd> <p> The passed structure is filled with data that describes the feature support. To see the structure types, see the Remarks section in <strong>{{D3D12_FEATURE}} enumeration</strong>. </p> </dd> <dd> <p> The size of the structure passed to the <em>pFeatureSupportData</em> parameter. </p> </dd> <p> Gets the size of the handle increment for the given type of descriptor heap. This value is typically used to increment a handle into a descriptor array by the correct amount.</p> <p>The descriptor size returned by this method is used as one input to the helper structures <strong>{{CD3DX12_CPU_DESCRIPTOR_HANDLE}}</strong> and <strong>{{CD3DX12_GPU_DESCRIPTOR_HANDLE}}</strong>.</p> <p> Returns the size of the handle increment for the given type of descriptor heap, including any necessary padding.</p> <dd> <p> The <strong>{{D3D12_DESCRIPTOR_HEAP_TYPE}}</strong>-typed value that specifies the type of descriptor heap to get the size of the handle increment for. </p> </dd> <p>Creates a shader-resource view for accessing data in a resource.</p> <p>Returns nothing.</p> <dd> <p>A reference to the <strong>{{ID3D12Resource}}</strong> object that represents the shader resource.</p> <p>At least one of <em>pResource</em> or <em>pDesc</em> must be provided. A null <em>pResource</em> is used to initialize a null descriptor, which guarantees {{D3D11}}-like null binding behavior (reading 0s, writes are discarded), but must have a valid <em>pDesc</em> in order to determine the descriptor type. </p> </dd> <dd> <p>A reference to a <strong>{{D3D12_SHADER_RESOURCE_VIEW_DESC}}</strong> structure that describes the shader-resource view. </p> <p>A null <em>pDesc</em> is used to initialize a default descriptor, if possible. This behavior is identical to the {{D3D11}} null descriptor behavior, where defaults are filled in. This behavior inherits the resource format and dimension (if not typeless) and for buffers {{SRVs}} target a full buffer and are typed (not raw or structured), and for textures {{SRVs}} target a full texture, all mips and all array slices. Not all resources support null descriptor initialization.</p> </dd> <dd> <p>Describes the {{CPU}} descriptor handle that represents the shader-resource view. This handle can be created in a shader-visible or non-shader-visible descriptor heap.</p> </dd> <p> Creates a view for unordered accessing. </p> <p> Returns nothing. </p> <dd> <p>A reference to the <strong>{{ID3D12Resource}}</strong> object that represents the unordered access. </p> <p>At least one of <em>pResource</em> or <em>pDesc</em> must be provided. A null <em>pResource</em> is used to initialize a null descriptor, which guarantees {{D3D11}}-like null binding behavior (reading 0s, writes are discarded), but must have a valid <em>pDesc</em> in order to determine the descriptor type. </p> </dd> <dd> <p> The <strong>{{ID3D12Resource}}</strong> for the counter (if any) associated with the {{UAV}}. </p> <p> If <em>pCounterResource</em> is not specified, the <strong>CounterOffsetInBytes</strong> member of the <strong>{{D3D12_BUFFER_UAV}}</strong> structure must be 0. </p> <p> If <em>pCounterResource</em> is specified, then there is a counter associated with the {{UAV}}, and the runtime performs validation of the following requirements: </p> <ul> <li> The <strong>StructureByteStride</strong> member of the <strong>{{D3D12_BUFFER_UAV}}</strong> structure must be greater than 0. </li> <li> The format must be {{DXGI_FORMAT_UNKNOWN}}. </li> <li> The {{D3D12_BUFFER_UAV_FLAG_RAW}} flag (a <strong>{{D3D12_BUFFER_UAV_FLAGS}}</strong> enumeration constant) must not be set. </li> <li> Both of the resources (<em>pResource</em> and <em>pCounterResource</em>) must be buffers. </li> <li> The <strong>CounterOffsetInBytes</strong> member of the <strong>{{D3D12_BUFFER_UAV}}</strong> structure must be a multiple of 4 bytes, and must be within the range of the counter resource. </li> <li><em>pResource</em> cannot be {{NULL}} </li> <li><em>pDesc</em> cannot be {{NULL}}. </li> </ul> </dd> <dd> <p>A reference to a <strong>{{D3D12_UNORDERED_ACCESS_VIEW_DESC}}</strong> structure that describes the unordered-access view. </p> <p>A null <em>pDesc</em> is used to initialize a default descriptor, if possible. This behavior is identical to the {{D3D11}} null descriptor behavior, where defaults are filled in. This behavior inherits the resource format and dimension (if not typeless) and for buffers {{UAVs}} target a full buffer and are typed, and for textures {{UAVs}} target the first mip and all array slices. Not all resources support null descriptor initialization.</p> </dd> <dd> <p>Describes the {{CPU}} descriptor handle that represents the start of the heap that holds the unordered-access view. </p> </dd> <p>Creates a render-target view for accessing resource data.</p> <p>Returns nothing.</p> <dd> <p>A reference to the <strong>{{ID3D12Resource}}</strong> object that represents the render target. </p> <p>At least one of <em>pResource</em> or <em>pDesc</em> must be provided. A null <em>pResource</em> is used to initialize a null descriptor, which guarantees {{D3D11}}-like null binding behavior (reading 0s, writes are discarded), but must have a valid <em>pDesc</em> in order to determine the descriptor type. </p> </dd> <dd> <p>A reference to a <strong>{{D3D12_RENDER_TARGET_VIEW_DESC}}</strong> structure that describes the render-target view.</p> <p>A null <em>pDesc</em> is used to initialize a default descriptor, if possible. This behavior is identical to the {{D3D11}} null descriptor behavior, where defaults are filled in. This behavior inherits the resource format and dimension (if not typeless) and {{RTVs}} target the first mip and all array slices. Not all resources support null descriptor initialization.</p> </dd> <dd> <p> Describes the {{CPU}} descriptor handle that represents the start of the heap that holds the render-target view. </p> </dd> <p>Create a sampler object that encapsulates sampling information for a texture.</p> <p>Returns nothing.</p> <dd> <p>A reference to a <strong>{{D3D12_SAMPLER_DESC}}</strong> structure that describes the sampler. </p> </dd> <dd> <p>Describes the {{CPU}} descriptor handle that represents the start of the heap that holds the sampler.</p> </dd> <p> Copies descriptors from a source to a destination. </p> <p> Returns nothing. </p> <dd> <p> The number of destination descriptor ranges to copy to. </p> </dd> <dd> <p> An array of {{CPU_descriptor_handle}} objects to copy to. </p> </dd> <dd> <p> An array of destination descriptor range sizes to copy to. </p> </dd> <dd> <p> The number of source descriptor ranges to copy from. </p> </dd> <dd> <p> An array of {{CPU_descriptor_handle}} objects to copy from. </p> </dd> <dd> <p> An array of source descriptor range sizes to copy from. </p> </dd> <dd> <p> The <strong>{{D3D12_DESCRIPTOR_HEAP_TYPE}}</strong>-typed value that specifies the type of descriptor heap to copy with. </p> </dd> <p> Copies descriptors from a source to a destination. </p> <p> Returns nothing. </p> <dd> <p> The number of descriptors to copy. </p> </dd> <dd> <p> A {{CPU_descriptor_handle}} that describes the destination descriptors to start to copy to. </p> </dd> <dd> <p> A {{CPU_descriptor_handle}} that describes the source descriptors to start to copy from. </p> </dd> <dd> <p> The <strong>{{D3D12_DESCRIPTOR_HEAP_TYPE}}</strong>-typed value that specifies the type of descriptor heap to copy with. </p> </dd> <p> Gets the size and alignment of memory required for a collection of resources on this adapter. </p> <p> When using <strong>CreatePlacedResource</strong>, the application must use this method to understand the size and alignment characteristics of texture resources. The results of this method vary depending on the particular adapter, and must be treated as unique to this adapter and driver version. </p><p> Applications cannot use the output of <strong>GetResourceAllocationInfo</strong> to understand packed mip properties of textures. To understand packed mip properties of textures, applications must use <strong>GetResourceTiling</strong>. Texture resource sizes significantly differ from the information returned by <strong>GetResourceTiling</strong>, because some adapter architectures allocate extra memory for textures to reduce the effective bandwidth during common rendering scenarios. This even includes textures that have constraints on their texture layouts or have standardized texture layouts. That extra memory cannot be sparsely mapped or remapped by an application using <strong>CreateReservedResource</strong> and <strong>UpdateTileMappings</strong>, so it isn't reported in <strong>GetResourceTiling</strong>. </p><p> Applications can forgo using <strong>GetResourceAllocationInfo</strong> for buffer resources (<strong>{{D3D12_RESOURCE_DIMENSION}}</strong>_BUFFER). Buffers have the same size on all adapters, which is merely the smallest multiple of 64KB which is greater or equal to <strong>{{D3D12_RESOURCE_DESC}}</strong>::<strong>Width</strong>. </p><p> When multiple resource descriptions are passed in, the C++ algorithm for calculating a structure size and alignment are used. For example, a three-element array with two tiny 64KB-aligned resources and a tiny 4MB-aligned resource reports differing sizes based on the order of the array. If the 4MB aligned resource is in the middle, the resulting <strong>Size</strong> is 12MB. Otherwise, the resulting <strong>Size</strong> is 8MB. The <strong>Alignment</strong> returned would always be 4MB, as it is the superset of all alignments in the resource array. </p> <p> Returns a <strong>{{D3D12_RESOURCE_ALLOCATION_INFO}}</strong> structure that provides info about video memory allocated for the specified array of resources. </p> <dd> <p> For single {{GPU}} operation, set this to zero. If there are multiple {{GPU}} nodes, set bits to identify the nodes (the device's physical adapters). Each bit in the mask corresponds to a single node. Refer to Multi-Adapter.</p> </dd> <dd> <p> The number of resource descriptors in the <em>pResourceDescs</em> array. </p> </dd> <dd> <p> An array of <strong>{{D3D12_RESOURCE_DESC}}</strong> structures that described the resources to get info about. </p> </dd> <p> Divulges the equivalent custom heap properties that are used for non-custom heap types, based on the adapter's architectural properties. </p> <p> Returns a <strong>{{D3D12_HEAP_PROPERTIES}}</strong> structure that provides properties for the specified heap. The <strong>Type</strong> member of the returned {{D3D12_HEAP_PROPERTIES}} is always {{D3D12_HEAP_TYPE_CUSTOM}}. </p><p> When <strong>{{D3D12_FEATURE_DATA_ARCHITECTURE}}</strong>::UMA is {{FALSE}}, the returned {{D3D12_HEAP_PROPERTIES}} members convert as follows: </p><table> <tr><th>Heap Type</th><th>How the returned {{D3D12_HEAP_PROPERTIES}} members convert</th></tr> <tr><td>{{D3D12_HEAP_TYPE_UPLOAD}}</td><td><strong>{{CPUPageProperty}}</strong> = {{WRITE_COMBINE}}, <strong>MemoryPoolPreference</strong> = {{L0}}.</td></tr> <tr><td>{{D3D12_HEAP_TYPE_DEFAULT}}</td><td><strong>{{CPUPageProperty}}</strong> = {{NOT_AVAILABLE}}, <strong>MemoryPoolPreference</strong> = {{L1}}.</td></tr> <tr><td>{{D3D12_HEAP_TYPE_READBACK}}</td><td><strong>{{CPUPageProperty}}</strong> = {{WRITE_BACK}}, <strong>MemoryPoolPreference</strong> = {{L0}}.</td></tr> </table><p>?</p><p> When {{D3D12_FEATURE_DATA_ARCHITECTURE::UMA}} is {{TRUE}} and {{D3D12_FEATURE_DATA_ARCHITECTURE::CacheCoherentUMA}} is {{FALSE}}, the returned {{D3D12_HEAP_PROPERTIES}} members convert as follows: </p><table> <tr><th>Heap Type</th><th>How the returned {{D3D12_HEAP_PROPERTIES}} members convert</th></tr> <tr><td>{{D3D12_HEAP_TYPE_UPLOAD}}</td><td><strong>{{CPUPageProperty}}</strong> = {{WRITE_COMBINE}}, <strong>MemoryPoolPreference</strong> = {{L0}}.</td></tr> <tr><td>{{D3D12_HEAP_TYPE_DEFAULT}}</td><td><strong>{{CPUPageProperty}}</strong> = {{NOT_AVAILABLE}}, <strong>MemoryPoolPreference</strong> = {{L0}}.</td></tr> <tr><td>{{D3D12_HEAP_TYPE_READBACK}}</td><td><strong>{{CPUPageProperty}}</strong> = {{WRITE_BACK}}, <strong>MemoryPoolPreference</strong> = {{L0}}.</td></tr> </table><p>?</p><p> When {{D3D12_FEATURE_DATA_ARCHITECTURE::UMA}} is {{TRUE}} and {{D3D12_FEATURE_DATA_ARCHITECTURE::CacheCoherentUMA}} is {{TRUE}}, the returned {{D3D12_HEAP_PROPERTIES}} members convert as follows: </p><table> <tr><th>Heap Type</th><th>How the returned {{D3D12_HEAP_PROPERTIES}} members convert</th></tr> <tr><td>{{D3D12_HEAP_TYPE_UPLOAD}}</td><td><strong>{{CPUPageProperty}}</strong> = {{WRITE_BACK}}, <strong>MemoryPoolPreference</strong> = {{L0}}.</td></tr> <tr><td>{{D3D12_HEAP_TYPE_DEFAULT}}</td><td><strong>{{CPUPageProperty}}</strong> = {{NOT_AVAILABLE}}, <strong>MemoryPoolPreference</strong> = {{L0}}.</td></tr> <tr><td>{{D3D12_HEAP_TYPE_READBACK}}</td><td><strong>{{CPUPageProperty}}</strong> = {{WRITE_BACK}}, <strong>MemoryPoolPreference</strong> = {{L0}}.</td></tr> </table><p>?</p> <dd> <p> For single-{{GPU}} operation, set this to zero. If there are multiple {{GPU}} nodes, set a bit to identify the node (the device's physical adapter). Each bit in the mask corresponds to a single node. Only 1 bit must be set. See Multi-Adapter. </p> </dd> <dd> <p> A <strong>{{D3D12_HEAP_TYPE}}</strong>-typed value that specifies the heap to get properties for. {{D3D12_HEAP_TYPE_CUSTOM}} is not supported as a parameter value. </p> </dd> <p> Creates both a resource and an implicit heap, such that the heap is big enough to contain the entire resource and the resource is mapped to the heap. </p> <p> This method creates both a resource and a heap, such that the heap is big enough to contain the entire resource and the resource is mapped to the heap. The created heap is known as an implicit heap, because the heap object cannot be obtained by the application. The application must ensure the {{GPU}} will no longer read or write to this resource before releasing the final reference on the resource. </p><p> The implicit heap is made resident for {{GPU}} access before the method returns to the application. See Residency. </p><p> The resource {{GPU}} {{VA}} mapping cannot be changed. See <strong>{{ID3D12CommandQueue::UpdateTileMappings}}</strong> and Volume Tiled Resources. </p><p> This method may be called by multiple threads concurrently. </p> <p> This method returns <strong>{{E_OUTOFMEMORY}}</strong> if there is insufficient memory to create the resource. For other possible return values, see Direct3D 12 Return Codes. </p> <dd> <p> A reference to a <strong>{{D3D12_HEAP_PROPERTIES}}</strong> structure that provides properties for the resource's heap. </p> </dd> <dd> <p> Heap options, as a bitwise-{{OR}}'d combination of <strong>{{D3D12_HEAP_FLAGS}}</strong> enumeration constants. </p> </dd> <dd> <p> A reference to a <strong>{{D3D12_RESOURCE_DESC}}</strong> structure that describes the resource. </p> </dd> <dd> <p> The initial state of the resource, as a bitwise-{{OR}}'d combination of <strong>{{D3D12_RESOURCE_STATES}}</strong> enumeration constants. </p> <p> When a resource is created together with a <strong>{{D3D12_HEAP_TYPE}}</strong>_UPLOAD heap, <em>InitialResourceState</em> must be <strong>{{D3D12_RESOURCE_STATE}}</strong>_GENERIC_READ. When a resource is created together with a {{D3D12_HEAP_TYPE_READBACK}} heap, <em>InitialResourceState</em> must be {{D3D12_RESOURCE_STATE_COPY_DEST}}. </p> </dd> <dd> <p> Specifies a <strong>{{D3D12_CLEAR_VALUE}}</strong> that describes the default value for a clear color. </p> <p><em>pOptimizedClearValue</em> specifies a value for which clear operations are most optimal. When the created resource is a texture with either the <strong>{{D3D12_RESOURCE_FLAG}}</strong>_ALLOW_RENDER_TARGET or {{D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL}} flags, applications should choose the value that the clear operation will most commonly be called with. Clear operations can be called with other values, but those operations will not be as efficient as when the value matches the one passed into resource creation. <em>pOptimizedClearValue</em> must be {{NULL}} when used with <strong>{{D3D12_RESOURCE_DIMENSION}}</strong>_BUFFER. </p> </dd> <dd> <p> The globally unique identifier (<strong>{{GUID}}</strong>) for the resource interface. This is an input parameter. The <strong>{{REFIID}}</strong>, or <strong>{{GUID}}</strong>, of the interface to the resource can be obtained by using the __uuidof() macro. For example, __uuidof(<strong>{{ID3D12Resource}}</strong>) will get the <strong>{{GUID}}</strong> of the interface to a resource. </p> <p> While riidResource is, most commonly, the {{GUID}} for <strong>{{ID3D12Resource}}</strong>, it may be any {{GUID}} for any interface. If the resource object doesn't support the interface for this {{GUID}}, creation will fail with {{E_NOINTERFACE}}. </p> </dd> <dd> <p> A reference to memory that receives the requested interface reference to the created resource object. <em>ppvResource</em> can be {{NULL}}, to enable capability testing. When <em>ppvResource</em> is {{NULL}}, no object will be created and {{S_FALSE}} will be returned when <em>pResourceDesc</em> is valid. </p> </dd> <p> Creates a heap that can be used with placed resources and reserved resources. </p> <p><strong>CreateHeap</strong> creates a heap that can be used with placed resources and reserved resources. Before releasing the final reference on the heap, the application must ensure that the {{GPU}} will no longer read or write to this heap. Placed resource objects will hold a reference on the heap they are created on, but reserved resources will not hold a reference for each mapping made to a heap. </p> <p> This method returns <strong>{{E_OUTOFMEMORY}}</strong> if there is insufficient memory to create the heap. See Direct3D 12 Return Codes for other possible return values. </p> <dd> <p> A reference to a <strong>{{D3D12_HEAP_DESC}}</strong> structure that describes the heap. </p> </dd> <dd> <p> The globally unique identifier (<strong>{{GUID}}</strong>) for the heap interface. This is an input parameter. The <strong>{{REFIID}}</strong>, or <strong>{{GUID}}</strong>, of the interface to the heap can be obtained by using the __uuidof() macro. For example, __uuidof(<strong>{{ID3D12Heap}}</strong>) will get the <strong>{{GUID}}</strong> of the interface to a heap. <em>riid</em> is, most commonly, the {{GUID}} for <strong>{{ID3D12Heap}}</strong>, but it may be any {{GUID}} for any interface. If the resource object does not support the interface for the specified {{GUID}}, creation will fail with {{E_NOINTERFACE}}. </p> </dd> <dd> <p> A reference to a memory block that receives a reference to the heap. <em>ppvHeap</em> can be {{NULL}}, to enable capability testing. When <em>ppvHeap</em> is {{NULL}}, no object will be created and {{S_FALSE}} will be returned when <em>pDesc</em> is valid. </p> </dd> <p> Creates a resource that is placed in a specific heap. Placed resources are the lightest weight resource objects available, and are the fastest to create and destroy. </p> <p><strong>CreatePlacedResource</strong> is similar to fully mapping a reserved resource to an offset within a heap; but the virtual address space associated with a heap may be reused as well. </p><p> Placed resources are lighter weight than committed resources to create and destroy, because no heap is created or destroyed during this operation. However, placed resources enable an even lighter weight technique to reuse memory than resource creation and destruction: reuse through aliasing and aliasing barriers. Multiple placed resources may simultaneously overlap each other on the same heap, but only a single overlapping resource can be used at a time. </p><p> There are two placed resource usage semantics, a simple model and an advanced model. The simple model is recommended, and is the most likely model for tool support, until the advanced model is proven to be required by the app. </p> <p> This method returns <strong>{{E_OUTOFMEMORY}}</strong> if there is insufficient memory to create the resource. See Direct3D 12 Return Codes for other possible return values. </p> <dd> <p> A reference to the <strong>{{ID3D12Heap}}</strong> interface that represents the heap in which the resource is placed. </p> </dd> <dd> <p> The offset, in bytes, to the resource. The <em>HeapOffset</em> must be a multiple of the resource's alignment, and <em>HeapOffset</em> plus the resource size must be smaller than or equal to the heap size. <strong>GetResourceAllocationInfo</strong> must be used to understand the sizes of texture resources. </p> </dd> <dd> <p> A reference to a <strong>{{D3D12_RESOURCE_DESC}}</strong> structure that describes the resource. </p> </dd> <dd> <p> The initial state of the resource, as a bitwise-{{OR}}'d combination of <strong>{{D3D12_RESOURCE_STATES}}</strong> enumeration constants. </p> <p> When a resource is created together with a {{D3D12_HEAP_TYPE_UPLOAD}} heap, <em>InitialState</em> must be {{D3D12_RESOURCE_STATE_GENERIC_READ}}. When a resource is created together with a {{D3D12_HEAP_TYPE_READBACK}} heap, <em>InitialState</em> must be {{D3D12_RESOURCE_STATE_COPY_DEST}}. </p> </dd> <dd> <p> Specifies a <strong>{{D3D12_CLEAR_VALUE}}</strong> that describes the default value for a clear color. </p> <p><em>pOptimizedClearValue</em> specifies a value for which clear operations are most optimal. When the created resource is a texture with either the {{D3D12_RESOURCE_FLAG_ALLOW_RENDER_TARGET}} or {{D3D12_RESOURCE_FLAG_ALLOW_DEPTH_STENCIL}} flags, applications should choose the value that the clear operation will most commonly be called with. Clear operations can be called with other values, but those operations will not be as efficient as when the value matches the one passed into resource creation. <em>pOptimizedClearValue</em> must be {{NULL}} when used with {{D3D12_RESOURCE_DIMENSION_BUFFER}}. </p> </dd> <dd> <p> The globally unique identifier (<strong>{{GUID}}</strong>) for the resource interface. This is an input parameter. </p> <p> The <strong>{{REFIID}}</strong>, or <strong>{{GUID}}</strong>, of the interface to the resource can be obtained by using the __uuidof() macro. For example, __uuidof(<strong>{{ID3D12Resource}}</strong>) will get the <strong>{{GUID}}</strong> of the interface to a resource. Although <strong>riid</strong> is, most commonly, the {{GUID}} for <strong>{{ID3D12Resource}}</strong>, it may be any {{GUID}} for any interface. If the resource object doesn't support the interface for this {{GUID}}, creation will fail with {{E_NOINTERFACE}}. </p> </dd> <dd> <p> A reference to a memory block that receives a reference to the resource. <em>ppvResource</em> can be {{NULL}}, to enable capability testing. When <em>ppvResource</em> is {{NULL}}, no object will be created and {{S_FALSE}} will be returned when <em>pResourceDesc</em> and other parameters are valid. </p> </dd> <p> Creates a shared handle to an heap, resource, or fence object. </p> <p> Both heaps and committed resources can be shared. Sharing a committed resource shares the implicit heap along with the committed resource description, such that a compatible resource description can be mapped to the heap from another device. </p> <p> Returns {{S_OK}} if successful; otherwise, returns one of the following values: </p><ul> <li>{{DXGI_ERROR_INVALID_CALL}} if one of the parameters is invalid. </li> <li>{{DXGI_ERROR_NAME_ALREADY_EXISTS}} if the supplied name of the resource to share is already associated with another resource. </li> <li>{{E_ACCESSDENIED}} if the object is being created in a protected namespace.</li> <li>{{E_OUTOFMEMORY}} if sufficient memory is not available to create the handle.</li> <li> Possibly other error codes that are described in the Direct3D 12 Return Codes topic. </li> </ul> <dd> <p> A reference to the <strong>{{ID3D12DeviceChild}}</strong> interface that represents the heap, resource, or fence object to create for sharing. The following interfaces (derived from <strong>{{ID3D12DeviceChild}}</strong>) are supported: </p> <ul> <li> <strong>{{ID3D12Heap}}</strong> </li> <li> <strong>{{ID3D12Resource}}</strong> </li> <li> <strong>{{ID3D12Fence}}</strong> </li> </ul> </dd> <dd> <p> A reference to a <strong>{{SECURITY_ATTRIBUTES}}</strong> structure that contains two separate but related data members: an optional security descriptor, and a <strong>Boolean</strong> value that determines whether child processes can inherit the returned handle. </p> <p> Set this parameter to <strong>{{NULL}}</strong> if you want child processes that the application might create to not inherit the handle returned by <strong>CreateSharedHandle</strong>, and if you want the resource that is associated with the returned handle to get a default security descriptor. </p> <p> The <strong>lpSecurityDescriptor</strong> member of the structure specifies a <strong>{{SECURITY_DESCRIPTOR}}</strong> for the resource. Set this member to <strong>{{NULL}}</strong> if you want the runtime to assign a default security descriptor to the resource that is associated with the returned handle. The {{ACLs}} in the default security descriptor for the resource come from the primary or impersonation token of the creator. For more info, see Synchronization Object Security and Access Rights. </p> </dd> <dd> <p>Currently the only value this parameter accepts is {{GENERIC_ALL}}.</p> </dd> <dd> <p> A <strong>{{NULL}}</strong>-terminated <strong>{{UNICODE}}</strong> string that contains the name to associate with the shared heap. The name is limited to {{MAX_PATH}} characters. Name comparison is case-sensitive. </p> <p> If <em>Name</em> matches the name of an existing resource, <strong>CreateSharedHandle</strong> fails with {{DXGI_ERROR_NAME_ALREADY_EXISTS}}. This occurs because these objects share the same namespace. </p> <p> The name can have a "Global\" or "Local\" prefix to explicitly create the object in the global or session namespace. The remainder of the name can contain any character except the backslash character (\). For more information, see Kernel Object Namespaces. Fast user switching is implemented using Terminal Services sessions. Kernel object names must follow the guidelines outlined for Terminal Services so that applications can support multiple users. </p> <p> The object can be created in a private namespace. For more information, see Object Namespaces. </p> </dd> <dd> <p> A reference to a variable that receives the {{NT}} {{HANDLE}} value to the resource to share. You can use this handle in calls to access the resource. </p> </dd> <p> Opens a handle for shared resources, shared heaps, and shared fences, by using {{HANDLE}} and {{REFIID}}. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> The handle that was output by the call to <strong>{{ID3D12Device::CreateSharedHandle}}</strong>. </p> </dd> <dd> <p> The globally unique identifier (<strong>{{GUID}}</strong>) for one of the following interfaces: </p> <ul> <li> <strong>{{ID3D12Heap}}</strong> </li> <li> <strong>{{ID3D12Resource}}</strong> </li> <li> <strong>{{ID3D12Fence}}</strong> </li> </ul> <p> The <strong>{{REFIID}}</strong>, or <strong>{{GUID}}</strong>, of the interface can be obtained by using the __uuidof() macro. For example, __uuidof({{ID3D12Heap}}) will get the <strong>{{GUID}}</strong> of the interface to a resource. </p> </dd> <dd> <p> A reference to a memory block that receives a reference to one of the following interfaces: </p> <ul> <li> <strong>{{ID3D12Heap}}</strong> </li> <li> <strong>{{ID3D12Resource}}</strong> </li> <li> <strong>{{ID3D12Fence}}</strong> </li> </ul> </dd> <p> Opens a handle for shared resources, shared heaps, and shared fences, by using Name and Access. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> The name that was optionally passed as the <em>Name</em> parameter in the call to <strong>{{ID3D12Device::CreateSharedHandle}}</strong>. </p> </dd> <dd> <p> The access level that was specified in the <em>Access</em> parameter in the call to <strong>{{ID3D12Device::CreateSharedHandle}}</strong>. </p> </dd> <dd> <p> Pointer to the shared handle. </p> </dd> <p>Makes objects resident for the device.</p> <p><strong>MakeResident</strong> loads the data associated with a resource from disk, and re-allocates the memory from the resource's appropriate memory pool. This method should be called on the object which owns the physical memory. </p><p>Use this method, and <strong>Evict</strong>, to manage {{GPU}} video memory, noting that this was done automatically in {{D3D11}}, but now has to be done by the app in {{D3D12}}.</p><p><strong>MakeResident</strong> and <strong>Evict</strong> can help applications manage the residency budget on many adapters. <strong>MakeResident</strong> explicitly pages-in data and, then, precludes page-out so the {{GPU}} can access the data. <strong>Evict</strong> enables page-out.</p><p>Some {{GPU}} architectures do not benefit from residency manipulation, due to the lack of sufficient {{GPU}} virtual address space. Use <strong>{{D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT}}</strong> and <strong>{{IDXGIAdapter3::QueryVideoMemoryInfo}}</strong> to recognize when the maximum {{GPU}} {{VA}} space per-process is too small or roughly the same size as the residency budget. For such architectures, the residency budget will always be constrained by the amount of {{GPU}} virtual address space. <strong>Evict</strong> will not free-up any residency budget on such systems. </p><p>Applications must handle <strong>MakeResident</strong> failures, even if there appears to be enough residency budget available. Physical memory fragmentation and adapter architecture quirks can preclude the utilization of large contiguous ranges. Applications should free up more residency budget before trying again. </p><p><strong>MakeResident</strong> is ref-counted, such that <strong>Evict</strong> must be called the same amount of times as <strong>MakeResident</strong> before <strong>Evict</strong> takes effect. Objects that support residency are made resident during creation, so a single <strong>Evict</strong> call will actually evict the object. </p><p>Applications must use fences to ensure the {{GPU}} doesn't use non-resident objects. <strong>MakeResident</strong> must return before the {{GPU}} executes a command list that references the object. <strong>Evict</strong> must be called after the {{GPU}} finishes executing a command list that references the object.</p><p>Evicted objects still consume the same {{GPU}} virtual address and same amount of {{GPU}} virtual address space. Therefore, resource descriptors and other {{GPU}} virtual address references are not invalidated after <strong>Evict</strong>.</p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> The number of objects in the <em>ppObjects</em> array to make resident for the device. </p> </dd> <dd> <p>A reference to a memory block that contains an array of <strong>{{ID3D12Pageable}}</strong> interface references for the objects. </p> <p>Even though most {{D3D12}} objects inherit from <strong>{{ID3D12Pageable}}</strong>, residency changes are only supported on the following objects: Descriptor Heaps, Heaps, Committed Resources, and Query Heaps</p> </dd> <p>Enables the page-out of data, which precludes {{GPU}} access of that data.</p> <p><strong>Evict</strong> persists the data associated with a resource to disk, and then removes the resource from the memory pool where it was located. This method should be called on the object which owns the physical memory: either a committed resource (which owns both virtual and physical memory assignments) or a heap - noting that reserved resources do not have physical memory, and placed resources are borrowing memory from a heap. </p><p>Refer to the remarks for <strong>MakeResident</strong>.</p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> The number of objects in the <em>ppObjects</em> array to evict from the device. </p> </dd> <dd> <p> A reference to a memory block that contains an array of <strong>{{ID3D12Pageable}}</strong> interface references for the objects. </p> <p>Even though most {{D3D12}} objects inherit from <strong>{{ID3D12Pageable}}</strong>, residency changes are only supported on the following objects: Descriptor Heaps, Heaps, Committed Resources, and Query Heaps</p> </dd> <p>Gets the reason that the device was removed.</p> <p>This method returns the reason that the device was removed.</p> <p> Gets a resource layout that can be copied. Helps the app fill-in <strong>{{D3D12_PLACED_SUBRESOURCE_FOOTPRINT}}</strong> and <strong>{{D3D12_SUBRESOURCE_FOOTPRINT}}</strong> when suballocating space in upload heaps. </p> <p> This routine assists the application in filling out <strong>{{D3D12_PLACED_SUBRESOURCE_FOOTPRINT}}</strong> and <strong>{{D3D12_SUBRESOURCE_FOOTPRINT}}</strong> structures, when suballocating space in upload heaps. The resulting structures are {{GPU}} adapter-agnostic, meaning that the values will not vary from one {{GPU}} adapter to the next. <strong>GetCopyableFootprints</strong> uses specified details about resource formats, texture layouts, and alignment requirements (from the <strong>{{D3D12_RESOURCE_DESC}}</strong> structure) to fill out the subresource structures. Applications have access to all these details, so this method, or a variation of it, could be written as part of the app. </p> <p> This method does not return a value. </p> <p> Creates a query heap. A query heap contains an array of queries. </p> <p> Refer to Queries for more information. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> Specifies the query heap in a <strong>{{D3D12_QUERY_HEAP_DESC}}</strong> structure. </p> </dd> <dd> <p> Specifies a {{REFIID}} that uniquely identifies the heap. </p> </dd> <dd> <p> Specifies a reference to the heap, that will be returned on successful completion of the method. <em>ppvHeap</em> can be {{NULL}}, to enable capability testing. When <em>ppvHeap</em> is {{NULL}}, no object will be created and {{S_FALSE}} will be returned when <em>pDesc</em> is valid. </p> </dd> <p>A development-time aid for certain types of profiling and experimental prototyping.</p> <p>This method is only useful during the development of applications. It enables developers to profile {{GPU}} usage of multiple algorithms without experiencing artifacts from dynamic frequency scaling.</p><p>Do not call this method in normal execution for a shipped application. This method only works while the machine is in developer mode. If developer mode is not enabled, then device removal will occur. Instead, call this method in response to an off-by-default, developer-facing switch. Calling it in response to command line parameters, config files, registry keys, and developer console commands are reasonable usage scenarios. </p><p>A stable power state typically fixes {{GPU}} clock rates at a slower setting that is significantly lower than that experienced by users under normal application load. This reduction in clock rate affects the entire system. Slow clock rates are required to ensure processors don?t exhaust power, current, and thermal limits. Normal usage scenarios commonly leverage a processors ability to dynamically over-clock. Any conclusions made by comparing two designs under a stable power state should be double-checked with supporting results from real usage scenarios.</p> <p>This method returns one of the Direct3D 12 Return Codes.</p> <dd> <p>Specifies a {{BOOL}} that turns the stable power state on or off.</p> </dd> <p> This method creates a command signature. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> Describes the command signature to be created with the <strong>{{D3D12_COMMAND_SIGNATURE_DESC}}</strong> structure. </p> </dd> <dd> <p>Specifies the <strong>{{ID3D12RootSignature}}</strong> that the command signature applies to. </p> <p>The root signature is required if any of the commands in the signature will update bindings on the pipeline. If the only command present is a draw or dispatch, the root signature parameter can be set to {{NULL}}.</p> </dd> <dd> <p> The globally unique identifier (<strong>{{GUID}}</strong>) for the command signature interface (<strong>{{ID3D12CommandSignature}}</strong>). The <strong>{{REFIID}}</strong>, or <strong>{{GUID}}</strong>, of the interface to the command signature can be obtained by using the __uuidof() macro. For example, __uuidof(<strong>{{ID3D12CommandSignature}}</strong>) will get the <strong>{{GUID}}</strong> of the interface to a command signature. </p> </dd> <dd> <p> Specifies a reference, that on successful completion of the method will point to the created command signature (<strong>{{ID3D12CommandSignature}}</strong>). </p> </dd> <p> Gets info about how a tiled resource is broken into tiles. </p> <p> To estimate the total resource size of textures needed when calculating heap sizes and calling <strong>CreatePlacedResource</strong>, use <strong>GetResourceAllocationInfo</strong> instead of <strong>GetResourceTiling</strong>. <strong>GetResourceTiling</strong> cannot be used for this. </p><p> For more information on tiled resources, refer to Volume Tiled Resources. </p> <p> This method does not return a value. </p> <dd> <p> Specifies a tiled <strong>{{ID3D12Resource}}</strong> to get info about. </p> </dd> <dd> <p> A reference to a variable that receives the number of tiles needed to store the entire tiled resource. </p> </dd> <dd> <p> A reference to a <strong>{{D3D12_PACKED_MIP_INFO}}</strong> structure that <strong>GetResourceTiling</strong> fills with info about how the tiled resource's mipmaps are packed. </p> </dd> <dd> <p> Specifies a <strong>{{D3D12_TILE_SHAPE}}</strong> structure that <strong>GetResourceTiling</strong> fills with info about the tile shape. This is info about how pixels fit in the tiles, independent of tiled resource's dimensions, not including packed mipmaps. If the entire tiled resource is packed, this parameter is meaningless because the tiled resource has no defined layout for packed mipmaps. In this situation, <strong>GetResourceTiling</strong> sets the members of {{D3D12_TILE_SHAPE}} to zeros. </p> </dd> <dd> <p> A reference to a variable that contains the number of tiles in the subresource. On input, this is the number of subresources to query tilings for; on output, this is the number that was actually retrieved at <em>pSubresourceTilingsForNonPackedMips</em> (clamped to what's available). </p> </dd> <dd> <p> The number of the first subresource tile to get. <strong>GetResourceTiling</strong> ignores this parameter if the number that <em>pNumSubresourceTilings</em> points to is 0. </p> </dd> <dd> <p> Specifies a <strong>{{D3D12_SUBRESOURCE_TILING}}</strong> structure that <strong>GetResourceTiling</strong> fills with info about subresource tiles. If subresource tiles are part of packed mipmaps, <strong>GetResourceTiling</strong> sets the members of {{D3D12_SUBRESOURCE_TILING}} to zeros, except the <em>StartTileIndexInOverallResource</em> member, which <strong>GetResourceTiling</strong> sets to {{D3D12_PACKED_TILE}} (0xffffffff). The {{D3D12_PACKED_TILE}} constant indicates that the whole <strong>{{D3D12_SUBRESOURCE_TILING}}</strong> structure is meaningless for this situation, and the info that the <em>pPackedMipDesc</em> parameter points to applies. </p> </dd> <p> Gets a locally unique identifier for the current device (adapter). </p> <p> This method returns a unique identifier for the adapter that is specific to the adapter hardware. Applications can use this identifier to define robust mappings across various {{APIs}} (Direct3D 12, {{DXGI}}). </p><p> A locally unique identifier ({{LUID}}) is a 64-bit value that is guaranteed to be unique only on the system on which it was generated. The uniqueness of a locally unique identifier ({{LUID}}) is guaranteed only until the system is restarted. </p> <p> The locally unique identifier for the adapter. </p> <p>Manages a pipeline library, in particular loading and retrieving individual {{PSOs}}.</p> <p>Refer to the remarks and examples for <strong>CreatePipelineLibrary</strong>. </p> <p>Adds the input {{PSO}} to an internal database with the corresponding name.</p> <p>Refer to the remarks and examples for <strong>CreatePipelineLibrary</strong>. </p> <p>This method returns an {{HRESULT}} success or error code, including {{E_INVALIDARG}} if the name already exists, {{E_OUTOFMEMORY}} if unable to allocate storage in the library. </p> <dd> <p>Specifies a unique name for the library. Overwriting is not supported.</p> </dd> <dd> <p>Specifies the <strong>{{ID3D12PipelineState}}</strong> to add.</p> </dd> <p>Retrieves the requested {{PSO}} from the library. </p> <p>Refer to the remarks and examples for <strong>CreatePipelineLibrary</strong>. </p> <p>This method returns an {{HRESULT}} success or error code, which can include {{E_INVALIDARG}} if the name doesn?t exist, or if the input description doesn?t match the data in the library, and {{E_OUTOFMEMORY}} if unable to allocate the return {{PSO}}. </p> <dd> <p>The unique name of the {{PSO}}.</p> </dd> <dd> <p>Specifies a description of the required {{PSO}} in a <strong>{{D3D12_GRAPHICS_PIPELINE_STATE_DESC}}</strong> structure. This input description is matched against the data in the current library database, and stored in order to prevent duplication of {{PSO}} contents.</p> </dd> <dd> <p>Specifies a {{REFIID}} for the <strong>{{ID3D12PipelineState}}</strong> object. Typically set this, and the following parameter, with the macro <code>{{IID_PPV_ARGS}}(&amp;{{PSO1}})</code>, where <em>{{PSO1}}</em> is the name of the object.</p> </dd> <dd> <p>Specifies a reference that will reference the returned {{PSO}}.</p> </dd> <p>Retrieves the requested {{PSO}} from the library. The input desc is matched against the data in the current library database, and remembered in order to prevent duplication of {{PSO}} contents. </p> <p>Refer to the remarks and examples for <strong>CreatePipelineLibrary</strong>. </p> <p>This method returns an {{HRESULT}} success or error code, which can include {{E_INVALIDARG}} if the name doesn?t exist, or if the input description doesn?t match the data in the library, and {{E_OUTOFMEMORY}} if unable to allocate the return {{PSO}}. </p> <dd> <p>The unique name of the {{PSO}}.</p> </dd> <dd> <p>Specifies a description of the required {{PSO}} in a <strong>{{D3D12_COMPUTE_PIPELINE_STATE_DESC}}</strong> structure. This input description is matched against the data in the current library database, and stored in order to prevent duplication of {{PSO}} contents.</p> </dd> <dd> <p>Specifies a {{REFIID}} for the <strong>{{ID3D12PipelineState}}</strong> object. Typically set this, and the following parameter, with the macro <code>{{IID_PPV_ARGS}}(&amp;{{PSO1}})</code>, where <em>{{PSO1}}</em> is the name of the object.</p> </dd> <dd> <p>Specifies a reference that will reference the returned {{PSO}}.</p> </dd> <p>Returns the amount of memory required to serialize the current contents of the database. </p> <p>Refer to the remarks and examples for <strong>CreatePipelineLibrary</strong>. </p> <p>This method returns a {{SIZE_T}} object, containing the size required in bytes.</p> <p>Writes the contents of the library to the provided memory, to be provided back to the runtime at a later time. </p> <p>Refer to the remarks and examples for <strong>CreatePipelineLibrary</strong>. </p> <p>This method returns an {{HRESULT}} success or error code, including {{E_INVALIDARG}} if the buffer provided isn?t big enough. </p> <dd> <p>Specifies a reference to the data. This memory must be readable and writeable up to the input size. This data can be saved and provided to <strong>CreatePipelineLibrary</strong> at a later time, including future instances of this or other processes. The data becomes invalidated if the runtime or driver is updated, and is not portable to other hardware or devices.</p> </dd> <dd> <p>The size provided must be at least the size returned from <strong>GetSerializedSize</strong>. </p> </dd> <p>Represents a virtual adapter; it is used to create command allocators, command lists, command queues, fences, resources, pipeline state objects, heaps, root signatures, samplers, and many resource views.</p><strong>Note</strong>??The latest version of this interface is <strong>{{ID3D12Device2}}</strong> introduced in the Windows 10 Creators Update. Applications targetting Windows 10 Creators Update should use the <strong>{{ID3D12Device2}}</strong> interface instead of <strong>{{ID3D12Device}}</strong>.? <p>Use <strong>{{D3D12CreateDevice}}</strong> to create a device. </p><p>For Windows 10 Anniversary some additional functionality is available through <strong>{{ID3D12Device1}}</strong>.</p> <p>Represents a virtual adapter, and expands on the range of methods provided by <strong>{{ID3D12Device}}</strong>.</p> <p>Use <strong>{{D3D12CreateDevice}}</strong> to create a device. </p> <p>Creates a cached pipeline library. By grouping {{PSOs}} that are expected to share data together into a library before serializing, there?s less overhead due to metadata, as well as opportunity to avoid redundant or duplicated data from being written to disk.</p> <p>A pipeline library enables the following operations.</p><ul> <li>Adding Pipeline State Objects ({{PSOs}}) to an existing library object (refer to <strong>StorePipeline</strong>). </li> <li>Serializing a {{PSO}} library into a contiguous block of memory for disk storage (refer to <strong>Serialize</strong>).</li> <li>De-serializing a {{PSO}} library from persistent storage (this is handled by <strong>CreatePipelineLibrary</strong>).</li> <li>Retrieving individual {{PSOs}} from the library (refer to <strong>LoadComputePipeline</strong> and <strong>LoadGraphicsPipeline</strong>).</li> </ul><p>At no point in the lifecycle of a pipeline library is there duplication between {{PSOs}} with identical sub-components. A recommended solution for managing the lifetime of the provided reference while only having to ref-count the returned interface is to leverage <strong>{{ID3D12Object::SetPrivateDataInterface}}</strong>, and use an object which implements <strong>{{IUnknown}}</strong>, and frees the memory when the ref-count reaches 0. </p> <p>This method returns an {{HRESULT}} success or error code, including {{E_INVALIDARG}} if the blob is corrupted or unrecognized, {{D3D12_ERROR_DRIVER_VERSION_MISMATCH}} if the provided data came from an old driver or runtime, and {{D3D12_ERROR_ADAPTER_NOT_FOUND}} if the data came from different hardware.</p><p>If you pass nullptr for <em>ppPipelineLibrary</em> then the runtime will still perform the validation of the blob but avoid creating the actual library and returns {{S_FALSE}} if the library would have been created.</p><p>Also, the feature requires an updated driver, and attempting to use it on old drivers will return {{E_NOTIMPL}}.</p> <dd> <p> If the input library blob is empty, the initial contents of the library is empty. If the input library blob is not empty, it is validated for integrity, parsed, and the reference is stored. The reference provided as input to this method must remain valid for the lifetime of the object returned. For efficiency reasons, the data is not copied. </p> </dd> <dd> <p>Specifies the length of <em>pLibraryBlob</em> in bytes.</p> </dd> <dd> <p>Specifies a unique {{REFIID}} for the <strong>{{ID3D12PipelineLibrary}}</strong> object. Typically set this and the following parameter with the macro <code>{{IID_PPV_ARGS}}(&amp;Library)</code>, where <em>Library</em> is the name of the object.</p> </dd> <dd> <p>Returns a reference to the created library.</p> </dd> <p>Specifies an event that should be fired when one or more of a collection of fences reach specific values.</p> <p>To specify a single fence refer to the <strong>SetEventOnCompletion</strong> method.</p> <p>This method returns an {{HRESULT}} success or error code.</p> <dd> <p>An array of length <em>NumFences</em> that specifies the <strong>{{ID3D12Fence}}</strong> objects.</p> </dd> <dd> <p>An array of length <em>NumFences</em> that specifies the fence values required for the event is to be signaled.</p> </dd> <dd> <p>Specifies the number of fences to be included.</p> </dd> <dd> <p>Specifies one of the <strong>{{D3D12_MULTIPLE_FENCE_WAIT_FLAGS}}</strong> that determines how to proceed.</p> </dd> <dd> <p>A handle to the event object.</p> </dd> <p> </p><p>This method sets residency priorities of a specified list of objects.</p> <p>For more information, refer to Residency.</p> <p>This method returns an {{HRESULT}} success or error code.</p> <dd> <p>Specifies the number of objects in the <em>ppObjects</em> and <em>pPriorities</em> arrays.</p> </dd> <dd> <p>Specifies an array, of length <em>NumObjects</em>, containing references to <strong>{{ID3D12Pageable}}</strong> objects.</p> </dd> <dd> <p>Specifies an array, of length <em>NumObjects</em>, of <strong>{{D3D12_RESIDENCY_PRIORITY}}</strong> values for the list of objects.</p> </dd> <p>Represents a virtual adapter; it is used to create command allocators, command lists, command queues, fences, resources, pipeline state objects, heaps, root signatures, samplers, and many resource views.</p><strong>Note</strong>??The latest version of this interface is <strong>{{ID3D12Device2}}</strong> introduced in the Windows 10 Creators Update. Applications targetting Windows 10 Creators Update should use the <strong>{{ID3D12Device2}}</strong> interface instead of <strong>{{ID3D12Device}}</strong>.? <p>Use <strong>{{D3D12CreateDevice}}</strong> to create a device. </p><p>For Windows 10 Anniversary some additional functionality is available through <strong>{{ID3D12Device1}}</strong>.</p> <p>Represents a virtual adapter; it is used to create command allocators, command lists, command queues, fences, resources, pipeline state objects, heaps, root signatures, samplers, and many resource views.</p><strong>Note</strong>??The latest version of this interface is <strong>{{ID3D12Device2}}</strong> introduced in the Windows 10 Creators Update. Applications targetting Windows 10 Creators Update should use the <strong>{{ID3D12Device2}}</strong> interface instead of <strong>{{ID3D12Device}}</strong>.? <p>Use <strong>{{D3D12CreateDevice}}</strong> to create a device. </p><p>For Windows 10 Anniversary some additional functionality is available through <strong>{{ID3D12Device1}}</strong>.</p> <p> Deserializes a root signature so you can determine the layout definition (<strong>{{D3D12_ROOT_SIGNATURE_DESC}}</strong>). </p> <p>This function has been superceded by <strong>{{D3D12CreateVersionedRootSignatureDeserializer}}</strong>.</p><p> If an application has a serialized root signature already or has a compiled shader that contains a root signature and wants to determine the layout definition, it can call <strong>{{D3D12CreateRootSignatureDeserializer}}</strong> to generate a <strong>{{ID3D12RootSignatureDeserializer}}</strong> interface. <strong>{{ID3D12RootSignatureDeserializer::GetRootSignature}}</strong> can return the deserialized data structure (<strong>{{D3D12_ROOT_SIGNATURE_DESC}}</strong>). <strong>{{ID3D12RootSignatureDeserializer}}</strong> just owns the lifetime of the memory for the deserialized data structure. </p><p> The <strong>{{REFIID}}</strong>, or <strong>{{GUID}}</strong>, of the interface to the root signature deserializer can be obtained by using the __uuidof() macro. For example, __uuidof(<strong>{{ID3D12RootSignatureDeserializer}}</strong>) will get the <strong>{{GUID}}</strong> of the interface to a root signature deserializer. </p><p> The function signature {{PFN_D3D12_CREATE_ROOT_SIGNATURE_DESERIALIZER}} is provided as a typedef, so that you can use dynamic linking techniques (GetProcAddress) instead of statically linking. </p> <p> Returns <strong>{{S_OK}}</strong> if successful; otherwise, returns one of the Direct3D 12 Return Codes. </p> <p> Serializes a root signature of any version that can be passed to <strong>{{ID3D12Device::CreateRootSignature}}</strong>. </p> <p> If an application procedurally generates a <strong>{{D3D12_ROOT_SIGNATURE_DESC1}}</strong> data structure, it must pass a reference to this <strong>{{D3D12_ROOT_SIGNATURE_DESC1}}</strong> in a call to <strong>{{D3D12SerializeVersionedRootSignature}}</strong> to make the serialized form. The application then passes the serialized form to which <em>ppBlob</em> points into <strong>{{ID3D12Device::CreateRootSignature}}</strong>. </p><p> If a shader has been authored with a root signature in it (when that capability is added), the compiled shader will contain a serialized root signature in it already. </p><p> The function signature {{PFN_D3D12_SERIALIZE_VERSIONED_ROOT_SIGNATURE}} is provided as a typedef, so that you can use dynamic linking techniques (GetProcAddress) instead of statically linking. </p><p>This function was released with the Windows 10 Anniversary Update (14393) and supersedes <strong>{{D3D12SerializeRootSignature}}</strong>.</p> <p> Returns <strong>{{S_OK}}</strong> if successful; otherwise, returns one of the Direct3D 12 Return Codes. </p> <p>Generates an interface that can return the deserialized data structure, via <strong>GetUnconvertedRootSignatureDesc</strong>.</p> <p> If an application has a serialized root signature already or has a compiled shader that contains a root signature and wants to determine the layout definition, it can call <strong>{{D3D12CreateVersionedRootSignatureDeserializer}}</strong> to generate a <strong>{{ID3D12VersionedRootSignatureDeserializer}}</strong> interface. <strong>{{ID3D12VersionedRootSignatureDeserializer::GetRootSignatureDescAtVersion}}</strong> can return the deserialized data structure (<strong>{{D3D12_ROOT_SIGNATURE_DESC1}}</strong>). <strong>{{ID3D12VersionedRootSignatureDeserializer}}</strong> just owns the lifetime of the memory for the deserialized data structure. </p><p> The <strong>{{REFIID}}</strong>, or <strong>{{GUID}}</strong>, of the interface to the root signature deserializer can be obtained by using the __uuidof() macro. For example, __uuidof(<strong>{{ID3D12VersionedRootSignatureDeserializer}}</strong>) will get the <strong>{{GUID}}</strong> of the interface to a root signature deserializer. </p><p> The function signature {{PFN_D3D12_CREATE_ROOT_SIGNATURE_DESERIALIZER}} is provided as a typedef, so that you can use dynamic linking techniques (GetProcAddress) instead of statically linking. </p><p>This function supercedes <strong>{{D3D12CreateRootSignatureDeserializer}}</strong>.</p> <p> Returns <strong>{{S_OK}}</strong> if successful; otherwise, returns one of the Direct3D 12 Return Codes. </p> <p> Gets a debug interface. </p> <p> The function signature {{PFN_D3D12_GET_DEBUG_INTERFACE}} is provided as a typedef, so that you can use dynamic linking techniques (GetProcAddress) instead of statically linking. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> The globally unique identifier (<strong>{{GUID}}</strong>) for the debug interface. The <strong>{{REFIID}}</strong>, or <strong>{{GUID}}</strong>, of the debug interface can be obtained by using the __uuidof() macro. For example, __uuidof(<strong>{{ID3D12Debug}}</strong>) will get the <strong>{{GUID}}</strong> of the debug interface. </p> </dd> <dd> <p> The debug interface, as a reference to reference to void. See <strong>{{ID3D12Debug}}</strong> and <strong>{{ID3D12DebugDevice}}</strong>. </p> </dd> <p>Generates an interface that can return the deserialized data structure, via <strong>GetUnconvertedRootSignatureDesc</strong>.</p> <p> If an application has a serialized root signature already or has a compiled shader that contains a root signature and wants to determine the layout definition, it can call <strong>{{D3D12CreateVersionedRootSignatureDeserializer}}</strong> to generate a <strong>{{ID3D12VersionedRootSignatureDeserializer}}</strong> interface. <strong>{{ID3D12VersionedRootSignatureDeserializer::GetRootSignatureDescAtVersion}}</strong> can return the deserialized data structure (<strong>{{D3D12_ROOT_SIGNATURE_DESC1}}</strong>). <strong>{{ID3D12VersionedRootSignatureDeserializer}}</strong> just owns the lifetime of the memory for the deserialized data structure. </p><p> The <strong>{{REFIID}}</strong>, or <strong>{{GUID}}</strong>, of the interface to the root signature deserializer can be obtained by using the __uuidof() macro. For example, __uuidof(<strong>{{ID3D12VersionedRootSignatureDeserializer}}</strong>) will get the <strong>{{GUID}}</strong> of the interface to a root signature deserializer. </p><p> The function signature {{PFN_D3D12_CREATE_ROOT_SIGNATURE_DESERIALIZER}} is provided as a typedef, so that you can use dynamic linking techniques (GetProcAddress) instead of statically linking. </p><p>This function supercedes <strong>{{D3D12CreateRootSignatureDeserializer}}</strong>.</p> <p> Returns <strong>{{S_OK}}</strong> if successful; otherwise, returns one of the Direct3D 12 Return Codes. </p> <p> Specifies options for the amount of information to report about a live device object's lifetime. </p> <p> This enumeration is used by <strong>{{ID3D12DebugDevice::ReportLiveDeviceObjects}}</strong>. </p> <dd></dd> <dd> <p>Obtain a summary about a live device object's lifetime. </p> </dd> <dd> <p>Obtain detailed information about a live device object's lifetime. </p> </dd> <dd> <p> Internal use only.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Specifies the data type of the memory pointed to by the <em>pData</em> parameter of <strong>{{ID3D12DebugDevice1::SetDebugParameter}}</strong> and <strong>{{ID3D12DebugDevice1::GetDebugParameter}}</strong>.</p> <p>Flags for optional {{D3D12}} Debug Layer features.</p> <p>This enum is used by <strong>{{ID3D12DebugDevice1::SetDebugParameter}}</strong> and <strong>{{ID3D12DebugDevice1::GetDebugParameter}}</strong>.</p> <dd> <p>The default. No optional Debug Layer features.</p> </dd> <dd> <p>The Debug Layer is allowed to deliberately change functional behavior of an application in order to help identify potential errors. By default, the Debug Layer allows most invalid {{API}} usage to run the natural course.</p> </dd> <dd> <p>Performs additional resource state validation of resources set in descriptors at the time <strong>{{ID3D12CommandQueue::ExecuteCommandLists}}</strong> is called. By design descriptors can be changed even after submitting command lists assuming proper synchronization. Conservative resource state tracking ignores this allowance and validates all resources used in descriptor tables when <strong>ExecuteCommandLists</strong> is called. The result may be false validation errors.</p> </dd> <dd> <p>Disables validation of bundle commands by virtually injecting checks into the calling command list validation paths.</p> </dd> <dd> <p>Internal use only.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Specifies the type of shader patching used by {{GPU}}-Based Validation at either the device or command list level.</p> <p>This enum is used by the <strong>{{D3D12_DEBUG_DEVICE_GPU_BASED_VALIDATION_SETTINGS}}</strong> structure.</p> <dd> <p>No shader patching is to be done. This will retain the original shader bytecode. Can lead to errors in some of the {{GPU}}-Based Validation state tracking as the unpatched shader may still change resource state (see Common state promotion) but the promotion will be untracked without patching the shader. This can improve performance but no validation will be performed and may also lead to misleading {{GPU}}-Based Validation errors. Use this mode very carefully. </p> </dd> <dd> <p>Shaders can be patched with resource state tracking code but no validation. This may improve performance but no validation will be performed.</p> </dd> <dd> <p>The default. Shaders are patched with validation code but erroneous instructions will still be executed. </p> </dd> <dd> <p>Shaders are patched with validation code and erroneous instructions are skipped in execution. This can help avoid crashes or device removal.</p> </dd> <dd> <p>Unused, simply the count of the number of modes.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Specifies how {{GPU}}-Based Validation handles patched pipeline states during <strong>{{ID3D12Device::CreateGraphicsPipelineState}}</strong> and <strong>{{ID3D12Device::CreateComputePipelineState}}</strong>.</p> <p>This enum is used by the <strong>{{D3D12_DEBUG_DEVICE_GPU_BASED_VALIDATION_SETTINGS}}</strong> structure.</p><p>Generally speaking most application developers are likely to leave this parameter unchanged. However, if the overhead of deferring patched {{PSO}} creation is suspected to be too much of a performance problem, then developers should consider changing this setting.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Indicates the debug parameter type used by <strong>{{ID3D12DebugCommandList1::SetDebugParameter}}</strong> and <strong>{{ID3D12DebugCommandList1::GetDebugParameter}}</strong>.</p> <p> Specifies categories of debug messages. This will identify the category of a message when retrieving a message with <strong>{{ID3D12InfoQueue::GetMessage}}</strong> and when adding a message with <strong>{{ID3D12InfoQueue::AddMessage}}</strong>. When creating an info queue filter, these values can be used to allow or deny any categories of messages to pass through the storage and retrieval filters. </p> <p>This is part of the Information Queue feature, refer to the <strong>{{ID3D12InfoQueue}}</strong> Interface.</p> <p> Debug message severity levels for an information queue.</p> <p> Use these values to allow or deny message categories to pass through the storage and retrieval filters for an information queue (see <strong>{{D3D12_INFO_QUEUE_FILTER}}</strong>). This {{API}} is used by <strong>AddApplicationMessage</strong> and <strong>AddMessage</strong>. </p> <dd> <p> Indicates a corruption error. </p> </dd> <dd> <p> Indicates an error. </p> </dd> <dd> <p> Indicates a warning. </p> </dd> <dd> <p> Indicates an information message. </p> </dd> <dd> <p> Indicates a message other than corruption, error, warning or information. </p> </dd> <p> Specifies debug message {{IDs}} for setting up an info-queue filter (see <strong>{{D3D12_INFO_QUEUE_FILTER}}</strong>); use these messages to allow or deny message categories to pass through the storage and retrieval filters. These {{IDs}} are used by methods such as <strong>{{ID3D12InfoQueue::GetMessage}}</strong> or <strong>{{ID3D12InfoQueue::AddMessage}}</strong>. </p> <p> This enum is used by <strong>AddMessage</strong>. </p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Describes settings used by {{GPU}}-Based Validation. </p> <p>Point to an object using this structure with the <em>pData</em> member of <strong>{{ID3D12DebugDevice1::SetDebugParameter}}</strong> to configure device-wide {{GPU}}-Based Validation settings. </p><p>Individual command lists can override the default shader patch mode using <strong>{{ID3D12DebugCommandList1::SetDebugParameter}}</strong>.</p> <dd> <p>Specifies a {{UINT}} that limits the number of messages that can be stored in the {{GPU}}-Based Validation message log. The default value is 256. Since many identical errors can be produced in a single Draw/Dispatch call it may be useful to increase this number. Note this can become a memory burden if a large number of command lists are used as there is a committed message log per command list.</p> </dd> <dd> <p>Specifies the <strong>{{D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE}}</strong> that {{GPU}}-Based Validation uses when injecting validation code into shaders, except when overridden by per-command-list {{GPU}}-Based Validation settings (see <strong>{{D3D12_DEBUG_COMMAND_LIST_GPU_BASED_VALIDATION_SETTINGS}}</strong>). The default value is {{D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE_UNGUARDED_VALIDATION}}.</p> </dd> <dd> <p>Specifies one of the <strong>{{D3D12_GPU_BASED_VALIDATION_PIPELINE_STATE_CREATE_FLAGS}}</strong> that indicates how {{GPU}}-Based Validation handles patching pipeline states. The default value is {{D3D12_GPU_BASED_VALIDATION_PIPELINE_STATE_CREATE_FLAG_NONE}}.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Describes per-command-list settings used by {{GPU}}-Based Validation. </p> <p> Point to an object using this structure with the <em>pData</em> member of <strong>{{ID3D12DebugCommandList1::SetDebugParameter}}</strong> to configure per-command-list {{GPU}}-Based Validation settings. </p> <dd> <p>Specifies a <strong>{{D3D12_GPU_BASED_VALIDATION_SHADER_PATCH_MODE}}</strong> that overrides the default device-level shader patch mode (see <strong>{{ID3D12DebugDevice1::SetDebugParameter}}</strong>). By default this value is initialized to the <em>DefaultShaderPatchMode</em> assigned to the device (see <strong>{{D3D12_DEBUG_DEVICE_GPU_BASED_VALIDATION_SETTINGS}}</strong>.</p> </dd> <p> A debug message in the Information Queue.</p> <p> This structure is returned from <strong>{{ID3D12InfoQueue::GetMessage}}</strong> as part of the Information Queue feature (see <strong>{{ID3D12InfoQueue}}</strong>). </p> <dd> <p> The category of the message. See <strong>{{D3D12_MESSAGE_CATEGORY}}</strong>. </p> </dd> <dd> <p> The severity of the message. See <strong>{{D3D12_MESSAGE_SEVERITY}}</strong>. </p> </dd> <dd> <p> The {{ID}} of the message. See <strong>{{D3D12_MESSAGE_ID}}</strong>. </p> </dd> <dd> <p> The message string. </p> </dd> <dd> <p> The length of <em>pDescription</em>, in bytes. </p> </dd> <p> Allow or deny certain types of messages to pass through a filter.</p> <p> For use with an <strong>{{ID3D12InfoQueue}}</strong> Interface.</p> <dd> <p>Number of message categories to allow or deny. </p> </dd> <dd> <p> Array of message categories to allow or deny. Array must have at least <em>NumCategories</em> members (see <strong>{{D3D12_MESSAGE_CATEGORY}}</strong>). </p> </dd> <dd> <p> Number of message severity levels to allow or deny. </p> </dd> <dd> <p> Array of message severity levels to allow or deny. Array must have at least <em>NumSeverities</em> members (see <strong>{{D3D12_MESSAGE_SEVERITY}}</strong>). </p> </dd> <dd> <p> Number of message {{IDs}} to allow or deny. </p> </dd> <dd> <p> Array of message {{IDs}} to allow or deny. Array must have at least <em>NumIDs</em> members (see <strong>{{D3D12_MESSAGE_ID}}</strong>). </p> </dd> <p> Debug message filter; contains a lists of message types to allow or deny.</p> <p> For use with an <strong>{{ID3D12InfoQueue}}</strong> Interface.</p> <dd> <p> Specifies types of messages that you want to allow. See <strong>{{D3D12_INFO_QUEUE_FILTER_DESC}}</strong>. </p> </dd> <dd> <p> Specifies types of messages that you want to deny. </p> </dd> <p> A debug interface controls debug settings and validates pipeline state. It can only be used if the debug layer is turned on. </p> <p>This interface is obtained by querying it from the <strong>{{ID3D12Device}}</strong> using <code>{{IUnknown::QueryInterface}}</code>. </p> <p> Enables the debug layer. </p> <p>To enable the debug layers using this {{API}}, it must be called before the {{D3D12}} device is created. Calling this {{API}} after creating the {{D3D12}} device will cause the {{D3D12}} runtime to remove the device.</p> <p> This method does not return a value. </p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Adds {{GPU}}-Based Validation and Dependent Command Queue Synchronization to the debug layer.</p> <p>This interface is currently in Preview mode.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Enables the debug layer.</p> <p>This method is identical to <strong>{{ID3D12Debug::EnableDebugLayer}}</strong>.</p> <p>This method does not return a value.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>This method enables or disables {{GPU}}-Based Validation ({{GBV}}) before creating a device with the debug layer enabled. </p> <p>{{GPU}}-Based Validation can only be enabled/disabled prior to creating a device. By default, {{GPU}}-Based Validation is disabled. To disable {{GPU}}-Based Validation after initially enabling it the device must be fully released and recreated. </p><p>For more information, see Using {{D3D12}} Debug Layer {{GPU}}-Based Validation.</p> <p>This method does not return a value.</p> <dd> <p>{{TRUE}} to enable {{GPU}}-Based Validation, otherwise {{FALSE}}.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Enables or disables dependent command queue synchronization when using a {{D3D12}} device with the debug layer enabled.</p> <p>Dependent Command Queue Synchronization is a {{D3D12}} Debug Layer feature that gives the debug layer the ability to track resource states more accurately when enabled. Dependent Command Queue Synchronization is enabled by default. </p><p>When Dependent Command Queue Synchronization is enabled, the debug layer holds back actual submission of {{GPU}} work until all outstanding fence <strong>Wait</strong> conditions are met. This gives the debug layer the ability to make reasonable assumptions about {{GPU}} state (such as resource states) on the {{CPU}}-timeline when multiple command queues are potentially doing concurrent work.</p><p>With Dependent Command Queue Synchronization disabled, all resource states tracked by the debug layer are cleared each time <strong>{{ID3D12CommandQueue::Signal}}</strong> is called. This results in significantly less useful resource state validation.</p><p>Disabling Dependent Command Queue Synchronization may reduce some debug layer performance overhead when using multiple command queues. However, it is suggested to leave it enabled unless this overhead is problematic. Note that applications that use only a single command queue will see no performance changes with Dependent Command Queue Synchronization disabled.</p> <p>This method does not return a value.</p> <dd> <p>{{TRUE}} to enable Dependent Command Queue Synchronization, otherwise {{FALSE}}.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Specifies device-wide debug layer settings.</p> <p>This interface is currently in Preview mode.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Modifies the {{D3D12}} optional device-wide Debug Layer settings.</p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p>Specifies a <strong>{{D3D12_DEBUG_DEVICE_PARAMETER_TYPE}}</strong> value that indicates which debug parameter data to get.</p> </dd> <dd> <p>Debug parameter data to set.</p> </dd> <dd> <p>Size in bytes of the data pointed to by <em>pData</em>.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets optional device-wide Debug Layer settings.</p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p>Specifies a <strong>{{D3D12_DEBUG_DEVICE_PARAMETER_TYPE}}</strong> value that indicates which debug parameter data to set.</p> </dd> <dd> <p>Points to the memory that will be filled with a copy of the debug parameter data. The interpretation of this data depends on the <strong>{{D3D12_DEBUG_DEVICE_PARAMETER_TYPE}}</strong> given in the <em>Type</em> parameter.</p> </dd> <dd> <p>Size in bytes of the memory buffer pointed to by <em>pData</em>.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Specifies the amount of information to report on a device object's lifetime.</p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p>A value from the <strong>{{D3D12_RLDO_FLAGS}}</strong> enumeration. This method uses the value in <em>Flags</em> to determine the amount of information to report about a device object's lifetime.</p> </dd> <p> This interface represents a graphics device for debugging. </p> <p> Set a bit field of flags that will turn debug features on and off. </p> <p> This method returns one of the Direct3D 12 Return Codes. <strong>{{HRESULT}}</strong> </p> <dd> <p> Feature-mask flags, as a bitwise-{{OR}}'d combination of <strong>{{D3D12_DEBUG_FEATURE}}</strong> enumeration constants. If a flag is present, that feature will be set to on; otherwise, the feature will be set to off. </p> </dd> <p> Gets a bit field of flags that indicates which debug features are on or off. </p> <p> Mask of feature-mask flags, as a bitwise {{OR}}'ed combination of <strong>{{D3D12_DEBUG_FEATURE}}</strong> enumeration constants. If a flag is present, then that feature will be set to on, otherwise the feature will be set to off. </p> <p> Reports information about a device object's lifetime. </p> <p> This method returns one of the Direct3D 12 Return Codes. <strong>{{HRESULT}}</strong> </p> <dd> <p> A value from the <strong>{{D3D12_RLDO_FLAGS}}</strong> enumeration. This method uses the value in <em>Flags</em> to determine the amount of information to report about a device object's lifetime. </p> </dd> <p> Provides methods to monitor and debug a command queue. </p> <p> Checks whether a resource, or subresource, is in a specified state, or not.</p> <p>This method is very similar to <strong>{{ID3D12DebugCommandList::AssertResourceState}}</strong>, however there are methods on the command queue that work directly with resources that might need to be monitored (for example <strong>{{ID3D13CommandQueue::CopyTileMappings}}</strong>).</p> <p> This method returns true if the resource or subresource is in the specified state, false otherwise. </p> <dd> <p> Specifies the <strong>{{ID3D12Resource}}</strong> to check.</p> </dd> <dd> <p> The index of the subresource to check. This can be set to an index, or {{D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES}}.</p> </dd> <dd> <p> Specifies the state to check for. This can be one or more {{D3D12_RESOURCE_STATES}} flags Or'ed together.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>This interface enables modification of additional command list debug layer settings.</p> <p>This interface is currently in Preview mode.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Validates that the given state matches the state of the subresource, assuming the state of the given subresource is known during recording of a command list (e.g. the resource was transitioned earlier in the same command list recording). If the state is not yet known this method sets the known state for further validation later in the same command list recording.</p> <p>Since execution of command lists occurs sometime after recording, the state of a resource often cannot be known during command list recording. <strong>AssertResourceState</strong> gives an application developer the ability to impose an assumed state on a resource or subresource at a fixed recording point in a command list.</p><p>Often the state of a resource or subresource can either be known due to a previous barrier or inferred-by-use (for example, was used in an earlier call to <strong>CopyBufferRegion</strong>) during command list recording. In such cases <strong>AssertResourceState</strong> can produce a debug message if the given state does not match the known or assumed state.</p><p>This {{API}} is for debug validation only and does not affect the actual runtime or {{GPU}} state of the resource.</p> <p>This method returns <strong>true</strong> if the tracked state of the resource or subresource matches the specified state, <strong>false</strong> otherwise.</p> <dd> <p>Specifies the <strong>{{ID3D12Resource}}</strong> to check.</p> </dd> <dd> <p>The index of the subresource to check. This can be set to an index, or {{D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES}}.</p> </dd> <dd> <p>Specifies the state to check for. This can be one or more <strong>{{D3D12_RESOURCE_STATES}}</strong> flags Or'ed together.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Modifies optional Debug Layer settings of a command list.</p> <p>Certain debug behaviors of {{D3D12}} Debug Layer can be modified by setting debug parameters. These can be used to toggle extra validation or expose experimental debug features.</p><p><strong>{{ID3D12DebugCommandList1::SetDebugParameter}}</strong> only impacts debug settings for the associated command list. For device-wide debug parameters see the <strong>{{ID3D12DebugDevice1::SetDebugParameter}}</strong> method.</p><p>Resetting a command list restores the debug parameters to the default values. This is because a command list reset is treated as equivalent to creating a new command list.</p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p>Specifies a <strong>{{D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE}}</strong> value that indicates which debug parameter data to set.</p> </dd> <dd> <p>Pointer to debug parameter data to set. The interpretation of this data depends on the <strong>{{D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE}}</strong> given in the <em>Type</em> parameter.</p> </dd> <dd> <p>Specifies the size in bytes of the debug parameter <em>pData</em>.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets optional Command List Debug Layer settings.</p> <p> Returns {{S_OK}} if successful, otherwise {{E_INVALIDARG}}. </p> <dd> <p>Specifies a <strong>{{D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE}}</strong> value that determines which debug parameter data to copy to the memory pointed to by <em>pData</em>.</p> </dd> <dd> <p>Points to the memory that will be filled with a copy of the debug parameter data. The interpretation of this data depends on the <strong>{{D3D12_DEBUG_COMMAND_LIST_PARAMETER_TYPE}}</strong> given in the <em>Type</em> parameter.</p> </dd> <dd> <p>Size in bytes of the memory buffer pointed to by <em>pData</em>.</p> </dd> <p> Provides methods to monitor and debug a command list.</p> <p> Checks whether a resource, or subresource, is in a specified state, or not.</p> <p>This method returns true if the resource or subresource is in the specified state, false otherwise.</p> <dd> <p>Specifies the <strong>{{ID3D12Resource}}</strong> to check.</p> </dd> <dd> <p>The index of the subresource to check. This can be set to an index, or {{D3D12_RESOURCE_BARRIER_ALL_SUBRESOURCES}}.</p> </dd> <dd> <p>Specifies the state to check for. This can be one or more {{D3D12_RESOURCE_STATES}} flags Or'ed together.</p> </dd> <p> Turns the debug features for a command list on or off.</p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> A combination of feature-mask flags that are combined by using a bitwise {{OR}} operation. If a flag is present, that feature will be set to on, otherwise the feature will be set to off. </p> </dd> <p> Returns the debug feature flags that have been set on a command list. </p> <p> A bit mask containing the set debug features. </p> <p> An information-queue interface stores, retrieves, and filters debug messages. The queue consists of a message queue, an optional storage filter stack, and a optional retrieval filter stack. </p> <p>This interface is obtained by querying it from the <strong>{{ID3D12Device}}</strong> using <code>{{IUnknown::QueryInterface}}</code>. </p> <p> Set the maximum number of messages that can be added to the message queue. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> Maximum number of messages that can be added to the message queue. -1 means no limit. When the number of messages in the message queue has reached the maximum limit, new messages coming in will push old messages out. </p> </dd> <p> Clear all messages from the message queue. </p> <p> This method does not return a value. </p> <p> Get a message from the message queue. </p> <p>This method does not remove any messages from the message queue. </p><p>This method gets messages from the message queue after an optional retrieval filter has been applied. </p><p>Applications should call this method twice to retrieve a message - first to obtain the size of the message and second to get the message. Here is a typical example: </p><code> // Get the size of the message {{SIZE_T}} messageLength = 0; {{HRESULT}} hr = pInfoQueue-&gt;GetMessage(0, {{NULL}}, &amp;messageLength); // Allocate space and get the message {{D3D12_MESSAGE}} * pMessage = ({{D3D12_MESSAGE}}*)malloc(messageLength); hr = pInfoQueue-&gt;GetMessage(0, pMessage, &amp;messageLength); </code> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p>Index into message queue after an optional retrieval filter has been applied. This can be between 0 and the number of messages in the message queue that pass through the retrieval filter (which can be obtained with <strong>GetNumStoredMessagesAllowedByRetrievalFilter</strong>). 0 is the message at the front of the message queue. </p> </dd> <dd> <p> Returned message.</p> </dd> <dd> <p>Size of <em>pMessage</em> in bytes. </p> </dd> <p> Get the number of messages that were allowed to pass through a storage filter. </p> <p> Number of messages allowed by a storage filter. </p> <p>Get the number of messages that were denied passage through a storage filter. </p> <p> Number of messages denied by a storage filter. </p> <p> Get the number of messages currently stored in the message queue. </p> <p> Number of messages currently stored in the message queue. </p> <p> Get the number of messages that are able to pass through a retrieval filter. </p> <p>Number of messages allowed by a retrieval filter. </p> <p> Get the number of messages that were discarded due to the message count limit. </p> <p>Get and set the message count limit with <strong>GetMessageCountLimit</strong> and <strong>SetMessageCountLimit</strong>, respectively. </p> <p> Number of messages discarded. </p> <p> Get the maximum number of messages that can be added to the message queue. </p> <p> Maximum number of messages that can be added to the queue. -1 means no limit. When the number of messages in the message queue has reached the maximum limit, new messages coming in will push old messages out. </p> <p> Add storage filters to the top of the storage-filter stack. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> Array of storage filters.</p> </dd> <p> Get the storage filter at the top of the storage-filter stack. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> Storage filter at the top of the storage-filter stack. </p> </dd> <dd> <p> Size of the storage filter in bytes. If <em>pFilter</em> is {{NULL}}, the size of the storage filter will be output to this parameter. </p> </dd> <p>Remove a storage filter from the top of the storage-filter stack. </p> <p> This method does not return a value. </p> <p> Push an empty storage filter onto the storage-filter stack. </p> <p>An empty storage filter allows all messages to pass through. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <p> Push a copy of storage filter currently on the top of the storage-filter stack onto the storage-filter stack. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <p> Push a storage filter onto the storage-filter stack. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> Pointer to a storage filter.</p> </dd> <p> Pop a storage filter from the top of the storage-filter stack. </p> <p> This method does not return a value. </p> <p> Get the size of the storage-filter stack in bytes. </p> <p> Size of the storage-filter stack in bytes. </p> <p> Add storage filters to the top of the retrieval-filter stack. </p> <p>The following code example shows how to use this method: </p><code> {{D3D12_MESSAGE_CATEGORY}} cats[] = { ..., ..., ... }; {{D3D12_MESSAGE_SEVERITY}} sevs[] = { ..., ..., ... }; {{UINT}} ids[] = { ..., ..., ... }; {{D3D12_INFO_QUEUE_FILTER}} filter; memset( &amp;filter, 0, sizeof(filter) ); // To set the type of messages to allow, // set filter.AllowList as follows: filter.AllowList.NumCategories = sizeof(cats / sizeof({{D3D12_MESSAGE_CATEGORY}})); filter.AllowList.pCategoryList = cats; filter.AllowList.NumSeverities = sizeof(sevs / sizeof({{D3D12_MESSAGE_SEVERITY}})); filter.AllowList.pSeverityList = sevs; filter.AllowList.NumIDs = sizeof(ids) / sizeof({{UINT}}); filter.AllowList.pIDList = ids; // To set the type of messages to deny, set filter.DenyList // similarly to the preceding filter.AllowList. // The following single call sets all of the preceding information. hr = infoQueue-&gt;AddRetrievalFilterEntries( &amp;filter ); </code> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p>Array of retrieval filters. </p> </dd> <p> Get the retrieval filter at the top of the retrieval-filter stack. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> Retrieval filter at the top of the retrieval-filter stack. </p> </dd> <dd> <p> Size of the retrieval filter in bytes. If <em>pFilter</em> is {{NULL}}, the size of the retrieval filter will be output to this parameter. </p> </dd> <p> Remove a retrieval filter from the top of the retrieval-filter stack. </p> <p> This method does not return a value. </p> <p> Push an empty retrieval filter onto the retrieval-filter stack. </p> <p>An empty retrieval filter allows all messages to pass through. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <p>Push a copy of retrieval filter currently on the top of the retrieval-filter stack onto the retrieval-filter stack. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <p> Push a retrieval filter onto the retrieval-filter stack. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> Pointer to a retrieval filter.</p> </dd> <p> Pop a retrieval filter from the top of the retrieval-filter stack. </p> <p> This method does not return a value. </p> <p> Get the size of the retrieval-filter stack in bytes. </p> <p> Size of the retrieval-filter stack in bytes. </p> <p>Adds a debug message to the message queue and sends that message to debug output. </p> <p>This method is used by the runtime's internal mechanisms to add debug messages to the message queue and send them to debug output. For applications to add their own custom messages to the message queue and send them to debug output, call <strong>{{ID3D12InfoQueue::AddApplicationMessage}}</strong>. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> Category of a message. </p> </dd> <dd> <p> Severity of a message. </p> </dd> <dd> <p> Unique identifier of a message. </p> </dd> <dd> <p> User-defined message. </p> </dd> <p> Adds a user-defined message to the message queue and sends that message to debug output. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> Severity of a message.</p> </dd> <dd> <p> Specifies the message string. </p> </dd> <p> Set a message category to break on when a message with that category passes through the storage filter. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> Message category to break on. </p> </dd> <dd> <p> Turns this breaking condition on or off (true for on, false for off). </p> </dd> <p> Set a message severity level to break on when a message with that severity level passes through the storage filter. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> A message severity level to break on. </p> </dd> <dd> <p> Turns this breaking condition on or off (true for on, false for off). </p> </dd> <p> Set a message identifier to break on when a message with that identifier passes through the storage filter. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> Message identifier to break on. </p> </dd> <dd> <p> Turns this breaking condition on or off (true for on, false for off). </p> </dd> <p> Get a message category to break on when a message with that category passes through the storage filter. </p> <p> Whether this breaking condition is turned on or off (true for on, false for off). </p> <dd> <p> Message category to break on. </p> </dd> <p>Get a message severity level to break on when a message with that severity level passes through the storage filter. </p> <p> Whether this breaking condition is turned on or off (true for on, false for off). </p> <dd> <p> Message severity level to break on.</p> </dd> <p> Get a message identifier to break on when a message with that identifier passes through the storage filter. </p> <p> Whether this breaking condition is turned on or off (true for on, false for off). </p> <dd> <p> Message identifier to break on. </p> </dd> <p> Set a boolean that turns the debug output on or off. </p> <p>This will stop messages that pass the storage filter from being printed out in the debug output, however those messages will still be added to the message queue. </p> <p> This method does not return a value. </p> <dd> <p> Disable/Enable the debug output (true to disable or mute the output, false to enable the output). </p> </dd> <p> Get a boolean that determines if debug output is on or off. </p> <p> Whether the debug output is on or off (true for on, false for off). </p> <p>Options for the amount of information to report about a device object's lifetime.</p> <p> This enumeration is used by <strong>{{ID3D11Debug::ReportLiveDeviceObjects}}</strong>. </p><p> Several inline functions exist to combine the options using operators, see the {{D3D11SDKLayers}}.h header file for details. </p> <dd> <p> Specifies to obtain a summary about a device object's lifetime. </p> </dd> <dd> <p> Specifies to obtain detailed information about a device object's lifetime. </p> </dd> <dd> <p> Do not use this enumeration constant. It is for internal use only. </p> </dd> <p>Indicates which resource types to track.</p> <p>The <strong>{{ID3D11TracingDevice::SetShaderTrackingOptionsByType}}</strong> or <strong>{{ID3D11RefDefaultTrackingOptions::SetTrackingOptions}}</strong> method tracks a specific type of resource.</p><strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <dd> <p>No resource types are tracked.</p> </dd> <dd> <p>Track device memory that is created with unordered access view ({{UAV}}) bind flags.</p> </dd> <dd> <p>Track device memory that is created without {{UAV}} bind flags.</p> </dd> <dd> <p>Track all device memory.</p> </dd> <dd> <p>Track all shaders that use group shared memory.</p> </dd> <dd> <p>Track all device memory except device memory that is created without {{UAV}} bind flags.</p> </dd> <dd> <p>Track all device memory except device memory that is created with {{UAV}} bind flags.</p> </dd> <dd> <p>Track all memory on the device.</p> </dd> <p>Options that specify how to perform shader debug tracking.</p> <p> This enumeration is used by the following methods: </p><ul> <li> <strong>{{ID3D11RefDefaultTrackingOptions::SetTrackingOptions}}</strong> </li> <li> <strong>{{ID3D11RefTrackingOptions::SetTrackingOptions}}</strong> </li> <li> <strong>{{ID3D11TracingDevice::SetShaderTrackingOptions}}</strong> </li> <li> <strong>{{ID3D11TracingDevice::SetShaderTrackingOptionsByType}}</strong> </li> </ul><strong>Note</strong>?? This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <dd> <p>No debug tracking is performed.</p> </dd> <dd> <p>Track the reading of uninitialized data.</p> </dd> <dd> <p>Track read-after-write hazards.</p> </dd> <dd> <p>Track write-after-read hazards.</p> </dd> <dd> <p>Track write-after-write hazards.</p> </dd> <dd> <p>Track that hazards are allowed in which data is written but the value does not change.</p> </dd> <dd> <p>Track that only one type of atomic operation is used on an address.</p> </dd> <dd> <p>Track read-after-write hazards across thread groups.</p> </dd> <dd> <p>Track write-after-read hazards across thread groups.</p> </dd> <dd> <p>Track write-after-write hazards across thread groups.</p> </dd> <dd> <p>Track that only one type of atomic operation is used on an address across thread groups.</p> </dd> <dd> <p>Track hazards that are specific to unordered access views ({{UAVs}}).</p> </dd> <dd> <p>Track all hazards.</p> </dd> <dd> <p>Track all hazards and track that hazards are allowed in which data is written but the value does not change.</p> </dd> <dd> <p> All of the preceding tracking options are set except <strong>{{D3D11_SHADER_TRACKING_OPTION_IGNORE}}</strong>. </p> </dd> <p>Categories of debug messages. This will identify the category of a message when retrieving a message with <strong>{{ID3D11InfoQueue::GetMessage}}</strong> and when adding a message with <strong>{{ID3D11InfoQueue::AddMessage}}</strong>. When creating an <strong>info queue filter</strong>, these values can be used to allow or deny any categories of messages to pass through the storage and retrieval filters.</p> <p>This is part of the Information Queue feature. See <strong>{{ID3D11InfoQueue}} Interface</strong>.</p> <p>Debug message severity levels for an information queue.</p> <p>Use these values to allow or deny message categories to pass through the storage and retrieval filters for an information queue (see <strong>{{D3D11_INFO_QUEUE_FILTER}}</strong>). This {{API}} is used by <strong>{{ID3D11InfoQueue::AddApplicationMessage}}</strong>.</p> <dd> <p>Defines some type of corruption which has occurred.</p> </dd> <dd> <p>Defines an error message.</p> </dd> <dd> <p>Defines a warning message.</p> </dd> <dd> <p>Defines an information message.</p> </dd> <dd> <p>Defines a message other than corruption, error, warning, or information.</p> <p><strong>Direct3D 11:??</strong>This value is not supported until Direct3D 11.1.</p> </dd> <p>A debug message in the Information Queue.</p> <p>This structure is returned from <strong>{{ID3D11InfoQueue::GetMessage}}</strong> as part of the Information Queue feature (see <strong>{{ID3D11InfoQueue}} Interface</strong>).</p> <dd> <p>The category of the message. See <strong>{{D3D11_MESSAGE_CATEGORY}}</strong>.</p> </dd> <dd> <p>The severity of the message. See <strong>{{D3D11_MESSAGE_SEVERITY}}</strong>.</p> </dd> <dd> <p>The {{ID}} of the message. See <strong>{{D3D11_MESSAGE_ID}}</strong>.</p> </dd> <dd> <p>The message string.</p> </dd> <dd> <p>The length of pDescription in bytes.</p> </dd> <p>Allow or deny certain types of messages to pass through a filter.</p> <dd> <p>Number of message categories to allow or deny.</p> </dd> <dd> <p>Array of message categories to allow or deny. Array must have at least NumCategories members (see <strong>{{D3D11_MESSAGE_CATEGORY}}</strong>).</p> </dd> <dd> <p>Number of message severity levels to allow or deny.</p> </dd> <dd> <p>Array of message severity levels to allow or deny. Array must have at least NumSeverities members (see <strong>{{D3D11_MESSAGE_SEVERITY}}</strong>).</p> </dd> <dd> <p>Number of message {{IDs}} to allow or deny.</p> </dd> <dd> <p>Array of message {{IDs}} to allow or deny. Array must have at least NumIDs members (see <strong>{{D3D11_MESSAGE_ID}}</strong>).</p> </dd> <p>Allow or deny certain types of messages to pass through a filter.</p> <dd> <p>Number of message categories to allow or deny.</p> </dd> <dd> <p>Array of message categories to allow or deny. Array must have at least NumCategories members (see <strong>{{D3D11_MESSAGE_CATEGORY}}</strong>).</p> </dd> <dd> <p>Number of message severity levels to allow or deny.</p> </dd> <dd> <p>Array of message severity levels to allow or deny. Array must have at least NumSeverities members (see <strong>{{D3D11_MESSAGE_SEVERITY}}</strong>).</p> </dd> <dd> <p>Number of message {{IDs}} to allow or deny.</p> </dd> <dd> <p>Array of message {{IDs}} to allow or deny. Array must have at least NumIDs members (see <strong>{{D3D11_MESSAGE_ID}}</strong>).</p> </dd> <p>A debug interface controls debug settings, validates pipeline state and can only be used if the debug layer is turned on.</p> <p> This interface is obtained by querying it from the <strong>{{ID3D11Device}}</strong> using <strong>{{IUnknown::QueryInterface}}</strong>. </p><p> For more information about the debug layer, see Debug Layer. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Set a bit field of flags that will turn debug features on and off.</p> <strong>Note</strong>??If you call this {{API}} in a Session 0 process, it returns <strong>{{DXGI_ERROR_NOT_CURRENTLY_AVAILABLE}}</strong>.?<p>Setting one of the following feature-mask flags will cause a rendering-operation method (listed below) to do some extra task when called. </p><table> <tr><td>{{D3D11_DEBUG_FEATURE_FINISH_PER_RENDER_OP}} (0x2)</td><td>Application will wait for the {{GPU}} to finish processing the rendering operation before continuing.</td></tr> <tr><td>{{D3D11_DEBUG_FEATURE_FLUSH_PER_RENDER_OP}} (0x1)</td><td>Runtime will additionally call <strong>{{ID3D11DeviceContext::Flush}}</strong>.</td></tr> <tr><td>{{D3D11_DEBUG_FEATURE_PRESENT_PER_RENDER_OP}} (0x4)</td><td>Runtime will call <strong>{{IDXGISwapChain::Present}}</strong>. Presentation of render buffers will occur according to the settings established by prior calls to <strong>{{ID3D11Debug::SetSwapChain}}</strong> and <strong>{{ID3D11Debug::SetPresentPerRenderOpDelay}}</strong>.</td></tr> </table><p>?</p><p>These feature-mask flags apply to the following rendering-operation methods:</p><ul> <li> <strong>{{ID3D11DeviceContext::Draw}}</strong> </li> <li> <strong>{{ID3D11DeviceContext::DrawIndexed}}</strong> </li> <li> <strong>{{ID3D11DeviceContext::DrawInstanced}}</strong> </li> <li> <strong>{{ID3D11DeviceContext::DrawIndexedInstanced}}</strong> </li> <li> <strong>{{ID3D11DeviceContext::DrawAuto}}</strong> </li> <li> <strong>{{ID3D11DeviceContext::ClearRenderTargetView}}</strong> </li> <li> <strong>{{ID3D11DeviceContext::ClearDepthStencilView}}</strong> </li> <li> <strong>{{ID3D11DeviceContext::CopySubresourceRegion}}</strong> </li> <li> <strong>{{ID3D11DeviceContext::CopyResource}}</strong> </li> <li> <strong>{{ID3D11DeviceContext::UpdateSubresource}}</strong> </li> <li> <strong>{{ID3D11DeviceContext::GenerateMips}}</strong> </li> <li> <strong>{{ID3D11DeviceContext::ResolveSubresource}}</strong> </li> </ul><p>By setting one of the following feature-mask flags, you can control the behavior of the <strong>{{IDXGIDevice2::OfferResources}}</strong> and <strong>{{IDXGIDevice2::ReclaimResources}}</strong> methods to aid in testing and debugging. </p><strong>Note</strong>??These flags are supported by the Direct3D 11.1 runtime, which is available starting with Windows?8.?<table> <tr><td>{{D3D11_DEBUG_FEATURE_ALWAYS_DISCARD_OFFERED_RESOURCE}} (0x8)</td><td>When you call <strong>{{IDXGIDevice2::OfferResources}}</strong> to offer resources while this flag is enabled, their content is always discarded. Use this flag to test code paths that regenerate resource content on reclaim. You cannot use this flag in combination with {{D3D11_DEBUG_FEATURE_NEVER_DISCARD_OFFERED_RESOURCE}}.</td></tr> <tr><td>{{D3D11_DEBUG_FEATURE_NEVER_DISCARD_OFFERED_RESOURCE}} (0x10)</td><td>When you call <strong>{{IDXGIDevice2::OfferResources}}</strong> to offer resources while this flag is enabled, their content is never discarded. Use this flag to test code paths that do not need to regenerate resource content on reclaim. You cannot use this flag in combination with {{D3D11_DEBUG_FEATURE_ALWAYS_DISCARD_OFFERED_RESOURCE}}.</td></tr> </table><p>?</p><p>The behavior of the <strong>{{IDXGIDevice2::OfferResources}}</strong> and <strong>{{IDXGIDevice2::ReclaimResources}}</strong> methods depends on system-wide memory pressure. Therefore, the scenario where content is lost and must be regenerated is uncommon for most applications. The preceding new options in the Direct3D debug layer let you simulate that scenario consistently and test code paths.</p><p>The following flag is supported by the Direct3D 11.1 runtime.</p><table> <tr><td>{{D3D11_DEBUG_FEATURE_AVOID_BEHAVIOR_CHANGING_DEBUG_AIDS}} (0x40)</td><td>Disables the following default debugging behavior.</td></tr> </table><p>?</p><p>When the debug layer is enabled, it performs certain actions to reveal application problems. By setting the {{D3D11_DEBUG_FEATURE_AVOID_BEHAVIOR_CHANGING_DEBUG_AIDS}} feature-mask flag, you can enable the debug layer without getting the following default debugging behavior:</p><ul> <li>If an application calls <strong>{{ID3D11DeviceContext1::DiscardView}}</strong>, the runtime fills in the resource with a random color.</li> <li>If an application calls <strong>{{IDXGISwapChain1::Present1}}</strong> with partial presentation parameters, the runtime ignores the partial presentation information.</li> </ul><p>The following flag is supported by the Direct3D 11.2 runtime.</p><table> <tr><td>{{D3D11_DEBUG_FEATURE_DISABLE_TILED_RESOURCE_MAPPING_TRACKING_AND_VALIDATION}} (0x80)</td><td>Disables the following default debugging behavior.</td></tr> </table><p>?</p><p>By default (that is, without {{D3D11_DEBUG_FEATURE_DISABLE_TILED_RESOURCE_MAPPING_TRACKING_AND_VALIDATION}} set), the debug layer validates the proper usage of all tile mappings for tiled resources for bound resources for every operation performed on the device context (for example, draw, copy, and so on). Depending on the size of the tiled resources used (if any), this validation can be processor intensive and slow. Apps might want to initially run with tiled resource tile mapping validation on; then, when they determine that the calling pattern is safe, they can disable the validation by setting {{D3D11_DEBUG_FEATURE_DISABLE_TILED_RESOURCE_MAPPING_TRACKING_AND_VALIDATION}}.</p><p>If {{D3D11_DEBUG_FEATURE_DISABLE_TILED_RESOURCE_MAPPING_TRACKING_AND_VALIDATION}} is set when a tiled resource is created, the debug layer never performs the tracking of tile mapping for that resource for its entire lifetime. Alternatively, if {{D3D11_DEBUG_FEATURE_DISABLE_TILED_RESOURCE_MAPPING_TRACKING_AND_VALIDATION}} is set for any given device context method call (like draw or copy calls) involving tiled resources, the debug layer skips all tile mapping validation for the call.</p> <p>This method returns one of the Direct3D 11 Return Codes.</p> <dd> <p>A combination of feature-mask flags that are combined by using a bitwise {{OR}} operation. If a flag is present, that feature will be set to on, otherwise the feature will be set to off. For descriptions of the feature-mask flags, see Remarks.</p> </dd> <p>Get a bitfield of flags that indicates which debug features are on or off.</p> <p>Mask of feature-mask flags bitwise {{ORed}} together. If a flag is present, then that feature will be set to on, otherwise the feature will be set to off. See <strong>{{ID3D11Debug::SetFeatureMask}}</strong> for a list of possible feature-mask flags.</p> <p>Set the number of milliseconds to sleep after <strong>{{IDXGISwapChain::Present}}</strong> is called.</p> <strong>Note</strong>??If you call this {{API}} in a Session 0 process, it returns <strong>{{DXGI_ERROR_NOT_CURRENTLY_AVAILABLE}}</strong>.?<p>The application will only sleep if {{D3D11_DEBUG_FEATURE_PRESENT_PER_RENDER_OP}} is a set in the <strong>feature mask</strong>. If that flag is not set the number of milliseconds is set but ignored and the application does not sleep. 10ms is used as a default value if this method is never called.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <p>Get the number of milliseconds to sleep after <strong>{{IDXGISwapChain::Present}}</strong> is called.</p> <p>Value is set with <strong>{{ID3D11Debug::SetPresentPerRenderOpDelay}}</strong>.</p> <p>Number of milliseconds to sleep after Present is called.</p> <p>Sets a swap chain that the runtime will use for automatically calling <strong>{{IDXGISwapChain::Present}}</strong>.</p> <strong>Note</strong>??If you call this {{API}} in a Session 0 process, it returns <strong>{{DXGI_ERROR_NOT_CURRENTLY_AVAILABLE}}</strong>.?<p>The swap chain set by this method will only be used if {{D3D11_DEBUG_FEATURE_PRESENT_PER_RENDER_OP}} is set in the <strong>feature mask</strong>.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <p>Get the swap chain that the runtime will use for automatically calling <strong>{{IDXGISwapChain::Present}}</strong>.</p> <p>The swap chain retrieved by this method will only be used if {{D3D11_DEBUG_FEATURE_PRESENT_PER_RENDER_OP}} is set in the <strong>feature mask</strong>.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <p>Check to see if the draw pipeline state is valid.</p> <p>Use validate prior to calling a draw method (for example, <strong>{{ID3D11DeviceContext::Draw}}</strong>); validation requires the debug layer.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the <strong>{{ID3D11DeviceContext}}</strong>, that represents a device context.</p> </dd> <p>Report information about a device object's lifetime.</p> <p><strong>ReportLiveDeviceObjects</strong> uses the value in <em>Flags</em> to determine the amount of information to report about a device object's lifetime.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A value from the <strong>{{D3D11_RLDO_FLAGS}}</strong> enumeration.</p> </dd> <p>Verifies whether the dispatch pipeline state is valid.</p> <p>Use this method before you call a dispatch method (for example, <strong>{{ID3D11DeviceContext::Dispatch}}</strong>). Validation requires the debug layer.</p> <p>This method returns one of the return codes described in the topic Direct3D 11 Return Codes.</p> <dd> <p>A reference to the <strong>{{ID3D11DeviceContext}}</strong> that represents a device context.</p> </dd> <strong>Note</strong>?? The <strong>{{ID3D11SwitchToRef}}</strong> interface and its methods are not supported in Direct3D 11.? <strong>Note</strong>??The <strong>{{ID3D11SwitchToRef}}</strong> interface and its methods are not supported in Direct3D 11.? <p>Reserved.</p> <strong>Note</strong>??The <strong>{{ID3D11SwitchToRef}}</strong> interface and its methods are not supported in Direct3D 11.? <p>Reserved.</p> <p>The tracing device interface sets shader tracking information, which enables accurate logging and playback of shader execution.</p> <p>To get this interface, turn on the debug layer and use <strong>{{IUnknown::QueryInterface}}</strong> from the <strong>{{ID3D11Device}}</strong>.</p><strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Sets the reference rasterizer's default race-condition tracking options for the specified resource types.</p> <p>This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.</p> <p>This method returns one of the Direct3D 11 return codes.</p> <dd> <p>A <strong>{{D3D11_SHADER_TRACKING_RESOURCE_TYPE}}</strong>-typed value that specifies the type of resource to track. </p> </dd> <dd> <p>A combination of <strong>{{D3D11_SHADER_TRACKING_OPTIONS}}</strong>-typed flags that are combined by using a bitwise <strong>{{OR}}</strong> operation. The resulting value identifies tracking options. If a flag is present, the tracking option that the flag represents is set to "on," otherwise the tracking option is set to "off."</p> </dd> <p>Sets the reference rasterizer's race-condition tracking options for a specific shader.</p> <strong>Note</strong>??After a call to <strong>SetShaderTrackingOptions</strong>, the tracking options that the <em>Options</em> parameter specifies are set for all calls by the shader that the <em>pShader</em> parameter specifies, until the next call to <strong>SetShaderTrackingOptions</strong>. If you set a flag that is specific to unordered access views ({{UAV}}) (for example, <strong>{{D3D11_SHADER_TRACKING_OPTION_UAV_SPECIFIC_FLAGS}}</strong>) in the <em>Options</em> parameter for a compute shader, <strong>SetShaderTrackingOptions</strong> ignores it.?<strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>This method returns one of the Direct3D 11 return codes.</p> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of a shader.</p> </dd> <dd> <p>A combination of <strong>{{D3D11_SHADER_TRACKING_OPTIONS}}</strong>-typed flags that are combined by using a bitwise <strong>{{OR}}</strong> operation. The resulting value identifies tracking options. If a flag is present, the tracking option that the flag represents is set to "on"; otherwise the tracking option is set to "off."</p> </dd> <p>Sets graphics processing unit ({{GPU}}) debug reference tracking options.</p> <p>This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.</p> <p>This method returns one of the Direct3D 11 return codes.</p> <dd> <p>A combination of <strong>{{D3D11_SHADER_TRACKING_OPTIONS}}</strong>-typed flags that are combined by using a bitwise <strong>{{OR}}</strong> operation. The resulting value identifies tracking options. If a flag is present, the tracking option that the flag represents is set to "on"; otherwise the tracking option is set to "off."</p> </dd> <p>Sets graphics processing unit ({{GPU}}) debug reference tracking options.</p> <p>This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.</p> <p>This method returns one of the Direct3D 11 return codes.</p> <dd> <p>A combination of <strong>{{D3D11_SHADER_TRACKING_OPTIONS}}</strong>-typed flags that are combined by using a bitwise <strong>{{OR}}</strong> operation. The resulting value identifies tracking options. If a flag is present, the tracking option that the flag represents is set to "on"; otherwise the tracking option is set to "off."</p> </dd> <p> Sets graphics processing unit ({{GPU}}) debug reference default tracking options for specific resource types. </p> <p> This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8. </p> <p> This method returns one of the Direct3D 11 return codes. </p> <dd> <p> A <strong>{{D3D11_SHADER_TRACKING_RESOURCE_TYPE}}</strong>-typed value that specifies the type of resource to track. </p> </dd> <dd> <p>A combination of <strong>{{D3D11_SHADER_TRACKING_OPTIONS}}</strong>-typed flags that are combined by using a bitwise <strong>{{OR}}</strong> operation. The resulting value identifies tracking options. If a flag is present, the tracking option that the flag represents is set to "on"; otherwise the tracking option is set to "off."</p> </dd> <p> Sets graphics processing unit ({{GPU}}) debug reference default tracking options for specific resource types. </p> <p> This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8. </p> <p> This method returns one of the Direct3D 11 return codes. </p> <dd> <p> A <strong>{{D3D11_SHADER_TRACKING_RESOURCE_TYPE}}</strong>-typed value that specifies the type of resource to track. </p> </dd> <dd> <p>A combination of <strong>{{D3D11_SHADER_TRACKING_OPTIONS}}</strong>-typed flags that are combined by using a bitwise <strong>{{OR}}</strong> operation. The resulting value identifies tracking options. If a flag is present, the tracking option that the flag represents is set to "on"; otherwise the tracking option is set to "off."</p> </dd> <p>An information-queue interface stores, retrieves, and filters debug messages. The queue consists of a message queue, an optional storage filter stack, and a optional retrieval filter stack.</p> <p> To get this interface, turn on debug layer and use <strong>{{IUnknown::QueryInterface}}</strong> from the <strong>{{ID3D11Device}}</strong>. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Set the maximum number of messages that can be added to the message queue.</p> <p>When the number of messages in the message queue has reached the maximum limit, new messages coming in will push old messages out.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Maximum number of messages that can be added to the message queue. -1 means no limit.</p> </dd> <p>Clear all messages from the message queue.</p> <p>Returns nothing.</p> <p>Get a message from the message queue.</p> <p>This method does not remove any messages from the message queue.</p><p>This method gets messages from the message queue after an optional retrieval filter has been applied.</p><p>Applications should call this method twice to retrieve a message - first to obtain the size of the message and second to get the message. Here is a typical example:</p><pre> // Get the size of the message {{SIZE_T}} messageLength = 0; {{HRESULT}} hr = pInfoQueue-&gt;GetMessage(0, {{NULL}}, &amp;messageLength); // Allocate space and get the message {{D3D11_MESSAGE}} * pMessage = ({{D3D11_MESSAGE}}*)malloc(messageLength); hr = pInfoQueue-&gt;GetMessage(0, pMessage, &amp;messageLength); </pre><p>For an overview see <strong>Information Queue Overview</strong>.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index into message queue after an optional retrieval filter has been applied. This can be between 0 and the number of messages in the message queue that pass through the retrieval filter (which can be obtained with <strong>{{ID3D11InfoQueue::GetNumStoredMessagesAllowedByRetrievalFilter}}</strong>). 0 is the message at the front of the message queue.</p> </dd> <dd> <p>Returned message (see <strong>{{D3D11_MESSAGE}}</strong>).</p> </dd> <dd> <p>Size of pMessage in bytes, including the size of the message string that the pMessage points to.</p> </dd> <p>Get the number of messages that were allowed to pass through a storage filter.</p> <p>Number of messages allowed by a storage filter.</p> <p>Get the number of messages that were denied passage through a storage filter.</p> <p>Number of messages denied by a storage filter.</p> <p>Get the number of messages currently stored in the message queue.</p> <p>Number of messages currently stored in the message queue.</p> <p>Get the number of messages that are able to pass through a retrieval filter.</p> <p>Number of messages allowed by a retrieval filter.</p> <p>Get the number of messages that were discarded due to the message count limit.</p> <p>Get and set the message count limit with <strong>{{ID3D11InfoQueue::GetMessageCountLimit}}</strong> and <strong>{{ID3D11InfoQueue::SetMessageCountLimit}}</strong>, respectively.</p> <p>Number of messages discarded.</p> <p>Get the maximum number of messages that can be added to the message queue.</p> <p>When the number of messages in the message queue has reached the maximum limit, new messages coming in will push old messages out.</p> <p>Maximum number of messages that can be added to the queue. -1 means no limit.</p> <p>Add storage filters to the top of the storage-filter stack.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Array of storage filters (see <strong>{{D3D11_INFO_QUEUE_FILTER}}</strong>).</p> </dd> <p>Get the storage filter at the top of the storage-filter stack.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Storage filter at the top of the storage-filter stack.</p> </dd> <dd> <p>Size of the storage filter in bytes. If pFilter is <strong>{{NULL}}</strong>, the size of the storage filter will be output to this parameter.</p> </dd> <p>Remove a storage filter from the top of the storage-filter stack.</p> <p>Returns nothing.</p> <p>Push an empty storage filter onto the storage-filter stack.</p> <p>An empty storage filter allows all messages to pass through.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <p>Push a copy of storage filter currently on the top of the storage-filter stack onto the storage-filter stack.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <p>Push a storage filter onto the storage-filter stack.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Pointer to a storage filter (see <strong>{{D3D11_INFO_QUEUE_FILTER}}</strong>).</p> </dd> <p>Pop a storage filter from the top of the storage-filter stack.</p> <p>Returns nothing.</p> <p>Get the size of the storage-filter stack in bytes.</p> <p>Size of the storage-filter stack in bytes.</p> <p>Add storage filters to the top of the retrieval-filter stack.</p> <p>The following code example shows how to use <strong>{{ID3D11InfoQueue::AddRetrievalFilterEntries}}</strong>:</p><pre> {{D3D11_MESSAGE_CATEGORY}} cats[] = { ..., ..., ... }; {{D3D11_MESSAGE_SEVERITY}} sevs[] = { ..., ..., ... }; {{UINT}} ids[] = { ..., ..., ... }; {{D3D11_INFO_QUEUE_FILTER}} filter; memset( &amp;filter, 0, sizeof(filter) ); // To set the type of messages to allow, // set filter.AllowList as follows: filter.AllowList.NumCategories = sizeof(cats / sizeof({{D3D11_MESSAGE_CATEGORY}})); filter.AllowList.pCategoryList = cats; filter.AllowList.NumSeverities = sizeof(sevs / sizeof({{D3D11_MESSAGE_SEVERITY}})); filter.AllowList.pSeverityList = sevs; filter.AllowList.NumIDs = sizeof(ids) / sizeof({{UINT}}); filter.AllowList.pIDList = ids; // To set the type of messages to deny, set filter.DenyList // similarly to the preceding filter.AllowList. // The following single call sets all of the preceding information. hr = infoQueue-&gt;AddRetrievalFilterEntries( &amp;filter ); </pre> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Array of retrieval filters (see <strong>{{D3D11_INFO_QUEUE_FILTER}}</strong>).</p> </dd> <p>Get the retrieval filter at the top of the retrieval-filter stack.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Retrieval filter at the top of the retrieval-filter stack.</p> </dd> <dd> <p>Size of the retrieval filter in bytes. If pFilter is <strong>{{NULL}}</strong>, the size of the retrieval filter will be output to this parameter.</p> </dd> <p>Remove a retrieval filter from the top of the retrieval-filter stack.</p> <p>Returns nothing.</p> <p>Push an empty retrieval filter onto the retrieval-filter stack.</p> <p>An empty retrieval filter allows all messages to pass through.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <p>Push a copy of retrieval filter currently on the top of the retrieval-filter stack onto the retrieval-filter stack.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <p>Push a retrieval filter onto the retrieval-filter stack.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Pointer to a retrieval filter (see <strong>{{D3D11_INFO_QUEUE_FILTER}}</strong>).</p> </dd> <p>Pop a retrieval filter from the top of the retrieval-filter stack.</p> <p>Returns nothing.</p> <p>Get the size of the retrieval-filter stack in bytes.</p> <p>Size of the retrieval-filter stack in bytes.</p> <p>Add a debug message to the message queue and send that message to debug output.</p> <p>This method is used by the runtime's internal mechanisms to add debug messages to the message queue and send them to debug output. For applications to add their own custom messages to the message queue and send them to debug output, call <strong>{{ID3D11InfoQueue::AddApplicationMessage}}</strong>.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Category of a message (see <strong>{{D3D11_MESSAGE_CATEGORY}}</strong>).</p> </dd> <dd> <p>Severity of a message (see <strong>{{D3D11_MESSAGE_SEVERITY}}</strong>).</p> </dd> <dd> <p>Unique identifier of a message (see <strong>{{D3D11_MESSAGE_ID}}</strong>).</p> </dd> <dd> <p>User-defined message.</p> </dd> <p>Add a user-defined message to the message queue and send that message to debug output.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Severity of a message (see <strong>{{D3D11_MESSAGE_SEVERITY}}</strong>).</p> </dd> <dd> <p>Message string.</p> </dd> <p>Set a message category to break on when a message with that category passes through the storage filter.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Message category to break on (see <strong>{{D3D11_MESSAGE_CATEGORY}}</strong>).</p> </dd> <dd> <p>Turns this breaking condition on or off (true for on, false for off).</p> </dd> <p>Set a message severity level to break on when a message with that severity level passes through the storage filter.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A <strong>{{D3D11_MESSAGE_SEVERITY}}</strong>, which represents a message severity level to break on.</p> </dd> <dd> <p>Turns this breaking condition on or off (true for on, false for off).</p> </dd> <p>Set a message identifier to break on when a message with that identifier passes through the storage filter.</p> <p>This method returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Message identifier to break on (see <strong>{{D3D11_MESSAGE_ID}}</strong>).</p> </dd> <dd> <p>Turns this breaking condition on or off (true for on, false for off).</p> </dd> <p>Get a message category to break on when a message with that category passes through the storage filter.</p> <p>Whether this breaking condition is turned on or off (true for on, false for off).</p> <dd> <p>Message category to break on (see <strong>{{D3D11_MESSAGE_CATEGORY}}</strong>).</p> </dd> <p>Get a message severity level to break on when a message with that severity level passes through the storage filter.</p> <p>Whether this breaking condition is turned on or off (true for on, false for off).</p> <dd> <p>Message severity level to break on (see <strong>{{D3D11_MESSAGE_SEVERITY}}</strong>).</p> </dd> <p>Get a message identifier to break on when a message with that identifier passes through the storage filter.</p> <p>Whether this breaking condition is turned on or off (true for on, false for off).</p> <dd> <p>Message identifier to break on (see <strong>{{D3D11_MESSAGE_ID}}</strong>).</p> </dd> <p>Set a boolean that turns the debug output on or off.</p> <p>This will stop messages that pass the storage filter from being printed out in the debug output, however those messages will still be added to the message queue.</p> <p>Returns nothing.</p> <dd> <p>Disable/Enable the debug output (<strong>{{TRUE}}</strong> to disable or mute the output, <strong>{{FALSE}}</strong> to enable the output).</p> </dd> <p>Get a boolean that turns the debug output on or off.</p> <p>Whether the debug output is on or off (true for on, false for off).</p> <p>Indicates the device state.</p> <p>A state-block mask indicates the device states that a pass or a technique changes.</p> <dd> <p>Boolean value indicating whether to save the vertex shader state. </p> </dd> <dd> <p>Array of vertex-shader samplers. The array is a multi-byte bitmask where each bit represents one sampler slot. </p> </dd> <dd> <p>Array of vertex-shader resources. The array is a multi-byte bitmask where each bit represents one resource slot. </p> </dd> <dd> <p>Array of vertex-shader constant buffers. The array is a multi-byte bitmask where each bit represents one constant buffer slot. </p> </dd> <dd> <p>Array of vertex-shader interfaces. The array is a multi-byte bitmask where each bit represents one interface slot.</p> </dd> <dd> <p>Boolean value indicating whether to save the hull shader state. </p> </dd> <dd> <p>Array of hull-shader samplers. The array is a multi-byte bitmask where each bit represents one sampler slot. </p> </dd> <dd> <p>Array of hull-shader resources. The array is a multi-byte bitmask where each bit represents one resource slot.</p> </dd> <dd> <p>Array of hull-shader constant buffers. The array is a multi-byte bitmask where each bit represents one constant buffer slot.</p> </dd> <dd> <p>Array of hull-shader interfaces. The array is a multi-byte bitmask where each bit represents one interface slot.</p> </dd> <dd> <p>Boolean value indicating whether to save the domain shader state. </p> </dd> <dd> <p>Array of domain-shader samplers. The array is a multi-byte bitmask where each bit represents one sampler slot.</p> </dd> <dd> <p>Array of domain-shader resources. The array is a multi-byte bitmask where each bit represents one resource slot.</p> </dd> <dd> <p>Array of domain-shader constant buffers. The array is a multi-byte bitmask where each bit represents one buffer slot.</p> </dd> <dd> <p>Array of domain-shader interfaces. The array is a multi-byte bitmask where each bit represents one interface slot.</p> </dd> <dd> <p>Boolean value indicating whether to save the geometry shader state. </p> </dd> <dd> <p>Array of geometry-shader samplers. The array is a multi-byte bitmask where each bit represents one sampler slot. </p> </dd> <dd> <p>Array of geometry-shader resources. The array is a multi-byte bitmask where each bit represents one resource slot.</p> </dd> <dd> <p>Array of geometry-shader constant buffers. The array is a multi-byte bitmask where each bit represents one buffer slot. </p> </dd> <dd> <p>Array of geometry-shader interfaces. The array is a multi-byte bitmask where each bit represents one interface slot.</p> </dd> <dd> <p>Boolean value indicating whether to save the pixel shader state.</p> </dd> <dd> <p>Array of pixel-shader samplers. The array is a multi-byte bitmask where each bit represents one sampler slot. </p> </dd> <dd> <p>Array of pixel-shader resources. The array is a multi-byte bitmask where each bit represents one resource slot. </p> </dd> <dd> <p>Array of pixel-shader constant buffers. The array is a multi-byte bitmask where each bit represents one constant buffer slot. </p> </dd> <dd> <p>Array of pixel-shader interfaces. The array is a multi-byte bitmask where each bit represents one interface slot. </p> </dd> <dd> <p>Boolean value indicating whether to save the pixel shader unordered access views.</p> </dd> <dd> <p>Boolean value indicating whether to save the compute shader state.</p> </dd> <dd> <p>Array of compute-shader samplers. The array is a multi-byte bitmask where each bit represents one sampler slot. </p> </dd> <dd> <p>Array of compute-shader resources. The array is a multi-byte bitmask where each bit represents one resource slot.</p> </dd> <dd> <p>Array of compute-shader constant buffers. The array is a multi-byte bitmask where each bit represents one constant buffer slot.</p> </dd> <dd> <p>Array of compute-shader interfaces. The array is a multi-byte bitmask where each bit represents one interface slot.</p> </dd> <dd> <p>Boolean value indicating whether to save the compute shader unordered access views.</p> </dd> <dd> <p>Array of vertex buffers. The array is a multi-byte bitmask where each bit represents one resource slot. </p> </dd> <dd> <p>Boolean value indicating whether to save the index buffer state. </p> </dd> <dd> <p>Boolean value indicating whether to save the input layout state. </p> </dd> <dd> <p>Boolean value indicating whether to save the primitive topology state. </p> </dd> <dd> <p>Boolean value indicating whether to save the render targets states. </p> </dd> <dd> <p>Boolean value indicating whether to save the depth-stencil state. </p> </dd> <dd> <p>Boolean value indicating whether to save the blend state. </p> </dd> <dd> <p>Boolean value indicating whether to save the viewports states. </p> </dd> <dd> <p>Boolean value indicating whether to save the scissor rectangles states. </p> </dd> <dd> <p>Boolean value indicating whether to save the rasterizer state. </p> </dd> <dd> <p>Boolean value indicating whether to save the stream-out buffers states. </p> </dd> <dd> <p>Boolean value indicating whether to save the predication state. </p> </dd> <p>Describes an effect-variable type.</p> <p>{{D3DX11_EFFECT_TYPE_DESC}} is used with <strong>{{ID3DX11EffectType::GetDesc}}</strong> </p> <dd> <p>Name of the type, for example "float4" or "MyStruct".</p> </dd> <dd> <p>The variable class (see <strong>{{D3D10_SHADER_VARIABLE_CLASS}}</strong>). </p> </dd> <dd> <p>The variable type (see <strong>{{D3D10_SHADER_VARIABLE_TYPE}}</strong>).</p> </dd> <dd> <p>Number of elements in this type (0 if not an array).</p> </dd> <dd> <p>Number of members (0 if not a structure).</p> </dd> <dd> <p>Number of rows in this type (0 if not a numeric primitive).</p> </dd> <dd> <p>Number of columns in this type (0 if not a numeric primitive).</p> </dd> <dd> <p>Number of bytes required to represent this data type, when tightly packed.</p> </dd> <dd> <p>Number of bytes occupied by this data type, when laid out in a constant buffer.</p> </dd> <dd> <p>Number of bytes to seek between elements, when laid out in a constant buffer.</p> </dd> <p>Describes an effect variable.</p> <p>{{D3DX11_EFFECT_VARIABLE_DESC}} is used with <strong>{{ID3DX11EffectVariable::GetDesc}}</strong>.</p> <dd> <p>Name of this variable, annotation, or structure member.</p> </dd> <dd> <p>Semantic string of this variable or structure member ({{NULL}} for annotations or if not present).</p> </dd> <dd> <p>Optional flags for effect variables.</p> </dd> <dd> <p>Number of annotations on this variable (always 0 for annotations).</p> </dd> <dd> <p>Offset into containing cbuffer or tbuffer (always 0 for annotations or variables not in constant buffers).</p> </dd> <dd> <p>Used if the variable has been explicitly bound using the register keyword. Check Flags for {{D3DX11_EFFECT_VARIABLE_EXPLICIT_BIND_POINT}}.</p> </dd> <p>Describes an effect shader.</p> <p>{{D3DX11_EFFECT_SHADER_DESC}} is used with <strong>{{ID3DX11EffectShaderVariable::GetShaderDesc}}</strong>.</p> <dd> <p>Passed into CreateInputLayout. Only valid on a vertex shader or geometry shader. See <strong>{{ID3D11Device::CreateInputLayout}}</strong>.</p> </dd> <dd> <p><strong>{{TRUE}}</strong> is the shader is defined inline; otherwise <strong>{{FALSE}}</strong>.</p> </dd> <dd> <p>Shader bytecode.</p> </dd> <dd> <p>The length of pBytecode. </p> </dd> <dd> <p>Stream out declaration string (for geometry shader with {{SO}}).</p> </dd> <dd> <p>Indicates which stream is rasterized. {{D3D11}} geometry shaders can output up to four streams of data, one of which can be rasterized.</p> </dd> <dd> <p>Number of entries in the input signature.</p> </dd> <dd> <p>Number of entries in the output signature.</p> </dd> <dd> <p>Number of entries in the patch constant signature.</p> </dd> <p>Describes an effect pass, which contains pipeline state.</p> <p>{{D3DX11_PASS_DESC}} is used with <strong>{{ID3DX11EffectPass::GetDesc}}</strong>.</p> <dd> <p>Name of this pass (<strong>{{NULL}}</strong> if not anonymous).</p> </dd> <dd> <p>Number of annotations on this pass.</p> </dd> <dd> <p>Signature from the vertex shader or geometry shader (if there is no vertex shader) or <strong>{{NULL}}</strong> if neither exists.</p> </dd> <dd> <p>Singature size in bytes.</p> </dd> <dd> <p>The stencil-reference value used in the depth-stencil state.</p> </dd> <dd> <p>The sample mask for the blend state.</p> </dd> <dd> <p>The per-component blend factors ({{RGBA}}) for the blend state.</p> </dd> <p>Describes an effect pass.</p> <p>{{D3DX11_PASS_SHADER_DESC}} is used with <strong>{{ID3DX11EffectPass}}</strong> Get*ShaderDesc methods.</p><p>If this is an inline shader assignment, the returned interface will be an anonymous shader variable, which is not retrievable any other way. It's name in the variable description will be "$Anonymous". If there is no assignment of this type in the pass block, pShaderVariable != <strong>{{NULL}}</strong>, but pShaderVariable-&gt;IsValid() == <strong>{{FALSE}}</strong>.</p> <dd> <p>The variable that this shader came from.</p> </dd> <dd> <p>The element of pShaderVariable (if an array) or 0 if not applicable.</p> </dd> <p>Describes an effect technique.</p> <p>{{D3DX11_TECHNIQUE_DESC}} is used with <strong>{{ID3DX11EffectTechnique::GetDesc}}</strong>.</p> <dd> <p>Name of this technique ({{NULL}} if not anonymous).</p> </dd> <dd> <p>Number of passes contained in the technique.</p> </dd> <dd> <p>Number of annotations on this technique.</p> </dd> <p>Describes an effect group.</p> <p>{{D3DX11_GROUP_DESC}} is used with <strong>{{ID3DX11EffectTechnique::GetDesc}}</strong>.</p> <dd> <p>Name of this group (only <strong>{{NULL}}</strong> if global).</p> </dd> <dd> <p>Number of techniques contained in group.</p> </dd> <dd> <p>Number of annotations on this group.</p> </dd> <p>Describes an effect.</p> <p>{{D3DX11_EFFECT_DESC}} is used with <strong>{{ID3DX11Effect::GetDesc}}</strong>.</p> <dd> <p>Number of constant buffers in this effect.</p> </dd> <dd> <p>Number of global variables in this effect.</p> </dd> <dd> <p>Number of global interfaces in this effect.</p> </dd> <dd> <p>Number of techniques in this effect.</p> </dd> <dd> <p>Number of groups in this effect.</p> </dd> <p>Get the semantic attached to a member.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A string that contains the semantic.</p> <dd> <p>A zero-based index.</p> </dd> <p>Tests that the effect type is valid.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p><strong>{{TRUE}}</strong> if it is valid; otherwise <strong>{{FALSE}}</strong>.</p> <p>Get an effect-type description.</p> <p>The effect-variable description contains data about the name, annotations, semantic, flags and buffer offset of the effect type.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to an effect-type description. See <strong>{{D3DX11_EFFECT_TYPE_DESC}}</strong>.</p> </dd> <p>Get a member type by index.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectType}}</strong>.</p> <dd> <p>A zero-based index.</p> </dd> <p>Get an member type by name.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectType}}</strong>.</p> <dd> <p>A member's name.</p> </dd> <p>Get a member type by semantic.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectType}}</strong>.</p> <dd> <p>A semantic.</p> </dd> <p>Get the name of a member.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>The name of the member.</p> <dd> <p>A zero-based index.</p> </dd> <p>Get the semantic attached to a member.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A string that contains the semantic.</p> <dd> <p>A zero-based index.</p> </dd> <p>The <strong>{{ID3DX11EffectVariable}}</strong> interface is the base class for all effect variables.</p><p>The lifetime of an <strong>{{ID3DX11EffectVariable}}</strong> object is equal to the lifetime of its parent <strong>{{ID3DX11Effect}}</strong> object.</p><ul> <li>{{Methods}}</li> </ul> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Compare the data type with the data stored.</p> <p>This method checks that the data type matches the data stored after casting one interface to another (using any of the As methods).</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p><strong>{{TRUE}}</strong> if the syntax is valid; otherwise <strong>{{FALSE}}</strong>.</p> <p>Get type information.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectType}}</strong>.</p> <p>Get a description.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to an effect-variable description (see <strong>{{D3DX11_EFFECT_VARIABLE_DESC}}</strong>).</p> </dd> <p>Get an annotation by index.</p> <p>Annonations can be attached to a technique, a pass, or a global variable.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectVariable}}</strong>.</p> <dd> <p>A zero-based index.</p> </dd> <p>Get an annotation by name.</p> <p>Annonations can be attached to a technique, a pass, or a global variable.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectVariable}}</strong>. Note that if the annotation is not found the <strong>{{ID3DX11EffectVariable}}</strong> returned will be empty. The <strong>{{ID3DX11EffectVariable::IsValid}}</strong> method should be called to determine whether the annotation was found.</p> <dd> <p>The annotation name.</p> </dd> <p>Get a structure member by index.</p> <p>If the effect variable is an structure, use this method to look up a member by index.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectVariable}}</strong>.</p> <dd> <p>A zero-based index.</p> </dd> <p>Get a structure member by name.</p> <p>If the effect variable is an structure, use this method to look up a member by name.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectVariable}}</strong>.</p> <dd> <p>Member name.</p> </dd> <p>Get a structure member by semantic.</p> <p>If the effect variable is an structure, use this method to look up a member by attached semantic.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectVariable}}</strong>.</p> <dd> <p>The semantic.</p> </dd> <p>Get an array element.</p> <p>If the effect variable is an array, use this method to return one of the elements.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectVariable}}</strong>.</p> <dd> <p>A zero-based index; otherwise 0.</p> </dd> <p>Get a constant buffer.</p> <p>Effect variables are read-from or written-to a constant buffer.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to a <strong>{{ID3DX11EffectConstantBuffer}}</strong>.</p> <p>Get a scalar variable.</p> <p>AsScalar returns a version of the effect variable that has been specialized to a scalar variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain scalar data.</p><p>Applications can test the returned object for validity by calling <strong>IsValid</strong>.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to a scalar variable. See <strong>{{ID3DX11EffectScalarVariable}}</strong>.</p> <p>Get a vector variable.</p> <p>AsVector returns a version of the effect variable that has been specialized to a vector variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain vector data.</p><p>Applications can test the returned object for validity by calling <strong>IsValid</strong>.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to a vector variable. See <strong>{{ID3DX11EffectVectorVariable}}</strong>.</p> <p>Get a matrix variable.</p> <p>AsMatrix returns a version of the effect variable that has been specialized to a matrix variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain matrix data.</p><p>Applications can test the returned object for validity by calling <strong>IsValid</strong>.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to a matrix variable. See <strong>{{ID3DX11EffectMatrixVariable}}</strong>.</p> <p>Get a string variable.</p> <p>AsString returns a version of the effect variable that has been specialized to a string variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain string data.</p><p>Applications can test the returned object for validity by calling <strong>IsValid</strong>.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to a string variable. See <strong>{{ID3DX11EffectStringVariable}}</strong>.</p> <p>Get a class-instance variable.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to class-instance variable. See <strong>{{ID3DX11EffectClassInstanceVariable}}</strong>.</p> <p>Get an interface variable.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an interface variable. See <strong>{{ID3DX11EffectInterfaceVariable}}</strong>.</p> <p>Get a shader-resource variable.</p> <p>AsShaderResource returns a version of the effect variable that has been specialized to a shader-resource variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain shader-resource data.</p><p>Applications can test the returned object for validity by calling <strong>IsValid</strong>.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to a shader-resource variable. See <strong>{{ID3DX11EffectShaderResourceVariable}}</strong>.</p> <p>Get an unordered-access-view variable.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an unordered-access-view variable. See <strong>{{ID3DX11EffectUnorderedAccessViewVariable}}</strong>.</p> <p>Get a render-target-view variable.</p> <p>This method returns a version of the effect variable that has been specialized to a render-target-view variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain render-target-view data.</p><p>Applications can test the returned object for validity by calling <strong>IsValid</strong>.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to a render-target-view variable. See <strong>{{ID3DX11EffectRenderTargetViewVariable}}</strong>.</p> <p>Get a depth-stencil-view variable.</p> <p>This method returns a version of the effect variable that has been specialized to a depth-stencil-view variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain depth-stencil-view data.</p><p>Applications can test the returned object for validity by calling <strong>IsValid</strong>.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to a depth-stencil-view variable. See <strong>{{ID3DX11EffectDepthStencilViewVariable}}</strong>.</p> <p>Get a constant buffer.</p> <p>AsConstantBuffer returns a version of the effect variable that has been specialized to a constant buffer. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain constant buffer data.</p><p>Applications can test the returned object for validity by calling <strong>IsValid</strong>.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to a constant buffer. See <strong>{{ID3DX11EffectConstantBuffer}}</strong>.</p> <p>Get a shader variable.</p> <p>AsShader returns a version of the effect variable that has been specialized to a shader variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain shader data.</p><p>Applications can test the returned object for validity by calling <strong>IsValid</strong>.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to a shader variable. See <strong>{{ID3DX11EffectShaderVariable}}</strong>.</p> <p>Get a effect-blend variable.</p> <p>AsBlend returns a version of the effect variable that has been specialized to an effect-blend variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain effect-blend data.</p><p>Applications can test the returned object for validity by calling <strong>IsValid</strong>.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an effect blend variable. See <strong>{{ID3DX11EffectBlendVariable}}</strong>.</p> <p>Get a depth-stencil variable.</p> <p>AsDepthStencil returns a version of the effect variable that has been specialized to a depth-stencil variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain depth-stencil data.</p><p>Applications can test the returned object for validity by calling <strong>IsValid</strong>.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to a depth-stencil variable. See <strong>{{ID3DX11EffectDepthStencilVariable}}</strong>.</p> <p>Get a rasterizer variable.</p> <p>AsRasterizer returns a version of the effect variable that has been specialized to a rasterizer variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain rasterizer data.</p><p>Applications can test the returned object for validity by calling <strong>IsValid</strong>.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to a rasterizer variable. See <strong>{{ID3DX11EffectRasterizerVariable}}</strong>.</p> <p>Get a sampler variable.</p> <p>AsSampler returns a version of the effect variable that has been specialized to a sampler variable. Similar to a cast, this specialization will return an invalid object if the effect variable does not contain sampler data.</p><p>Applications can test the returned object for validity by calling <strong>IsValid</strong>.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to a sampler variable. See <strong>{{ID3DX11EffectSamplerVariable}}</strong>.</p> <p>Set data.</p> <p>This method does no conversion or type checking; it is therefore a very quick way to access array items.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the variable.</p> </dd> <dd> <p>The offset (in bytes) from the beginning of the reference to the data.</p> </dd> <dd> <p>The number of bytes to set.</p> </dd> <p>Get data.</p> <p>This method does no conversion or type checking; it is therefore a very quick way to access array items.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the variable.</p> </dd> <dd> <p>The offset (in bytes) from the beginning of the reference to the data.</p> </dd> <dd> <p>The number of bytes to get.</p> </dd> <p>Set an array of boolean variables.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the start of the data to set.</p> </dd> <dd> <p>Must be set to 0; this is reserved for future use. </p> </dd> <dd> <p>The number of array elements to set.</p> </dd> <p>Set a floating-point variable.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the variable.</p> </dd> <p>Get a floating-point variable.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the variable.</p> </dd> <p>Set an array of floating-point variables.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the start of the data to set.</p> </dd> <dd> <p>Must be set to 0; this is reserved for future use. </p> </dd> <dd> <p>The number of array elements to set.</p> </dd> <p>Get an array of floating-point variables.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the start of the data to set.</p> </dd> <dd> <p>Must be set to 0; this is reserved for future use. </p> </dd> <dd> <p>The number of array elements to set.</p> </dd> <p>Set an integer variable.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the variable.</p> </dd> <p>Get an integer variable.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the variable.</p> </dd> <p>Set an array of integer variables.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the start of the data to set.</p> </dd> <dd> <p>Must be set to 0; this is reserved for future use. </p> </dd> <dd> <p>The number of array elements to set.</p> </dd> <p>Get an array of integer variables.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the start of the data to set.</p> </dd> <dd> <p>Must be set to 0; this is reserved for future use. </p> </dd> <dd> <p>The number of array elements to set.</p> </dd> <p>Set a boolean variable.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the variable.</p> </dd> <p>Get a boolean variable.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the variable.</p> </dd> <p>Set an array of boolean variables.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the start of the data to set.</p> </dd> <dd> <p>Must be set to 0; this is reserved for future use. </p> </dd> <dd> <p>The number of array elements to set.</p> </dd> <p>Get an array of boolean variables.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the start of the data to set.</p> </dd> <dd> <p>Must be set to 0; this is reserved for future use. </p> </dd> <dd> <p>The number of array elements to set.</p> </dd> <p>A vector-variable interface accesses a four-component vector.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Set a four-component vector that contains boolean data.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the first component.</p> </dd> <p>Set a four-component vector that contains integer data.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the first component.</p> </dd> <p>Set a four-component vector that contains floating-point data.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the first component.</p> </dd> <p>Get a four-component vector that contains boolean data.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the first component.</p> </dd> <p>Get a four-component vector that contains integer data.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the first component.</p> </dd> <p>Get a four-component vector that contains floating-point data.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the first component.</p> </dd> <p>Set an array of four-component vectors that contain boolean data.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the start of the data to set.</p> </dd> <dd> <p>Must be set to 0; this is reserved for future use. </p> </dd> <dd> <p>The number of array elements to set.</p> </dd> <p>Set an array of four-component vectors that contain integer data.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the start of the data to set.</p> </dd> <dd> <p>Must be set to 0; this is reserved for future use. </p> </dd> <dd> <p>The number of array elements to set.</p> </dd> <p>Set an array of four-component vectors that contain floating-point data.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the start of the data to set.</p> </dd> <dd> <p>Must be set to 0; this is reserved for future use. </p> </dd> <dd> <p>The number of array elements to set.</p> </dd> <p>Get an array of four-component vectors that contain boolean data.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the start of the data to set.</p> </dd> <dd> <p>Must be set to 0; this is reserved for future use. </p> </dd> <dd> <p>The number of array elements to set.</p> </dd> <p>Get an array of four-component vectors that contain integer data.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the start of the data to set.</p> </dd> <dd> <p>Must be set to 0; this is reserved for future use. </p> </dd> <dd> <p>The number of array elements to set.</p> </dd> <p>Get an array of four-component vectors that contain floating-point data.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the start of the data to set.</p> </dd> <dd> <p>Must be set to 0; this is reserved for future use. </p> </dd> <dd> <p>The number of array elements to set.</p> </dd> <p>Transpose and set an array of floating-point matrices.</p> <p>Transposing a matrix will rearrange the data order from row-column order to column-row order (or vice versa).</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to an array of matrices.</p> </dd> <dd> <p>The offset (in number of matrices) between the start of the array and the first matrix to set.</p> </dd> <dd> <p>The number of matrices in the array to set.</p> </dd> <p>Set a floating-point matrix.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the first element in the matrix.</p> </dd> <p>Get a matrix.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the first element in a matrix.</p> </dd> <p>Set an array of floating-point matrices.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the first matrix.</p> </dd> <dd> <p>The number of matrix elements to skip from the start of the array.</p> </dd> <dd> <p>The number of elements to set.</p> </dd> <p>Get an array of matrices.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the first element of the first matrix in an array of matrices.</p> </dd> <dd> <p>The offset (in number of matrices) between the start of the array and the first matrix returned.</p> </dd> <dd> <p>The number of matrices in the returned array.</p> </dd> <p>Transpose and set a floating-point matrix.</p> <p>Transposing a matrix will rearrange the data order from row-column order to column-row order (or vice versa).</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the first element of a matrix.</p> </dd> <p>Transpose and get a floating-point matrix.</p> <p>Transposing a matrix will rearrange the data order from row-column order to column-row order (or vice versa).</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the first element of a transposed matrix.</p> </dd> <p>Transpose and set an array of floating-point matrices.</p> <p>Transposing a matrix will rearrange the data order from row-column order to column-row order (or vice versa).</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to an array of matrices.</p> </dd> <dd> <p>The offset (in number of matrices) between the start of the array and the first matrix to set.</p> </dd> <dd> <p>The number of matrices in the array to set.</p> </dd> <p>Transpose and get an array of floating-point matrices.</p> <p>Transposing a matrix will rearrange the data order from row-column order to column-row order (or vice versa).</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the first element of an array of tranposed matrices.</p> </dd> <dd> <p>The offset (in number of matrices) between the start of the array and the first matrix to get.</p> </dd> <dd> <p>The number of matrices in the array to get.</p> </dd> <p>A string-variable interface accesses a string variable.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Get the string.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the string.</p> </dd> <p>Get an array of strings.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to the first string in the array.</p> </dd> <dd> <p>The offset (in number of strings) between the start of the array and the first string to get.</p> </dd> <dd> <p>The number of strings in the returned array.</p> </dd> <p>Gets a class instance.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Pointer to an <strong>{{ID3D11ClassInstance}}</strong> reference that will be set to class instance.</p> </dd> <p>Gets a class instance.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Pointer to an <strong>{{ID3D11ClassInstance}}</strong> reference that will be set to class instance.</p> </dd> <p>Accesses an interface variable.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Sets a class instance.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Pointer to an <strong>{{ID3DX11EffectClassInstanceVariable}}</strong> interface.</p> </dd> <p>Get a class instance.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Pointer to an <strong>{{ID3DX11EffectClassInstanceVariable}}</strong> reference that will be set to the class instance.</p> </dd> <p>Set a shader resource.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>The address of a reference to a shader-resource-view interface. See <strong>{{ID3D11ShaderResourceView}}</strong>.</p> </dd> <p>Set a shader resource.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>The address of a reference to a shader-resource-view interface. See <strong>{{ID3D11ShaderResourceView}}</strong>.</p> </dd> <p>Get a shader resource.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>The address of a reference to a shader-resource-view interface. See <strong>{{ID3D11ShaderResourceView}}</strong>.</p> </dd> <p>Set an array of shader resources.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>The address of an array of shader-resource-view interfaces. See <strong>{{ID3D11ShaderResourceView}}</strong>.</p> </dd> <dd> <p>The zero-based array index to get the first interface.</p> </dd> <dd> <p>The number of elements in the array.</p> </dd> <p>Get an array of shader resources.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>The address of an array of shader-resource-view interfaces. See <strong>{{ID3D11ShaderResourceView}}</strong>.</p> </dd> <dd> <p>The zero-based array index to get the first interface.</p> </dd> <dd> <p>The number of elements in the array.</p> </dd> <p>Accesses an unordered access view.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Set an unordered-access-view.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Pointer to an <strong>{{ID3D11UnorderedAccessView}}</strong>.</p> </dd> <p>Get an unordered-access-view.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Pointer to an <strong>{{ID3D11UnorderedAccessView}}</strong> reference that will be set on return.</p> </dd> <p>Set an array of unordered-access-views.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>An array of <strong>{{ID3D11UnorderedAccessView}}</strong> references.</p> </dd> <dd> <p>Index of the first unordered-access-view.</p> </dd> <dd> <p>Number of elements in the array.</p> </dd> <p>Get an array of unordered-access-views.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Pointer to an <strong>{{ID3D11UnorderedAccessView}}</strong> reference that will be set to the {{UAV}} array on return. </p> </dd> <dd> <p>Index of the first interface.</p> </dd> <dd> <p>Number of elements in the array.</p> </dd> <p>Set a render-target.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a render-target-view interface. See <strong>{{ID3D11RenderTargetView}}</strong>.</p> </dd> <p>Set a render-target.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a render-target-view interface. See <strong>{{ID3D11RenderTargetView}}</strong>.</p> </dd> <p>Get a render-target.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>The address of a reference to a render-target-view interface. See <strong>{{ID3D11RenderTargetView}}</strong>.</p> </dd> <p>Set an array of render-targets.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Set an array of render-target-view interfaces. See <strong>{{ID3D11RenderTargetView}}</strong>.</p> </dd> <dd> <p>The zero-based array index to store the first interface.</p> </dd> <dd> <p>The number of elements in the array.</p> </dd> <p>Get an array of render-targets.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to an array of render-target-view interfaces. See <strong>{{ID3D11RenderTargetView}}</strong>.</p> </dd> <dd> <p>The zero-based array index to get the first interface.</p> </dd> <dd> <p>The number of elements in the array.</p> </dd> <p>A depth-stencil-view-variable interface accesses a depth-stencil view.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Set a depth-stencil-view resource.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a depth-stencil-view interface. See <strong>{{ID3D11DepthStencilView}}</strong>.</p> </dd> <p>Get a depth-stencil-view resource.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>The address of a reference to a depth-stencil-view interface. See <strong>{{ID3D11DepthStencilView}}</strong>.</p> </dd> <p>Set an array of depth-stencil-view resources.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to an array of depth-stencil-view interfaces. See <strong>{{ID3D11DepthStencilView}}</strong>.</p> </dd> <dd> <p>The zero-based array index to set the first interface.</p> </dd> <dd> <p>The number of elements in the array.</p> </dd> <p>Get an array of depth-stencil-view resources.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to an array of depth-stencil-view interfaces. See <strong>{{ID3D11DepthStencilView}}</strong>.</p> </dd> <dd> <p>The zero-based array index to get the first interface.</p> </dd> <dd> <p>The number of elements in the array.</p> </dd> <p>Reverts a previously set texture buffer.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <p>Set a constant-buffer.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a constant-buffer interface. See <strong>{{ID3D11Buffer}}</strong>.</p> </dd> <p>Reverts a previously set constant buffer.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <p>Get a constant-buffer.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>The address of a reference to a constant-buffer interface. See <strong>{{ID3D11Buffer}}</strong>.</p> </dd> <p>Set a texture-buffer.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a shader-resource-view interface for accessing a texture buffer.</p> </dd> <p>Reverts a previously set texture buffer.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <p>Get a texture-buffer.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>The address of a reference to a shader-resource-view interface for accessing a texture buffer. See <strong>{{ID3D11ShaderResourceView}}</strong>.</p> </dd> <p>A shader-variable interface accesses a shader variable.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Get a shader description.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A zero-based index.</p> </dd> <dd> <p>A reference to a shader description (see <strong>{{D3DX11_EFFECT_SHADER_DESC}}</strong>).</p> </dd> <p>Get a vertex shader.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A zero-based index.</p> </dd> <dd> <p>A reference to an <strong>{{ID3D11VertexShader}}</strong> reference that will be set to the vertex shader on return.</p> </dd> <p>Get a geometry shader.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A zero-based index.</p> </dd> <dd> <p>A reference to an <strong>{{ID3D11GeometryShader}}</strong> reference that will be set to the geometry shader on return.</p> </dd> <p>Get a pixel shader.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A zero-based index.</p> </dd> <dd> <p>A reference to an <strong>{{ID3D11PixelShader}}</strong> reference that will be set to the pixel shader on return.</p> </dd> <p>Get a hull shader.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index of the shader.</p> </dd> <dd> <p>A reference to an <strong>{{ID3D11HullShader}}</strong> reference that will be set to the hull shader on return.</p> </dd> <p>Get a domain shader.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index of the domain shader.</p> </dd> <dd> <p>Pointer to an <strong>{{ID3D11DomainShader}}</strong> reference that will be set to the domain shader on return.</p> </dd> <p>Get a compute shader.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index of the compute shader.</p> </dd> <dd> <p>Pointer to an <strong>{{ID3D11ComputeShader}}</strong> reference that will be set to the compute shader on return.</p> </dd> <p>Get an input-signature description.</p> <p>An effect contains one or more shaders; each shader has an input and output signature; each signature contains one or more elements (or parameters). The shader index identifies the shader and the element index identifies the element (or parameter) in the shader signature.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A zero-based shader index.</p> </dd> <dd> <p>A zero-based shader-element index.</p> </dd> <dd> <p>A reference to a parameter description (see <strong>{{D3D11_SIGNATURE_PARAMETER_DESC}}</strong>).</p> </dd> <p>Get an output-signature description.</p> <p>An effect contains one or more shaders; each shader has an input and output signature; each signature contains one or more elements (or parameters). The shader index identifies the shader and the element index identifies the element (or parameter) in the shader signature.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A zero-based shader index.</p> </dd> <dd> <p>A zero-based element index.</p> </dd> <dd> <p>A reference to a parameter description (see <strong>{{D3D11_SIGNATURE_PARAMETER_DESC}}</strong>).</p> </dd> <p>Get a patch constant signature description.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A zero-based shader index. </p> </dd> <dd> <p>A zero-based element index. </p> </dd> <dd> <p>A reference to a parameter description (see <strong>{{D3D11_SIGNATURE_PARAMETER_DESC}}</strong>).</p> </dd> <p>The blend-variable interface accesses blend state.</p> <p>An <strong>{{ID3DX11EffectVariable}}</strong> interface is created when an effect is read into memory.</p><p>Effect variables are saved in memory in the backing store; when a technique is applied, the values in the backing store are copied to the device. You can use either of these methods to return state.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Get a reference to a blend-state interface.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index into an array of blend-state interfaces. If there is only one blend-state interface, use 0.</p> </dd> <dd> <p>The address of a reference to a blend-state interface (see <strong>{{ID3D11BlendState}}</strong>).</p> </dd> <p>Sets an effect's blend-state.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index into an array of blend-state interfaces. If there is only one blend-state interface, use 0.</p> </dd> <dd> <p>A reference to an <strong>{{ID3D11BlendState}}</strong> interface containing the blend-state to set.</p> </dd> <p>Reverts a previously set blend-state.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index into an array of blend-state interfaces. If there is only one blend-state interface, use 0.</p> </dd> <p>Get a reference to a blend-state variable.</p> <p>Effect variables are saved in memory in the backing store; when a technique is applied, the values in the backing store are copied to the device. Backing store data can used to recreate the variable when necessary.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index into an array of blend-state descriptions. If there is only one blend-state variable in the effect, use 0.</p> </dd> <dd> <p>A reference to a blend-state description (see <strong>{{D3D11_BLEND_DESC}}</strong>).</p> </dd> <p>A depth-stencil-variable interface accesses depth-stencil state.</p> <p>An <strong>{{ID3DX11EffectVariable}}</strong> interface is created when an effect is read into memory.</p><p>Effect variables are saved in memory in the backing store; when a technique is applied, the values in the backing store are copied to the device. You can use either of these methods to return state.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Get a reference to a depth-stencil interface.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index into an array of depth-stencil interfaces. If there is only one depth-stencil interface, use 0.</p> </dd> <dd> <p>The address of a reference to a blend-state interface (see <strong>{{ID3D11DepthStencilState}}</strong>).</p> </dd> <p>Sets the depth stencil state.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index into an array of depth-stencil interfaces. If there is only one depth-stencil interface, use 0.</p> </dd> <dd> <p>Pointer to an <strong>{{ID3D11DepthStencilState}}</strong> interface containing the new depth stencil state.</p> </dd> <p>Reverts a previously set depth stencil state.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index into an array of depth-stencil interfaces. If there is only one depth-stencil interface, use 0.</p> </dd> <p>Get a reference to a variable that contains depth-stencil state.</p> <p>Effect variables are saved in memory in the backing store; when a technique is applied, the values in the backing store are copied to the device. Backing store data can used to recreate the variable when necessary.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index into an array of depth-stencil-state descriptions. If there is only one depth-stencil variable in the effect, use 0.</p> </dd> <dd> <p>A reference to a depth-stencil-state description (see <strong>{{D3D11_DEPTH_STENCIL_DESC}}</strong>).</p> </dd> <p>Reverts a previously set rasterizer state.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index into an array of rasterizer interfaces. If there is only one rasterizer interface, use 0. </p> </dd> <p>Get a reference to a rasterizer interface.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index into an array of rasterizer interfaces. If there is only one rasterizer interface, use 0.</p> </dd> <dd> <p>The address of a reference to a rasterizer interface (see <strong>{{ID3D11RasterizerState}}</strong>).</p> </dd> <p>Sets the rasterizer state.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index into an array of rasterizer interfaces. If there is only one rasterizer interface, use 0. </p> </dd> <dd> <p>Pointer to an <strong>{{ID3D11RasterizerState}}</strong> interface.</p> </dd> <p>Reverts a previously set rasterizer state.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index into an array of rasterizer interfaces. If there is only one rasterizer interface, use 0. </p> </dd> <p>Get a reference to a variable that contains rasteriser state.</p> <p>Effect variables are saved in memory in the backing store; when a technique is applied, the values in the backing store are copied to the device. Backing store data can used to recreate the variable when necessary.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index into an array of rasteriser-state descriptions. If there is only one rasteriser variable in the effect, use 0.</p> </dd> <dd> <p>A reference to a rasteriser-state description (see <strong>{{D3D11_RASTERIZER_DESC}}</strong>).</p> </dd> <p>A sampler interface accesses sampler state.</p> <p>An <strong>{{ID3DX11EffectVariable}}</strong> interface is created when an effect is read into memory.</p><p>Effect variables are saved in memory in the backing store; when a technique is applied, the values in the backing store are copied to the device. You can use either of these methods to return state.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Get a reference to a sampler interface.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index into an array of sampler interfaces. If there is only one sampler interface, use 0.</p> </dd> <dd> <p>The address of a reference to a sampler interface (see <strong>{{ID3D11SamplerState}}</strong>).</p> </dd> <p>Set sampler state.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index into an array of sampler interfaces. If there is only one sampler interface, use 0. </p> </dd> <dd> <p>Pointer to an <strong>{{ID3D11SamplerState}}</strong> interface containing the sampler state.</p> </dd> <p>Revert a previously set sampler state.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index into an array of sampler interfaces. If there is only one sampler interface, use 0. </p> </dd> <p>Get a reference to a variable that contains sampler state.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Index into an array of sampler descriptions. If there is only one sampler variable in the effect, use 0.</p> </dd> <dd> <p>A reference to a sampler description (see <strong>{{D3D11_SAMPLER_DESC}}</strong>).</p> </dd> <p>An <strong>{{ID3DX11EffectPass}}</strong> interface encapsulates state assignments within a technique.</p><p>The lifetime of an <strong>{{ID3DX11EffectPass}}</strong> object is equal to the lifetime of its parent <strong>{{ID3DX11Effect}}</strong> object.</p><ul> <li>{{Methods}}</li> </ul> <p>A pass is a block of code that sets render-state objects and shaders. A pass is declared within a technique.</p><p>To get an effect-pass interface, call a method like <strong>{{ID3DX11EffectTechnique::GetPassByName}}</strong>.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Test a pass to see if it contains valid syntax.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p><strong>{{TRUE}}</strong> if the code syntax is valid; otherwise <strong>{{FALSE}}</strong>.</p> <p>Get a pass description.</p> <p>A pass is a block of code that sets render state and shaders (which in turn sets constant buffers, samplers and textures). An effect technique contains one or more passes.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a pass description (see <strong>{{D3DX11_PASS_DESC}}</strong>).</p> </dd> <p>Get a vertex-shader description.</p> <p>An effect pass can contain render state assignments and shader object assignments.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a vertex-shader description (see <strong>{{D3DX11_PASS_SHADER_DESC}}</strong>).</p> </dd> <p>Get a geometry-shader description.</p> <p>An effect pass can contain render state assignments and shader object assignments.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a geometry-shader description (see <strong>{{D3DX11_PASS_SHADER_DESC}}</strong>).</p> </dd> <p>Get a pixel-shader description.</p> <p>An effect pass can contain render state assignments and shader object assignments.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a pixel-shader description (see <strong>{{D3DX11_PASS_SHADER_DESC}}</strong>).</p> </dd> <p>Get hull-shader description.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a hull-shader description (see <strong>{{D3DX11_PASS_SHADER_DESC}}</strong>).</p> </dd> <p>Get a domain-shader description.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a domain-shader description (see <strong>{{D3DX11_PASS_SHADER_DESC}}</strong>).</p> </dd> <p>Get a compute-shader description.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a compute-shader description (see <strong>{{D3DX11_PASS_SHADER_DESC}}</strong>).</p> </dd> <p>Get an annotation by index.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectVariable}}</strong>.</p> <dd> <p>A zero-based index.</p> </dd> <p>Get an annotation by name.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectVariable}}</strong>.</p> <dd> <p>The name of the annotation.</p> </dd> <p>Set the state contained in a pass to the device.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Unused.</p> </dd> <dd> <p>The <strong>{{ID3D11DeviceContext}}</strong> to apply the pass to.</p> </dd> <p>Generate a mask for allowing/preventing state changes.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a state-block mask (see <strong>{{D3DX11_STATE_BLOCK_MASK}}</strong>).</p> </dd> <p>An <strong>{{ID3DX11EffectTechnique}}</strong> interface is a collection of passes.</p><p>The lifetime of an <strong>{{ID3DX11EffectTechnique}}</strong> object is equal to the lifetime of its parent <strong>{{ID3DX11Effect}}</strong> object.</p><ul> <li>{{Methods}}</li> </ul> <p>An effect contains one or more techniques; each technique contains one or more passes; each pass contains state assignments.</p><p>To get an effect-technique interface, call a method such as <strong>{{ID3DX11Effect::GetTechniqueByName}}</strong>.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Test a technique to see if it contains valid syntax.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p><strong>{{TRUE}}</strong> if the code syntax is valid; otherwise <strong>{{FALSE}}</strong>.</p> <p>Get a technique description.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a technique description (see <strong>{{D3DX11_TECHNIQUE_DESC}}</strong>).</p> </dd> <p>Get an annotation by index.</p> <p>Use an annotation to attach a piece of metadata to a technique.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectVariable}}</strong>.</p> <dd> <p>The zero-based index of the interface reference.</p> </dd> <p>Get an annotation by name.</p> <p>Use an annotation to attach a piece of metadata to a technique.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectVariable}}</strong>.</p> <dd> <p>Name of the annotation.</p> </dd> <p>Get a pass by index.</p> <p>A technique contains one or more passes; get a pass using a name or an index.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to a <strong>{{ID3DX11EffectPass}}</strong>.</p> <dd> <p>A zero-based index.</p> </dd> <p>Get a pass by name.</p> <p>A technique contains one or more passes; get a pass using a name or an index.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectPass}}</strong>.</p> <dd> <p>The name of the pass.</p> </dd> <p>Compute a state-block mask to allow/prevent state changes.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a state-block mask (see <strong>{{D3DX11_STATE_BLOCK_MASK}}</strong>).</p> </dd> <p>The <strong>{{ID3DX11EffectGroup}}</strong> interface accesses an Effect group.</p><p>The lifetime of an <strong>{{ID3DX11EffectGroup}}</strong> object is equal to the lifetime of its parent <strong>{{ID3DX11Effect}}</strong> object.</p><ul> <li>{{Methods}}</li> </ul> <p>To get an <strong>{{ID3DX11EffectGroup}}</strong> interface, call a method like <strong>{{ID3DX11Effect::GetGroupByName}}</strong>.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Test an effect to see if it contains valid syntax.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p><strong>{{TRUE}}</strong> if the code syntax is valid; otherwise <strong>{{FALSE}}</strong>.</p> <p>Gets a group description.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a <strong>{{D3DX11_GROUP_DESC}}</strong> structure.</p> </dd> <p>Get an annotation by index.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Pointer to an <strong>{{ID3DX11EffectVariable}}</strong> interface.</p> <dd> <p>Index of the annotation.</p> </dd> <p>Get an annotation by name.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectVariable}}</strong>. Note that if the annotation is not found the <strong>{{ID3DX11EffectVariable}}</strong> returned will be empty. The <strong>{{ID3DX11EffectVariable::IsValid}}</strong> method should be called to determine whether the annotation was found.</p> <dd> <p>The name of the annotation.</p> </dd> <p>Get a technique by index.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectTechnique}}</strong>.</p> <dd> <p>A zero-based index.</p> </dd> <p>Get a technique by name.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectTechnique}}</strong>, or <strong>{{NULL}}</strong> if the technique is not found.</p> <dd> <p>The name of the technique.</p> </dd> <p>An <strong>{{ID3DX11Effect}}</strong> interface manages a set of state objects, resources, and shaders for implementing a rendering effect.</p> <p>An effect is created by calling <strong>{{D3DX11CreateEffectFromMemory}}</strong>.</p><p>The effect system groups the information required for rendering into an effect which contains: state objects for assigning state changes in groups, resources for supplying input data and storing output data, and programs that control how the rendering is done called shaders.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.?<strong>Note</strong>??<p>If you call <strong>QueryInterface</strong> on an <strong>{{ID3DX11Effect}}</strong> object to retrieve the <strong>{{IUnknown}}</strong> interface, <strong>QueryInterface</strong> returns {{E_NOINTERFACE}}. To work around this issue, use the following code:</p> <pre> {{IUnknown}}* pIUnknown = ({{IUnknown}}*)pEffect; pIUnknown-&gt;AddRef(); </pre>? <p>Test an effect to see if it contains valid syntax.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p><strong>{{TRUE}}</strong> if the code syntax is valid; otherwise <strong>{{FALSE}}</strong>.</p> <p>Get the device that created the effect.</p> <p>An effect is created for a specific device, by calling a function such as <strong>{{D3DX11CreateEffectFromMemory}}</strong>.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to an <strong>{{ID3D11Device}}</strong>.</p> </dd> <p>Get an effect description.</p> <p>An effect description contains basic information about an effect such as the techniques it contains and the constant buffer resources it requires.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to an effect description (see <strong>{{D3DX11_EFFECT_DESC}}</strong>).</p> </dd> <p>Get a constant buffer by index.</p> <p>An effect that contains a variable that will be read/written by an application requires at least one constant buffer. For best performance, an effect should organize variables into one or more constant buffers based on their frequency of update.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to a <strong>{{ID3DX11EffectConstantBuffer}}</strong>.</p> <dd> <p>A zero-based index.</p> </dd> <p>Get a constant buffer by name.</p> <p>An effect that contains a variable that will be read/written by an application requires at least one constant buffer. For best performance, an effect should organize variables into one or more constant buffers based on their frequency of update.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to the constant buffer indicated by the Name. See <strong>{{ID3DX11EffectConstantBuffer}}</strong>.</p> <dd> <p>The constant-buffer name.</p> </dd> <p>Get a variable by index.</p> <p>An effect may contain one or more variables. Variables outside of a technique are considered global to all effects, those located inside of a technique are local to that technique. You can access any local non-static effect variable using its name or with an index.</p><p>The method returns a reference to an <strong>effect-variable interface</strong> if a variable is not found; you can call <strong>{{ID3DX11Effect::IsValid}}</strong> to verify whether or not the index exists.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to a <strong>{{ID3DX11EffectVariable}}</strong>.</p> <dd> <p>A zero-based index.</p> </dd> <p>Get a variable by name.</p> <p>An effect may contain one or more variables. Variables outside of a technique are considered global to all effects, those located inside of a technique are local to that technique. You can access an effect variable using its name or with an index.</p><p>The method returns a reference to an <strong>effect-variable interface</strong> whether or not a variable is found. <strong>{{ID3DX11Effect::IsValid}}</strong> should be called to verify whether or not the name exists.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectVariable}}</strong>. Returns an invalid variable if the specified name cannot be found.</p> <dd> <p>The variable name.</p> </dd> <p>Get a variable by semantic.</p> <p>Each effect variable can have a semantic attached, which is a user defined metadata string. Some system-value semantics are reserved words that trigger built in functionality by pipeline stages.</p><p>The method returns a reference to an <strong>effect-variable interface</strong> if a variable is not found; you can call <strong>{{ID3DX11Effect::IsValid}}</strong> to verify whether or not the semantic exists.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to the effect variable indicated by the Semantic. See <strong>{{ID3DX11EffectVariable}}</strong>.</p> <dd> <p>The semantic name.</p> </dd> <p>Gets an effect group by index.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectGroup}}</strong> interface.</p> <dd> <p>Index of the effect group.</p> </dd> <p>Gets an effect group by name.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectGroup}}</strong> interface.</p> <dd> <p>Name of the effect group.</p> </dd> <p>Get a technique by index.</p> <p>An effect contains one or more techniques; each technique contains one or more passes. You can access a technique using its name or with an index. </p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectTechnique}}</strong>.</p> <dd> <p>A zero-based index.</p> </dd> <p>Get a technique by name.</p> <p>An effect contains one or more techniques; each technique contains one or more passes. You can access a technique using its name or with an index.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>A reference to an <strong>{{ID3DX11EffectTechnique}}</strong>. If a technique with the appropriate name is not found an invalid technique is returned. <strong>{{ID3DX11EffectTechnique::IsValid}}</strong> should be called on the returned technique to determine whether it is valid.</p> <dd> <p>The name of the technique.</p> </dd> <p>Gets a class linkage interface.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns a reference to an <strong>{{ID3D11ClassLinkage}}</strong> interface.</p> <p>Creates a copy of an effect interface.</p> <strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>Flags affecting the creation of the cloned effect. Can be 0 or one of the following values.</p> <table> <tr><th>Flag</th><th>Description</th></tr> <tr><td>{{D3DX11_EFFECT_CLONE_FORCE_NONSINGLE}}</td><td>Ignore all "single" qualifiers on cbuffers. All cbuffers will have their own <strong>{{ID3D11Buffer}}</strong>s created in the cloned effect.</td></tr> </table> <p>?</p> </dd> <dd> <p>Pointer to an <strong>{{ID3DX11Effect}}</strong> reference that will be set to the copy of the effect.</p> </dd> <p>Minimize the amount of memory required for an effect.</p> <p>An effect uses memory space two different ways: to store the information required by the runtime to execute an effect, and to store the metadata required to reflect information back to an application using the {{API}}. You can minimize the amount of memory required by an effect by calling <strong>{{ID3DX11Effect::Optimize}}</strong> which removes the reflection metadata from memory. {{API}} methods to read variables will no longer work once reflection data has been removed.</p><p>The following methods will fail after Optimize has been called on an effect.</p><ul> <li> <strong>{{ID3DX11Effect::GetConstantBufferByIndex}}</strong> </li> <li> <strong>{{ID3DX11Effect::GetConstantBufferByName}}</strong> </li> <li> <strong>{{ID3DX11Effect::GetDesc}}</strong> </li> <li> <strong>{{ID3DX11Effect::GetDevice}}</strong> </li> <li> <strong>{{ID3DX11Effect::GetTechniqueByIndex}}</strong> </li> <li> <strong>{{ID3DX11Effect::GetTechniqueByName}}</strong> </li> <li> <strong>{{ID3DX11Effect::GetVariableByIndex}}</strong> </li> <li> <strong>{{ID3DX11Effect::GetVariableByName}}</strong> </li> <li> <strong>{{ID3DX11Effect::GetVariableBySemantic}}</strong> </li> </ul><strong>Note</strong>??References retrieved with these methods before calling <strong>{{ID3DX11Effect::Optimize}}</strong> are still valid after <strong>{{ID3DX11Effect::Optimize}}</strong> is called. This allows the application to get all the variables, techniques, and passes it will use, call Optimize, and then use the effect.?<strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>Returns one of the following Direct3D 11 Return Codes.</p> <p>Test an effect to see if the reflection metadata has been removed from memory.</p> <p>An effect uses memory space two different ways: to store the information required by the runtime to execute an effect, and to store the metadata required to reflect information back to an application using the {{API}}. You can minimize the amount of memory required by an effect by calling <strong>{{ID3DX11Effect::Optimize}}</strong> which removes the reflection metadata from memory. Of course, {{API}} methods to read variables will no longer work once reflection data has been removed.</p><strong>Note</strong>??The DirectX {{SDK}} does not supply any compiled binaries for effects. You must use Effects 11 source to build your effects-type application. For more information about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p><strong>{{TRUE}}</strong> if the effect is optimized; otherwise <strong>{{FALSE}}</strong>.</p> <p>Creates an effect from a binary effect or file.</p> <strong>Note</strong>??You must use Effects 11 source to build your effects-type application. For more info about using Effects 11 source, see Differences Between Effects 10 and Effects 11.? <p>The return value is one of the values listed in Direct3D 11 Return Codes.</p> <dd> <p>Blob of compiled effect data.</p> </dd> <dd> <p>Length of the data blob.</p> </dd> <dd> <p>No effect flags exist. Set to zero.</p> </dd> <dd> <p>Pointer to the <strong>{{ID3D11Device}}</strong> on which to create Effect resources.</p> </dd> <dd> <p>Address of the newly created <strong>{{ID3DX11Effect}}</strong> interface.</p> </dd> <p> Defines results for animation updates.</p> <dd> <p> No animation variables have changed.</p> </dd> <dd> <p> One or more animation variables has changed.</p> </dd> <p> Defines the activity status of an animation manager.</p> <dd> <p> The animation manager is idle; no animations are currently playing.</p> </dd> <dd> <p> The animation manager is busy; at least one animation is currently playing or scheduled.</p> </dd> <p> Defines animation modes.</p> <dd> <p> Animation is disabled.</p> </dd> <dd> <p> The animation mode is managed by the system.</p> </dd> <dd> <p> Animation is enabled.</p> </dd> <p>Defines the pattern for a loop iteration.</p> <dd> <p>The start of a loop begins with the first value (v1-&gt;v2, v1-&gt;v2, v1-&gt;v2, and so on).</p> </dd> <dd> <p>The start of a loop alternates between values (v1-&gt;v2, v2-&gt;v1, v1-&gt;v2, and so on).</p> </dd> <p> Defines the rounding modes to be used when the value of an animation variable is converted from a floating-point type to an integer type.</p> <dd> <p> Round to the nearest integer.</p> </dd> <dd> <p> Round down.</p> </dd> <dd> <p> Round up.</p> </dd> <p> Defines the status for a storyboard.</p> <p>Unless <strong>{{IUIAnimationStoryboard::GetStatus}}</strong> is called from a handler for <strong>OnStoryboardStatusChanged</strong> events, it returns only the following status values:</p><ul> <li>{{UI_ANIMATION_STORYBOARD_BUILDING}}</li> <li>{{UI_ANIMATION_STORYBOARD_SCHEDULED}}</li> <li>{{UI_ANIMATION_STORYBOARD_PLAYING}}</li> <li>{{UI_ANIMATION_STORYBOARD_READY}}</li> </ul><p>All status values can be passed to <strong>{{IUIAnimationStoryboardEventHandler::OnStoryboardStatusChanged}}</strong>.</p><p>The following diagram illustrates the transitions between these states.</p><p></p> <dd> <p> The storyboard has never been scheduled.</p> </dd> <dd> <p> The storyboard is scheduled to play.</p> </dd> <dd> <p> The storyboard was canceled.</p> </dd> <dd> <p> The storyboard is currently playing.</p> </dd> <dd> <p> The storyboard was truncated.</p> </dd> <dd> <p> The storyboard has finished playing.</p> </dd> <dd> <p> The storyboard is built and ready for scheduling.</p> </dd> <dd> <p> Scheduling the storyboard failed because a scheduling conflict occurred and the currently scheduled storyboard has higher priority.</p> </dd> <p> Defines results for storyboard scheduling.</p> <p> <strong>{{IUIAnimationStoryboard::Schedule}}</strong> returns {{UI_ANIMATION_SCHEDULING_DEFERRED}} only if the application attempts to schedule a storyboard during a callback to <strong>{{IUIAnimationStoryboardEventHandler::OnStoryboardStatusChanged}}</strong>.</p> <dd> <p> Scheduling failed for an unexpected reason.</p> </dd> <dd> <p> Scheduling failed because a scheduling conflict occurred and the currently scheduled storyboard has higher priority. For more information, see <strong>{{IUIAnimationPriorityComparison::HasPriority}}</strong>.</p> </dd> <dd> <p> Scheduling failed because the storyboard is already scheduled.</p> </dd> <dd> <p> Scheduling succeeded.</p> </dd> <dd> <p> Scheduling is deferred and will be attempted when the current callback completes.</p> </dd> <p> Defines potential effects on a storyboard if a priority comparison returns false.</p> <p>This enumeration is used as the <em>priorityEffect</em> parameter of <strong>{{IUIAnimationPriorityComparison::HasPriority}}</strong>, informing the client of the potential effect on the storyboard to be scheduled when the return value is false ({{S_FALSE}}). {{UI_ANIMATION_PRIORITY_EFFECT_FAILURE}} means that the attempt to schedule the storyboard might fail if the return value is false. {{UI_ANIMATION_PRIORITY_EFFECT_DELAY}} means that the attempt to schedule the storyboard will succeed, but if the return value is false, the storyboard could play later than it would otherwise.</p><p> This enumeration can help an application decide how aggressive to be about reducing latency in the {{UI}}. For example, if the application returns true when the effect is {{UI_ANIMATION_PRIORITY_EFFECT_DELAY}}, then other animations might get canceled or compressed even though doing so was not strictly necessary to play a new animation within the application-specified longest acceptable delay.</p> <dd> <p> This storyboard might not be successfully scheduled.</p> </dd> <dd> <p> The storyboard will be scheduled, but might start playing later.</p> </dd> <p> Defines animation slope characteristics.</p> <dd> <p> An increasing slope.</p> </dd> <dd> <p> A decreasing slope.</p> </dd> <p>Defines which aspects of an interpolator depend on a given input.</p> <p>Multiple <strong>{{UI_ANIMATION_DEPENDENCIES}}</strong> values can be combined using a bitwise-{{OR}} operation.</p> <dd> <p>No aspect depends on the input.</p> </dd> <dd> <p>The intermediate values depend on the input.</p> </dd> <dd> <p>The final value depends on the input.</p> </dd> <dd> <p>The final velocity depends on the input.</p> </dd> <dd> <p>The duration depends on the input.</p> </dd> <p> Defines the behavior of a timer when the animation manager is idle.</p> <dd> <p> The timer continues to generate timer events (is enabled) when the animation manager is idle.</p> </dd> <dd> <p> The timer is suspended (disabled) when the animation manager is idle. </p> </dd> <p> Defines activity status for a timer's client.</p> <dd> <p> The client is idle.</p> </dd> <dd> <p> The client is busy.</p> </dd> <p> Defines the animation manager, which provides a central interface for creating and managing animations.</p> <p><strong>{{IUIAnimationManager}}</strong> defines a central control object for animations. A single instance of <strong>{{IUIAnimationManager}}</strong> is typically used to compose, schedule, and manage all animations for a client application.</p><p> <strong>{{IUIAnimationVariable}}</strong>, <strong>{{IUIAnimationTransition}}</strong>, and <strong>{{IUIAnimationStoryboard}}</strong> are the primary components for building animations. Use <strong>{{IUIAnimationManager}}</strong> to create and manage these components.</p> <p> Creates a new animation variable.</p> <p>The initial value of an animation variable is specified when the variable is created. After an animation variable is created, its value cannot be changed directly; it must be updated through the animation manager.</p><p>An animation variable is typically created to represent each visual characteristic that is to be animated. For example, an application might create two animation variables for the X and Y coordinates of an object that can move freely within a window.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The initial value for the new animation variable.</p> </dd> <dd> <p> The new animation variable.</p> </dd> <p> Creates and schedules a single-transition storyboard.</p> <p>This method schedules a new storyboard by creating the storyboard, applying the specified transition to the specified variable, and then scheduling the storyboard.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The animation variable.</p> </dd> <dd> <p> A transition to be applied to the animation variable.</p> </dd> <dd> <p> The current system time.</p> </dd> <p> Creates a new storyboard.</p> <p>Storyboards can specify complex coordinated updates to many animation variables. These updates happen in sequence or in parallel, and they are guaranteed to remain synchronized within the storyboard. A storyboard is created, populated with transitions on animation variables, and then scheduled. </p> <p> If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The new storyboard.</p> </dd> <p> Finishes all active storyboards within the specified time interval.</p> <p> Calling <strong>FinishAllStoryboards</strong> ensures that all active storyboards finish within the specified completion deadline. If a storyboard is scheduled to play past the deadline, it is compressed. A storyboard is considered active if its status is <strong>{{UI_ANIMATION_STORYBOARD_PLAYING}}</strong> or <strong>{{UI_ANIMATION_STORYBOARD_SCHEDULED}}</strong>.</p> <p> If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The maximum time interval during which all storyboards must be finished.</p> </dd> <p> Abandons all active storyboards.</p> <p>Calling this method is equivalent to calling the <strong>{{IUIAnimationStoryboard::Abandon}}</strong> method for each active storyboard. A storyboard is considered active if its status is <strong>{{UI_ANIMATION_STORYBOARD_PLAYING}}</strong> or <strong>{{UI_ANIMATION_STORYBOARD_SCHEDULED}}</strong>.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p>Updates the values of all animation variables.</p> <p>Calling this method advances the animation manager to <em>timeNow</em>, changing statuses of storyboards as necessary and updating any animation variables to appropriate interpolated values. If the animation manager is paused, no storyboards or variables are updated. If the animation mode is <strong>{{UI_ANIMATION_MODE_DISABLED}}</strong>, all scheduled storyboards finish playing immediately. If the values of any variables change during this call, the value of <em>updateResult</em> is <strong>{{UI_ANIMATION_UPDATE_VARIABLES_CHANGED}}</strong>; otherwise, it is <strong>{{UI_ANIMATION_UPDATE_NO_CHANGE}}</strong>. </p> <p> If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The current system time. This parameter must be greater than or equal to 0.0.</p> </dd> <dd> <p>The result of the update. This parameter can be omitted from calls to this method.</p> </dd> <p> Gets the animation variable with the specified tag.</p> <p> A tag is a pairing of an integer identifier (<em>id</em>) with a {{COM}} object (<em>object</em>). An application can use tags to identify animation variables and storyboards. <strong>{{NULL}}</strong> is a valid object component of a tag; therefore, the <em>object</em> parameter can be <strong>{{NULL}}</strong>.</p><p>Tags are not necessarily unique; this method returns <strong>{{UI_E_AMBIGUOUS_MATCH}}</strong> if more than one animation variable exists with the specified tag.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The object portion of the tag. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p> The identifier portion of the tag.</p> </dd> <dd> <p> The animation variable that matches the specified tag, or <strong>{{NULL}}</strong> if no match is found.</p> </dd> <p> Gets the storyboard with the specified tag.</p> <p>A tag is a pairing of an integer identifier (<em>id</em>) with a {{COM}} object (<em>object</em>). An application can use tags to identify animation variables and storyboards. <strong>{{NULL}}</strong> is a valid object component of a tag; therefore, the <em>object</em> parameter can be <strong>{{NULL}}</strong>.</p><p>Tags are not necessarily unique; this method returns {{UI_E_AMBIGUOUS_MATCH}} if more than one storyboard exists with the specified tag.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The object portion of the tag. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p> The identifier portion of the tag.</p> </dd> <dd> <p> The storyboard that matches the specified tag, or <strong>{{NULL}}</strong> if no match is found.</p> </dd> <p> Gets the status of the animation manager.</p> <p> If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The status.</p> </dd> <p> Sets the animation mode.</p> <p>This method is used to enable or disable animation globally. While animation is disabled, all storyboards finish immediately when they are scheduled. The default mode is <strong>{{UI_ANIMATION_MODE_SYSTEM_DEFAULT}}</strong>, which lets Windows decide when to enable or disable animation in the application.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The animation mode.</p> </dd> <p> Pauses all animations.</p> <p> When an animation manager is paused, its status is set to <strong>{{UI_ANIMATION_MANAGER_IDLE}}</strong>.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p> Resumes all animations.</p> <p> When an animation manager is resumed, and at least one animation is currently scheduled or playing, its status is set to <strong>{{UI_ANIMATION_MANAGER_BUSY}}</strong>.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p> Specifies a handler for animation manager status updates.</p> <p>Passing <strong>{{NULL}}</strong> for the <em>handler</em> parameter causes Windows Animation to release its reference to any handler object that you passed in earlier. This technique can be essential for breaking reference cycles without having to call the <strong>{{IUIAnimationManager::Shutdown}}</strong> method.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The event handler to be called when the status of the animation manager changes. The specified object must implement the <strong>{{IUIAnimationManagerEventHandler}}</strong> interface or be <strong>{{NULL}}</strong>. See Remarks section for more information.</p> </dd> <p> Sets the priority comparison handler to be called to determine whether a scheduled storyboard can be canceled.</p> <p>Setting a priority comparison handler with this method enables the application to indicate when scheduling conflicts can be resolved by canceling storyboards.</p><p>A scheduled storyboard can be canceled only if it has not started playing and the priority comparison object registered with this method returns <strong>{{S_OK}}</strong>. Canceled storyboards are completely removed from the schedule.</p><p>Passing <strong>{{NULL}}</strong> for the <em>comparison</em> parameter causes Windows Animation to release its reference to any priority comparison handler object you passed in earlier. This technique can be essential for breaking reference cycles without having to call the <strong>{{IUIAnimationManager::Shutdown}}</strong> method.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The priority comparison handler for cancelation. The specified object must implement the <strong>{{IUIAnimationPriorityComparison}}</strong> interface or be <strong>{{NULL}}</strong>. See Remarks.</p> </dd> <p>Sets the priority comparison handler to be called to determine whether a scheduled storyboard can be trimmed.</p> <p> Setting a priority comparison handler with this method enables the application to indicate when scheduling conflicts can be resolved by trimming the scheduled storyboard.</p><p>A scheduled storyboard can be trimmed only if the priority comparison object registered with this method returns <strong>{{S_OK}}</strong>. If the new storyboard trims the scheduled storyboard, the scheduled storyboard can no longer affect a variable once the new storyboard begins to animate that variable.</p><p>Passing <strong>{{NULL}}</strong> for the <em>comparison</em> parameter causes Windows Animation to release its reference to any handler object you passed in earlier. This technique can be essential for breaking reference cycles without having to call the <strong>{{IUIAnimationManager::Shutdown}}</strong> method.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes. </p> <dd> <p>The priority comparison handler for trimming. The specified object must implement the <strong>{{IUIAnimationPriorityComparison}}</strong> interface or be <strong>{{NULL}}</strong>. See Remarks.</p> </dd> <p> Sets the priority comparison handler to be called to determine whether a scheduled storyboard can be compressed.</p> <p>Setting a priority comparison handler with this method enables the application to indicate when the scheduling conflicts can be resolved by compressing the scheduled storyboard and any other storyboards animating the same variables.</p><p>A storyboard can be compressed only if the priority comparison object registered with this method returns <strong>{{S_OK}}</strong> for all the other scheduled storyboards that will be affected by compression. When the storyboards are compressed, time is temporarily accelerated for affected storyboards, so they play faster.</p><p>Passing <strong>{{NULL}}</strong> for the <em>comparison</em> parameter causes Windows Animation to release its reference to any handler object you passed in earlier. This technique can be essential for breaking reference cycles without having to call the <strong>{{IUIAnimationManager::Shutdown}}</strong> method.</p> <p> If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The priority comparison handler for compression. The specified object must implement the <strong>{{IUIAnimationPriorityComparison}}</strong> interface or be <strong>{{NULL}}</strong>. See Remarks. </p> </dd> <p> Sets the priority comparison handler to be called to determine whether a scheduled storyboard can be concluded.</p> <p>Setting a priority comparison handler with this method enables the application to indicate when scheduling conflicts can be resolved by concluding the scheduled storyboard.</p><p>A scheduled storyboard can be concluded only if it contains a loop with a repetition count of <strong><strong>{{UI_ANIMATION_REPEAT_INDEFINITELY}}</strong></strong> and the priority comparison object registered with this method returns <strong>{{S_OK}}</strong>. If the storyboard is concluded, the current repetition of the loop completes, and the reminder of the storyboard then plays. </p><p>Passing <strong>{{NULL}}</strong> for the <em>comparison</em> parameter causes Windows Animation to release its reference to any handler object you passed in earlier. This technique can be essential for breaking reference cycles without having to call the <strong>{{IUIAnimationManager::Shutdown}}</strong> method.</p> <p> If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The priority comparison handler for conclusion. The specified object must implement the <strong>{{IUIAnimationPriorityComparison}}</strong> interface or be <strong>{{NULL}}</strong>. See Remarks.</p> </dd> <p> Sets the default acceptable animation delay. This is the length of time that may pass before storyboards begin.</p> <p>For a storyboard to be successfully scheduled, it must begin before the longest acceptable delay has elapsed. This delay is determined in the following order: the delay value set by calling <strong>{{IUIAnimationStoryboard::SetLongestAcceptableDelay}}</strong> for this specific storyboard, the delay value set by calling this method, or 0.0 if neither method has been called.</p> <p> If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The default delay. This parameter can be a positive value, or <strong>{{UI_ANIMATION_SECONDS_EVENTUALLY}}</strong> (-1) to indicate that any finite delay is acceptable.</p> </dd> <p> Shuts down the animation manager and all its associated objects.</p> <p>Calling this method directs the animation manager, and all the objects it created, to release all their references to other objects. After <strong>{{IUIAnimationManager::Shutdown}}</strong> has been called, no other methods may be called on the animation manager or any objects that it created. An application can call this method to clean up if there is any possibility that the application has introduced a reference cycle that includes some animation objects.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p> Specifies the rounding mode for the animation variable.</p> <p> An animation variable's rounding mode determines how a floating-point value is converted to an integer. The default mode for each variable is <strong>{{UI_ANIMATION_ROUNDING_NEAREST}}</strong>.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The rounding mode for the animation variable.</p> </dd> <p> Gets the current value of the animation variable.</p> <p>The results can be affected by the lower and upper bounds determined by <strong>{{IUIAnimationVariable::SetLowerBound}}</strong> and <strong>{{IUIAnimationVariable::SetUpperBound}}</strong>, respectively.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The current value of the animation variable.</p> </dd> <p> Gets the final value of the animation variable. This is the value after all currently scheduled animations have completed.</p> <p>The result can be affected by the lower and upper bounds determined by <strong>{{IUIAnimationVariable::SetLowerBound}}</strong> and <strong>{{IUIAnimationVariable::SetUpperBound}}</strong>, respectively.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_VALUE_NOT_DETERMINED}}</strong></dt> </dl> </td><td> <p>The final value of the animation variable cannot be determined at this time.</p> </td></tr> </table><p>?</p> <dd> <p> The final value of the animation variable.</p> </dd> <p> Gets the previous value of the animation variable. This is the value of the animation variable before the most recent update.</p> <p>The results can be affected by the lower and upper bounds determined by <strong>{{IUIAnimationVariable::SetLowerBound}}</strong> and <strong>{{IUIAnimationVariable::SetUpperBound}}</strong>, respectively.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The previous value of the animation variable.</p> </dd> <p> Gets the current value of the animation variable as an integer.</p> <p>To specify the rounding mode to be used when converting the value, use the <strong>{{IUIAnimationVariable::SetRoundingMode}}</strong> method.</p><p>The result can also be affected by the lower and upper bounds determined by <strong>{{IUIAnimationVariable::SetLowerBound}}</strong> and <strong>{{IUIAnimationVariable::SetUpperBound}}</strong>, respectively.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The current value of the animation variable, converted to an <strong>{{INT32}}</strong> value.</p> </dd> <p> Gets the final value of the animation variable as an integer. This is the value after all currently scheduled animations have completed.</p> <p>To specify the rounding mode to be used when converting the value, use the <strong>{{IUIAnimationVariable::SetRoundingMode}}</strong> method.</p><p>The result can also be affected by the lower and upper bounds determined by <strong>{{IUIAnimationVariable::SetLowerBound}}</strong> and <strong>{{IUIAnimationVariable::SetUpperBound}}</strong>, respectively.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_VALUE_NOT_DETERMINED}}</strong></dt> </dl> </td><td> <p>The final value of the animation variable cannot be determined at this time.</p> </td></tr> </table><p>?</p> <dd> <p> The final value of the animation variable, converted to an <strong>{{INT32}}</strong> value.</p> </dd> <p> Gets the previous value of the animation variable as an integer. This is the value of the animation variable before the most recent update.</p> <p>To specify the rounding mode to be used when converting the value, use the <strong>{{IUIAnimationVariable::SetRoundingMode}}</strong> method.</p><p>The result can also be affected by the lower and upper bounds determined by <strong>{{IUIAnimationVariable::SetLowerBound}}</strong> and <strong>{{IUIAnimationVariable::SetUpperBound}}</strong>, respectively.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The previous value of the animation variable, converted to an <strong>{{INT32}}</strong> value.</p> </dd> <p> Gets the storyboard that is currently animating the animation variable.</p> <p> If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>{{UIAnimation}} Error Codes</strong> for a list of error codes.</p> <dd> <p>The current storyboard, or <strong>{{NULL}}</strong> if no storyboard is currently animating the animation variable.</p> </dd> <p> Sets the lower bound (floor) for the animation variable. The value of the animation variable should not fall below the specified value.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The lower bound for the animation variable.</p> </dd> <p> Sets an upper bound (ceiling) for the animation variable. The value of the animation variable should not rise above the specified value.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The upper bound for the animation variable.</p> </dd> <p> Specifies the rounding mode for the animation variable.</p> <p> An animation variable's rounding mode determines how a floating-point value is converted to an integer. The default mode for each variable is <strong>{{UI_ANIMATION_ROUNDING_NEAREST}}</strong>.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The rounding mode for the animation variable.</p> </dd> <p> Sets the tag for an animation variable.</p> <p> A tag is a pairing of an integer identifier (<em>id</em>) with a {{COM}} object (<em>object</em>); it can be used by an application to identify an animation variable. Because <strong>{{NULL}}</strong> is a valid object component of a tag, the <em>object</em> parameter can be <strong>{{NULL}}</strong>.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The object portion of the tag. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p> The identifier portion of the tag.</p> </dd> <p> Gets the tag for an animation variable.</p> <p>A tag is a pairing of an integer identifier (<em>id</em>) with a {{COM}} object (<em>object</em>); it can be used by an application to identify an animation variable.</p><p>The parameters are optional so that the method can return both portions of the tag, or just the identifier or object portion.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_VALUE_NOT_SET}}</strong></dt> </dl> </td><td> <p>The animation variable's tag was not set.</p> </td></tr> </table><p>?</p> <dd> <p> The object portion of the tag.</p> </dd> <dd> <p> The identifier portion of the tag.</p> </dd> <p> Specifies a variable change handler. This handler is notified of changes to the value of the animation variable.</p> <p>Passing <strong>{{NULL}}</strong> for the <em>handler</em> parameter causes Windows Animation to release its reference to any handler object you passed in earlier. This technique can be essential for breaking reference cycles without having to call the <strong>{{IUIAnimationManager::Shutdown}}</strong> method.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> A variable change handler. The specified object must implement the <strong>{{IUIAnimationVariableChangeHandler}}</strong> interface or be <strong>{{NULL}}</strong>. See Remarks.</p> </dd> <p> Specifies an integer variable change handler. This handler is notified of changes to the integer value of the animation variable.</p> <p>Passing {{NULL}} for the <em>handler</em> parameter causes Windows Animation to release its reference to any handler object you passed in earlier. This technique can be essential for breaking reference cycles without having to call the <strong>{{IUIAnimationManager::Shutdown}}</strong> method.</p><p> <strong>{{IUIAnimationVariableIntegerChangeHandler::OnIntegerValueChanged}}</strong> is called only if the rounded value has changed since the last update.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Winodws Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> An integer variable change handler. The specified object must implement the <strong>{{IUIAnimationVariableIntegerChangeHandler}}</strong> interface or be {{NULL}}. See Remarks.</p> </dd> <p> Defines a storyboard, which contains a group of transitions that are synchronized relative to one another.</p> <p><strong>{{IUIAnimationStoryboard}}</strong> is a primary component for building animations, along with <strong>{{IUIAnimationVariable}}</strong> and <strong>{{IUIAnimationTransition}}</strong>. </p> <p> Adds a transition to the storyboard.</p> <p>The <strong>AddTransition</strong> method applies the specified transition to the specified variable in the storyboard. If this is the first transition applied to this variable in this storyboard, the transition begins at the start of the storyboard. Otherwise, the transition is appended to the transition that was most recently added to the variable.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_TRANSITION_ALREADY_USED}}</strong></dt> </dl> </td><td> <p>This transition has already been added to a storyboard.</p> </td></tr> </table><p>?</p> <dd> <p> The animation variable for which the transition is to be added.</p> </dd> <dd> <p> The transition to be added.</p> </dd> <p> Adds a keyframe at the specified offset from an existing keyframe.</p> <p>A keyframe represents a moment in time within a storyboard and can be used to specify the start and end times of transitions. Because keyframes can be added at the ends of transitions, their offsets from the start of the storyboard may not be known until the storyboard is playing.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The existing keyframe. To add a keyframe at an offset from the start of the storyboard, use the special keyframe <strong>{{UI_ANIMATION_KEYFRAME_STORYBOARD_START}}</strong>.</p> </dd> <dd> <p> The offset from the existing keyframe at which a new keyframe is to be added.</p> </dd> <dd> <p> The keyframe to be added.</p> </dd> <p> Adds a keyframe at the end of the specified transition.</p> <p> A keyframe represents a moment in time within a storyboard and can be used to specify the start and end times of transitions. Because keyframes can be added at the ends of transitions, their offsets from the start of the storyboard may not be known until the storyboard is playing.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong> Windows Animation Error Codes</strong> for a list of error codes.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_TRANSITION_NOT_IN_STORYBOARD}}</strong></dt> </dl> </td><td> <p>The transition has not been added to the storyboard.</p> </td></tr> </table><p>?</p> <dd> <p> The transition after which a keyframe is to be added.</p> </dd> <dd> <p> The keyframe to be added.</p> </dd> <p> Adds a transition that starts at the specified keyframe.</p> <p>Transitions must be added in the order in which they will be played. A transition may begin playing before the preceding transition in the storyboard has finished, in which case the initial value and velocity seen by the new transition is determined by the state of the preceding one. A transition should not begin before the start of the preceding transition.</p><p>A keyframe represents a moment in time within a storyboard and can be used to specify the start and end times of transitions. Because keyframes can be added at the ends of transitions, their offsets from the start of the storyboard may not be known until the storyboard is playing.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_TRANSITION_ALREADY_USED}}</strong></dt> </dl> </td><td> <p>This transition has already been added to a storyboard or has been added to a storyboard that has finished playing and been released.</p> </td></tr> <tr><td> <dl> <dt><strong>{{UI_E_TRANSITION_ECLIPSED}}</strong></dt> </dl> </td><td> <p>The transition might eclipse the beginning of another transition in the storyboard.</p> </td></tr> </table><p>?</p> <dd> <p> The animation variable for which a transition is to be added.</p> </dd> <dd> <p> The transition to be added.</p> </dd> <dd> <p> The keyframe that specifies the beginning of the new transition.</p> </dd> <p> Adds a transition between two keyframes.</p> <p>This method applies the specified transition to the specified variable in the storyboard, with the transition starting and ending at the specified keyframes. If the transition was created with a duration parameter specified, that duration is overwritten with the duration of time between the start and end keyframes. Otherwise, Windows Animation speeds up or slows down the transition as necessary.</p><p> A keyframe represents a moment in time within a storyboard and can be used to specify the start and end times of transitions. Because keyframes can be added at the ends of transitions, their offsets from the start of the storyboard may not be known until the storyboard is playing.</p><p>Transitions must be added in the order in which they will be played. A transition may begin playing before the preceding transition in the storyboard has finished, in which case the initial value and velocity seen by the new transition will be determined by the state of the preceding one. It must not be possible for a transition to begin before the start of the preceding transition.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_TRANSITION_ALREADY_USED}}</strong></dt> </dl> </td><td> <p>This transition has already been added to a storyboard or has been added to a storyboard that has finished playing and been released.</p> </td></tr> <tr><td> <dl> <dt><strong>{{UI_E_TRANSITION_ECLIPSED}}</strong></dt> </dl> </td><td> <p>The transition might eclipse the beginning of another transition in the storyboard.</p> </td></tr> <tr><td> <dl> <dt><strong>{{UI_E_START_KEYFRAME_AFTER_END}}</strong></dt> </dl> </td><td> <p>The start keyframe might occur after the end keyframe.</p> </td></tr> </table><p>?</p> <dd> <p> The animation variable for which the transition is to be added.</p> </dd> <dd> <p> The transition to be added.</p> </dd> <dd> <p> A keyframe that specifies the beginning of the new transition.</p> </dd> <dd> <p> A keyframe that specifies the end of the new transition. It must not be possible for <em>endKeyframe</em> to appear earlier in the storyboard than <em>startKeyframe</em>.</p> </dd> <p> Creates a loop between two specified keyframes.</p> <p>This method directs a storyboard to play the interval between the given keyframes repeatedly before playing the remainder of the storyboard. If a finite repetition count is specified, the loop always plays that number of times. If <strong><strong>{{UI_ANIMATION_REPEAT_INDEFINITELY}}</strong></strong> (-1) is specified, the loop repeats until the storyboard is concluded, in which case the current iteration of the loop completes and the remainder of the storyboard plays. A storyboard that loops indefinitely also ends if it is truncated.</p><p>Nested and overlapping loops are not supported.</p><p>A keyframe represents a moment in time within a storyboard and can be used to specify the start or end times of transitions. Because keyframes can be added at the ends of transitions, their offsets from the start of the storyboard may not be known until the storyboard is playing.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_START_KEYFRAME_AFTER_END}}</strong></dt> </dl> </td><td> <p>The start keyframe might occur after the end keyframe.</p> </td></tr> <tr><td> <dl> <dt><strong>{{UI_E_END_KEYFRAME_NOT_DETERMINED}}</strong></dt> </dl> </td><td> <p>It might not be possible to determine the end keyframe time when the start keyframe is reached.</p> </td></tr> <tr><td> <dl> <dt><strong>{{UI_E_LOOPS_OVERLAP}}</strong></dt> </dl> </td><td> <p>Two repeated portions of a storyboard might overlap.</p> </td></tr> </table><p>?</p> <dd> <p> The keyframe at which the loop is to begin.</p> </dd> <dd> <p> The keyframe at which the loop is to end. It must not be posssible for <em>endKeyframe</em> to occur earlier in the storyboard than <em>startKeyframe</em>.</p> </dd> <dd> <p> The number of times the loop is to be repeated; this parameter must be 0 or a positive number. Use <strong><strong>{{UI_ANIMATION_REPEAT_INDEFINITELY}}</strong></strong> (-1) to repeat the loop indefinitely until the storyboard is trimmed or concluded.</p> </dd> <p> Directs the storyboard to hold the specified animation variable at its final value until the storyboard ends.</p> <p> When a storyboard is playing, it has exclusive access to any variables it animates unless the storyboard is trimmed by a higher priority storyboard. Typically, this exclusive access is released when the last transition in the storyboard for that variable finishes playing. Applications can call this method to maintain exclusive access to the animation variable and hold the variable, at the final value of the last transition, until the end of the storyboard.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The animation variable.</p> </dd> <p> Sets the longest acceptable delay before the scheduled storyboard begins.</p> <p>For a storyboard to be successfully scheduled, it must begin before the longest acceptable delay has elapsed. This delay is determined in the following order: the delay value set by calling this method, the delay value set by calling the <strong>{{IUIAnimationManager::SetDefaultLongestAcceptableDelay}}</strong> method, or 0.0 if neither of these methods has been called.</p> <p> If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes. </p> <dd> <p> The longest acceptable delay. This parameter can be a positive value, or <strong>{{UI_ANIMATION_SECONDS_EVENTUALLY}}</strong> (-1) to indicate that any finite delay is acceptable.</p> </dd> <p> Directs the storyboard to schedule itself for play.</p> <p>This method directs a storyboard to attempt to add itself to the schedule of playing storyboards. The rules are as follows:</p><ul> <li> <p>If there are no playing storyboards animating any of the same animation variables, the attempt succeeds and the storyboard starts playing immediately.</p> </li> <li> <p>If the storyboard has priority to cancel, trim, conclude, or compress conflicting storyboards, the attempt to schedule succeeds and the storyboard begins playing as soon as possible.</p> </li> <li> <p>If the storyboard does not have priority, the attempt fails and the <em>schedulingResult</em> parameter is set to <strong>{{UI_ANIMATION_SCHEDULING_INSUFFICIENT_PRIORITY}}</strong>.</p> </li> </ul><p>If this method is called from a handler for <strong>OnStoryboardStatusChanged</strong> events, the <em>schedulingResult</em> parameter is set to <strong>{{UI_ANIMATION_SCHEDULING_DEFERRED}}</strong>. The only way to determine whether the storyboard is successfully scheduled is to set a storyboard event handler and check whether the storyboard's status ever becomes <strong>{{UI_ANIMATION_STORYBOARD_INSUFFICIENT_PRIORITY}}</strong>.</p><p>It is possible reuse a storyboard by calling <strong>Schedule</strong> again after its status has reached <strong>{{UI_ANIMATION_STORYBOARD_READY}}</strong>. An attempt to schedule a storyboard when it is in any state other than <strong>{{UI_ANIMATION_STORYBOARD_BUILDING}}</strong> or <strong>{{UI_ANIMATION_STORYBOARD_READY}}</strong> fails, and <em>schedulingResult</em> is set to <strong>{{UI_ANIMATION_SCHEDULING_ALREADY_SCHEDULED}}</strong>.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The current time.</p> </dd> <dd> <p>The result of the scheduling request. This parameter can be omitted from calls to this method.</p> </dd> <p>Completes the current iteration of a keyframe loop that is in progress (where the loop is set to <strong>{{UI_ANIMATION_REPEAT_INDEFINITELY}}</strong>), terminates the loop, and continues with the storyboard. </p> <p>This method specifies that any subsequent keyframe loops that have a repetition count of <strong><strong>{{UI_ANIMATION_REPEAT_INDEFINITELY}}</strong></strong> (-1) will be skipped while the remainder of the storyboard is played. </p><p>An iteration of a keyframe loop that is in progress will be completed before the remainder of the storyboard plays.</p><p>If this method is called at the end of a keyframe loop iteration, the loop is terminated and the loop value is set to the starting loop value.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p>Finishes the storyboard within the specified time, compressing the storyboard if necessary.</p> <p>This method has no effect on storyboard events. Events continue to be raised as expected while the storyboard plays.</p> <p> If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The maximum amount of time that the storyboard can use to finish playing.</p> </dd> <p>Terminates the storyboard, releases all related animation variables, and removes the storyboard from the schedule.</p> <p> This method can be called before or after the storyboard starts playing.</p><p>This method does not trigger any storyboard events.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p> Sets the tag for the storyboard.</p> <p> A tag is a pairing of an integer identifier (<em>id</em>) with a {{COM}} object (<em>object</em>); it can be used by an application to identify a storyboard.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_STORYBOARD_ACTIVE}}</strong></dt> </dl> </td><td> <p>The storyboard is currently in the schedule.</p> </td></tr> </table><p>?</p> <dd> <p> The object portion of the tag. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p> The identifier portion of the tag.</p> </dd> <p> Gets the tag for a storyboard.</p> <p>A tag is a pairing of an integer identifier (<em>id</em>) with a {{COM}} object (<em>object</em>); it can be used by an application to identify a storyboard.</p><p>The parameters are optional so that the method can return both portions of the tag, or just the identifier or object portion.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_VALUE_NOT_SET}}</strong></dt> </dl> </td><td> <p>The storyboard's tag was not set.</p> </td></tr> </table><p>?</p> <dd> <p> The object portion of the tag.</p> </dd> <dd> <p> The identifier portion of the tag.</p> </dd> <p> Gets the status of the storyboard.</p> <p>Unless this method is called from a handler for <strong>OnStoryboardStatusChanged</strong> events, the only values it returns are <strong>{{UI_ANIMATION_STORYBOARD_BUILDING}}</strong>, <strong>{{UI_ANIMATION_STORYBOARD_SCHEDULED}}</strong>, <strong>{{UI_ANIMATION_STORYBOARD_PLAYING}}</strong>, and <strong>{{UI_ANIMATION_STORYBOARD_READY}}</strong>.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The storyboard status.</p> </dd> <p> Gets the time that has elapsed since the storyboard started playing.</p> <p> If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_STORYBOARD_NOT_PLAYING}}</strong></dt> </dl> </td><td> <p>The storyboard is not playing.</p> </td></tr> </table><p>?</p> <dd> <p> The elapsed time.</p> </dd> <p> Specifies a handler for storyboard events.</p> <p>Passing <strong>{{NULL}}</strong> for the <em>handler</em> parameter causes Windows Animation to release its reference to any handler object you passed in earlier. This technique can be essential for breaking reference cycles without having to call the <strong>{{IUIAnimationManager::Shutdown}}</strong> method.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The handler to be called whenever storyboard status and update events occur. The specified object must implement the <strong>{{IUIAnimationStoryboardEventHandler}}</strong> interface or be <strong>{{NULL}}</strong>. See Remarks.</p> </dd> <p> Defines a transition, which determines how an animation variable changes over time.</p> <p><strong>{{IUIAnimationTransition}}</strong> is one of the primary interfaces used to add animation to an application, along with the <strong>{{IUIAnimationVariable}}</strong> and <strong>{{IUIAnimationStoryboard}}</strong> interfaces.</p><p> <strong>{{UIAnimationTransitionLibrary}}</strong> implements a library of standard transitions.</p> <p> Sets the initial value for the transition.</p> <p>This method should not be called after the transition has been added to a storyboard.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The initial value for the transition.</p> </dd> <p> Sets the initial velocity for the transition.</p> <p>This method should not be called after the transition has been added to a storyboard.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The initial velocity for the transition.</p> </dd> <p>Determines whether a transition's duration is currently known.</p> <p>This method should not be called when the storyboard to which the transition has been added is scheduled or playing.</p> <p> Returns {{S_OK}} if the duration is known, {{S_FALSE}} if the duration is not known, or an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_STORYBOARD_ACTIVE}}</strong></dt> </dl> </td><td> <p>The storyboard for this transition is currently in schedule.</p> </td></tr> </table><p>?</p> <p> Gets the duration of the transition.</p> <p>An application should typically call the <strong>{{IUIAnimationTransition::IsDurationKnown}}</strong> method before calling this method. This method should not be called when the storyboard to which the transition has been added is scheduled or playing.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_VALUE_NOT_DETERMINED}}</strong></dt> </dl> </td><td> <p>The requested value for the duration cannot be determined.</p> </td></tr> <tr><td> <dl> <dt><strong>{{UI_E_STORYBOARD_ACTIVE}}</strong></dt> </dl> </td><td> <p>The storyboard for this transition is currently in the schedule.</p> </td></tr> </table><p>?</p> <dd> <p>The duration of the transition, in seconds.</p> </dd> <p> Defines a method for handling status updates to an animation manager.</p> <p> Handles status changes to an animation manager.</p> <p>A call made in this callback method to any other animation method results in the call failing and returning <strong>{{UI_E_ILLEGAL_REENTRANCY}}</strong>.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The new status.</p> </dd> <dd> <p> The previous status.</p> </dd> <p> Defines a method for handling events related to animation variable updates.</p> <p> <strong> OnValueChanged</strong> receives animation variable value updates as <strong>{{DOUBLE}}</strong> values. To receive value updates as <strong>{{INT32}}</strong> values, use <strong>{{IUIAnimationVariableIntegerChangeHandler::OnIntegerValueChanged}}</strong>.</p> <p> Handles events that occur when the value of an animation variable changes.</p><p>This method receives updates as <strong>{{DOUBLE}}</strong> values. To receive updates as <strong>{{INT32}}</strong> values, use the <strong> {{IUIAnimationVariableIntegerChangeHandler::OnIntegerValueChanged}}</strong> method.</p> <p>By default, a call made in a callback method to any other animation method results in the call failing and returning <strong>{{UI_E_ILLEGAL_REENTRANCY}}</strong>. However, there are exceptions to this default. The following methods can be successfully called from <strong>OnValueChanged</strong>:</p><ul> <li> <strong>{{IUIAnimationVariable::GetValue}} </strong> </li> <li> <strong>{{IUIAnimationVariable::GetFinalValue}} </strong> </li> <li> <strong>{{IUIAnimationVariable::GetPreviousValue}} </strong> </li> <li> <strong>{{IUIAnimationVariable::GetIntegerValue}} </strong> </li> <li> <strong>{{IUIAnimationVariable::GetFinalIntegerValue}} </strong> </li> <li> <strong>{{IUIAnimationVariable::GetPreviousIntegerValue}} </strong> </li> <li> <strong>{{IUIAnimationVariable::GetCurrentStoryboard}} </strong> </li> <li> <strong>{{IUIAnimationManager::GetVariableFromTag}} </strong> </li> <li> <strong>{{IUIAnimationManager::GetStoryboardFromTag}} </strong> </li> <li> <strong>{{IUIAnimationStoryboard::GetTag}} </strong> </li> <li> <strong>{{IUIAnimationVariable::GetTag}} </strong> </li> </ul> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p> Defines a method for handling animation variable update events.</p> <p> <strong> OnIntegerValueChanged</strong> receives animation variable value updates as <strong>{{INT32}}</strong> values. To receive value updates as <strong>{{DOUBLE}}</strong> values, use the <strong>{{IUIAnimationVariableChangeHandler::OnValueChanged}}</strong> method.</p> <p> Handles events that occur when the value of an animation variable changes.</p><p>This method receives updates as <strong>{{INT32}}</strong> values. To receive updates as <strong>{{DOUBLE}}</strong> values, use the <strong>{{IUIAnimationVariableChangeHandler::OnValueChanged}}</strong> method.</p> <p>The rounding mode for an animation variable is specified using the <strong>{{IUIAnimationVariable::SetRoundingMode}}</strong> method.</p><p><strong>OnIntegerValueChanged</strong> events might occur less frequently than <strong>OnValueChanged</strong> events because values such as 2.2, 2.3, 2.4 would all be rounded to the same integer.</p><p>By default, a call made in a callback method to any other animation method results in the call failing and returning <strong>{{UI_E_ILLEGAL_REENTRANCY}}</strong>. However, there are exceptions to this default. The following methods can be successfully called from <strong>OnIntegerValueChanged</strong>:</p><ul> <li> <strong>{{IUIAnimationVariable::GetCurrentStoryboard}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetFinalIntegerValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetFinalValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetIntegerValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetPreviousIntegerValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetPreviousValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetValue}}</strong> </li> <li> <strong>{{IUIAnimationManager::GetStoryboardFromTag}}</strong> </li> <li> <strong>{{IUIAnimationManager::GetVariableFromTag}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::GetTag}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetTag}}</strong> </li> </ul> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p> Defines methods for handling status and update events for a storyboard.</p> <p> Handles events that occur when a storyboard's status changes.</p> <p>By default, a call made in a callback method to any other animation method results in the call failing and returning <strong>{{UI_E_ILLEGAL_REENTRANCY}}</strong>. However, there are exceptions to this default. The following methods can be successfully called from <strong>OnStoryboardStatusChanged</strong>:</p><ul> <li> <strong>{{IUIAnimationManager::CreateAnimationVariable}}</strong> </li> <li> <strong>{{IUIAnimationManager::CreateStoryboard}}</strong> </li> <li> <strong>{{IUIAnimationManager::GetStoryboardFromTag}}</strong> </li> <li> <strong>{{IUIAnimationManager::GetVariableFromTag}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::Abandon}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::AddKeyframeAtOffset}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::AddKeyframeAfterTransition}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::AddTransition}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::AddTransitionAtKeyframe}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::AddTransitionBetweenKeyframes}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::Conclude}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::Finish}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::GetTag}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::HoldVariable}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::RepeatBetweenKeyframes}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::SetLongestAcceptableDelay}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::SetStoryboardEventHandler}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::SetTag}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::Schedule}}</strong> </li> <li> <strong>{{IUIAnimationTransition::GetDuration}}</strong> </li> <li> <strong>{{IUIAnimationTransition::IsDurationKnown}}</strong> </li> <li> <strong>{{IUIAnimationTransition::SetInitialValue}}</strong> </li> <li> <strong>{{IUIAnimationTransition::SetInitialVelocity}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetCurrentStoryboard}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetFinalIntegerValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetFinalValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetIntegerValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetPreviousIntegerValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetPreviousValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetTag}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable::SetTag}}</strong> </li> </ul> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The storyboard whose status has changed.</p> </dd> <dd> <p> The new status.</p> </dd> <dd> <p> The previous status.</p> </dd> <p> Handles events that occur when a storyboard is updated.</p> <p>This method is called when the value of at least one of the variables that a storyboard is animating has changed since the last call to the <strong>{{IUIAnimationManager::Update}}</strong> method.</p><p>By default, a call made in a callback method to any other animation method results in the call failing and returning <strong>{{UI_E_ILLEGAL_REENTRANCY}}</strong>. However, there are exceptions to this default. The following methods can be successfully called from <strong>OnStoryboardUpdated</strong>:</p><ul> <li> <strong>{{IUIAnimationManager::GetStoryboardFromTag}}</strong> </li> <li> <strong>{{IUIAnimationManager::GetVariableFromTag}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::GetTag}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetCurrentStoryboard}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetFinalIntegerValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetFinalValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetIntegerValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetPreviousIntegerValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetPreviousValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetTag}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetValue}}</strong> </li> </ul> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The storyboard that has been updated.</p> </dd> <p> Defines a method for priority comparison that the animation manager uses to resolve scheduling conflicts.</p> <p>A single animation variable can be included in multiple storyboards, but multiple storyboards cannot animate the same variable at the same time. If a newly scheduled storyboard attempts to animate one or more variables that are currently scheduled for animation by different storyboards, a scheduling conflict occurs. To determine which storyboard has priority, the animation manager can call <strong>HasPriority</strong> on one or more priority comparison handlers provided by the application.</p> <p> Determines whether a new storyboard has priority over a scheduled storyboard.</p> <p> A single animation variable can be included in multiple storyboards, but multiple storyboards cannot animate the same variable at the same time. If a new storyboard attempts to animate one or more variables that are currently scheduled for animation by a different storyboard, a scheduling conflict occurs. To determine which storyboard has priority, the animation manager can call <strong>HasPriority</strong> on one or more priority comparison handlers provided by the application.</p><p>Registering priority comparison objects is optional. By default, all storyboards can be trimmed, concluded or compressed to prevent failure, but none can be canceled, and by default no storyboards will be canceled or trimmed to prevent a delay.</p><p>By default, a call made in a callback method to any other animation method results in the call failing and returning <strong>{{UI_E_ILLEGAL_REENTRANCY}}</strong>. However, there are exceptions to this default. The following methods can be successfully called from <strong>HasPriority</strong>:</p><ul> <li> <strong>{{IUIAnimationManager::GetStoryboardFromTag}}</strong> </li> <li> <strong>{{IUIAnimationManager::GetVariableFromTag}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::GetTag}}</strong> </li> <li> <strong>{{IUIAnimationVariable::GetTag}}</strong> </li> </ul> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p><em>newStoryboard</em> has priority.</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_FALSE}}</strong></dt> </dl> </td><td> <p><em>scheduledStoryboard</em> has priority.</p> </td></tr> </table><p>?</p> <dd> <p> The currently scheduled storyboard.</p> </dd> <dd> <p> The new storyboard that is interrupting the scheduled storyboard specified in <em>scheduledStoryboard</em>.</p> </dd> <dd> <p> The potential effect on <em>newStoryboard</em> if <em>scheduledStoryboard</em> has a higher priority.</p> </dd> <p> Creates a smooth-stop transition.</p> <p>A smooth-stop transition slows down as it approaches the specified final value, and reaches it with a velocity of zero. The duration of the transition is determined by the initial velocity, the difference between the initial and final values, and the specified maximum duration. If there is no solution consisting of a single parabolic arc, this method creates a cubic transition.</p><p>The figure below shows the effect on an animation variable over time during a smooth-stop transition.</p><p></p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The maximum duration of the transition.</p> </dd> <dd> <p> The value of the animation variable at the end of the transition.</p> </dd> <dd> <p> The new smooth-stop transition.</p> </dd> <p> Creates an instantaneous transition.</p> <p>During an instantaneous transition, the value of the animation variable changes instantly from its current value to a specified final value. The duration of this transition is always zero.</p><p>The figure below shows the effect on an animation variable over time during an instantaneous transition.</p><p></p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The value of the animation variable at the end of the transition.</p> </dd> <dd> <p> The new instantaneous transition.</p> </dd> <p> Creates a constant transition.</p> <p>During a constant transition, the value of an animation variable remains at the initial value over the duration of the transition.</p><p>The figure below shows the effect on an animation variable over time during a constant-duration transition.</p><p></p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The duration of the transition.</p> </dd> <dd> <p> The new constant transition.</p> </dd> <p> Creates a discrete transition.</p> <p>During a discrete transition, the animation variable remains at the initial value for a specified delay time, then switches instantaneously to a specified final value and remains at that value for a given hold time.</p><p>The figure below shows the effect on an animation variable over time during a discrete transition.</p><p></p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The amount of time by which to delay the instantaneous switch to the final value.</p> </dd> <dd> <p> The value of the animation variable at the end of the transition.</p> </dd> <dd> <p>The amount of time by which to hold the variable at its final value.</p> </dd> <dd> <p> The new discrete transition.</p> </dd> <p> Creates a linear transition.</p> <p>During a linear transition, the value of the animation variable transitions linearly from its initial value to a specified final value.</p><p>The figure below shows the effect on an animation variable over time during a linear transition.</p><p></p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The duration of the transition.</p> </dd> <dd> <p> The value of the animation variable at the end of the transition.</p> </dd> <dd> <p> The new linear transition.</p> </dd> <p> Creates a linear-speed transition.</p> <p>During a linear-speed transition, the value of the animation variable changes at a specified rate. The duration of the transition is determined by the difference between the initial value and the specified final value.</p><p>The figure below shows the effect on an animation variable over time during a linear-speed transition.</p><p></p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The absolute value of the velocity.</p> </dd> <dd> <p> The value of the animation variable at the end of the transition.</p> </dd> <dd> <p> The new linear-speed transition.</p> </dd> <p> Creates a sinusoidal-velocity transition, with an amplitude determined by the initial velocity.</p> <p>The value of the animation variable oscillates around the initial value over the entire duration of a sinusoidal-range transition. The amplitude of the oscillation is determined by the velocity when the transition begins.</p><p>The figure below shows the effect on an animation variable over time during a sinusoidal-velocity transition.</p><p></p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The duration of the transition.</p> </dd> <dd> <p>The period of oscillation of the sinusoidal wave in seconds.</p> </dd> <dd> <p> The new sinusoidal-velocity transition.</p> </dd> <p> Creates a sinusoidal-range transition, with a specified range of oscillation.</p> <p>The value of the animation variable fluctuates between the specified minimum and maximum values over the entire duration of a sinusodial-range transition. The <em>slope</em> parameter is used to disambiguate between the two possible sine waves specified by the other parameters.</p><p>The figure below shows the effect on an animation variable over time during a sinusoidal-range transition. Passing in the <strong>{{UI_ANIMATION_SLOPE_INCREASING}}</strong> enumeration value yields a wave like the solid curve shown in the figure, whereas the <strong>{{UI_ANIMATION_SLOPE_DECREASING}}</strong> value yields a wave like the dashed curve.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The duration of the transition.</p> </dd> <dd> <p>The value of the animation variable at a trough of the sinusoidal wave.</p> </dd> <dd> <p>The value of the animation variable at a peak of the sinusoidal wave.</p> </dd> <dd> <p>The period of oscillation of the sinusoidal wave, in seconds.</p> </dd> <dd> <p>The slope at the start of the transition.</p> </dd> <dd> <p> The new sinusoidal-range transition.</p> </dd> <p> Creates an accelerate-decelerate transition.</p> <p>During an accelerate-decelerate transition, the animation variable speeds up and then slows down over the duration of the transition, ending at a specified value. You can control how quickly the variable accelerates and decelerates independently, by specifying different acceleration and deceleration ratios.</p><p>When the initial velocity is zero, the acceleration ratio is the fraction of the duration that the variable will spend accelerating; likewise with the deceleration ratio. If the initial velocity is nonzero, it is the fraction of the time between the velocity reaching zero and the end of transition. The acceleration ratio and the deceleration ratio should sum to a maximum of 1.0. </p><p>The figures below show the effect on animation variables with different initial velocities during accelerate-decelerate transitions.</p><strong>Note</strong>??d' in the above figure on the right shows the time between the velocity reaching zero and the end of the transition.? <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The duration of the transition.</p> </dd> <dd> <p> The value of the animation variable at the end of the transition.</p> </dd> <dd> <p> The ratio of the time spent accelerating to the duration.</p> </dd> <dd> <p> The ratio of the time spent decelerating to the duration.</p> </dd> <dd> <p> The new accelerate-decelerate transition.</p> </dd> <p> Creates a reversal transition.</p> <p> A reversal transition smoothly changes direction over the specified duration. The final value will be the same as the initial value and the final velocity will be the negative of the initial velocity. The figure below shows such a reversal transition.</p><p></p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The duration of the transition.</p> </dd> <dd> <p> The new reversal transition.</p> </dd> <p> Creates a cubic transition.</p> <p>During a cubic transition, the value of the animation variable changes from its initial value to a specified final value over the duration of the transition, ending at a specified velocity.</p><p>The figure below shows the effect on an animation variable over time during a cubic transition.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The duration of the transition.</p> </dd> <dd> <p> The value of the animation variable at the end of the transition.</p> </dd> <dd> <p> The velocity of the variable at the end of the transition.</p> </dd> <dd> <p> The new cubic transition.</p> </dd> <p> Creates a smooth-stop transition.</p> <p>A smooth-stop transition slows down as it approaches the specified final value, and reaches it with a velocity of zero. The duration of the transition is determined by the initial velocity, the difference between the initial and final values, and the specified maximum duration. If there is no solution consisting of a single parabolic arc, this method creates a cubic transition.</p><p>The figure below shows the effect on an animation variable over time during a smooth-stop transition.</p><p></p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The maximum duration of the transition.</p> </dd> <dd> <p> The value of the animation variable at the end of the transition.</p> </dd> <dd> <p> The new smooth-stop transition.</p> </dd> <p> Creates a parabolic-acceleration transition.</p> <p> During a parabolic-acceleration transition, the value of the animation variable changes from the initial value to the final value ending at the specified velocity. You can control how quickly the variable reaches the final value by specifying the rate of acceleration.</p><p>The figure below shows the effect on an animation variable over time during a parabolic-acceleration transition.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The value of the animation variable at the end of the transition.</p> </dd> <dd> <p>The velocity at the end of the transition.</p> </dd> <dd> <p> The acceleration during the transition.</p> </dd> <dd> <p> The new parabolic-acceleration transition.</p> </dd> <p> Defines methods for creating a custom interpolator.</p> <p>Client applications can use the transitions provided in <strong>{{IUIAnimationTransitionLibrary}}</strong> or in a library provided by a third party; however, if you need custom behavior, you can create your own transitions by implementing the <strong>{{IUIAnimationInterpolator}}</strong> interface.</p><p>Before Windows Animation can use your custom interpolator, you must wrap it in an object that implements <strong>{{IUIAnimationTransition}}</strong> by calling the <strong>{{IUIAnimationTransitionFactory::CreateTransition}}</strong> method and passing in the custom interpolator. After the interpolator is wrapped, client applications interact with your interpolator using the <strong>{{IUIAnimationTransition}}</strong> interface.</p><p>Custom interpolators can be reused across applications, but it is recommended that they be exposed using factory interfaces that return <strong>{{IUIAnimationTransition}}</strong> interfaces.</p> <p>Sets the initial value and velocity at the start of the transition.</p> <p>Windows Animation always calls <strong>SetInitialValueAndVelocity</strong> before calling the other methods of <strong>{{IUIAnimationInterpolator}}</strong> at different offsets. However, it can be called multiple times with different parameters. Interpolators can cache internal state to improve performance, but they must update this cached state each time <strong>SetInitialValueAndVelocity</strong> is called and ensure that the results of subsequent calls to these methods reflect the updated state.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The initial value.</p> </dd> <dd> <p>The initial velocity.</p> </dd> <p> Sets the duration of the transition.</p> <p>Windows Animation calls this method only after calling the <strong>GetDependencies</strong> method, and only if that call returns <strong>{{UI_ANIMATION_DEPENDENCY_DURATION}}</strong> as one of its <em>durationDependencies</em> flags.</p><p>Typically, an interpolator with a duration dependency will have a duration parameter in its associated creation method of <strong>{{IUIAnimationTransitionFactory}}</strong>. The interpolator should store its duration when first initialized and overwrite it when <strong>SetDuration</strong> is called.</p><p>Windows Animation always calls the <strong>SetInitialValueAndVelocity</strong> method to set the initial value and velocity before calling <strong>SetDuration</strong>, so a custom interpolator need not check whether the initial value and velocity have been set.</p><p>Windows Animation can call <strong>SetInitialValueAndVelocity</strong> and <strong>SetDuration</strong> multiple times with different parameters. Interpolators can cache internal state to improve performance, but they must update this cached state each time <strong>SetInitialValueAndVelocity</strong> is called and ensure that the results of subsequent calls to <strong>SetDuration</strong> reflect the updated state.</p> <p> If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The duration of the transition.</p> </dd> <p>Gets the duration of a transition.</p> <p>Windows Animation always calls the <strong>SetInitialValueAndVelocity</strong> method to set the initial value and velocity before calling <strong>GetDuration</strong>, so a custom interpolator need not check whether the initial value and velocity have been set.</p><p>Windows Animation can call <strong>SetInitialValueAndVelocity</strong> multiple times with different parameters. Interpolators can cache internal state to improve performance, but they must update this cached state each time <strong>SetInitialValueAndVelocity</strong> is called and ensure that the results of subsequent calls to <strong>GetDuration</strong> reflect the updated state.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The duration of the transition.</p> </dd> <p>Gets the final value at the end of the transition.</p> <p>Windows Animation always calls the <strong>SetInitialValueAndVelocity</strong> method to set the initial value and velocity before calling <strong>GetFinalValue</strong>, so a custom interpolator need not check whether the initial value and velocity have been set.</p><p>Windows Animation can call <strong>SetInitialValueAndVelocity</strong> multiple times with different parameters. Interpolators can cache internal state to improve performance, but they must update this cached state each time <strong>SetInitialValueAndVelocity</strong> is called and ensure that the results of subsequent calls to <strong>GetFinalValue</strong> reflect the updated state.</p> <p> If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The final value.</p> </dd> <p> Interpolates the value of an animation variable at the specified offset.</p> <p>Windows Animation always calls the <strong>SetInitialValueAndVelocity</strong> method to set the initial value and velocity before calling <strong>InterpolateValue</strong>, so a custom interpolator need not check whether the initial value and velocity have been set.</p><p>Windows Animation can call <strong>SetInitialValueAndVelocity</strong> multiple times with different parameters. Interpolators can cache internal state to improve performance, but they must update this cached state each time <strong>SetInitialValueAndVelocity</strong> is called and ensure that the results of subsequent calls to <strong>InterpolateValue</strong> reflect the updated state.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The offset from the start of the transition.</p> <p>This parameter is always greater than or equal to zero and less than the duration of the transition. This method is not called if the duration of the transition is zero.</p> </dd> <dd> <p>The interpolated value.</p> </dd> <p> Interpolates the velocity, or rate of change, at the specified offset.</p> <p>Windows Animation always calls the <strong>SetInitialValueAndVelocity</strong> method to set the initial value and velocity before calling <strong>InterpolateVelocity</strong>, so a custom interpolator need not check whether the initial value and velocity have been set.</p><p>Windows Animation can call <strong>SetInitialValueAndVelocity</strong> multiple times with different parameters. Interpolators can cache internal state to improve performance, but they must update this cached state each time <strong>SetInitialValueAndVelocity</strong> is called and ensure that the results of subsequent calls to <strong>InterpolateVelocity</strong> reflect the updated state.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The offset from the start of the transition.</p> <p>The offset is always greater than or equal to zero and less than or equal to the duration of the transition. This method is not called if the duration of the transition is zero.</p> </dd> <dd> <p> The interpolated velocity.</p> </dd> <p> Gets the aspects of the interpolator that depend on the initial value or velocity passed to <strong>SetInitialValueAndVelocity</strong>, or that depend on the duration passed to <strong>SetDuration</strong>.</p> <p>This method is called to identify which aspects of the custom interpolator are affected by certain inputs: value, velocity, and duration. For each of these inputs, the interpolator returns either of the following:</p><ul> <li>The bitwise-{{OR}} of any members of <strong>{{UI_ANIMATION_DEPENDENCIES}}</strong> that apply.</li> <li><strong>{{UI_ANIMATION_DEPENDENCY_NONE}}</strong> if nothing depends on the input.</li> </ul><p>For example, consider an interpolator (1) that accepts a final value as a parameter, (2) that always comes to a gradual stop at that final value, and (3) whose duration is determined by the difference between the final and initial values. The interpolator should return <strong>{{UI_ANIMATION_DEPENDENCY_INTERMEDIATE_VALUES}}</strong>|<strong>{{UI_ANIMATION_DURATION}}</strong> for <em>initialValueDependencies</em>. It should not return <strong>{{UI_ANIMATION_DEPENDENCY_FINAL_VALUE}}</strong> because this is set when the interpolator is created and is not affected by the initial value. Likewise it should not return <strong>{{UI_ANIMATION_DEPENDENCY_FINAL_VELOCITY}}</strong> because the slope of the curve is defined to always be zero when it reaches the final value.</p><p>It is important that an interpolator return correct set of flags. If a flag is not present for an output, Windows Animation assumes that the corresponding parameter does not affect that aspect of the interpolator's results. For example, if the custom interpolator does not include <strong>{{UI_ANIMATION_DEPENDENCY_FINAL_VALUE}}</strong> for <em>initialVelocityDependencies</em>, Windows Animation may call <strong>SetInitialValueAndVelocity</strong> with an arbitrary velocity parameter, then call <strong>GetFinalValue</strong> to determine the final value. The interpolator's implementation of <strong>GetFinalValue</strong> must return the same result no matter what velocity parameter has been passed to <strong>SetInitialValueAndVelocity</strong> because the interpolator has claimed that the transition's final value does not depend on the initial velocity.</p><strong>Note</strong>??If the flags returned for <em>durationDependencies</em> do not include <strong>{{UI_ANIMATION_DEPENDENCY_DURATION}}</strong>, <strong>SetDuration</strong> will never be called on the interpolator.? <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p> Defines a method for creating transitions from custom interpolators.</p> <p> When an application requires animation effects that are not available in the transition library, developers can implement custom transitions that it can use. A custom transition is created by first implementing the interpolator function for the transition, and then by using a factory object to generate transitions from the interpolator. An interpolator must implement the <strong>{{IUIAnimationInterpolator}}</strong> interface; an implementation of the transition factory object is provided by <strong>{{UIAnimationTransitionFactory}}</strong>.</p> <p> Creates a transition from a custom interpolator.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The interpolator from which a transition is to be created. The specified object must implement the <strong>{{IUIAnimationInterpolator}}</strong> interface.</p> </dd> <dd> <p> The new transition.</p> </dd> <p> Defines an animation timer, which provides services for managing animation timing.</p> <p>A timer helps to manage animation rendering by automatically indicating the passage of a small unit of time, called a tick. In turn, ticks can trigger animation rendering or other animation events. Each animation timer provides timing for a single animation manager.</p><p>The timing system is designed to provide the necessary timing services needed to support animations and does not require applications to play an explicit role in generating the ticks. The animation timer can be set up to automatically update the animation manager for each tick without application-side handling.</p><p>An application may not need to use a timer with Windows Animation, depending on the graphics platform it is using. For example, an application drawing with Direct2D or Direct3D can synchronize to monitor's refresh rate, yielding very smooth animation. However, such applications may still find the <strong>{{IUIAnimationTimer}}</strong> interface useful for its <strong>GetTime</strong> method, which returns an accurate system time in <strong>{{UI_ANIMATION_SECONDS}}</strong>, the units used throughout the Windows Animation {{API}}.</p> <p> Specifies a timer update handler.</p> <p> The timer update handler receives time updates (ticks) from the timer. The timer indicates an update by calling the <strong>{{IUIAnimationTimerUpdateHandler::OnUpdate}}</strong> method on the specified handler.</p><p>Passing <strong>{{NULL}}</strong> for the <em>updateHandler</em> parameter causes Windows Animation to release its reference to any handler object you passed in earlier. This technique can be essential for breaking reference cycles without having to call the <strong>{{IUIAnimationManager::Shutdown}}</strong> method.</p> <p>If the method succeeds, it returns {{S_OK}}. If the update handler is already connected to a timer, this method returns <strong>{{UI_E_TIMER_CLIENT_ALREADY_CONNECTED}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> A timer update handler, or <strong>{{NULL}}</strong> (see Remarks). The specified object must implement the <strong>{{IUIAnimationTimerUpdateHandler}}</strong> interface.</p> </dd> <dd> <p> A member of <strong>{{UI_ANIMATION_IDLE_BEHAVIOR}}</strong> that specifies the behavior of the timer when it is idle.</p> </dd> <p> Specifies a timer event handler.</p> <p> Timing events include the <strong>OnPreUpdate</strong>, <strong>OnPostUpdate</strong>, and <strong>OnRenderingTooSlow</strong> methods of the <strong>{{IUIAnimationTimerEventHandler}}</strong> interface.</p><p>Passing <strong>{{NULL}}</strong> for the <em>handler</em> parameter causes Windows Animation to release its reference to any handler object you passed in earlier. This technique can be essential for breaking reference cycles without having to call the <strong>{{IUIAnimationManager::Shutdown}}</strong> method.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> A timer event handler. The specified object must implement the <strong>{{IUIAnimationTimerEventHandler}}</strong> interface or be <strong>{{NULL}}</strong>. See Remarks.</p> </dd> <p> Enables the animation timer.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p> Disables the animation timer.</p> <p> If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p> Determines whether the timer is currently enabled.</p> <p> Returns {{S_OK}} if the animation timer is enabled, {{S_FALSE}} if the animation timer is disabled, or an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p> Gets the current time.</p> <p> This method can be used in both the application-driven and timer-driven configurations to retrieve the system time in <strong>{{UI_ANIMATION_SECONDS}}</strong>, the units used throughout the Windows Animation {{API}}.</p> <p> If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See Windows Animation Error Codes for a list of error codes.</p> <dd> <p> The current time, in <strong>{{UI_ANIMATION_SECONDS}}</strong>.</p> </dd> <p> Sets the frame rate below which the timer notifies the application that rendering is too slow.</p> <p> If the rendering frame rate for an animation falls below the specified frame rate, an <strong>{{IUIAnimationTimerEventHandler::OnRenderingTooSlow}}</strong> event is raised.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The minimum desirable frame rate, in frames per second.</p> </dd> <p> Defines methods for handling timing update events.</p> <p>The <strong>{{UIAnimationManager}}</strong> object implements this interface, so a client application can query the <strong>{{UIAnimationManager}}</strong> object for this interface and then pass the interface to <strong>{{IUIAnimationTimer::SetTimerUpdateHandler}}</strong>. It is not necessary to disconnect the <strong>{{UIAnimationManager}}</strong> and <strong>{{UIAnimationTimer}}</strong> objects; releasing them both is sufficient to clean up.</p> <p> Handles update events from the timer.</p> <p>This method is used by the <strong>{{UIAnimationTimer}}</strong> object to update the state of the <strong>{{UIAnimationManager}}</strong> object. The <strong>{{UIAnimationTimer}}</strong> object calls <strong>{{UIAnimationTimerEventHandler::OnPostUpdate}}</strong> only when calls to this method return a result of <strong>{{UI_ANIMATION_UPDATE_VARIABLES_CHANGED}}</strong>.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The current timer time, in seconds.</p> </dd> <dd> <p> Receives a member of the <strong>{{UI_ANIMATION_UPDATE_RESULT}}</strong> enumeration, indicating whether any animation variables changed as a result of the update.</p> </dd> <p> Specifies a handler for timer client status change events.</p> <p>If the update handler is already connected to the timer, this method returns <strong>{{UI_E_TIMER_CLIENT_ALREADY_CONNECTED}}.</strong></p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> A handler for timer client events. The specified object must implement <strong>{{IUIAnimationTimerUpdateHandler}}</strong>. </p> </dd> <p> Clears the handler for timer client status change events.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p> Defines a method for handling events related to changes in timer client status.</p> <p> Handles events that occur when the status of the timer's client changes.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The new status of the timer's client.</p> </dd> <dd> <p> The previous status of the timer's client.</p> </dd> <p> Defines methods for handling timing events.</p> <p> Use <strong> SetTimerEventHandler</strong> to specify the timing events handler for an instance of <strong>{{IUIAnimationTimer}}</strong>. </p> <p> Handles events that occur before an animation update begins.</p> <p>For each tick, a timer calls the following sequence of methods:</p><ul> <li><strong>{{IUIAnimationTimerEventHandler::OnPreUpdate}}</strong></li> <li> <strong>{{IUIAnimationTimerUpdateHandler::OnUpdate}}</strong> </li> <li> <strong>{{IUIAnimationTimerEventHandler::OnPostUpdate}}</strong> </li> </ul><p><strong>OnPreUpdate</strong> and <strong>OnPostUpdate</strong> are called on the <strong>{{IUIAnimationTimerEventHandler}}</strong> registered with the <strong>{{IUIAnimationTimer::SetTimerEventHandler}}</strong> method. <strong>OnUpdate</strong> is called on the <strong>{{IUIAnimationTimerUpdateHandler}}</strong> registered with the <strong>{{IUIAnimationTimer::SetTimerUpdateHandler}}</strong> method.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>{{UIAnimation}} Error Codes</strong> for a list of error codes.</p> <p> Handles events that occur after an animation update is finished.</p> <p>The <strong>{{UIAnimationTimer}}</strong> object calls this method only when calls to <strong>{{IUIAnimationTimerUpdateHandler::OnUpdate}}</strong> return a result of <strong>{{UI_ANIMATION_UPDATE_VARIABLES_CHANGED}}</strong>.</p><p>For each tick, a timer calls the following sequence of methods:</p><ul> <li> <strong>{{IUIAnimationTimerEventHandler::OnPreUpdate}}</strong> </li> <li> <strong>{{IUIAnimationTimerUpdateHandler::OnUpdate}}</strong> </li> <li><strong>{{IUIAnimationTimerEventHandler::OnPostUpdate}}</strong></li> </ul><p> <strong>OnPreUpdate</strong> and <strong>OnPostUpdate</strong> are called on the <strong>{{IUIAnimationTimerEventHandler}}</strong> registered with <strong>{{IUIAnimationTimer::SetTimerEventHandler}}</strong>. <strong>OnUpdate</strong> is called on the <strong>{{IUIAnimationTimerUpdateHandler}}</strong> registered with <strong>{{IUIAnimationTimer::SetTimerUpdateHandler}}</strong>.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>{{UIAnimation}} Error Codes</strong> for a list of error codes.</p> <p> Handles events that occur when the rendering frame rate for an animation falls below a minimum desirable frame rate. </p> <p> The minimum desirable frame rate is specified using the <strong>{{IUIAnimationTimer::SetFrameRateThreshold}}</strong> method.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>{{UIAnimation}} Error Codes</strong> for a list of error codes.</p> <dd> <p> The current frame rate, in frames per second.</p> </dd> <p>Retrieves an estimate of the time interval before the next animation event.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The estimated time, in seconds.</p> </dd> <p>Creates a new animation variable for each specified dimension.</p> <p>The initial value of an animation variable is specified when the variable is created. After an animation variable is created, its value cannot be changed directly; it must be updated through the animation manager.</p><p>An animation variable is typically created to represent each visual characteristic that is to be animated. For example, an application might create three animation variables for the X, Y, and Z coordinates of an object that can move freely within a a three-dimensional space.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>A vector (of size <em>cDimension</em>) of initial values for the animation variable.</p> </dd> <dd> <p>The number of dimensions that require animated values. This parameter specifies the number of values listed in <em>initialValue</em>.</p> </dd> <dd> <p> The new animation variable.</p> </dd> <p>Creates a new animation variable.</p> <p>The initial value of an animation variable is specified when the variable is created. After an animation variable is created, its value cannot be changed directly; it must be updated through the animation manager.</p><p>An animation variable is typically created to represent each visual characteristic that is to be animated. For example, an application might create two animation variables for the X and Y coordinates of an object that can move freely within a window.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The initial value for the animation variable.</p> </dd> <dd> <p> The new animation variable.</p> </dd> <p> Creates and schedules a single-transition storyboard.</p> <p>This method schedules a new storyboard by creating the storyboard, applying the specified transition to the specified variable, and then scheduling the storyboard.</p> <p>Returns {{S_OK}} if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The animation variable.</p> </dd> <dd> <p> A transition to be applied to the animation variable.</p> </dd> <dd> <p> The current system time.</p> </dd> <p>Creates a new storyboard.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The new storyboard.</p> </dd> <p> Finishes all active storyboards within the specified time interval.</p> <p> Calling the <strong>FinishAllStoryboards</strong> method ensures that all active storyboards finish within the specified completion deadline. If a storyboard is scheduled to play past the deadline, it is compressed.</p><p>A storyboard is considered active if a call to the <strong>{{IUIAnimationStoryboard::GetStatus}}</strong> method returns <strong>{{UI_ANIMATION_STORYBOARD_PLAYING}}</strong> or <strong>{{UI_ANIMATION_STORYBOARD_SCHEDULED}}</strong>.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The maximum time interval during which all storyboards must be finished.</p> </dd> <p> Abandons all active storyboards.</p> <p>Calling this method is equivalent to calling the <strong>{{IUIAnimationStoryboard::Abandon}}</strong> method for each active storyboard. </p><p>A storyboard is considered active if a call to the <strong>{{IUIAnimationStoryboard::GetStatus}}</strong> method returns <strong>{{UI_ANIMATION_STORYBOARD_PLAYING}}</strong> or <strong>{{UI_ANIMATION_STORYBOARD_SCHEDULED}}</strong>.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p>Updates the values of all animation variables.</p> <p>Calling this method advances the animation manager to <em>timeNow</em>, changes the status of all storyboards as necessary, and updates any animation variables to appropriate interpolated values. If the animation manager is paused, no storyboards or variables are updated. If the animation mode is <strong>{{UI_ANIMATION_MODE_DISABLED}}</strong>, all scheduled storyboards finish playing immediately. If the values of any variables change during this call, the value of <em>updateResult</em> is <strong>{{UI_ANIMATION_UPDATE_VARIABLES_CHANGED}}</strong>; otherwise, it is <strong>{{UI_ANIMATION_UPDATE_NO_CHANGE}}</strong>. </p> <p>Returns {{S_OK}} if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The current system time. This parameter must be greater than or equal to 0.0.</p> </dd> <dd> <p>The result of the update. You can omit this parameter from calls to this method.</p> </dd> <p> Gets the animation variable with the specified tag.</p> <p> A tag is a pairing of an integer identifier (<em>id</em>) with a {{COM}} object (<em>object</em>). An application can use tags to identify animation variables and storyboards. {{NULL}} is a valid object component of a tag; therefore, the <em>object</em> parameter can be {{NULL}}.</p><p>Tags are not necessarily unique; this method returns <strong>{{UI_E_AMBIGUOUS_MATCH}}</strong> if more than one animation variable exists with the specified tag.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The object portion of the tag. This parameter can be {{NULL}}.</p> </dd> <dd> <p> The identifier portion of the tag.</p> </dd> <dd> <p> The animation variable that matches the specified tag, or <strong>{{NULL}}</strong> if no match is found.</p> </dd> <p> Gets the storyboard with the specified tag.</p> <p>A tag is a pairing of an integer identifier (<em>id</em>) with a {{COM}} object (<em>object</em>). An application can use tags to identify animation variables and storyboards. {{NULL}} is a valid object component of a tag; therefore, the <em>object</em> parameter can be {{NULL}}.</p><p>Tags are not necessarily unique; this method returns {{UI_E_AMBIGUOUS_MATCH}} if more than one storyboard exists with the specified tag.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The object portion of the tag. This parameter can be {{NULL}}.</p> </dd> <dd> <p> The identifier portion of the tag.</p> </dd> <dd> <p> The storyboard that matches the specified tag, or <strong>{{NULL}}</strong> if no match is found.</p> </dd> <p>Retrieves an estimate of the time interval before the next animation event.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The estimated time, in seconds.</p> </dd> <p> Gets the status of the animation manager.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The status of the animation manager.</p> </dd> <p> Sets the animation mode.</p> <p>Use this method to enable or disable animation globally. While animation is disabled, all storyboards finish immediately when they are scheduled. The default mode is <strong>{{UI_ANIMATION_MODE_SYSTEM_DEFAULT}}</strong>, which lets Windows decide when to enable or disable animation in the application.</p> <p>Returns {{S_OK}} if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The animation mode.</p> </dd> <p> Pauses all animations.</p> <p> When an animation manager is paused, its status is set to <strong>{{UI_ANIMATION_MANAGER_IDLE}}</strong>.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p> Resumes all animations.</p> <p> When an animation manager is resumed, and at least one animation is currently scheduled or playing, its status is set to <strong>{{UI_ANIMATION_MANAGER_BUSY}}</strong>.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p> Specifies a handler for animation manager status updates.</p> <p>Passing <strong>{{NULL}}</strong> for the <em>handler</em> parameter causes Windows Animation to release its reference to any handler object that you passed in earlier. This technique can be essential for breaking reference cycles without having to call the <strong>{{IUIAnimationManager2::Shutdown}}</strong> method.</p> <p>Returns <strong>{{S_OK}}</strong> if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The event handler to be called when the status of the animation manager changes. The specified object must implement the <strong>{{IUIAnimationManagerEventHandler}}</strong> interface or be <strong>{{NULL}}</strong>. See Remarks for more info.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, specifies that <strong>{{IUIAnimationManager2::EstimateNextEventTime}}</strong> will incorporate <em>handler</em> into its estimate of the time interval until the next animation event. No default value.</p> </dd> <p> Sets the priority comparison handler that determines whether a scheduled storyboard can be canceled.</p> <p>Setting a priority comparison handler with this method enables the application to indicate when scheduling conflicts can be resolved by canceling storyboards.</p><p>A scheduled storyboard can be canceled only if it hasn't started playing and the priority comparison object registered with this method returns <strong>{{S_OK}}</strong>. Canceled storyboards are completely removed from the schedule.</p><p>Passing <strong>{{NULL}}</strong> for the <em>comparison</em> parameter causes Windows Animation to release its reference to any priority comparison handler object that you passed in earlier. This technique can be essential for breaking reference cycles without having to call the <strong>{{IUIAnimationManager2::Shutdown}}</strong> method.</p> <p>Returns <strong>{{S_OK}}</strong> if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The priority comparison handler for cancelation. The specified object must implement the <strong>{{IUIAnimationPriorityComparison2}}</strong> interface or be <strong>{{NULL}}</strong>. See Remarks for more info.</p> </dd> <p> Sets the priority comparison handler that determines whether a scheduled storyboard can be trimmed.</p> <p> Setting a priority comparison handler with this method enables the application to indicate when scheduling conflicts can be resolved by trimming the scheduled storyboard.</p><p>A scheduled storyboard can be trimmed only if the priority comparison object registered with this method returns <strong>{{S_OK}}</strong>. If the new storyboard trims the scheduled storyboard, the scheduled storyboard can no longer affect a variable after the new storyboard begins to animate that variable.</p><p>Passing <strong>{{NULL}}</strong> for the <em>comparison</em> parameter causes Windows Animation to release its reference to any handler object that you passed in earlier. This technique can be essential for breaking reference cycles without having to call the <strong>{{IUIAnimationManager2::Shutdown}}</strong> method.</p> <p>Returns <strong>{{S_OK}}</strong> if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The priority comparison handler for trimming. The specified object must implement the <strong>{{IUIAnimationPriorityComparison}}</strong> interface or be <strong>{{NULL}}</strong>. See Remarks for more info.</p> </dd> <p> Sets the priority comparison handler that determines whether a scheduled storyboard can be compressed.</p> <p>Setting a priority comparison handler with this method enables the application to indicate when scheduling conflicts can be resolved by compressing the scheduled storyboard and any other storyboards animating the same variables.</p><p>A storyboard can be compressed only if the priority comparison object registered with this method returns <strong>{{S_OK}}</strong> for all the other scheduled storyboards that will be affected by compression. When the storyboards are compressed, time is temporarily accelerated for affected storyboards, so they play faster.</p><p>Passing <strong>{{NULL}}</strong> for the <em>comparison</em> parameter causes Windows Animation to release its reference to any handler object that you passed in earlier. This technique can be essential for breaking reference cycles without having to call the <strong>{{IUIAnimationManager2::Shutdown}}</strong> method.</p> <p>Returns <strong>{{S_OK}}</strong> if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The priority comparison handler for compression. The specified object must implement the <strong>{{IUIAnimationPriorityComparison2}}</strong> interface or be <strong>{{NULL}}</strong>. See Remarks for more info. </p> </dd> <p> Sets the priority comparison handler that determines whether a scheduled storyboard can be concluded.</p> <p>Setting a priority comparison handler with this method enables the application to indicate when scheduling conflicts can be resolved by concluding the scheduled storyboard.</p><p>A scheduled storyboard can be concluded only if it contains a loop with a repetition count of <strong>{{UI_ANIMATION_REPEAT_INDEFINITELY}}</strong> and the priority comparison object registered with this method returns <strong>{{S_OK}}</strong>. If the storyboard is concluded, the current repetition of the loop completes, and the rest of the storyboard then plays. </p><p>Passing <strong>{{NULL}}</strong> for the <em>comparison</em> parameter causes Windows Animation to release its reference to any handler object that you passed in earlier. This technique can be essential for breaking reference cycles without having to call the <strong>{{IUIAnimationManager2::Shutdown}}</strong> method.</p> <p>Returns <strong>{{S_OK}}</strong> if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The priority comparison handler for conclusion. The specified object must implement the <strong>{{IUIAnimationPriorityComparison2}}</strong> interface or be <strong>{{NULL}}</strong>. See Remarks for more info.</p> </dd> <p> Sets the default acceptable animation delay. This is the length of time that may pass before storyboards begin.</p> <p>For Windows Animation to schedule a storyboard successfully, the storyboard must begin before the longest acceptable delay has elapsed. Windows Animation determines this delay in the following order: the delay value set by calling <strong>{{IUIAnimationStoryboard::SetLongestAcceptableDelay}}</strong> for this specific storyboard, the delay value set by calling this method, or 0.0 if neither method has been called.</p> <p>Returns {{S_OK}} if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The default delay. This parameter can be a positive value, or <strong>{{UI_ANIMATION_SECONDS_EVENTUALLY}}</strong> (-1) to indicate that any finite delay is acceptable.</p> </dd> <p> Shuts down the animation manager and all its associated objects.</p> <p>Calling this method directs the animation manager, and all the objects it created, to release all their references to other objects. After <strong>{{IUIAnimationManager2::Shutdown}}</strong> has been called, no other methods may be called on the animation manager or on any objects that it created. An application can call this method to clean up if there is any possibility that the application has introduced a reference cycle that includes some animation objects.</p> <p>Returns {{S_OK}} if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p>Defines an animation variable, which represents a visual element that can be animated in multiple dimensions.</p> <p>Gets the number of dimensions that the animation variable is to be animated in.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The number of dimensions.</p> </dd> <p>Gets the value of the animation variable in the specified dimension.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The value of the animation variable.</p> </dd> <dd> <p>The dimension from which to get the value of the animation variable. </p> </dd> <p>Gets the value of the animation variable in the specified dimension.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The value of the animation variable.</p> </dd> <dd> <p>The dimension from which to get the value of the animation variable. </p> </dd> <p>Gets the animation curve of the animation variable.</p> <p>The application implements the <strong>{{IDCompositionAnimation}}</strong> object that is referenced by the <em>animation</em> parameter.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The object that generates a sequence of animation curve primitives.</p> </dd> <p>Gets the animation curve of the animation variable for the specified dimension.</p> <p>The application implements the <strong>{{IDCompositionAnimation}}</strong> object that is referenced by the <em>animation</em> parameter.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The object that generates a sequence of animation curve primitives.</p> </dd> <dd> <p>The number of animation curves. </p> </dd> <p>Gets the final value of the animation variable. This is the value after all currently scheduled animations have completed.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The final value of the animation variable.</p> </dd> <p>Gets the final value of the animation variable for the specified dimension. This is the value after all currently scheduled animations have completed.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The final value of the animation variable.</p> </dd> <dd> <p>The dimension from which to get the value of the animation variable. </p> </dd> <p>Gets the previous value of the animation variable. This is the value of the animation variable before the most recent update.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The previous value of the animation variable.</p> </dd> <p>Gets the previous value of the animation variable for the specified dimension. This is the value of the animation variable before the most recent update.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The previous value of the animation variable.</p> </dd> <dd> <p>The dimension from which to get the value of the animation variable. </p> </dd> <p>Gets the integer value of the animation variable.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The value of the animation variable as an integer.</p> </dd> <p>Gets the integer value of the animation variable for the specified dimension.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The value of the animation variable as an integer.</p> </dd> <dd> <p>The dimension from which to get the value of the animation variable. </p> </dd> <p>Gets the final integer value of the animation variable. This is the value after all currently scheduled animations have completed.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The final value of the animation variable as an integer.</p> </dd> <p>Gets the final integer value of the animation variable for the specified dimension. This is the value after all currently scheduled animations have completed.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The final value of the animation variable as an integer.</p> </dd> <dd> <p>The dimension from which to get the value of the animation variable. </p> </dd> <p>Gets the previous integer value of the animation variable in the specified dimension. This is the value of the animation variable before the most recent update.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The previous value of the animation variable as an integer.</p> </dd> <p>Gets the previous integer value of the animation variable for the specified dimension. This is the value of the animation variable before the most recent update.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The previous value of the animation variable as an integer.</p> </dd> <dd> <p>The dimension from which to get the value of the animation variable. </p> </dd> <p>Gets the active storyboard for the animation variable.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The active storyboard, or {{NULL}} if the animation variable is not being animated.</p> </dd> <p>Sets the lower bound (floor) for the value of the animation variable. The value of the animation variable should not fall below the specified value.</p> <p>Returns {{S_OK}} if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The lower bound for the value of the animation variable.</p> </dd> <p>Sets the lower bound (floor) value of each specified dimension for the animation variable. The value of each animation variable should not fall below its lower bound.</p> <p>Returns {{S_OK}} if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>A vector (of size <em>cDimension</em>) that contains the lower bound values of each dimension.</p> </dd> <dd> <p>The number of dimensions that require lower bound values. This parameter specifies the number of values listed in <em>bound</em>.</p> </dd> <p>Sets the upper bound (ceiling) for the value of the animation variable. The value of the animation variable should not rise above the specified value.</p> <p>Returns {{S_OK}} if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The upper bound for the value of the animation variable.</p> </dd> <p>Sets the upper bound (ceiling) value of each specified dimension for the animation variable. The value of each animation variable should not rise above its upper bound.</p> <p>Returns {{S_OK}} if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>A vector (of size <em>cDimension</em>) that contains the upper bound values of each dimension.</p> </dd> <dd> <p>The number of dimensions that require upper bound values. This parameter specifies the number of values listed in <em>bound</em>.</p> </dd> <p>Sets the rounding mode of the animation variable.</p> <p> An animation variable's rounding mode determines how a floating-point value is converted to an integer. The default mode for each variable is <strong>{{UI_ANIMATION_ROUNDING_NEAREST}}</strong>.</p> <p>Returns {{S_OK}} if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The rounding mode.</p> </dd> <p>Sets the tag of the animation variable. </p> <p> A tag is a pairing of an integer identifier (<em>id</em>) with a {{COM}} object (<em>object</em>), and it can be used by an application to identify an animation variable. Because <strong>{{NULL}}</strong> is a valid object component of a tag, the <em>object</em> parameter can be <strong>{{NULL}}</strong>.</p> <p>Returns <strong>{{S_OK}}</strong> if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The object portion of the tag. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <dd> <p>The identifier portion of the tag. </p> </dd> <p> Gets the tag of the animation variable.</p> <p>A tag is a pairing of an integer identifier (<em>id</em>) with a {{COM}} object (<em>object</em>); it can be used by an application to identify an animation variable.</p><p>The parameters are optional, so that the method can return both portions of the tag, or just the identifier or object portion.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The object portion of the tag.</p> </dd> <dd> <p> The identifier portion of the tag.</p> </dd> <p>Specifies a handler for changes to the value of the animation variable. </p> <p>Passing <strong>{{NULL}}</strong> for the <em>handler</em> parameter causes Windows Animation to release its reference to any handler object that you passed in earlier. This technique can be essential for breaking reference cycles without having to call the <strong>{{IUIAnimationManager2::Shutdown}}</strong> method.</p> <p>Returns <strong>{{S_OK}}</strong> if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The handler for changes to the value of the animation variable. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, specifies that the <strong>EstimateNextEventTime</strong> method will incorporate <em>handler</em> into its estimate of the time interval until the next animation event. No default value.</p> </dd> <p>Specifies a handler for changes to the integer value of the animation variable. </p> <p>Passing <strong>{{NULL}}</strong> for the <em>handler</em> parameter causes Windows Animation to release its reference to any handler object that you passed in earlier. This technique can be essential for breaking reference cycles without having to call the <strong>Shutdown</strong> method.</p><p> <strong>{{IUIAnimationVariableIntegerChangeHandler2::OnIntegerValueChanged}}</strong> is called only if the rounded value has changed since the last update.</p> <p>Returns <strong>{{S_OK}}</strong> if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>A reference to the handler for changes to the integer value of the animation variable. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, specifies that the <strong>EstimateNextEventTime</strong> method will incorporate <em>handler</em> into its estimate of the time interval until the next animation event. No default value.</p> </dd> <p>Specifies a handler for changes to the animation curve of the animation variable. </p> <p>Returns {{S_OK}} if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>A reference to the handler for changes to the animation curve of the animation variable. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <p>Extends the <strong>{{IUIAnimationTransition}}</strong> interface that defines a transition. An <strong>{{IUIAnimationTransition2}}</strong> transition determines how an animation variable changes over time in a given dimension.</p> <p>Gets the number of dimensions in which the animation variable has a transition specified.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The number of dimensions.</p> </dd> <p>Sets the initial value of the transition.</p> <p>Do not call this method after the transition has been added to a storyboard.</p> <p>Returns {{S_OK}} if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The initial value for the transition.</p> </dd> <p>Sets the initial value of the transition for each specified dimension in the animation variable.</p> <p>The animation manager should not call this method after the transition has been added to a storyboard.</p> <p>Returns <strong>{{S_OK}}</strong> if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>A vector (of size <em>cDimension</em>) that contains the initial values for the transition.</p> </dd> <dd> <p>The number of dimensions that require transition values. This parameter specifies the number of values listed in <em>value</em>.</p> </dd> <p>Sets the initial velocity of the transition.</p> <p>Returns {{S_OK}} if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The initial velocity for the transition.</p> </dd> <p>Sets the initial velocity of the transition for each specified dimension in the animation variable.</p> <p>Returns {{S_OK}} if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>A vector (of size <em>cDimension</em>) that contains the initial velocities for the transition.</p> </dd> <dd> <p>The number of dimensions that require transition velocities. This parameter specifies the number of values listed in <em>velocity</em>.</p> </dd> <p>Determines whether the duration of a transition is known.</p> <p>This method should not be called when the storyboard to which the transition has been added is scheduled or playing.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p> Gets the duration of the transition.</p> <p>An application should typically call the <strong>IsDurationKnown</strong> method before calling this method. </p><p>This method should not be called when the storyboard to which the transition has been added is scheduled or playing.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The duration of the transition, in seconds.</p> </dd> <p> Defines a method for handling updates to an <strong>animation manager</strong>.</p> <p> Handles status changes to an <strong>animation manager</strong>.</p> <p>Calls made to other Windows Animation methods from <strong>{{IUIAnimationManager2::OnManagerStatusChanged}}</strong> fail and return <strong>{{UI_E_ILLEGAL_REENTRANCY}}</strong>.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p>Defines a method for handling animation variable update events. <strong>{{IUIAnimationVariableChangeHandler2}}</strong> handles events that occur in a specified dimension.</p> <p> The <strong> OnValueChanged</strong> method receives animation variable value updates as <strong>{{DOUBLE}}</strong> values. To receive value updates as <strong>{{INT32}}</strong> values, use the <strong>{{IUIAnimationVariableIntegerChangeHandler2::OnIntegerValueChanged}}</strong> method.</p> <p> Handles events that occur when the value of an animation variable changes in the specified dimension.</p> <p>This method receives updates as <strong>{{DOUBLE}}</strong> values. To receive updates as <strong>{{INT32}}</strong> values, use the <strong> {{IUIAnimationVariableIntegerChangeHandler2::OnIntegerValueChanged}}</strong> method.</p><p>By default, a call made in a callback method to any other animation method results in the call failing and returning <strong>{{UI_E_ILLEGAL_REENTRANCY}}</strong>. However, there are exceptions to this default. The following methods can be successfully called from <strong>{{IUIAnimationVariableChangeHandler2::OnValueChanged}}</strong>:</p><ul> <li> <strong>{{IUIAnimationVariable2::GetValue}} </strong> </li> <li> <strong>{{IUIAnimationVariable2::GetFinalValue}} </strong> </li> <li> <strong>{{IUIAnimationVariable2::GetPreviousValue}} </strong> </li> <li> <strong>{{IUIAnimationVariable2::GetIntegerValue}} </strong> </li> <li> <strong>{{IUIAnimationVariable2::GetFinalIntegerValue}} </strong> </li> <li> <strong>{{IUIAnimationVariable2::GetPreviousIntegerValue}} </strong> </li> <li> <strong>{{IUIAnimationVariable2::GetCurrentStoryboard}} </strong> </li> <li> <strong>{{IUIAnimationVariable2::GetTag}} </strong> </li> <li> <strong>{{IUIAnimationManager2::GetVariableFromTag}} </strong> </li> <li> <strong>{{IUIAnimationManager2::GetStoryboardFromTag}} </strong> </li> <li> <strong>{{IUIAnimationStoryboard2::GetTag}} </strong> </li> <li> <strong>{{IUIAnimationVariable::GetValue}} </strong> </li> <li> <strong>{{IUIAnimationVariable::GetFinalValue}} </strong> </li> <li> <strong>{{IUIAnimationVariable::GetPreviousValue}} </strong> </li> <li> <strong>{{IUIAnimationVariable::GetIntegerValue}} </strong> </li> <li> <strong>{{IUIAnimationVariable::GetFinalIntegerValue}} </strong> </li> <li> <strong>{{IUIAnimationVariable::GetPreviousIntegerValue}} </strong> </li> <li> <strong>{{IUIAnimationVariable::GetCurrentStoryboard}} </strong> </li> <li> <strong>{{IUIAnimationVariable::GetTag}} </strong> </li> <li> <strong>{{IUIAnimationManager::GetVariableFromTag}} </strong> </li> <li> <strong>{{IUIAnimationManager::GetStoryboardFromTag}} </strong> </li> <li> <strong>{{IUIAnimationStoryboard::GetTag}} </strong> </li> </ul> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The storyboard that is animating the animation variable specified by the <em>variable</em> parameter.</p> </dd> <dd> <p>The animation variable that has been updated.</p> </dd> <dd> <p>The new value of the animation variable.</p> </dd> <dd> <p>The previous value of the animation variable.</p> </dd> <dd> <p>The dimension in which the value of the animation variable changed.</p> </dd> <p>Defines a method for handling animation variable update events. <strong>{{IUIAnimationVariableIntegerChangeHandler2}}</strong> handles events that occur in a specified dimension.</p> <p> Handles events that occur when the integer value of an animation variable changes in the specified dimension.</p> <p>This method receives updates as <strong>{{INT32}}</strong> values. To receive updates as <strong>{{DOUBLE}}</strong> values, use the <strong>OnValueChanged</strong> method.</p><p><strong>OnIntegerValueChanged</strong> events might occur less frequently than <strong>OnValueChanged</strong> events because values such as 2.2, 2.3, and 2.4 would all be rounded to the same integer.</p><p>By default, a call made in a callback method to any other animation method results in the call failing and returning <strong>{{UI_E_ILLEGAL_REENTRANCY}}</strong>. However, there are exceptions to this default. The following methods can be successfully called from <strong>OnIntegerValueChanged</strong>:</p><ul> <li> <strong>GetValue</strong> </li> <li> <strong>GetFinalValue</strong> </li> <li> <strong>GetPreviousValue</strong> </li> <li> <strong>GetIntegerValue</strong> </li> <li> <strong>GetFinalIntegerValue</strong> </li> <li> <strong>GetPreviousIntegerValue</strong> </li> <li> <strong>GetCurrentStoryboard</strong> </li> <li> <strong>GetVariableFromTag</strong> </li> <li> <strong>GetStoryboardFromTag</strong> </li> <li> <strong>GetTag</strong> </li> <li> <strong>GetTag</strong> </li> </ul> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The storyboard that is animating the animation variable specified by the <em>variable</em> parameter.</p> </dd> <dd> <p>The animation variable that has been updated.</p> </dd> <dd> <p>The new integer value of the animation variable.</p> <strong>Note</strong>??The rounding mode for an animation variable is specified using the <strong>SetRoundingMode</strong> method. ? </dd> <dd> <p>The previous integer value of the animation variable.</p> <strong>Note</strong>??The rounding mode for an animation variable is specified using the <strong>SetRoundingMode</strong> method. ? </dd> <dd> <p>The dimension in which the integer value of the animation variable changed.</p> </dd> <p>Defines a method for handling animation curve update events. </p> <p> Handles events that occur when the animation curve of an animation variable changes.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The animation variable for which the animation curve has been updated.</p> </dd> <p>Defines methods for handling storyboard events. </p> <p> Handles storyboard status change events.</p> <p>By default, a call made in a callback method to any other animation method results in the call failing and returning <strong>{{UI_E_ILLEGAL_REENTRANCY}}</strong>. However, there are exceptions to this default. The following methods can be successfully called from <strong>OnStoryboardStatusChanged</strong>:</p><ul> <li> <strong>{{IUIAnimationManager2::CreateAnimationVariable}}</strong> </li> <li> <strong>{{IUIAnimationManager2::CreateStoryboard}}</strong> </li> <li> <strong>{{IUIAnimationManager2::GetStoryboardFromTag}}</strong> </li> <li> <strong>{{IUIAnimationManager2::GetVariableFromTag}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard2::Abandon}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard2::AddKeyframeAtOffset}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard2::AddKeyframeAfterTransition}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard2::AddTransition}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard2::AddTransitionAtKeyframe}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard2::AddTransitionBetweenKeyframes}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard2::Conclude}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard2::Finish}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard2::GetTag}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard2::HoldVariable}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard2::RepeatBetweenKeyframes}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard2::SetLongestAcceptableDelay}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard2::SetStoryboardEventHandler}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard2::SetTag}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard2::Schedule}}</strong> </li> <li> <strong>{{IUIAnimationTransition2::GetDuration}}</strong> </li> <li> <strong>{{IUIAnimationTransition2::IsDurationKnown}}</strong> </li> <li> <strong>{{IUIAnimationTransition2::SetInitialValue}}</strong> </li> <li> <strong>{{IUIAnimationTransition2::SetInitialVelocity}}</strong> </li> <li> <strong>{{IUIAnimationVariable2::GetCurrentStoryboard}}</strong> </li> <li> <strong>{{IUIAnimationVariable2::GetFinalIntegerValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable2::GetFinalValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable2::GetIntegerValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable2::GetPreviousIntegerValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable2::GetPreviousValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable2::GetTag}}</strong> </li> <li> <strong>{{IUIAnimationVariable2::GetValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable2::SetTag}}</strong> </li> </ul> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The storyboard for which the status has changed.</p> </dd> <dd> <p> The new status.</p> </dd> <dd> <p> The previous status.</p> </dd> <p>Handles storyboard update events.</p> <p>This method is called when the value of at least one of the variables that a storyboard is animating has changed since the last call to the <strong>{{IUIAnimationManager2::Update}}</strong> method.</p><p>By default, a call made in a callback method to any other animation method results in the call failing and returning <strong>{{UI_E_ILLEGAL_REENTRANCY}}</strong>. However, there are exceptions to this default. The following methods can be successfully called from <strong>OnStoryboardUpdated</strong>:</p><ul> <li> <strong>{{IUIAnimationManager2::GetStoryboardFromTag}}</strong> </li> <li> <strong>{{IUIAnimationManager2::GetVariableFromTag}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard2::GetTag}}</strong> </li> <li> <strong>{{IUIAnimationVariable2::GetCurrentStoryboard}}</strong> </li> <li> <strong>{{IUIAnimationVariable2::GetFinalIntegerValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable2::GetFinalValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable2::GetIntegerValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable2::GetPreviousIntegerValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable2::GetPreviousValue}}</strong> </li> <li> <strong>{{IUIAnimationVariable2::GetTag}}</strong> </li> <li> <strong>{{IUIAnimationVariable2::GetValue}}</strong> </li> </ul> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The storyboard that has been updated.</p> </dd> <p>Defines a method for handling storyboard loop iteration events.</p> <p>Handles loop iteration change events, which occur when a loop within a storyboard begins a new iteration.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The storyboard to which the loop belongs.</p> </dd> <dd> <p>The loop {{ID}}.</p> </dd> <dd> <p>The iteration count for the latest <strong>{{IUIAnimationManager2::Update}}</strong>.</p> </dd> <dd> <p>The iteration count for the previous <strong>{{IUIAnimationManager2::Update}}</strong>.</p> </dd> <p>Defines a method that resolves scheduling conflicts through priority comparison.</p> <p>A single animation variable can be included in multiple storyboards, but multiple storyboards cannot animate the same variable at the same time. If a newly scheduled storyboard attempts to animate one or more variables that are currently scheduled for animation by different storyboards, a scheduling conflict occurs. To determine which storyboard has priority, the animation manager can call the <strong>HasPriority</strong> method on one or more priority comparison handlers provided by the application.</p> <p>Determines the relative priority between a scheduled storyboard and a new storyboard.</p> <p> A single animation variable can be included in multiple storyboards, but multiple storyboards cannot animate the same variable at the same time. If a new storyboard attempts to animate one or more variables that are currently scheduled for animation by a different storyboard, a scheduling conflict occurs. To determine which storyboard has priority, the animation manager can call the <strong>HasPriority</strong> method on one or more priority comparison handlers provided by the application.</p><p>Registering priority comparison objects is optional. By default, all storyboards can be trimmed, concluded, or compressed to prevent failure, but none can be canceled, and by default no storyboards will be canceled or trimmed to prevent a delay.</p><p>By default, a call made in a callback method to any other animation method results in the call failing and returning <strong>{{UI_E_ILLEGAL_REENTRANCY}}</strong>. However, there are exceptions to this default. The following methods can be successfully called from <strong>HasPriority</strong>:</p><ul> <li> <strong>{{IUIAnimationManager2::GetStoryboardFromTag}}</strong> </li> <li> <strong>{{IUIAnimationManager2::GetVariableFromTag}}</strong> </li> <li> <strong>{{IUIAnimationStoryboard::GetTag}}</strong> </li> <li> <strong>{{IUIAnimationVariable2::GetTag}}</strong> </li> </ul> <p>Returns the following if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p><em>newStoryboard</em> has priority.</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_FALSE}}</strong></dt> </dl> </td><td> <p><em>scheduledStoryboard</em> has priority.</p> </td></tr> </table><p>?</p> <dd> <p> The currently scheduled storyboard.</p> </dd> <dd> <p> The new storyboard that is interrupting the scheduled storyboard specified by <em>scheduledStoryboard</em>.</p> </dd> <dd> <p> The potential effect on <em>newStoryboard</em> if <em>scheduledStoryboard</em> has a higher priority.</p> </dd> <p>Defines a library of standard transitions for a specified dimension.</p> <p>Windows Animation includes a library of common transitions that developers can apply to variables through a storyboard. The parameters for specifying a transition depend on the type of transition. For some transitions, the duration of the transition is an explicit parameter; for others, the duration is determined by other parameters, such as speed or acceleration when the transition begins. A transition's initial value or velocity can be overridden if a discontinuous jump is desired, and duration can be queried after the transition is added to a storyboard.</p><p>If an application requires an effect that cannot be specified using the transition library, developers can implement custom transitions. A custom transition is created by first implementing the interpolator function for the transition, and then by using a factory object to generate transitions from interpolators. An interpolator must implement the <strong>{{IUIAnimationInterpolator2}}</strong> interface; an implementation of the transition factory object is provided by the <strong>{{UIAnimationTransitionFactory2}}</strong> object.</p> <p> Creates an instantaneous scalar transition.</p> <p>During an instantaneous transition, the value of the animation variable changes instantly from its current value to a specified final value. The duration of this transition is always zero.</p><p>The following figure shows the change in value over time of an animation variable during an instantaneous transition.</p><p></p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The value of the animation variable at the end of the transition.</p> </dd> <dd> <p> The new instantaneous transition.</p> </dd> <p> Creates an instantaneous vector transition for each specified dimension.</p> <p>During an instantaneous transition, the value of the animation variable changes instantly from its current value to a specified final value. The duration of this transition is always zero.</p><p>The following figure shows the change in value over time of an animation variable during an instantaneous transition.</p><p></p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>A vector (of size <em>cDimension</em>) that contains the values of the animation variable at the end of the transition.</p> </dd> <dd> <p>The number of dimensions to apply the transition. This parameter specifies the number of values listed in <em>finalValue</em>.</p> </dd> <dd> <p> The new instantaneous transition.</p> </dd> <p> Creates a constant scalar transition.</p> <p>During a constant transition, the value of an animation variable remains at the initial value over the duration of the transition.</p><p>The following figure shows the change in value for an animation variable over time during a constant-duration transition.</p><p></p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The duration of the transition.</p> </dd> <dd> <p> The new constant transition.</p> </dd> <p> Creates a discrete scalar transition.</p> <p>During a discrete transition, the animation variable remains at the initial value for a specified delay time, then switches instantaneously to a specified final value and remains at that value for a given hold time.</p><p>The following figure shows the change in value over time of an animation variable during a discrete transition.</p><p></p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The amount of time by which to delay the instantaneous switch to the final value.</p> </dd> <dd> <p> The value of the animation variable at the end of the transition.</p> </dd> <dd> <p>The amount of time by which to hold the variable at its final value.</p> </dd> <dd> <p> The new discrete transition.</p> </dd> <p> Creates a discrete vector transition for each specified dimension.</p> <p>During a discrete transition, the animation variable remains at the initial value for a specified delay time, then switches instantaneously to a specified final value and remains at that value for a given hold time.</p><p>The following figure shows the change in value over time of an animation variable during a discrete transition.</p><p></p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The amount of time by which to delay the instantaneous switch to the final value.</p> </dd> <dd> <p>A vector (of size <em>cDimension</em>) that contains the final values of the animation variable at the end of the transition.</p> </dd> <dd> <p>The number of dimensions to apply the transition. This parameter specifies the number of values listed in <em>finalValue</em>.</p> </dd> <dd> <p>The amount of time by which to hold the variable at its final value.</p> </dd> <dd> <p> The new discrete transition.</p> </dd> <p> Creates a linear scalar transition.</p> <p>During a linear transition, the value of the animation variable transitions linearly from its initial value to a specified final value.</p><p>The following figure shows the change in value over time of an animation variable during a linear transition.</p><p></p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The duration of the transition.</p> </dd> <dd> <p> The value of the animation variable at the end of the transition.</p> </dd> <dd> <p> The new linear transition.</p> </dd> <p> Creates a linear vector transition in the specified dimension.</p> <p>During a linear transition, the value of the animation variable transitions linearly from its initial value to a specified final value.</p><p>The following figure shows the change in value over time of an animation variable during a linear transition.</p><p></p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The duration of the transition.</p> </dd> <dd> <p>A vector (of size <em>cDimension</em>) that contains the final values of the animation variable at the end of the transition.</p> </dd> <dd> <p>The number of dimensions to apply the transition. This parameter specifies the number of values listed in <em>finalValue</em>.</p> </dd> <dd> <p> The new linear transition.</p> </dd> <p> Creates a linear-speed scalar transition.</p> <p>During a linear-speed transition, the value of the animation variable changes at a specified rate. The duration of the transition is determined by the difference between the initial value and the specified final value.</p><p>The following figure shows the change in value over time of an animation variable during a linear-speed transition.</p><p></p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The absolute value of the velocity in units/second.</p> </dd> <dd> <p> The value of the animation variable at the end of the transition.</p> </dd> <dd> <p> The new linear-speed transition.</p> </dd> <p> Creates a linear-speed vector transition in the specified dimension.</p> <p>During a linear-speed transition, the value of the animation variable changes at a specified rate. The duration of the transition is determined by the difference between the initial value and the specified final value.</p><p>The following figure shows the change in value over time of an animation variable during a linear-speed transition.</p><p></p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The absolute value of the velocity in units/second.</p> </dd> <dd> <p>A vector (of size <em>cDimension</em>) that contains the final values of the animation variable at the end of the transition.</p> </dd> <dd> <p>The number of dimensions to apply the transition. This parameter specifies the number of values listed in <em>finalValue</em>.</p> </dd> <dd> <p> The new linear-speed transition.</p> </dd> <p> Creates a sinusoidal scalar transition where amplitude is determined by initial velocity.</p> <p>The value of the animation variable oscillates around the initial value over the entire duration of a sinusoidal-range transition. The amplitude of the oscillation is determined by the velocity when the transition begins.</p><p>The following figure shows the change in value over time of an animation variable during a sinusoidal-velocity transition.</p><p></p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The duration of the transition.</p> </dd> <dd> <p>The period of oscillation of the sinusoidal wave.</p> </dd> <dd> <p> The new sinusoidal-velocity transition.</p> </dd> <p> Creates a sinusoidal-range scalar transition with a specified range of oscillation.</p> <p>The value of the animation variable fluctuates between the specified minimum and maximum values over the entire duration of a sinusodial-range transition. The <em>slope</em> parameter is used to disambiguate between the two possible sine waves specified by the other parameters.</p><p>The following figure shows the change in value over time of an animation variable during a sinusoidal-range transition. Passing in the <strong>{{UI_ANIMATION_SLOPE_INCREASING}}</strong> enumeration value yields a wave like the solid curve shown in the figure, whereas the <strong>{{UI_ANIMATION_SLOPE_DECREASING}}</strong> value yields a wave like the dashed curve.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The duration of the transition.</p> </dd> <dd> <p>The value of the animation variable at a trough of the sinusoidal wave.</p> </dd> <dd> <p>The value of the animation variable at a peak of the sinusoidal wave.</p> </dd> <dd> <p>The period of oscillation of the sinusoidal wave.</p> </dd> <dd> <p>The slope at the start of the transition.</p> </dd> <dd> <p> The new sinusoidal-range transition.</p> </dd> <p> Creates an accelerate-decelerate scalar transition.</p> <p>During an accelerate-decelerate transition, the animation variable speeds up and then slows down over the duration of the transition, ending at a specified value. You can control how quickly the variable accelerates and decelerates independently, by specifying different acceleration and deceleration ratios.</p><p>When the initial velocity is zero, the acceleration ratio is the fraction of the duration that the variable will spend accelerating; likewise for the deceleration ratio. If the value of initial velocity is nonzero, the value is the fraction of the time between the velocity reaching zero and the end of transition. The acceleration ratio and the deceleration ratio should sum to a maximum of 1.0. </p><p>The following figures show the change in value for animation variables with different initial velocities during accelerate-decelerate transitions.</p><strong>Note</strong>??d' in the figure on the right shows the time between the velocity reaching zero and the end of the transition.? <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The duration of the transition.</p> </dd> <dd> <p> The value of the animation variable at the end of the transition.</p> </dd> <dd> <p> The ratio of <em>duration</em> time spent accelerating (0 to 1).</p> </dd> <dd> <p> The ratio of <em>duration</em> time spent decelerating (0 to 1).</p> </dd> <dd> <p> The new accelerate-decelerate transition.</p> </dd> <p> Creates a reversal scalar transition.</p> <p> A reversal transition smoothly changes direction over the specified duration. The final value will be the same as the initial value and the final velocity will be the negative of the initial velocity. The folllowing figure shows such a reversal transition.</p><p></p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The duration of the transition.</p> </dd> <dd> <p> The new reversal transition.</p> </dd> <p> Creates a cubic scalar transition.</p> <p>During a cubic transition, the value of the animation variable changes from its initial value to the <em>finalValue</em> over the <em>duration</em> of the transition, ending at the <em>finalVelocity</em>.</p><p>The following figure shows the effect on an animation variable over time during a cubic transition.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The duration of the transition.</p> </dd> <dd> <p> The value of the animation variable at the end of the transition.</p> </dd> <dd> <p> The velocity of the variable at the end of the transition.</p> </dd> <dd> <p> The new cubic transition.</p> </dd> <p> Creates a cubic vector transition for each specified dimension.</p> <p>During a cubic transition, the value of the animation variable changes from its initial value to the <em>finalValue</em> over the <em>duration</em> of the transition, ending at the <em>finalVelocity</em>.</p><p>The following figure shows the effect on an animation variable over time during a cubic transition.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The duration of the transition.</p> </dd> <dd> <p>A vector (of size <em>cDimension</em>) that contains the final values of the animation variable at the end of the transition.</p> </dd> <dd> <p>A vector (of size <em>cDimension</em>) that contains the final velocities (in units per second) of the animation variable at the end of the transition.</p> </dd> <dd> <p>The number of dimensions to apply the transition. This parameter specifies the number of values listed in <em>finalValue</em> and <em>finalVelocity</em>.</p> </dd> <dd> <p> The new cubic transition.</p> </dd> <p> Creates a smooth-stop scalar transition.</p> <p>A smooth-stop transition slows down as it approaches the specified final value, and reaches the final value with a velocity of zero. The duration of the transition is determined by the initial velocity, the difference between the initial and final values, and the specified maximum duration. If there is no solution consisting of a single parabolic arc, this method creates a cubic transition.</p><p>The following figure shows the change in value over time of an animation variable during a smooth-stop transition.</p><p></p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The maximum duration of the transition.</p> </dd> <dd> <p> The value of the animation variable at the end of the transition.</p> </dd> <dd> <p> The new smooth-stop transition.</p> </dd> <p> Creates a parabolic-acceleration scalar transition.</p> <p> During a parabolic-acceleration transition, the value of the animation variable changes from the initial value to the final value, ending at the specified velocity. You can control how quickly the variable reaches the final value by specifying the rate of acceleration.</p><p>The following figure shows the change in value over time of an animation variable during a parabolic-acceleration transition.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The value of the animation variable at the end of the transition.</p> </dd> <dd> <p>The velocity, in units/second, at the end of the transition.</p> </dd> <dd> <p> The acceleration, in units/second?, during the transition.</p> </dd> <dd> <p> The new parabolic-acceleration transition.</p> </dd> <p> Creates a cubic B?zier linear scalar transition.</p> <p>During a cubic B?zier linear transition, the value of the animation variable changes from its initial value to the <em>finalValue</em> over the <em>duration</em> of the transition. The ordered pairs, (x1, y1) and (x2, y2), act as control points that provide directional information to transform the linear path of the transition into a smooth parametric curve.</p><p>The following figure shows the change in value over time for an animation variable during a cubic B?zier linear transition.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The duration of the transition.</p> </dd> <dd> <p> The value of the animation variable at the end of the transition.</p> </dd> <dd> <p>The x-coordinate of the first control point.</p> </dd> <dd> <p>The y-coordinate of the first control point.</p> </dd> <dd> <p>The x-coordinate of the second control point.</p> </dd> <dd> <p>The y-coordinate of the second control point.</p> </dd> <dd> <p>The new cubic B?zier linear transition.</p> </dd> <p> Creates a cubic B?zier linear vector transition for each specified dimension.</p> <p>During a cubic B?zier linear transition, the value of the animation variable changes from its initial value to the <em>finalValue</em> over the <em>duration</em> of the transition. The ordered pairs, (x1, y1) and (x2, y2), act as control points that provide directional information to transform the linear path of the transition into a smooth parametric curve.</p><p>The following figure shows the change in value over time of an animation variable during a cubic B?zier linear transition.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The duration of the transition.</p> </dd> <dd> <p>A vector (of size <em>cDimension</em>) that contains the final values of the animation variable at the end of the transition.</p> </dd> <dd> <p>The number of dimensions to apply the transition. This parameter specifies the number of values listed in <em>finalValue</em>.</p> </dd> <dd> <p>The x-coordinate of the first control point.</p> </dd> <dd> <p>The y-coordinate of the first control point.</p> </dd> <dd> <p>The x-coordinate of the second control point.</p> </dd> <dd> <p>The y-coordinate of the second control point.</p> </dd> <dd> <p>The new cubic B?zier linear transition.</p> </dd> <p>Defines a method that allows a custom interpolator to provide transition information, in the form of a cubic polynomial curve, to the animation manager.</p> <p>Adds a cubic polynomial segment that describes the shape of a transition curve to the animation function. </p> <p>This method will fail with an error code of {{UI_E_INVALID_PRIMITIVE}} if the start time is either less than 0 or less than the start time of a previous segment. </p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The dimension in which to apply the new segment.</p> </dd> <dd> <p>The begin offset for the segment, where 0 corresponds to the start of the transition.</p> </dd> <dd> <p>The cubic polynomial constant coefficient.</p> </dd> <dd> <p>The cubic polynomial linear coefficient.</p> </dd> <dd> <p>The cubic polynomial quadratic coefficient.</p> </dd> <dd> <p>The cubic polynomial cubic coefficient.</p> </dd> <p>Adds a sinusoidal segment that describes the shape of a transition curve to the animation function. </p> <p>Defined by the function Y(t) = bias + amplitude*sin(360*frequency*t + phase), where 'sin' is the sin of an angle specified in degrees (for example, sin(n + 360) == sin(n) for any real number 'n').</p><p>This method will fail with an error code of {{UI_E_INVALID_PRIMITIVE}} if the start time is either less than 0 or less than the start time of a previous segment. </p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The dimension in which to apply the new segment.</p> </dd> <dd> <p>The begin offset for the segment, where 0 corresponds to the start of the transition.</p> </dd> <dd> <p>The bias constant in the sinusoidal function.</p> </dd> <dd> <p>The amplitude constant in the sinusoidal function.</p> </dd> <dd> <p>The frequency constant in the sinusoidal function.</p> </dd> <dd> <p>The phase constant in the sinusoidal function.</p> </dd> <p>Extends the <strong>{{IUIAnimationInterpolator}}</strong> interface that defines methods for creating a custom interpolator. <strong>{{IUIAnimationInterpolator2}}</strong> supports interpolation in a given dimension. </p> <p>Client applications can use the transitions provided in the <strong>{{IUIAnimationTransitionLibrary}}</strong> or<strong>{{IUIAnimationTransitionLibrary2}}</strong> interfaces, or in a library provided by a third party; however, custom transitions can be created by implementing the <strong>{{IUIAnimationInterpolator}}</strong> or <strong>{{IUIAnimationInterpolator2}}</strong> interfaces.</p><p>Before Windows Animation can use your custom interpolator, you must wrap it in an object that implements the <strong>{{IUIAnimationTransition}}</strong> interface (by calling <strong>{{IUIAnimationTransitionFactory::CreateTransition}}</strong>) or the <strong>{{IUIAnimationTransition2}}</strong> interface (by calling <strong>{{IUIAnimationTransitionFactory2::CreateTransition}}</strong>) and passing in the custom interpolator. After the interpolator wrapper has been created, client applications interact with your interpolator using the <strong>{{IUIAnimationTransition}}</strong> or <strong>{{IUIAnimationTransition2}}</strong> interfaces.</p><p>Custom interpolators can be reused across applications, but it is recommended that they be exposed using factory interfaces that return an <strong>{{IUIAnimationTransition}}</strong> interface or an <strong>{{IUIAnimationTransition2}}</strong> interface.</p> <p>Gets the number of dimensions that require interpolation.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The number of dimensions.</p> </dd> <p>Sets the initial value and velocity of the transition for the given dimension.</p> <p>Windows Animation always calls <strong>SetInitialValueAndVelocity</strong> before calling the other methods of <strong>{{IUIAnimationInterpolator2}}</strong> at different offsets. However, <strong>SetInitialValueAndVelocity</strong> can be called multiple times with different parameters. Interpolators can cache internal state to improve performance, but they must update this cached state each time <strong>SetInitialValueAndVelocity</strong> is called and ensure that the results of subsequent calls to these methods reflect the updated state.</p> <p>Returns <strong>{{S_OK}}</strong> if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The initial value.</p> </dd> <dd> <p>The initial velocity.</p> </dd> <dd> <p>The dimension in which to set the initial value or velocity of the transition.</p> </dd> <p>Used to determine which kinds of command lists are capable of supporting various operations. For example, whether a command list supports immediate writes. </p> <dd> <p>Specifies that no command list supports the operation in question.</p> </dd> <dd> <p>Specifies that direct command lists can support the operation in question.</p> </dd> <dd> <p>Specifies that command list bundles can support the operation in question.</p> </dd> <dd> <p>Specifies that compute command lists can support the operation in question.</p> </dd> <dd> <p>Specifies that copy command lists can support the operation in question.</p> </dd> <dd> <p>Specifies that video-decode command lists can support the operation in question.</p> </dd> <dd> <p>Specifies that video-processing command lists can support the operation is question.</p> </dd> <p>Sets the duration of the transition in the given dimension.</p> <p>Windows Animation calls this method only after calling the <strong>{{IUIAnimationInterpolator2::GetDependencies}}</strong> method, and only if that call returns <strong>{{UI_ANIMATION_DEPENDENCY_DURATION}}</strong> as one of its <em>durationDependencies</em> flags.</p><p>Typically, an interpolator with a duration dependency has a duration parameter in the <strong>{{IUIAnimationTransitionFactory}}</strong> or <strong>{{IUIAnimationTransitionFactory2}}</strong> creation method that is associated with that interpolator. The interpolator should store its duration when first initialized and overwrite the duration when <strong>SetDuration</strong> is called.</p><p>Windows Animation always calls the <strong>{{IUIAnimationInterpolator2::SetInitialValueAndVelocity}}</strong> method to set the initial value and velocity before calling <strong>SetDuration</strong>, so a custom interpolator doesn't need to check whether the initial value and velocity have been set.</p><p>Windows Animation can call <strong>SetInitialValueAndVelocity</strong> and <strong>SetDuration</strong> multiple times with different parameters. Interpolators can cache internal state to improve performance, but they must update this cached state each time <strong>SetInitialValueAndVelocity</strong> is called and ensure that the results of subsequent calls to <strong>SetDuration</strong> reflect the updated state.</p> <p>Returns <strong>{{S_OK}}</strong> if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The duration of the transition.</p> </dd> <p>Gets the duration of a transition for the given dimension.</p> <p>Windows Animation always calls the <strong>{{IUIAnimationInterpolator2::SetInitialValueAndVelocity}}</strong> method to set the initial value and velocity before calling <strong>GetDuration</strong>, so a custom interpolator need not check whether the initial value and velocity have been set.</p><p>Windows Animation can call <strong>SetInitialValueAndVelocity</strong> multiple times with different parameters. Interpolators can cache internal state to improve performance, but they must update this cached state each time <strong>SetInitialValueAndVelocity</strong> is called and ensure that the results of subsequent calls to <strong>GetDuration</strong> reflect the updated state.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The duration of the transition.</p> </dd> <p>Gets the final value at the end of the transition for the given dimension.</p> <p>Windows Animation always calls the <strong>{{IUIAnimationInterpolator2::SetInitialValueAndVelocity}}</strong> method to set the initial value and velocity before calling <strong>GetFinalValue</strong>, so a custom interpolator need not check whether the initial value and velocity have been set.</p><p>Windows Animation can call <strong>SetInitialValueAndVelocity</strong> multiple times with different parameters. Interpolators can cache internal state to improve performance, but they must update this cached state each time <strong>SetInitialValueAndVelocity</strong> is called and ensure that the results of subsequent calls to <strong>GetFinalValue</strong> reflect the updated state.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The final value.</p> </dd> <dd> <p>The dimension from which to retrieve the final value.</p> </dd> <p>Interpolates the value of an animation variable at the specified offset and for the given dimension.</p> <p>Windows Animation always calls the <strong>{{IUIAnimationInterpolator2::SetInitialValueAndVelocity}}</strong> method to set the initial value and velocity before calling <strong>InterpolateValue</strong>, so a custom interpolator need not check whether the initial value and velocity have been set.</p><p>Windows Animation can call <strong>SetInitialValueAndVelocity</strong> multiple times with different parameters. Interpolators can cache internal state to improve performance, but they must update this cached state each time <strong>SetInitialValueAndVelocity</strong> is called and ensure that the results of subsequent calls to <strong>InterpolateValue</strong> reflect the updated state.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The offset from the start of the transition.</p> <p>This parameter is always greater than or equal to zero and less than the duration of the transition. This method is not called if the duration of the transition is zero.</p> </dd> <dd> <p>The interpolated value.</p> </dd> <dd> <p>The dimension in which to interpolate the value.</p> </dd> <p>Interpolates the velocity, or rate of change, at the specified offset for the given dimension.</p> <p>Windows Animation always calls the <strong>{{IUIAnimationInterpolator2::SetInitialValueAndVelocity}}</strong> method to set the initial value and velocity before calling <strong>InterpolateVelocity</strong>, so a custom interpolator need not check whether the initial value and velocity have been set.</p><p>Windows Animation can call <strong>SetInitialValueAndVelocity</strong> multiple times with different parameters. Interpolators can cache internal state to improve performance, but they must update this cached state each time <strong>SetInitialValueAndVelocity</strong> is called and ensure that the results of subsequent calls to <strong>InterpolateVelocity</strong> reflect the updated state.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The offset from the start of the transition. </p> <p>The offset is always greater than or equal to zero and less than or equal to the duration of the transition. This method is not called if the duration of the transition is zero. </p> </dd> <dd> <p>The interpolated velocity.</p> </dd> <dd> <p>The dimension in which to interpolate the velocity.</p> </dd> <p>Generates a primitive interpolation of the specified animation curve.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The object that defines the custom animation curve information.</p> </dd> <dd> <p>The dimension in which to apply the new segment.</p> </dd> <p>For the given dimension, <strong>GetDependencies</strong> retrieves the aspects of the interpolator that depend on the initial value or velocity that is passed to the <strong>{{IUIAnimationInterpolator2::SetInitialValueAndVelocity}}</strong> method or the duration that is passed to the <strong>{{IUIAnimationInterpolator2::SetDuration}}</strong> method.</p> <p>This method is called to identify which aspects of the custom interpolator are affected by certain inputs: value, velocity, and duration. For each of these inputs, the interpolator returns either of the following:</p><ul> <li>The bitwise-{{OR}} of any members of <strong>{{UI_ANIMATION_DEPENDENCIES}}</strong> that apply.</li> <li><strong>{{UI_ANIMATION_DEPENDENCY_NONE}}</strong> if nothing depends on the input.</li> </ul><p>For example, consider an interpolator that:</p><ul> <li>Accepts a final value as a parameter.</li> <li>Always comes to a gradual stop at that final value.</li> <li>Has a duration determined by the difference between the final value and the initial value.</li> </ul><p>In this case the interpolator should return <strong>{{UI_ANIMATION_DEPENDENCY_INTERMEDIATE_VALUES}}</strong>|<strong>{{UI_ANIMATION_DURATION}}</strong> for the <em>initialValueDependencies</em> parameter. It should not return <strong>{{UI_ANIMATION_DEPENDENCY_FINAL_VALUE}}</strong>, because this value is set when the interpolator is created and is not affected by the initial value. Likewise, the interpolator should not return <strong>{{UI_ANIMATION_DEPENDENCY_FINAL_VELOCITY}}</strong>, because the slope of the curve is defined to always be zero when it reaches the final value.</p><p>It is important that an interpolator return a correct set of flags. If a flag is not present for an output, Windows Animation assumes that the corresponding parameter does not affect that aspect of the interpolator's results. For example, if the custom interpolator does not include <strong>{{UI_ANIMATION_DEPENDENCY_FINAL_VALUE}}</strong> for <em>initialVelocityDependencies</em>, Windows Animation may call <strong>SetInitialValueAndVelocity</strong> with an arbitrary velocity parameter, and then call <strong>GetFinalValue</strong> to determine the final value. The interpolator's implementation of <strong>GetFinalValue</strong> must return the same result no matter which velocity parameter has been passed to <strong>SetInitialValueAndVelocity</strong>, because the interpolator has claimed that the transition's final value does not depend on the initial velocity.</p><strong>Note</strong>??If the flags returned for <em>durationDependencies</em> do not include <strong>{{UI_ANIMATION_DEPENDENCY_DURATION}}</strong>, <strong>SetDuration</strong> will never be called on the interpolator.? <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p>Defines a method for creating transitions from custom interpolators.</p><p><strong>{{IUIAnimationTransitionFactory2}}</strong> supports the creation of transitions in a specified dimension.</p> <p> When an application requires animation effects that are not available in the transition library, developers can implement custom transitions that the application can use. A custom transition is created by first implementing the interpolator function for the transition, and then by using a factory object to generate transitions from the interpolator. An interpolator must implement either the <strong>{{IUIAnimationInterpolator}}</strong> interface or the <strong>{{IUIAnimationInterpolator2}}</strong> interface; an implementation of the transition factory object is provided by <strong>{{UIAnimationTransitionFactory}}</strong> or by <strong>{{UIAnimationTransitionFactory2}}</strong>.</p> <p>Creates a transition from a custom interpolator for a given dimension.</p> <p>If the method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The interpolator from which a transition is to be created. The specified object must implement the <strong>{{IUIAnimationInterpolator2}}</strong> interface.</p> </dd> <dd> <p>The new transition.</p> </dd> <p> Directs the storyboard to schedule itself for play.</p> <p>This method directs a storyboard to try to add itself to the schedule of playing storyboards, using these rules:</p><ul> <li> <p>If there are no playing storyboards animating any of the same animation variables, the attempt succeeds and the storyboard starts playing immediately.</p> </li> <li> <p>If the storyboard has priority to cancel, trim, conclude, or compress conflicting storyboards, the attempt to schedule succeeds and the storyboard starts playing as soon as possible.</p> </li> <li> <p>If the storyboard does not have priority, the attempt fails and the <em>schedulingResult</em> parameter is set to <strong>{{UI_ANIMATION_SCHEDULING_INSUFFICIENT_PRIORITY}}</strong>.</p> </li> </ul><p>If this method is called from a handler for <strong>OnStoryboardStatusChanged</strong> events, the <em>schedulingResult</em> parameter is set to <strong>{{UI_ANIMATION_SCHEDULING_DEFERRED}}</strong>. The only way to determine whether the storyboard is successfully scheduled is to set a storyboard event handler and check whether the storyboard's status ever becomes <strong>{{UI_ANIMATION_SCHEDULING_INSUFFICIENT_PRIORITY}}</strong>.</p><p>It is possible to reuse a storyboard by calling <strong>Schedule</strong> again after its status has reached <strong>{{UI_ANIMATION_STORYBOARD_READY}}</strong>. An attempt to schedule a storyboard when it is in any state other than <strong>{{UI_ANIMATION_STORYBOARD_BUILDING}}</strong> or <strong>{{UI_ANIMATION_STORYBOARD_READY}}</strong> fails, and <em>schedulingResult</em> is set to <strong>{{UI_ANIMATION_SCHEDULING_ALREADY_SCHEDULED}}</strong>.</p> <p>Returns {{S_OK}} if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The current time.</p> </dd> <dd> <p>The result of the scheduling request. You can omit this parameter from calls to this method.</p> </dd> <p> Adds a transition to the storyboard.</p> <p>The <strong>AddTransition</strong> method applies the specified transition to the specified variable in the storyboard. If this is the first transition applied to this variable in this storyboard, the transition begins at the start of the storyboard. Otherwise, the transition is appended to the transition that was most recently added to the variable.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_TRANSITION_ALREADY_USED}}</strong></dt> </dl> </td><td> <p>This transition has already been added to a storyboard.</p> </td></tr> </table><p>?</p><p>See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The animation variable for which the transition is to be added.</p> </dd> <dd> <p> The transition to be added.</p> </dd> <p> Adds a keyframe at the specified offset from an existing keyframe.</p> <p>A keyframe represents a moment in time within a storyboard and can be used to specify the start and end times of transitions. Because keyframes can be added at the ends of transitions, their offsets from the start of the storyboard may not be known until the storyboard is playing.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The existing keyframe. To add a keyframe at an offset from the start of the storyboard, use the special keyframe <strong>{{UI_ANIMATION_KEYFRAME_STORYBOARD_START}}</strong>.</p> </dd> <dd> <p> The offset from the existing keyframe at which a new keyframe is to be added.</p> </dd> <dd> <p> The keyframe to be added.</p> </dd> <p> Adds a keyframe at the end of the specified transition.</p> <p> A keyframe represents a moment in time within a storyboard and can be used to specify the start and end times of transitions. Because keyframes can be added at the ends of transitions, their offsets from the start of the storyboard may not be known until the storyboard is playing.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_TRANSITION_NOT_IN_STORYBOARD}}</strong></dt> </dl> </td><td> <p>The transition has not been added to the storyboard.</p> </td></tr> </table><p>?</p><p>See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The transition after which a keyframe is to be added.</p> </dd> <dd> <p> The keyframe to be added.</p> </dd> <p> Adds a transition that starts at the specified keyframe.</p> <p>Transitions must be added in the order in which they will be played. A transition may begin playing before the preceding transition in the storyboard has finished, in which case the initial value and velocity seen by the new transition is determined by the state of the preceding one. A transition should not begin before the start of the preceding transition.</p><p>A keyframe represents a moment in time within a storyboard and can be used to specify the start and end times of transitions. Because keyframes can be added at the ends of transitions, their offsets from the start of the storyboard may not be known until the storyboard is playing.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_TRANSITION_ALREADY_USED}}</strong></dt> </dl> </td><td> <p>This transition has already been added to a storyboard or has been added to a storyboard that has finished playing and been released.</p> </td></tr> <tr><td> <dl> <dt><strong>{{UI_E_TRANSITION_ECLIPSED}}</strong></dt> </dl> </td><td> <p>The transition might eclipse the beginning of another transition in the storyboard.</p> </td></tr> </table><p>?</p><p>See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The animation variable for which a transition is to be added.</p> </dd> <dd> <p> The transition to be added.</p> </dd> <dd> <p> The keyframe that specifies the beginning of the new transition.</p> </dd> <p> Adds a transition between two keyframes.</p> <p>This method applies the specified transition to the specified variable in the storyboard, with the transition starting and ending at the specified keyframes. If the transition was created with a duration parameter specified, that duration is overwritten with the duration of time between the start and end keyframes. Otherwise, Windows Animation speeds up or slows down the transition as necessary.</p><p> A keyframe represents a moment in time within a storyboard and can be used to specify the start and end times of transitions. Because keyframes can be added at the ends of transitions, their offsets from the start of the storyboard may not be known until the storyboard is playing.</p><p>Transitions must be added in the order in which they will be played. A transition may begin playing before the preceding transition in the storyboard has finished, in which case the initial value and velocity seen by the new transition will be determined by the state of the preceding one. It must not be possible for a transition to begin before the start of the preceding transition.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_TRANSITION_ALREADY_USED}}</strong></dt> </dl> </td><td> <p>This transition has already been added to a storyboard or has been added to a storyboard that has finished playing and been released.</p> </td></tr> <tr><td> <dl> <dt><strong>{{UI_E_TRANSITION_ECLIPSED}}</strong></dt> </dl> </td><td> <p>The transition might eclipse the beginning of another transition in the storyboard.</p> </td></tr> <tr><td> <dl> <dt><strong>{{UI_E_START_KEYFRAME_AFTER_END}}</strong></dt> </dl> </td><td> <p>The start keyframe might occur after the end keyframe.</p> </td></tr> </table><p>?</p><p>See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The animation variable for which the transition is to be added.</p> </dd> <dd> <p> The transition to be added.</p> </dd> <dd> <p> A keyframe that specifies the beginning of the new transition.</p> </dd> <dd> <p> A keyframe that specifies the end of the new transition. It must not be possible for <em>endKeyframe</em> to appear earlier in the storyboard than <em>startKeyframe</em>.</p> </dd> <p>Creates a loop between two keyframes.</p> <p>This method directs a storyboard to play the interval between the given keyframes repeatedly before playing the remainder of the storyboard. If a finite repetition count is specified, the loop always plays that number of times. If <strong>{{UI_ANIMATION_REPEAT_INDEFINITELY}}</strong> (-1) is specified, the loop repeats until the storyboard is concluded, in which case the current iteration of the loop completes and the remainder of the storyboard plays. A storyboard that loops indefinitely also ends if it is truncated.</p><p>Nested and overlapping loops are not supported.</p><p>A keyframe represents a moment in time within a storyboard and can be used to specify the start or end times of transitions. Because keyframes can be added at the ends of transitions, their offsets from the start of the storyboard may not be known until the storyboard is playing.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The keyframe at which the loop is to begin.</p> </dd> <dd> <p>The keyframe at which the loop is to end. <em>endKeyframe</em> must not occur earlier in the storyboard than <em>startKeyframe</em>.</p> </dd> <dd> <p>The number of times the loop is to be repeated; the last iteration of a loop can terminate fractionally between keyframes. A value of zero indicates that the specified portion of a storyboard will not be played. A value of <strong>{{UI_ANIMATION_REPEAT_INDEFINITELY}}</strong> (-1) indicates that the loop will repeat indefinitely until the storyboard is trimmed or concluded.</p> </dd> <dd> <p>The pattern for the loop iteration. </p> <p>A value of <strong>{{UI_ANIMATION_REPEAT_MODE_ALTERNATE}}</strong> (1) specifies that the start of the loop must alternate between keyframes (k1-&gt;k2, k2-&gt;k1, k1-&gt;k2, and so on).</p> <p>A value of <strong>{{UI_ANIMATION_REPEAT_MODE_NORMAL}}</strong> (0) specifies that the start of the loop must begin with the first keyframe (k1-&gt;k2, k1-&gt;k2, k1-&gt;k2, and so on).</p> <strong>Note</strong>??If <em>repeatMode</em> has a value of <strong>{{UI_ANIMATION_REPEAT_MODE_ALTERNATE}}</strong> (1) and <em>cRepetition</em> has a value of <strong>{{UI_ANIMATION_REPEAT_INDEFINITELY}}</strong> (-1), the loop terminates on the end keyframe. ? </dd> <dd> <p>The handler for each loop iteration event. The default value is 0.</p> </dd> <dd> <p>The loop {{ID}} to pass to <em>pIterationChangeHandler</em>. The default value is 0.</p> </dd> <dd> <p>If true, specifies that <em>pIterationChangeHandler</em> will be incorporated into the estimate of the time interval until the next animation event that is returned by the <strong>{{IUIAnimationManager2::EstimateNextEventTime}}</strong> method. The default value is 0, or false.</p> </dd> <p> Directs the storyboard to hold the specified animation variable at its final value until the storyboard ends.</p> <p> When a storyboard is playing, it has exclusive access to any variables it animates unless the storyboard is trimmed by a higher-priority storyboard. Typically, this exclusive access is released when the last transition in the storyboard for that variable finishes playing. Applications can call this method to maintain exclusive access to the animation variable and hold the variable, at the final value of the last transition, until the end of the storyboard.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The animation variable.</p> </dd> <p> Sets the longest acceptable delay before the scheduled storyboard begins.</p> <p>For Windows Animation to schedule a storyboard successfully, the storyboard must begin before the longest acceptable delay has elapsed. Windows Animation determines this delay in the following order: the delay value set by calling this method, the delay value set by calling the <strong>{{IUIAnimationManager2::SetDefaultLongestAcceptableDelay}}</strong> method, or 0.0 if neither of these methods has been called.</p><p> Use <strong>{{IUIAnimationStoryboard2::SetSkipDuration}}</strong> to start a storyboard animation at a specified offset instead of delaying the start of a storyboard.</p> <p>Returns <strong>{{S_OK}}</strong> if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The longest acceptable delay. This parameter can be a positive value, or <strong>{{UI_ANIMATION_SECONDS_EVENTUALLY}}</strong> (-1) to indicate that any finite delay is acceptable.</p> </dd> <p>Specifies an offset from the beginning of a storyboard at which to start animating.</p> <p>Calls to <strong>SetSkipDuration</strong> fail if the storyboard has been scheduled.</p><p><strong>SetSkipDuration</strong> does not delay the start of a scheduled storyboard. See <strong>{{IUIAnimationStoryboard2::SetLongestAcceptableDelay}}</strong> for more info on how to set a delay for a scheduled storyboard.</p><p>This diagram shows a skip duration, or offset, for a storyboard. </p><p></p> <p>Returns {{S_OK}} if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p>The offset, or amount of time, to skip at the beginning of the storyboard.</p> </dd> <p> Directs the storyboard to schedule itself for play.</p> <p>This method directs a storyboard to try to add itself to the schedule of playing storyboards, using these rules:</p><ul> <li> <p>If there are no playing storyboards animating any of the same animation variables, the attempt succeeds and the storyboard starts playing immediately.</p> </li> <li> <p>If the storyboard has priority to cancel, trim, conclude, or compress conflicting storyboards, the attempt to schedule succeeds and the storyboard starts playing as soon as possible.</p> </li> <li> <p>If the storyboard does not have priority, the attempt fails and the <em>schedulingResult</em> parameter is set to <strong>{{UI_ANIMATION_SCHEDULING_INSUFFICIENT_PRIORITY}}</strong>.</p> </li> </ul><p>If this method is called from a handler for <strong>OnStoryboardStatusChanged</strong> events, the <em>schedulingResult</em> parameter is set to <strong>{{UI_ANIMATION_SCHEDULING_DEFERRED}}</strong>. The only way to determine whether the storyboard is successfully scheduled is to set a storyboard event handler and check whether the storyboard's status ever becomes <strong>{{UI_ANIMATION_SCHEDULING_INSUFFICIENT_PRIORITY}}</strong>.</p><p>It is possible to reuse a storyboard by calling <strong>Schedule</strong> again after its status has reached <strong>{{UI_ANIMATION_STORYBOARD_READY}}</strong>. An attempt to schedule a storyboard when it is in any state other than <strong>{{UI_ANIMATION_STORYBOARD_BUILDING}}</strong> or <strong>{{UI_ANIMATION_STORYBOARD_READY}}</strong> fails, and <em>schedulingResult</em> is set to <strong>{{UI_ANIMATION_SCHEDULING_ALREADY_SCHEDULED}}</strong>.</p> <p>Returns {{S_OK}} if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The current time.</p> </dd> <dd> <p>The result of the scheduling request. You can omit this parameter from calls to this method.</p> </dd> <p>Completes the current iteration of a keyframe loop that is in progress (where the loop is set to <strong>{{UI_ANIMATION_REPEAT_INDEFINITELY}}</strong>), terminates the loop, and continues with the storyboard. </p> <p>This method specifies that any subsequent keyframe loops that have a repetition count of <strong><strong>{{UI_ANIMATION_REPEAT_INDEFINITELY}}</strong></strong> (-1) will be skipped while the remainder of the storyboard is played. </p><p>An iteration of a keyframe loop that is in progress will be completed before the remainder of the storyboard plays.</p><p>If this method is called at the end of an alternating keyframe loop iteration, the loop is terminated with the loop value set to the ending loop value.</p><p> If this method is called at the end of a non-alternating keyframe loop iteration, where "loop wrapping" results in the loop value being set to the starting value of the next iteration, the loop is executed once more in order for the loop value to be set to the ending loop value.</p><p>For alternating keyframe loops, each iteration has a starting value that is equivalent to the ending value of the preceding loop. In this case, "loop wrapping" is not an issue.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p>Finishes the storyboard within the specified time, compressing the storyboard if necessary.</p> <p>This method has no effect on storyboard events. Events continue to be raised as expected while the storyboard plays.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The maximum amount of time that the storyboard can use to finish playing.</p> </dd> <p>Terminates the storyboard, releases all related animation variables, and removes the storyboard from the schedule.</p> <p> This method can be called before or after the storyboard starts playing.</p><p>This method does not trigger any storyboard events.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <p> Sets the tag for the storyboard.</p> <p> A tag is a pairing of an integer identifier (<em>id</em>) with a {{COM}} object (<em>object</em>). It can be used by an application to identify a storyboard.</p> <p>Returns {{S_OK}} if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The object portion of the tag. This parameter can be {{NULL}}.</p> </dd> <dd> <p> The identifier portion of the tag.</p> </dd> <p> Gets the tag for a storyboard.</p> <p>A tag is a pairing of an integer identifier (<em>id</em>) with a {{COM}} object (<em>object</em>); it can be used by an application to identify a storyboard.</p><p>This method can return the identifier, the object, or both portions of the tag.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_VALUE_NOT_SET}}</strong></dt> </dl> </td><td> <p>The storyboard tag was not set.</p> </td></tr> </table><p>?</p> <dd> <p> The object portion of the tag.</p> </dd> <dd> <p> The identifier portion of the tag.</p> </dd> <p> Gets the status of the storyboard.</p> <p>Unless this method is called from a handler for <strong>OnStoryboardStatusChanged</strong> events, the only values it returns are <strong>{{UI_ANIMATION_STORYBOARD_BUILDING}}</strong>, <strong>{{UI_ANIMATION_STORYBOARD_SCHEDULED}}</strong>, <strong>{{UI_ANIMATION_STORYBOARD_PLAYING}}</strong>, and <strong>{{UI_ANIMATION_STORYBOARD_READY}}</strong>.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The storyboard status.</p> </dd> <p> Gets the time that has elapsed since the storyboard started playing.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{UI_E_STORYBOARD_NOT_PLAYING}}</strong></dt> </dl> </td><td> <p>The storyboard is not playing.</p> </td></tr> </table><p>?</p> <dd> <p> The elapsed time.</p> </dd> <p> Specifies a handler for storyboard events.</p> <p>Passing <strong>{{NULL}}</strong> for the <em>handler</em> parameter causes Windows Animation to release its reference to any handler object that you passed in earlier. This technique can be essential for breaking reference cycles without having to call the <strong>{{IUIAnimationManager2::Shutdown}}</strong> method.</p> <p>Returns <strong>{{S_OK}}</strong> if successful; otherwise an <strong>{{HRESULT}}</strong> error code. See <strong>Windows Animation Error Codes</strong> for a list of error codes.</p> <dd> <p> The handler that Windows Animation should call whenever storyboard status and update events occur. The specified object must implement the <strong>{{IUIAnimationStoryboardEventHandler2}}</strong> interface or be <strong>{{NULL}}</strong>. See Remarks for more info.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, registers the <strong>OnStoryboardStatusChanged</strong> event and includes those events in <strong>{{IUIAnimationManager2::EstimateNextEventTime}}</strong>, which estimates the time interval until the next animation event. No default value.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, registers the <strong>OnStoryboardUpdated</strong> event and includes those events in <strong>{{IUIAnimationManager2::EstimateNextEventTime}}</strong>, which estimates the time interval until the next animation event. No default value.</p> </dd> <p>Strip flag options.</p> <p>These flags are used by <strong>{{D3DStripShader}}</strong>.</p> <p>Values that identify parts of the content of an arbitrary length data buffer.</p> <p>These values are passed to the <strong>{{D3DGetBlobPart}}</strong> or <strong>{{D3DSetBlobPart}}</strong> function.</p> <p>Describes shader data.</p> <p>An array of <strong>{{D3D_SHADER_DATA}}</strong> structures is passed to <strong>{{D3DCompressShaders}}</strong> to compress the shader data into a more compact form.</p> <dd> <p>A reference to shader data.</p> </dd> <dd> <p>Length of shader data that <strong>pBytecode</strong> points to.</p> </dd> <strong>Note</strong>??You can use this {{API}} to develop your Windows Store apps, but you can't use it in apps that you submit to the Windows Store.?<p>Reads a file that is on disk into memory.</p> <strong>Note</strong>??The {{D3dcompiler_44}}.dll or later version of the file contains the <strong>{{D3DReadFileToBlob}}</strong> compiler function.? <p>Returns one of the Direct3D 11 return codes.</p> <dd> <p>A reference to a constant null-terminated string that contains the name of the file to read into memory.</p> </dd> <dd> <p>A reference to a variable that receives a reference to the <strong>{{ID3DBlob}}</strong> interface that contains information that <strong>{{D3DReadFileToBlob}}</strong> read from the <em>pFileName</em> file. You can use this <strong>{{ID3DBlob}}</strong> interface to access the file information and pass it to other compiler functions.</p> </dd> <strong>Note</strong>??You can use this {{API}} to develop your Windows Store apps, but you can't use it in apps that you submit to the Windows Store.?<p>Writes a memory blob to a file on disk.</p> <strong>Note</strong>??The {{D3dcompiler_44}}.dll or later version of the file contains the <strong>{{D3DWriteBlobToFile}}</strong> compiler function.? <p>Returns one of the Direct3D 11 return codes.</p> <dd> <p>A reference to a <strong>{{ID3DBlob}}</strong> interface that contains the memory blob to write to the file that the <em>pFileName</em> parameter specifies.</p> </dd> <dd> <p>A reference to a constant null-terminated string that contains the name of the file to which to write.</p> </dd> <dd> <p>A Boolean value that specifies whether to overwrite information in the <em>pFileName</em> file. {{TRUE}} specifies to overwrite information and {{FALSE}} specifies not to overwrite information.</p> </dd> <p>Compile {{HLSL}} code or an effect file into bytecode for a given target.</p> <p>The difference between <strong>{{D3DCompile}}</strong> and <strong>{{D3DCompile2}}</strong> is that the latter method takes some optional parameters that can be used to control some aspects of how bytecode is generated. If this extra flexibility is not required, there is no performance gain from using <strong>{{D3DCompile2}}</strong>.</p> <p>Returns one of the Direct3D 11 return codes.</p> <dd> <p>A reference to uncompiled shader data; either {{ASCII}} {{HLSL}} code or a compiled effect.</p> </dd> <dd> <p>Length of <em>pSrcData</em>.</p> </dd> <dd> <p> You can use this parameter for strings that specify error messages. If not used, set to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p> An array of {{NULL}}-terminated macro definitions (see <strong>{{D3D_SHADER_MACRO}}</strong>).</p> </dd> <dd> <p>Optional. A reference to an <strong>{{ID3DInclude}}</strong> for handling include files. Setting this to <strong>{{NULL}}</strong> will cause a compile error if a shader contains a #include. You can pass the <strong>{{D3D_COMPILE_STANDARD_FILE_INCLUDE}}</strong> macro, which is a reference to a default include handler. This default include handler includes files that are relative to the current directory and files that are relative to the directory of the initial source file. When you use <strong>{{D3D_COMPILE_STANDARD_FILE_INCLUDE}}</strong>, you must specify the source file name in the <em>pSourceName</em> parameter; the compiler will derive the initial relative directory from <em>pSourceName</em>.</p> <pre>#define {{D3D_COMPILE_STANDARD_FILE_INCLUDE}} (({{ID3DInclude}}*)({{UINT_PTR}})1) </pre> </dd> <dd> <p>The name of the shader entry point function where shader execution begins. When you compile using a fx profile (for example, fx_4_0, fx_5_0, and so on), <strong>{{D3DCompile}}</strong> ignores <em>pEntrypoint</em>. In this case, we recommend that you set <em>pEntrypoint</em> to <strong>{{NULL}}</strong> because it is good programming practice to set a reference parameter to <strong>{{NULL}}</strong> if the called function will not use it. For all other shader profiles, a valid <em>pEntrypoint</em> is required. </p> </dd> <dd> <p>A string that specifies the shader target or set of shader features to compile against. The shader target can be shader model 2, shader model 3, shader model 4, or shader model 5. The target can also be an effect type (for example, fx_4_1). For info about the targets that various profiles support, see Specifying Compiler Targets. </p> </dd> <dd> <p>Flags defined by <strong>{{D3D}} compile constants</strong>.</p> </dd> <dd> <p>Flags defined by <strong>{{D3D}} compile effect constants</strong>. When you compile a shader and not an effect file, <strong>{{D3DCompile}}</strong> ignores <em>Flags2</em>; we recommend that you set <em>Flags2</em> to zero because it is good programming practice to set a nonreference parameter to zero if the called function will not use it.</p> </dd> <dd> <p>A reference to a variable that receives a reference to the <strong>{{ID3DBlob}}</strong> interface that you can use to access the compiled code.</p> </dd> <dd> <p>A reference to a variable that receives a reference to the <strong>{{ID3DBlob}}</strong> interface that you can use to access compiler error messages, or <strong>{{NULL}}</strong> if there are no errors.</p> </dd> <p>Compiles Microsoft High Level Shader Language ({{HLSL}}) code into bytecode for a given target.</p> <p>The difference between <strong>{{D3DCompile2}}</strong> and <strong>{{D3DCompile}}</strong> is that <strong>{{D3DCompile2}}</strong> takes some optional parameters (<em>SecondaryDataFlags</em>, <em>pSecondaryData</em> and <em>SecondaryDataSize</em>) that can be used to control some aspects of how bytecode is generated. Refer to the descriptions of these parameters for more details. There is no difference otherwise to the efficiency of the bytecode generated between <strong>{{D3DCompile2}}</strong> and <strong>{{D3DCompile}}</strong>.</p> <p>Returns one of the Direct3D 11 return codes.</p> <dd> <p>A reference to uncompiled shader data ({{ASCII}} {{HLSL}} code).</p> </dd> <dd> <p>The size, in bytes, of the block of memory that <em>pSrcData</em> points to.</p> </dd> <dd> <p>An optional reference to a constant null-terminated string containing the name that identifies the source data to use in error messages. If not used, set to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>An optional array of <strong>{{D3D_SHADER_MACRO}}</strong> structures that define shader macros. Each macro definition contains a name and a {{NULL}}-terminated definition. If not used, set to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p> A reference to an <strong>{{ID3DInclude}}</strong> interface that the compiler uses to handle include files. If you set this parameter to <strong>{{NULL}}</strong> and the shader contains a #include, a compile error occurs. You can pass the <strong>{{D3D_COMPILE_STANDARD_FILE_INCLUDE}}</strong> macro, which is a reference to a default include handler. This default include handler includes files that are relative to the current directory and files that are relative to the directory of the initial source file. When you use <strong>{{D3D_COMPILE_STANDARD_FILE_INCLUDE}}</strong>, you must specify the source file name in the <em>pSourceName</em> parameter; the compiler will derive the initial relative directory from <em>pSourceName</em>.</p> <pre>#define {{D3D_COMPILE_STANDARD_FILE_INCLUDE}} (({{ID3DInclude}}*)({{UINT_PTR}})1) </pre> </dd> <dd> <p>A reference to a constant null-terminated string that contains the name of the shader entry point function where shader execution begins. When you compile an effect, <strong>{{D3DCompile2}}</strong> ignores <em>pEntrypoint</em>; we recommend that you set <em>pEntrypoint</em> to <strong>{{NULL}}</strong> because it is good programming practice to set a reference parameter to <strong>{{NULL}}</strong> if the called function will not use it.</p> </dd> <dd> <p>A reference to a constant null-terminated string that specifies the shader target or set of shader features to compile against. The shader target can be a shader model (for example, shader model 2, shader model 3, shader model 4, or shader model 5). The target can also be an effect type (for example, fx_4_1). For info about the targets that various profiles support, see Specifying Compiler Targets. </p> </dd> <dd> <p>A combination of shader <strong>{{D3D}} compile constants</strong> that are combined by using a bitwise <strong>{{OR}}</strong> operation. The resulting value specifies how the compiler compiles the {{HLSL}} code.</p> </dd> <dd> <p>A combination of effect <strong>{{D3D}} compile effect constants</strong> that are combined by using a bitwise <strong>{{OR}}</strong> operation. The resulting value specifies how the compiler compiles the effect. When you compile a shader and not an effect file, <strong>{{D3DCompile2}}</strong> ignores <em>Flags2</em>; we recommend that you set <em>Flags2</em> to zero because it is good programming practice to set a nonreference parameter to zero if the called function will not use it.</p> </dd> <dd> <p>A combination of the following flags that are combined by using a bitwise <strong>{{OR}}</strong> operation. The resulting value specifies how the compiler compiles the {{HLSL}} code. </p> <table> <tr><th>Flag</th><th>Description</th></tr> <tr><td>{{D3DCOMPILE_SECDATA_MERGE_UAV_SLOTS}} (0x01)</td><td>Merge unordered access view ({{UAV}}) slots in the secondary data that the <em>pSecondaryData</em> parameter points to.</td></tr> <tr><td>{{D3DCOMPILE_SECDATA_PRESERVE_TEMPLATE_SLOTS}} (0x02)</td><td>Preserve template slots in the secondary data that the <em>pSecondaryData</em> parameter points to.</td></tr> <tr><td>{{D3DCOMPILE_SECDATA_REQUIRE_TEMPLATE_MATCH}} (0x04)</td><td>Require that templates in the secondary data that the <em>pSecondaryData</em> parameter points to match when the compiler compiles the {{HLSL}} code.</td></tr> </table> <p>?</p> <p>If <em>pSecondaryData</em> is <strong>{{NULL}}</strong>, set to zero.</p> </dd> <dd> <p>A reference to secondary data. If you don't pass secondary data, set to <strong>{{NULL}}</strong>. Use this secondary data to align {{UAV}} slots in two shaders. Suppose shader A has {{UAVs}} and they are bound to some slots. To compile shader B such that {{UAVs}} with the same names are mapped in B to the same slots as in A, pass A?s byte code to <strong>{{D3DCompile2}}</strong> as the secondary data. </p> </dd> <dd> <p>The size, in bytes, of the block of memory that <em>pSecondaryData</em> points to. If <em>pSecondaryData</em> is <strong>{{NULL}}</strong>, set to zero.</p> </dd> <dd> <p>A reference to a variable that receives a reference to the <strong>{{ID3DBlob}}</strong> interface that you can use to access the compiled code.</p> </dd> <dd> <p>A reference to a variable that receives a reference to the <strong>{{ID3DBlob}}</strong> interface that you can use to access compiler error messages, or <strong>{{NULL}}</strong> if there are no errors.</p> </dd> <strong>Note</strong>??You can use this {{API}} to develop your Windows Store apps, but you can't use it in apps that you submit to the Windows Store. Refer to the section, "Compiling shaders for {{UWP}}", in the remarks for <strong>{{D3DCompile2}}</strong>.?<p>Compiles Microsoft High Level Shader Language ({{HLSL}}) code into bytecode for a given target.</p> <strong>Note</strong>??The {{D3dcompiler_44}}.dll or later version of the file contains the <strong>{{D3DCompileFromFile}}</strong> compiler function.? <p>Returns one of the Direct3D 11 return codes.</p> <p>Preprocesses uncompiled {{HLSL}} code.</p> <p><strong>{{D3DPreprocess}}</strong> outputs #line directives and preserves line numbering of source input so that output line numbering can be properly related to the input source.</p> <p>Returns one of the Direct3D 11 return codes.</p> <dd> <p>A reference to uncompiled shader data; either {{ASCII}} {{HLSL}} code or a compiled effect.</p> </dd> <dd> <p>Length of <em>pSrcData</em>.</p> </dd> <dd> <p> The name of the file that contains the uncompiled {{HLSL}} code.</p> </dd> <dd> <p> An array of {{NULL}}-terminated macro definitions (see <strong>{{D3D_SHADER_MACRO}}</strong>).</p> </dd> <dd> <p> A reference to an <strong>{{ID3DInclude}}</strong> for handling include files. Setting this to <strong>{{NULL}}</strong> will cause a compile error if a shader contains a #include. You can pass the <strong>{{D3D_COMPILE_STANDARD_FILE_INCLUDE}}</strong> macro, which is a reference to a default include handler. This default include handler includes files that are relative to the current directory and files that are relative to the directory of the initial source file. When you use <strong>{{D3D_COMPILE_STANDARD_FILE_INCLUDE}}</strong>, you must specify the source file name in the <em>pSourceName</em> parameter; the compiler will derive the initial relative directory from <em>pSourceName</em>.</p> <pre>#define {{D3D_COMPILE_STANDARD_FILE_INCLUDE}} (({{ID3DInclude}}*)({{UINT_PTR}})1) </pre> </dd> <dd> <p>The address of a <strong>{{ID3DBlob}}</strong> that contains the compiled code.</p> </dd> <dd> <p> A reference to an <strong>{{ID3DBlob}}</strong> that contains compiler error messages, or <strong>{{NULL}}</strong> if there were no errors.</p> </dd> <strong>Note</strong>??You can use this {{API}} to develop your Windows Store apps, but you can't use it in apps that you submit to the Windows Store.?<p>Gets shader debug information.</p> <p>Debug information is embedded in the body of the shader after calling <strong>{{D3DCompile}}</strong>.</p> <p>Returns one of the Direct3D 11 return codes.</p> <dd> <p>A reference to source data; either uncompiled or compiled {{HLSL}} code.</p> </dd> <dd> <p>Length of <em>pSrcData</em>.</p> </dd> <dd> <p>A reference to a buffer that receives the <strong>{{ID3DBlob}}</strong> interface that contains debug information.</p> </dd> <p>Gets a reference to a reflection interface.</p> <p>Shader code contains metadata that can be inspected using the reflection {{APIs}}.</p><p>The following code illustrates retrieving a <strong>{{ID3D11ShaderReflection}}</strong> Interface from a shader.</p><pre> pd3dDevice-&gt;CreatePixelShader( pPixelShaderBuffer-&gt;GetBufferPointer(), pPixelShaderBuffer-&gt;GetBufferSize(), g_pPSClassLinkage, &amp;g_pPixelShader ); {{ID3D11ShaderReflection}}* pReflector = {{NULL}}; {{D3DReflect}}( pPixelShaderBuffer-&gt;GetBufferPointer(), pPixelShaderBuffer-&gt;GetBufferSize(), {{IID_ID3D11ShaderReflection}}, (void**) &amp;pReflector); </pre> <p>Returns one of the Direct3D 11 return codes.</p> <dd> <p>A reference to source data as compiled {{HLSL}} code.</p> </dd> <dd> <p>Length of <em>pSrcData</em>.</p> </dd> <dd> <p>The reference {{GUID}} of the {{COM}} interface to use. For example, <strong>{{IID_ID3D11ShaderReflection}}</strong>.</p> </dd> <dd> <p>A reference to a reflection interface.</p> </dd> <p>Creates a library-reflection interface from source data that contains an {{HLSL}} library of functions. </p><strong>Note</strong>??This function is part of the {{HLSL}} shader linking technology that you can use on all Direct3D?11 platforms to create precompiled {{HLSL}} functions, package them into libraries, and link them into full shaders at run time.? <p>Returns {{S_OK}} if successful; otherwise, returns one of the Direct3D 11 Return Codes. </p> <dd> <p>A reference to source data as an {{HLSL}} library of functions. </p> </dd> <dd> <p>The size, in bytes, of the block of memory that <em>pSrcData</em> points to.</p> </dd> <dd> <p>The reference {{GUID}} of the {{COM}} interface to use. For example, <strong>{{IID_ID3D11LibraryReflection}}</strong>.</p> </dd> <dd> <p>A reference to a variable that receives a reference to a library-reflection interface, <strong>{{ID3D11LibraryReflection}}</strong>.</p> </dd> <p>Disassembles compiled {{HLSL}} code.</p> <p>Returns one of the Direct3D 11 return codes.</p> <dd> <p>A reference to source data as compiled {{HLSL}} code.</p> </dd> <dd> <p>Length of <em>pSrcData</em>.</p> </dd> <dd> <p>Flags affecting the behavior of <strong>{{D3DDisassemble}}</strong>. <em>Flags</em> can be a combination of zero or more of the following values. </p> <table> <tr><th>Flag</th><th>Description</th></tr> <tr><td><strong>{{D3D_DISASM_ENABLE_COLOR_CODE}}</strong></td><td>Enable the output of color codes.</td></tr> <tr><td><strong>{{D3D_DISASM_ENABLE_DEFAULT_VALUE_PRINTS}}</strong></td><td>Enable the output of default values.</td></tr> <tr><td><strong>{{D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING}}</strong></td><td>Enable instruction numbering.</td></tr> <tr><td><strong>{{D3D_DISASM_ENABLE_INSTRUCTION_CYCLE}}</strong></td><td>No effect.</td></tr> <tr><td><strong>{{D3D_DISASM_DISABLE_DEBUG_INFO}}</strong></td><td>Disable debug information.</td></tr> <tr><td><strong>{{D3D_DISASM_ENABLE_INSTRUCTION_OFFSET}}</strong></td><td>Enable instruction offsets.</td></tr> <tr><td><strong>{{D3D_DISASM_INSTRUCTION_ONLY}}</strong></td><td>Disassemble instructions only.</td></tr> <tr><td><strong> {{D3D_DISASM_PRINT_HEX_LITERALS}}</strong></td><td>Use hex symbols in disassemblies.</td></tr> </table> <p>?</p> </dd> <dd> <p>The comment string at the top of the shader that identifies the shader constants and variables.</p> </dd> <dd> <p>A reference to a buffer that receives the <strong>{{ID3DBlob}}</strong> interface that accesses assembly text.</p> </dd> <p>Disassembles a specific region of compiled Microsoft High Level Shader Language ({{HLSL}}) code.</p> <strong>Note</strong>??The {{D3dcompiler_44}}.dll or later version of the file contains the <strong>{{D3DDisassembleRegion}}</strong> compiler function.? <p>Returns one of the Direct3D 11 return codes.</p> <dd> <p>A reference to compiled shader data.</p> </dd> <dd> <p>The size, in bytes, of the block of memory that <em>pSrcData</em> points to.</p> </dd> <dd> <p>A combination of zero or more of the following flags that are combined by using a bitwise <strong>{{OR}}</strong> operation. The resulting value specifies how <strong>{{D3DDisassembleRegion}}</strong> disassembles the compiled shader data.</p> <table> <tr><th>Flag</th><th>Description</th></tr> <tr><td>{{D3D_DISASM_ENABLE_COLOR_CODE}} (0x01)</td><td>Enable the output of color codes.</td></tr> <tr><td>{{D3D_DISASM_ENABLE_DEFAULT_VALUE_PRINTS}} (0x02)</td><td>Enable the output of default values.</td></tr> <tr><td>{{D3D_DISASM_ENABLE_INSTRUCTION_NUMBERING}} (0x04)</td><td>Enable instruction numbering.</td></tr> <tr><td>{{D3D_DISASM_ENABLE_INSTRUCTION_CYCLE}} (0x08)</td><td>No effect.</td></tr> <tr><td>{{D3D_DISASM_DISABLE_DEBUG_INFO}} (0x10)</td><td>Disable the output of debug information.</td></tr> <tr><td>{{D3D_DISASM_ENABLE_INSTRUCTION_OFFSET}} (0x20)</td><td>Enable the output of instruction offsets.</td></tr> <tr><td>{{D3D_DISASM_INSTRUCTION_ONLY}} (0x40)</td><td>This flag has no effect in <strong>{{D3DDisassembleRegion}}</strong>. Cycle information comes from the trace; therefore, cycle information is available only in <strong>{{D3DDisassemble11Trace}}</strong>'s trace disassembly.</td></tr> </table> <p>?</p> </dd> <dd> <p>A reference to a constant null-terminated string at the top of the shader that identifies the shader constants and variables.</p> </dd> <dd> <p>The number of bytes offset into the compiled shader data where <strong>{{D3DDisassembleRegion}}</strong> starts the disassembly.</p> </dd> <dd> <p>The number of instructions to disassemble.</p> </dd> <dd> <p>A reference to a variable that receives the number of bytes offset into the compiled shader data where <strong>{{D3DDisassembleRegion}}</strong> finishes the disassembly.</p> </dd> <dd> <p>A reference to a buffer that receives the <strong>{{ID3DBlob}}</strong> interface that accesses the disassembled {{HLSL}} code.</p> </dd> <p>Creates a linker interface. </p><strong>Note</strong>??This function is part of the {{HLSL}} shader linking technology that you can use on all Direct3D?11 platforms to create precompiled {{HLSL}} functions, package them into libraries, and link them into full shaders at run time.? <strong>Note</strong>??The {{D3dcompiler_47}}.dll or later version of the {{DLL}} contains the <strong>{{D3DCreateLinker}}</strong> function.? <p>Returns {{S_OK}} if successful; otherwise, returns one of the Direct3D 11 Return Codes.</p> <dd> <p>A reference to a variable that receives a reference to the <strong>{{ID3D11Linker}}</strong> interface that is used to link a shader module.</p> </dd> <p>Creates a shader module interface from source data for the shader module. </p><strong>Note</strong>??This function is part of the {{HLSL}} shader linking technology that you can use on all Direct3D?11 platforms to create precompiled {{HLSL}} functions, package them into libraries, and link them into full shaders at run time.? <strong>Note</strong>??The {{D3dcompiler_47}}.dll or later version of the {{DLL}} contains the <strong>{{D3DLoadModule}}</strong> function.? <p>Returns {{S_OK}} if successful; otherwise, returns one of the Direct3D 11 Return Codes.</p> <dd> <p>A reference to the source data for the shader module.</p> </dd> <dd> <p>The size, in bytes, of the block of memory that <em>pSrcData</em> points to.</p> </dd> <dd> <p>A reference to a variable that receives a reference to the <strong>{{ID3D11Module}}</strong> interface that is used for shader resource re-binding.</p> </dd> <p>Creates a function-linking-graph interface. </p><strong>Note</strong>??This function is part of the {{HLSL}} shader linking technology that you can use on all Direct3D?11 platforms to create precompiled {{HLSL}} functions, package them into libraries, and link them into full shaders at run time.? <strong>Note</strong>??The {{D3dcompiler_47}}.dll or later version of the {{DLL}} contains the <strong>{{D3DCreateFunctionLinkingGraph}}</strong> function.? <p>Returns {{S_OK}} if successful; otherwise, returns one of the Direct3D 11 Return Codes.</p> <dd> <p>Reserved</p> </dd> <dd> <p>A reference to a variable that receives a reference to the <strong>{{ID3D11FunctionLinkingGraph}}</strong> interface that is used for constructing shaders that consist of a sequence of precompiled function calls.</p> </dd> <p>Retrieves the byte offsets for instructions within a section of shader code.</p> <p>A new kind of Microsoft High Level Shader Language ({{HLSL}}) debugging information from a program database ({{PDB}}) file uses instruction-byte offsets within a shader blob (arbitrary-length data buffer). You use <strong>{{D3DGetTraceInstructionOffsets}}</strong> to translate to and from instruction indexes.</p><strong>Note</strong>??The {{D3dcompiler_44}}.dll or later version of the file contains the <strong>{{D3DGetTraceInstructionOffsets}}</strong> compiler function.? <p>Returns one of the Direct3D 11 return codes.</p> <dd> <p>A reference to the compiled shader data.</p> </dd> <dd> <p>The size, in bytes, of the block of memory that <em>pSrcData</em> points to.</p> </dd> <dd> <p>A combination of the following flags that are combined by using a bitwise <strong>{{OR}}</strong> operation. The resulting value specifies how <strong>{{D3DGetTraceInstructionOffsets}}</strong> retrieves the instruction offsets.</p> <table> <tr><th>Flag</th><th>Description</th></tr> <tr><td>{{D3D_GET_INST_OFFSETS_INCLUDE_NON_EXECUTABLE}} (0x01)</td><td>Include non-executable code in the retrieved information.</td></tr> </table> <p>?</p> </dd> <dd> <p>The index of the instruction in the compiled shader data for which <strong>{{D3DGetTraceInstructionOffsets}}</strong> starts to retrieve the byte offsets.</p> </dd> <dd> <p>The number of instructions for which <strong>{{D3DGetTraceInstructionOffsets}}</strong> retrieves the byte offsets.</p> </dd> <dd> <p>A reference to a variable that receives the actual number of offsets.</p> </dd> <dd> <p>A reference to a variable that receives the total number of instructions in the section of shader code.</p> </dd> <strong>Note</strong>??<strong>{{D3DGetInputSignatureBlob}}</strong> may be altered or unavailable for releases after Windows?8.1. Instead use <strong>{{D3DGetBlobPart}}</strong> with the <strong>{{D3D_BLOB_INPUT_SIGNATURE_BLOB}}</strong> value.?<p>Gets the input signature from a compilation result.</p> <p>Returns one of the Direct3D 11 return codes.</p> <strong>Note</strong>??<strong>{{D3DGetOutputSignatureBlob}}</strong> may be altered or unavailable for releases after Windows?8.1. Instead use <strong>{{D3DGetBlobPart}}</strong> with the <strong>{{D3D_BLOB_OUTPUT_SIGNATURE_BLOB}}</strong> value.?<p>Gets the output signature from a compilation result.</p> <p>Returns one of the Direct3D 11 return codes.</p> <strong>Note</strong>??<strong>{{D3DGetInputAndOutputSignatureBlob}}</strong> may be altered or unavailable for releases after Windows?8.1. Instead use <strong>{{D3DGetBlobPart}}</strong> with the <strong>{{D3D_BLOB_INPUT_AND_OUTPUT_SIGNATURE_BLOB}}</strong> value.?<p>Gets the input and output signatures from a compilation result.</p> <p>Returns one of the Direct3D 11 return codes.</p> <p>Removes unwanted blobs from a compilation result.</p> <p>Returns one of the Direct3D 11 return codes.</p> <dd> <p>A reference to source data as compiled {{HLSL}} code.</p> </dd> <dd> <p>Length of <em>pSrcData</em>.</p> </dd> <dd> <p>Strip flag options, represented by <strong>{{D3DCOMPILER_STRIP_FLAGS}}</strong>.</p> </dd> <dd> <p>A reference to a variable that receives a reference to the <strong>{{ID3DBlob}}</strong> interface that you can use to access the unwanted stripped out shader code.</p> </dd> <p>Retrieves a specific part from a compilation result.</p> <p><strong>{{D3DGetBlobPart}}</strong> retrieves the part of a blob (arbitrary length data buffer) that contains the type of data that the <em>Part</em> parameter specifies.</p> <p>Returns one of the Direct3D 11 return codes.</p> <dd> <p>A reference to uncompiled shader data; either {{ASCII}} {{HLSL}} code or a compiled effect.</p> </dd> <dd> <p>Length of uncompiled shader data that <em>pSrcData</em> points to.</p> </dd> <dd> <p>A <strong>{{D3D_BLOB_PART}}</strong>-typed value that specifies the part of the buffer to retrieve.</p> </dd> <dd> <p>Flags that indicate how to retrieve the blob part. Currently, no flags are defined.</p> </dd> <dd> <p>The address of a reference to the <strong>{{ID3DBlob}}</strong> interface that is used to retrieve the specified part of the buffer.</p> </dd> <p>Sets information in a compilation result.</p> <p><strong>{{D3DSetBlobPart}}</strong> modifies data in a compiled shader. Currently, <strong>{{D3DSetBlobPart}}</strong> can update only the private data in a compiled shader. You can use <strong>{{D3DSetBlobPart}}</strong> to attach arbitrary uninterpreted data to a compiled shader.</p><strong>Note</strong>??The {{D3dcompiler_44}}.dll or later version of the file contains the <strong>{{D3DSetBlobPart}}</strong> compiler function.? <p>Returns one of the Direct3D 11 return codes.</p> <dd> <p>A reference to compiled shader data.</p> </dd> <dd> <p>The length of the compiled shader data that <em>pSrcData</em> points to.</p> </dd> <dd> <p>A <strong>{{D3D_BLOB_PART}}</strong>-typed value that specifies the part to set. Currently, you can update only private data; that is, <strong>{{D3DSetBlobPart}}</strong> currently only supports the <strong>{{D3D_BLOB_PRIVATE_DATA}}</strong> value.</p> </dd> <dd> <p>Flags that indicate how to set the blob part. Currently, no flags are defined; therefore, set to zero.</p> </dd> <dd> <p>A reference to data to set in the compilation result.</p> </dd> <dd> <p>The length of the data that <em>pPart</em> points to.</p> </dd> <dd> <p>A reference to a buffer that receives the <strong>{{ID3DBlob}}</strong> interface for the new shader in which the new part data is set.</p> </dd> <p>Creates a buffer.</p> <p>The latest {{D3dcompiler_nn}}.dll contains the <strong>{{D3DCreateBlob}}</strong> compiler function. Therefore, you are no longer required to create and use an arbitrary length data buffer by using the <strong>{{D3D10CreateBlob}}</strong> function that is contained in {{D3d10}}.dll.</p> <p>Returns one of the Direct3D 11 return codes.</p> <dd> <p>Number of bytes in the blob.</p> </dd> <dd> <p>The address of a reference to the <strong>{{ID3DBlob}}</strong> interface that is used to retrieve the buffer.</p> </dd> <strong>Note</strong>??You can use this {{API}} to develop your Windows Store apps, but you can't use it in apps that you submit to the Windows Store.?<p>Compresses a set of shaders into a more compact form. </p> <p>Returns one of the Direct3D 11 return codes.</p> <dd> <p>The number of shaders to compress.</p> </dd> <dd> <p>An array of <strong>{{D3D_SHADER_DATA}}</strong> structures that describe the set of shaders to compress.</p> </dd> <dd> <p>Flags that indicate how to compress the shaders. Currently, only the {{D3D_COMPRESS_SHADER_KEEP_ALL_PARTS}} (0x00000001) flag is defined.</p> </dd> <dd> <p>The address of a reference to the <strong>{{ID3DBlob}}</strong> interface that is used to retrieve the compressed shader data.</p> </dd> <strong>Note</strong>??You can use this {{API}} to develop your Windows Store apps, but you can't use it in apps that you submit to the Windows Store.?<p>Decompresses one or more shaders from a compressed set. </p> <p>Returns one of the Direct3D 11 return codes.</p> <dd> <p>A reference to uncompiled shader data; either {{ASCII}} {{HLSL}} code or a compiled effect.</p> </dd> <dd> <p>Length of uncompiled shader data that <em>pSrcData</em> points to.</p> </dd> <dd> <p>The number of shaders to decompress.</p> </dd> <dd> <p>The index of the first shader to decompress.</p> </dd> <dd> <p>An array of indexes that represent the shaders to decompress.</p> </dd> <dd> <p>Flags that indicate how to decompress. Currently, no flags are defined.</p> </dd> <dd> <p>The address of a reference to the <strong>{{ID3DBlob}}</strong> interface that is used to retrieve the decompressed shader data.</p> </dd> <dd> <p>A reference to a variable that receives the total number of shaders that <strong>{{D3DDecompressShaders}}</strong> decompressed.</p> </dd> <p>Disassembles compiled {{HLSL}} code from a Direct3D10 effect.</p> <p>Returns one of the Direct3D 11 return codes.</p> <dd> <p>A reference to source data as compiled {{HLSL}} code.</p> </dd> <dd> <p>Shader compile options.</p> </dd> <dd> <p>A reference to a buffer that receives the <strong>{{ID3DBlob}}</strong> interface that contains disassembly text.</p> </dd> <p>Indicates shader type.</p> <dd> <p>Pixel shader.</p> </dd> <dd> <p>Vertex shader.</p> </dd> <dd> <p>Geometry shader.</p> </dd> <dd> <p>Hull shader.</p> </dd> <dd> <p>Domain shader.</p> </dd> <dd> <p>Compute shader.</p> </dd> <dd> <p>Indicates the end of the enumeration constants.</p> </dd> <p>Describes a shader signature.</p> <p>A shader can take n inputs and can produce m outputs. The order of the input (or output) parameters, their associated types, and any attached semantics make up the shader signature. Each shader has an input and an output signature.</p><p>When compiling a shader or an effect, some {{API}} calls validate shader signatures That is, they compare the output signature of one shader (like a vertex shader) with the input signature of another shader (like a pixel shader). This ensures that a shader outputs data that is compatible with a downstream shader that is consuming that data. Compatible means that a shader signature is a exact-match subset of the preceding shader stage. Exact match means parameter types and semantics must exactly match. Subset means that a parameter that is not required by a downstream stage, does not need to include that parameter in its shader signature.</p><p>Get a shader-signature from a shader or an effect by calling {{APIs}} such as <strong>{{ID3D11ShaderReflection::GetInputParameterDesc}}</strong>. </p> <dd> <p>A per-parameter string that identifies how the data will be used. For more info, see Semantics. </p> </dd> <dd> <p>Semantic index that modifies the semantic. Used to differentiate different parameters that use the same semantic.</p> </dd> <dd> <p>The register that will contain this variable's data.</p> </dd> <dd> <p>A <strong>{{D3D_NAME}}</strong>-typed value that identifies a predefined string that determines the functionality of certain pipeline stages.</p> </dd> <dd> <p>A <strong>{{D3D_REGISTER_COMPONENT_TYPE}}</strong>-typed value that identifies the per-component-data type that is stored in a register. Each register can store up to four-components of data.</p> </dd> <dd> <p>Mask which indicates which components of a register are used.</p> </dd> <dd> <p>Mask which indicates whether a given component is never written (if the signature is an output signature) or always read (if the signature is an input signature). </p> </dd> <dd> <p>Indicates which stream the geometry shader is using for the signature parameter.</p> </dd> <dd> <p>A <strong>{{D3D_MIN_PRECISION}}</strong>-typed value that indicates the minimum desired interpolation precision. For more info, see Using {{HLSL}} minimum precision.</p> </dd> <p>Describes a shader constant-buffer.</p> <p>Constants are supplied to shaders in a shader-constant buffer. Get the description of a shader-constant-buffer by calling <strong>{{ID3D11ShaderReflectionConstantBuffer::GetDesc}}</strong>.</p> <dd> <p>The name of the buffer.</p> </dd> <dd> <p>A <strong>{{D3D_CBUFFER_TYPE}}</strong>-typed value that indicates the intended use of the constant data.</p> </dd> <dd> <p>The number of unique variables.</p> </dd> <dd> <p>Buffer size (in bytes).</p> </dd> <dd> <p>A combination of <strong>{{D3D_SHADER_CBUFFER_FLAGS}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies properties for the shader constant-buffer.</p> </dd> <p>Describes a shader variable.</p> <p> Get a shader-variable description using reflection by calling <strong>{{ID3D11ShaderReflectionVariable::GetDesc}}</strong>. </p><p> As of the June 2010 update, <strong>DefaultValue</strong> emits default values for reflection. </p> <dd> <p>The variable name.</p> </dd> <dd> <p>Offset from the start of the parent structure to the beginning of the variable.</p> </dd> <dd> <p>Size of the variable (in bytes).</p> </dd> <dd> <p> A combination of <strong>{{D3D_SHADER_VARIABLE_FLAGS}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value identifies shader-variable properties. </p> </dd> <dd> <p>The default value for initializing the variable.</p> </dd> <dd> <p>Offset from the start of the variable to the beginning of the texture. </p> </dd> <dd> <p>The size of the texture, in bytes. </p> </dd> <dd> <p>Offset from the start of the variable to the beginning of the sampler. </p> </dd> <dd> <p>The size of the sampler, in bytes. </p> </dd> <p>Describes a shader-variable type.</p> <p>Get a shader-variable-type description by calling <strong>{{ID3D11ShaderReflectionType::GetDesc}}</strong>.</p> <dd> <p>A <strong>{{D3D_SHADER_VARIABLE_CLASS}}</strong>-typed value that identifies the variable class as one of scalar, vector, matrix, object, and so on.</p> </dd> <dd> <p>A <strong>{{D3D_SHADER_VARIABLE_TYPE}}</strong>-typed value that identifies the variable type.</p> </dd> <dd> <p>Number of rows in a matrix. Otherwise a numeric type returns 1, any other type returns 0.</p> </dd> <dd> <p>Number of columns in a matrix. Otherwise a numeric type returns 1, any other type returns 0.</p> </dd> <dd> <p>Number of elements in an array; otherwise 0.</p> </dd> <dd> <p>Number of members in the structure; otherwise 0.</p> </dd> <dd> <p>Offset, in bytes, between the start of the parent structure and this variable. Can be 0 if not a structure member.</p> </dd> <dd> <p>Name of the shader-variable type. This member can be <strong>{{NULL}}</strong> if it isn't used. This member supports dynamic shader linkage interface types, which have names. For more info about dynamic shader linkage, see Dynamic Linking.</p> </dd> <p>Describes a shader.</p> <p>A shader is written in {{HLSL}} and compiled into an intermediate language by the {{HLSL}} compiler. The shader description returns information about the compiled shader. Get a shader description by calling <strong>{{ID3D11ShaderReflection::GetDesc}}</strong>.</p> <dd> <p>Shader version.</p> </dd> <dd> <p>The name of the originator of the shader.</p> </dd> <dd> <p>Shader compilation/parse flags.</p> </dd> <dd> <p>The number of shader-constant buffers.</p> </dd> <dd> <p>The number of resource (textures and buffers) bound to a shader.</p> </dd> <dd> <p>The number of parameters in the input signature.</p> </dd> <dd> <p>The number of parameters in the output signature.</p> </dd> <dd> <p>The number of intermediate-language instructions in the compiled shader.</p> </dd> <dd> <p>The number of temporary registers in the compiled shader.</p> </dd> <dd> <p>Number of temporary arrays used.</p> </dd> <dd> <p>Number of constant defines.</p> </dd> <dd> <p>Number of declarations (input + output).</p> </dd> <dd> <p>Number of non-categorized texture instructions.</p> </dd> <dd> <p>Number of texture load instructions</p> </dd> <dd> <p>Number of texture comparison instructions</p> </dd> <dd> <p>Number of texture bias instructions</p> </dd> <dd> <p>Number of texture gradient instructions.</p> </dd> <dd> <p>Number of floating point arithmetic instructions used.</p> </dd> <dd> <p>Number of signed integer arithmetic instructions used.</p> </dd> <dd> <p>Number of unsigned integer arithmetic instructions used.</p> </dd> <dd> <p>Number of static flow control instructions used.</p> </dd> <dd> <p>Number of dynamic flow control instructions used.</p> </dd> <dd> <p>Number of macro instructions used.</p> </dd> <dd> <p>Number of array instructions used.</p> </dd> <dd> <p>Number of cut instructions used.</p> </dd> <dd> <p>Number of emit instructions used.</p> </dd> <dd> <p>The <strong>{{D3D_PRIMITIVE_TOPOLOGY}}</strong>-typed value that represents the geometry shader output topology.</p> </dd> <dd> <p>Geometry shader maximum output vertex count.</p> </dd> <dd> <p>The <strong>{{D3D_PRIMITIVE}}</strong>-typed value that represents the input primitive for a geometry shader or hull shader.</p> </dd> <dd> <p>Number of parameters in the patch-constant signature.</p> </dd> <dd> <p>Number of geometry shader instances.</p> </dd> <dd> <p>Number of control points in the hull shader and domain shader.</p> </dd> <dd> <p>The <strong>{{D3D_TESSELLATOR_OUTPUT_PRIMITIVE}}</strong>-typed value that represents the tessellator output-primitive type.</p> </dd> <dd> <p>The <strong>{{D3D_TESSELLATOR_PARTITIONING}}</strong>-typed value that represents the tessellator partitioning mode.</p> </dd> <dd> <p>The <strong>{{D3D_TESSELLATOR_DOMAIN}}</strong>-typed value that represents the tessellator domain.</p> </dd> <dd> <p>Number of barrier instructions in a compute shader.</p> </dd> <dd> <p>Number of interlocked instructions in a compute shader.</p> </dd> <dd> <p>Number of texture writes in a compute shader.</p> </dd> <p>Describes how a shader resource is bound to a shader input.</p> <p>Get a shader-input-signature description by calling <strong>{{ID3D11ShaderReflection::GetResourceBindingDesc}}</strong> or <strong>{{ID3D11ShaderReflection::GetResourceBindingDescByName}}</strong>.</p> <dd> <p>Name of the shader resource.</p> </dd> <dd> <p>A <strong>{{D3D_SHADER_INPUT_TYPE}}</strong>-typed value that identifies the type of data in the resource.</p> </dd> <dd> <p>Starting bind point.</p> </dd> <dd> <p>Number of contiguous bind points for arrays.</p> </dd> <dd> <p>A combination of <strong>{{D3D_SHADER_INPUT_FLAGS}}</strong>-typed values for shader input-parameter options. </p> </dd> <dd> <p>If the input is a texture, the <strong>{{D3D_RESOURCE_RETURN_TYPE}}</strong>-typed value that identifies the return type.</p> </dd> <dd> <p>A <strong>{{D3D_SRV_DIMENSION}}</strong>-typed value that identifies the dimensions of the bound resource.</p> </dd> <dd> <p>The number of samples for a multisampled texture; when a texture isn't multisampled, the value is set to -1 (0xFFFFFFFF). </p> </dd> <p>Describes a library.</p> <dd> <p>The name of the originator of the library.</p> </dd> <dd> <p>A combination of <strong>{{D3DCOMPILE}} Constants</strong> that are combined by using a bitwise {{OR}} operation. The resulting value specifies how the compiler compiles.</p> </dd> <dd> <p>The number of functions exported from the library.</p> </dd> <p>Describes a function.</p> <dd> <p>The shader version.</p> </dd> <dd> <p>The name of the originator of the function.</p> </dd> <dd> <p>A combination of <strong>{{D3DCOMPILE}} Constants</strong> that are combined by using a bitwise {{OR}} operation. The resulting value specifies shader compilation and parsing.</p> </dd> <dd> <p>The number of constant buffers for the function.</p> </dd> <dd> <p>The number of bound resources for the function.</p> </dd> <dd> <p>The number of emitted instructions for the function.</p> </dd> <dd> <p>The number of temporary registers used by the function.</p> </dd> <dd> <p>The number of temporary arrays used by the function.</p> </dd> <dd> <p>The number of constant defines for the function.</p> </dd> <dd> <p>The number of declarations (input + output) for the function.</p> </dd> <dd> <p>The number of non-categorized texture instructions for the function.</p> </dd> <dd> <p>The number of texture load instructions for the function.</p> </dd> <dd> <p>The number of texture comparison instructions for the function.</p> </dd> <dd> <p>The number of texture bias instructions for the function.</p> </dd> <dd> <p>The number of texture gradient instructions for the function.</p> </dd> <dd> <p>The number of floating point arithmetic instructions used by the function.</p> </dd> <dd> <p>The number of signed integer arithmetic instructions used by the function.</p> </dd> <dd> <p>The number of unsigned integer arithmetic instructions used by the function.</p> </dd> <dd> <p>The number of static flow control instructions used by the function.</p> </dd> <dd> <p>The number of dynamic flow control instructions used by the function.</p> </dd> <dd> <p>The number of macro instructions used by the function.</p> </dd> <dd> <p>The number of array instructions used by the function.</p> </dd> <dd> <p>The number of mov instructions used by the function.</p> </dd> <dd> <p>The number of movc instructions used by the function.</p> </dd> <dd> <p>The number of type conversion instructions used by the function.</p> </dd> <dd> <p>The number of bitwise arithmetic instructions used by the function.</p> </dd> <dd> <p>A <strong>{{D3D_FEATURE_LEVEL}}</strong>-typed value that specifies the minimum Direct3D feature level target of the function byte code.</p> </dd> <dd> <p>A value that contains a combination of one or more shader requirements flags; each flag specifies a requirement of the shader. A default value of 0 means there are no requirements. For a list of values, see <strong>{{ID3D11ShaderReflection::GetRequiresFlags}}</strong>. </p> </dd> <dd> <p>The name of the function.</p> </dd> <dd> <p>The number of logical parameters in the function signature, not including the return value.</p> </dd> <dd> <p>Indicates whether the function returns a value. <strong>{{TRUE}}</strong> indicates it returns a value; otherwise, <strong>{{FALSE}}</strong> (it is a subroutine).</p> </dd> <dd> <p>Indicates whether there is a Direct3D 10Level9 vertex shader blob. <strong>{{TRUE}}</strong> indicates there is a 10Level9 vertex shader blob; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <dd> <p>Indicates whether there is a Direct3D 10Level9 pixel shader blob. <strong>{{TRUE}}</strong> indicates there is a 10Level9 pixel shader blob; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p>Describes a function parameter. </p> <p>Get a function-parameter description by calling <strong>{{ID3D11FunctionParameterReflection::GetDesc}}</strong>.</p> <dd> <p>The name of the function parameter.</p> </dd> <dd> <p>The {{HLSL}} semantic that is associated with this function parameter. This name includes the index, for example, {{SV_Target}}[n].</p> </dd> <dd> <p>A <strong>{{D3D_SHADER_VARIABLE_TYPE}}</strong>-typed value that identifies the variable type for the parameter.</p> </dd> <dd> <p>A <strong>{{D3D_SHADER_VARIABLE_CLASS}}</strong>-typed value that identifies the variable class for the parameter as one of scalar, vector, matrix, object, and so on.</p> </dd> <dd> <p>The number of rows for a matrix parameter.</p> </dd> <dd> <p>The number of columns for a matrix parameter.</p> </dd> <dd> <p>A <strong>{{D3D_INTERPOLATION_MODE}}</strong>-typed value that identifies the interpolation mode for the parameter.</p> </dd> <dd> <p>A combination of <strong>{{D3D_PARAMETER_FLAGS}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies semantic flags for the parameter.</p> </dd> <dd> <p>The first input register for this parameter.</p> </dd> <dd> <p>The first input register component for this parameter.</p> </dd> <dd> <p>The first output register for this parameter.</p> </dd> <dd> <p>The first output register component for this parameter.</p> </dd> <p>Get an interface by index.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>A reference to a <strong>{{ID3D11ShaderReflectionType}} Interface</strong>.</p> <dd> <p>Zero-based index.</p> </dd> <p>Get the description of a shader-reflection-variable type.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a shader-type description (see <strong>{{D3D11_SHADER_TYPE_DESC}}</strong>).</p> </dd> <p>Get a shader-reflection-variable type by index.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>A reference to a <strong>{{ID3D11ShaderReflectionType}} Interface</strong>.</p> <dd> <p>Zero-based index.</p> </dd> <p>Get a shader-reflection-variable type by name.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>A reference to a <strong>{{ID3D11ShaderReflectionType}} Interface</strong>.</p> <dd> <p>Member name.</p> </dd> <p>Get a shader-reflection-variable type.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>The variable type.</p> <dd> <p>Zero-based index.</p> </dd> <p>Indicates whether two <strong>{{ID3D11ShaderReflectionType}} Interface</strong> references have the same underlying type.</p> <p>IsEqual indicates whether the sources of the <strong>{{ID3D11ShaderReflectionType}} Interface</strong> references have the same underlying type. For example, if two <strong>{{ID3D11ShaderReflectionType}} Interface</strong> references were retrieved from variables, IsEqual can be used to see if the variables have the same type.</p><p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns {{S_OK}} if the references have the same underlying type; otherwise returns {{S_FALSE}}.</p> <p>Gets the base class of a class.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns a reference to a <strong>{{ID3D11ShaderReflectionType}} Interface</strong> containing the base class type. Returns <strong>{{NULL}}</strong> if the class does not have a base class.</p> <p>Gets an <strong>{{ID3D11ShaderReflectionType}} Interface</strong> interface containing the variable base class type.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns A reference to a <strong>{{ID3D11ShaderReflectionType}} Interface</strong>.</p> <p>Gets the number of interfaces.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns the number of interfaces.</p> <p>Get an interface by index.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>A reference to a <strong>{{ID3D11ShaderReflectionType}} Interface</strong>.</p> <dd> <p>Zero-based index.</p> </dd> <p>Indicates whether a variable is of the specified type.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns {{S_OK}} if object being queried is equal to or inherits from the type in the <em>pType</em> parameter; otherwise returns {{S_FALSE}}.</p> <dd> <p>A reference to a <strong>{{ID3D11ShaderReflectionType}} Interface</strong>.</p> </dd> <p>Indicates whether a class type implements an interface.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns {{S_OK}} if the interface is implemented; otherwise return {{S_FALSE}}.</p> <dd> <p>A reference to a <strong>{{ID3D11ShaderReflectionType}} Interface</strong>.</p> </dd> <p>Gets the corresponding interface slot for a variable that represents an interface reference.</p> <p>GetInterfaceSlot gets the corresponding slot in an dynamic linkage array for an interface instance. The returned slot number is used to set an interface instance to a particular class instance. See the {{HLSL}} Interfaces and Classes overview for additional information.</p><p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns the index of the interface in the interface array.</p> <dd> <p>Index of the array element to get the slot number for. For a non-array variable this value will be zero.</p> </dd> <p>Get a shader-variable description.</p> <p>This method can be used to determine if the <strong>{{ID3D11ShaderReflectionVariable}} Interface</strong> is valid, the method returns <strong>{{E_FAIL}}</strong> when the variable is not valid.</p><p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a shader-variable description (see <strong>{{D3D11_SHADER_VARIABLE_DESC}}</strong>).</p> </dd> <p>Get a shader-variable type.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>A reference to a <strong>{{ID3D11ShaderReflectionType}} Interface</strong>.</p> <p>This method returns the buffer of the current <strong>{{ID3D11ShaderReflectionVariable}}</strong>.</p> <p> Returns a reference to the <strong>{{ID3D11ShaderReflectionConstantBuffer}}</strong> of the present <strong>{{ID3D11ShaderReflectionVariable}}</strong>. </p> <p>Gets the corresponding interface slot for a variable that represents an interface reference.</p> <p>GetInterfaceSlot gets the corresponding slot in an dynamic linkage array for an interface instance. The returned slot number is used to set an interface instance to a particular class instance. See the {{HLSL}} Interfaces and Classes overview for additional information.</p><p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns the index of the interface in the interface array.</p> <dd> <p>Index of the array element to get the slot number for. For a non-array variable this value will be zero.</p> </dd> <p>This shader-reflection interface provides access to a constant buffer.</p> <p> To create a constant-buffer interface, call <strong>{{ID3D11ShaderReflection::GetConstantBufferByIndex}}</strong> or <strong>{{ID3D11ShaderReflection::GetConstantBufferByName}}</strong>. This isn't a {{COM}} interface, so you don't need to worry about reference counts or releasing the interface when you're done with it. </p> <p>Get a constant-buffer description.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a <strong>{{D3D11_SHADER_BUFFER_DESC}}</strong>, which represents a shader-buffer description.</p> </dd> <p>Get a shader-reflection variable by index.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>A reference to a shader-reflection variable interface (see <strong>{{ID3D11ShaderReflectionVariable}} Interface</strong>).</p> <dd> <p>Zero-based index.</p> </dd> <p>Get a shader-reflection variable by name.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns a sentinel object (end of list marker). To determine if GetVariableByName successfully completed, call <strong>{{ID3D11ShaderReflectionVariable::GetDesc}}</strong> and check the returned <strong>{{HRESULT}}</strong>; any return value other than success means that GetVariableByName failed.</p> <dd> <p>Variable name.</p> </dd> <p>A shader-reflection interface accesses shader information.</p> <p> An <strong>{{ID3D11ShaderReflection}}</strong> interface can be retrieved for a shader by using <strong>{{D3DReflect}}</strong>. The following code illustrates retrieving a <strong>{{ID3D11ShaderReflection}}</strong> from a shader. </p><pre>pd3dDevice-&gt;CreatePixelShader( pPixelShaderBuffer-&gt;GetBufferPointer(), pPixelShaderBuffer-&gt;GetBufferSize(), g_pPSClassLinkage, &amp;g_pPixelShader ); {{ID3D11ShaderReflection}}* pReflector = {{NULL}}; {{D3DReflect}}( pPixelShaderBuffer-&gt;GetBufferPointer(), pPixelShaderBuffer-&gt;GetBufferSize(), {{IID_ID3D11ShaderReflection}}, (void**) &amp;pReflector);</pre> <p>Get a shader description.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A reference to a shader description. See <strong>{{D3D11_SHADER_DESC}}</strong>.</p> </dd> <p>Get a constant buffer by index.</p> <p>A constant buffer supplies either scalar constants or texture constants to a shader. A shader can use one or more constant buffers. For best performance, separate constants into buffers based on the frequency they are updated.</p><p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>A reference to a constant buffer (see <strong>{{ID3D11ShaderReflectionConstantBuffer}} Interface</strong>).</p> <dd> <p>Zero-based index.</p> </dd> <p>Get a constant buffer by name.</p> <p>A constant buffer supplies either scalar constants or texture constants to a shader. A shader can use one or more constant buffers. For best performance, separate constants into buffers based on the frequency they are updated.</p><p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>A reference to a constant buffer (see <strong>{{ID3D11ShaderReflectionConstantBuffer}} Interface</strong>).</p> <dd> <p>The constant-buffer name.</p> </dd> <p>Get a description of how a resource is bound to a shader.</p> <p>A shader consists of executable code (the compiled {{HLSL}} functions) and a set of resources that supply the shader with input data. <strong>GetResourceBindingDesc</strong> gets information about how one resource in the set is bound as an input to the shader. The <em>ResourceIndex</em> parameter specifies the index for the resource.</p><p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A zero-based resource index.</p> </dd> <dd> <p>A reference to an input-binding description. See <strong>{{D3D11_SHADER_INPUT_BIND_DESC}}</strong>.</p> </dd> <p>Get an input-parameter description for a shader.</p> <p>An input-parameter description is also called a shader signature. The shader signature contains information about the input parameters such as the order or parameters, their data type, and a parameter semantic.</p><p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p> Returns one of the following Direct3D 11 Return Codes. </p> <dd> <p>A zero-based parameter index.</p> </dd> <dd> <p> A reference to a shader-input-signature description. See <strong>{{D3D11_SIGNATURE_PARAMETER_DESC}}</strong>. </p> </dd> <p>Get an output-parameter description for a shader.</p> <p>An output-parameter description is also called a shader signature. The shader signature contains information about the output parameters such as the order or parameters, their data type, and a parameter semantic.</p><p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A zero-based parameter index.</p> </dd> <dd> <p>A reference to a shader-output-parameter description. See <strong>{{D3D11_SIGNATURE_PARAMETER_DESC}}</strong>.</p> </dd> <p>Get a patch-constant parameter description for a shader.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>A zero-based parameter index.</p> </dd> <dd> <p>A reference to a shader-input-signature description. See <strong>{{D3D11_SIGNATURE_PARAMETER_DESC}}</strong>.</p> </dd> <p>Gets a variable by name.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p> Returns a <strong>{{ID3D11ShaderReflectionVariable}} Interface</strong> interface. </p> <dd> <p>A reference to a string containing the variable name.</p> </dd> <p>Get a description of how a resource is bound to a shader. </p> <p>A shader consists of executable code (the compiled {{HLSL}} functions) and a set of resources that supply the shader with input data. <strong>GetResourceBindingDescByName</strong> gets information about how one resource in the set is bound as an input to the shader. The <em>Name</em> parameter specifies the name of the resource.</p><p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns one of the following Direct3D 11 Return Codes.</p> <dd> <p>The constant-buffer name of the resource.</p> </dd> <dd> <p>A reference to an input-binding description. See <strong>{{D3D11_SHADER_INPUT_BIND_DESC}}</strong>.</p> </dd> <p>Gets the number of Mov instructions.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns the number of Mov instructions.</p> <p>Gets the number of Movc instructions.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns the number of Movc instructions.</p> <p>Gets the number of conversion instructions.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns the number of conversion instructions.</p> <p>Gets the number of bitwise instructions.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>The number of bitwise instructions.</p> <p>Gets the geometry-shader input-primitive description.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p> The input-primitive description. See <strong>{{D3D_PRIMITIVE_TOPOLOGY}}</strong>, <strong>{{D3D11_PRIMITIVE_TOPOLOGY}}</strong>, or <strong>{{D3D10_PRIMITIVE_TOPOLOGY}}</strong>. </p> <p>Indicates whether a shader is a sample frequency shader.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>Returns true if the shader is a sample frequency shader; otherwise returns false.</p> <p>Gets the number of interface slots in a shader.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p>The number of interface slots in the shader.</p> <p>Gets the minimum feature level.</p> <p>This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll.</p> <p> Returns one of the following Direct3D 11 Return Codes. </p> <dd> <p> A reference to one of the enumerated values in <strong>{{D3D_FEATURE_LEVEL}}</strong>, which represents the minimum feature level. </p> </dd> <p>Retrieves the sizes, in units of threads, of the X, Y, and Z dimensions of the shader's thread-group grid.</p> <p> This method's interface is hosted in the out-of-box {{DLL}} {{D3DCompiler_xx}}.dll. </p><p>When a compute shader is written it defines the actions of a single thread group only. If multiple thread groups are required, it is the role of the <strong>{{ID3D11DeviceContext::Dispatch}}</strong> call to issue multiple thread groups. </p> <p> Returns the total size, in threads, of the thread-group grid by calculating the product of the size of each dimension. </p><code>*pSizeX * *pSizeY * *pSizeZ;</code> <dd> <p>A reference to the size, in threads, of the x-dimension of the thread-group grid. The maximum size is 1024.</p> </dd> <dd> <p>A reference to the size, in threads, of the y-dimension of the thread-group grid. The maximum size is 1024.</p> </dd> <dd> <p>A reference to the size, in threads, of the z-dimension of the thread-group grid. The maximum size is 64.</p> </dd> <p>Gets a group of flags that indicates the requirements of a shader.</p> <p>Here is how the {{D3D11Shader}}.h header defines the shader requirements flags:</p><pre> #define {{D3D_SHADER_REQUIRES_DOUBLES}} 0x00000001 #define {{D3D_SHADER_REQUIRES_EARLY_DEPTH_STENCIL}} 0x00000002 #define {{D3D_SHADER_REQUIRES_UAVS_AT_EVERY_STAGE}} 0x00000004 #define {{D3D_SHADER_REQUIRES_64_UAVS}} 0x00000008 #define {{D3D_SHADER_REQUIRES_MINIMUM_PRECISION}} 0x00000010 #define {{D3D_SHADER_REQUIRES_11_1_DOUBLE_EXTENSIONS}} 0x00000020 #define {{D3D_SHADER_REQUIRES_11_1_SHADER_EXTENSIONS}} 0x00000040 #define {{D3D_SHADER_REQUIRES_LEVEL_9_COMPARISON_FILTERING}} 0x00000080 </pre> <p>A value that contains a combination of one or more shader requirements flags; each flag specifies a requirement of the shader. A default value of 0 means there are no requirements. </p><table> <tr><th>Shader requirement flag</th><th>Description</th></tr> <tr><td><strong>{{D3D_SHADER_REQUIRES_DOUBLES}}</strong></td><td>Shader requires that the graphics driver and hardware support double data type. For more info, see <strong>{{D3D11_FEATURE_DATA_DOUBLES}}</strong>.</td></tr> <tr><td><strong>{{D3D_SHADER_REQUIRES_EARLY_DEPTH_STENCIL}}</strong></td><td>Shader requires an early depth stencil.</td></tr> <tr><td><strong>{{D3D_SHADER_REQUIRES_UAVS_AT_EVERY_STAGE}}</strong></td><td>Shader requires unordered access views ({{UAVs}}) at every pipeline stage.</td></tr> <tr><td><strong>{{D3D_SHADER_REQUIRES_64_UAVS}}</strong></td><td>Shader requires 64 {{UAVs}}.</td></tr> <tr><td><strong>{{D3D_SHADER_REQUIRES_MINIMUM_PRECISION}}</strong></td><td>Shader requires the graphics driver and hardware to support minimum precision. For more info, see Using {{HLSL}} minimum precision.</td></tr> <tr><td><strong>{{D3D_SHADER_REQUIRES_11_1_DOUBLE_EXTENSIONS}}</strong></td><td>Shader requires that the graphics driver and hardware support extended doubles instructions. For more info, see the <strong>ExtendedDoublesShaderInstructions</strong> member of <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS}}</strong>.</td></tr> <tr><td><strong>{{D3D_SHADER_REQUIRES_11_1_SHADER_EXTENSIONS}}</strong></td><td>Shader requires that the graphics driver and hardware support the <strong>msad4</strong> intrinsic function in shaders. For more info, see the <strong>{{SAD4ShaderInstructions}}</strong> member of <strong>{{D3D11_FEATURE_DATA_D3D11_OPTIONS}}</strong>.</td></tr> <tr><td><strong>{{D3D_SHADER_REQUIRES_LEVEL_9_COMPARISON_FILTERING}}</strong></td><td>Shader requires that the graphics driver and hardware support Direct3D 9 shadow support. For more info, see <strong>{{D3D11_FEATURE_DATA_D3D9_SHADOW_SUPPORT}}</strong>.</td></tr> <tr><td><strong>{{D3D_SHADER_REQUIRES_TILED_RESOURCES}}</strong></td><td>Shader requires that the graphics driver and hardware support tiled resources. For more info, see <strong>GetResourceTiling</strong>. </td></tr> </table><p>?</p> <p> A library-reflection interface accesses library info. </p><strong>Note</strong>?? This interface is part of the {{HLSL}} shader linking technology that you can use on all Direct3D?11 platforms to create precompiled {{HLSL}} functions, package them into libraries, and link them into full shaders at run time.? <p> To get a library-reflection interface, call <strong>{{D3DReflectLibrary}}</strong>. </p><strong>Note</strong>??<strong>{{ID3D11LibraryReflection}}</strong> requires the {{D3dcompiler_47}}.dll or a later version of the {{DLL}}.? <p>Fills the library descriptor structure for the library reflection.</p> <p>Returns one of the Direct3D 11 Return Codes.</p> <dd> <p>A reference to a <strong>{{D3D11_LIBRARY_DESC}}</strong> structure that receives a description of the library reflection.</p> </dd> <p>Gets the function reflector.</p> <p>A reference to a <strong>{{ID3D11FunctionReflection}}</strong> interface that represents the function reflector.</p> <dd> <p>The zero-based index of the function reflector to retrieve.</p> </dd> <p>A function-reflection interface accesses function info. </p><strong>Note</strong>??This interface is part of the {{HLSL}} shader linking technology that you can use on all Direct3D?11 platforms to create precompiled {{HLSL}} functions, package them into libraries, and link them into full shaders at run time.? <p>To get a function-reflection interface, call <strong>{{ID3D11LibraryReflection::GetFunctionByIndex}}</strong>. This isn't a {{COM}} interface, so you don't need to worry about reference counts or releasing the interface when you're done with it.</p><strong>Note</strong>??<strong>{{ID3D11FunctionReflection}}</strong> requires the {{D3dcompiler_47}}.dll or a later version of the {{DLL}}.? <p>Fills the function descriptor structure for the function.</p> <p>Returns one of the Direct3D 11 Return Codes.</p> <dd> <p>A reference to a <strong>{{D3D11_FUNCTION_DESC}}</strong> structure that receives a description of the function.</p> </dd> <p>Gets a constant buffer by index for a function.</p> <p>A constant buffer supplies either scalar constants or texture constants to a shader. A shader can use one or more constant buffers. For best performance, separate constants into buffers based on the frequency they are updated.</p> <p>A reference to a <strong>{{ID3D11ShaderReflectionConstantBuffer}}</strong> interface that represents the constant buffer.</p> <dd> <p>Zero-based index.</p> </dd> <p>Gets a constant buffer by name for a function.</p> <p>A constant buffer supplies either scalar constants or texture constants to a shader. A shader can use one or more constant buffers. For best performance, separate constants into buffers based on the frequency they are updated.</p> <p>A reference to a <strong>{{ID3D11ShaderReflectionConstantBuffer}}</strong> interface that represents the constant buffer.</p> <dd> <p>The constant-buffer name.</p> </dd> <p>Gets a description of how a resource is bound to a function. </p> <p>A shader consists of executable code (the compiled {{HLSL}} functions) and a set of resources that supply the shader with input data. <strong>GetResourceBindingDesc</strong> gets info about how one resource in the set is bound as an input to the shader. The <em>ResourceIndex</em> parameter specifies the index for the resource.</p> <p>Returns one of the Direct3D 11 Return Codes.</p> <dd> <p>A zero-based resource index.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_SHADER_INPUT_BIND_DESC}}</strong> structure that describes input binding of the resource. </p> </dd> <p>Gets a variable by name.</p> <p> Returns a <strong>{{ID3D11ShaderReflectionVariable}} Interface</strong> interface. </p> <dd> <p>A reference to a string containing the variable name.</p> </dd> <p>Gets a description of how a resource is bound to a function. </p> <p>A shader consists of executable code (the compiled {{HLSL}} functions) and a set of resources that supply the shader with input data. <strong>GetResourceBindingDescByName</strong> gets info about how one resource in the set is bound as an input to the shader. The <em>Name</em> parameter specifies the name of the resource.</p> <p>Returns one of the Direct3D 11 Return Codes.</p> <dd> <p>The constant-buffer name of the resource.</p> </dd> <dd> <p>A reference to a <strong>{{D3D11_SHADER_INPUT_BIND_DESC}}</strong> structure that describes input binding of the resource. </p> </dd> <p>Gets the function parameter reflector.</p> <p>A reference to a <strong>{{ID3D11FunctionParameterReflection}}</strong> interface that represents the function parameter reflector.</p> <dd> <p>The zero-based index of the function parameter reflector to retrieve.</p> </dd> <p>A function-parameter-reflection interface accesses function-parameter info. </p><strong>Note</strong>??This interface is part of the {{HLSL}} shader linking technology that you can use on all Direct3D?11 platforms to create precompiled {{HLSL}} functions, package them into libraries, and link them into full shaders at run time.? <p>To get a function-parameter-reflection interface, call <strong>{{ID3D11FunctionReflection::GetFunctionParameter}}</strong>. This isn't a {{COM}} interface, so you don't need to worry about reference counts or releasing the interface when you're done with it.</p><strong>Note</strong>??<strong>{{ID3D11FunctionParameterReflection}}</strong> requires the {{D3dcompiler_47}}.dll or a later version of the {{DLL}}.? <p>Fills the parameter descriptor structure for the function's parameter.</p> <p>Returns one of the Direct3D 11 Return Codes.</p> <dd> <p>A reference to a <strong>{{D3D11_PARAMETER_DESC}}</strong> structure that receives a description of the function's parameter. </p> </dd> <p> A module interface creates an instance of a module that is used for resource rebinding. </p><strong>Note</strong>?? This interface is part of the {{HLSL}} shader linking technology that you can use on all Direct3D?11 platforms to create precompiled {{HLSL}} functions, package them into libraries, and link them into full shaders at run time.? <p> To get a module interface, call <strong>{{D3DLoadModule}}</strong>. </p><strong>Note</strong>??<strong>{{ID3D11Module}}</strong> requires the {{D3dcompiler_47}}.dll or a later version of the {{DLL}}.? <p>Initializes an instance of a shader module that is used for resource rebinding.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the Direct3D 11 Return Codes.</p> <dd> <p>The name of a shader module to initialize. This can be <strong>{{NULL}}</strong> if you don't want to specify a name for the module.</p> </dd> <dd> <p>The address of a reference to an <strong>{{ID3D11ModuleInstance}}</strong> interface to initialize.</p> </dd> <p> A module-instance interface is used for resource rebinding. </p><strong>Note</strong>?? This interface is part of the {{HLSL}} shader linking technology that you can use on all Direct3D?11 platforms to create precompiled {{HLSL}} functions, package them into libraries, and link them into full shaders at run time.? <p> To get a module-instance interface, call <strong>{{ID3D11Module::CreateInstance}}</strong> or <strong>{{ID3D11FunctionLinkingGraph::CreateModuleInstance}}</strong>. </p><strong>Note</strong>??<strong>{{ID3D11ModuleInstance}}</strong> requires the {{D3dcompiler_47}}.dll or a later version of the {{DLL}}.? <p>Rebinds a constant buffer from a source slot to a destination slot.</p> <p>Returns:</p><ul> <li><strong>{{S_OK}}</strong> for a valid rebinding </li> <li><strong>{{S_FALSE}}</strong> for rebinding a nonexistent slot; that is, for which the shader reflection doesn?t have any data </li> <li><strong>{{E_FAIL}}</strong> for an invalid rebinding, for example, the rebinding is out-of-bounds </li> <li> Possibly one of the other Direct3D 11 Return Codes </li> </ul> <dd> <p>The source slot number for rebinding.</p> </dd> <dd> <p>The destination slot number for rebinding.</p> </dd> <dd> <p>The offset in bytes of the destination slot for rebinding. The offset must have 16-byte alignment.</p> </dd> <p>Rebinds a constant buffer by name to a destination slot.</p> <p>Returns:</p><ul> <li><strong>{{S_OK}}</strong> for a valid rebinding </li> <li><strong>{{S_FALSE}}</strong> for rebinding a nonexistent slot; that is, for which the shader reflection doesn?t have any data </li> <li><strong>{{E_FAIL}}</strong> for an invalid rebinding, for example, the rebinding is out-of-bounds </li> <li> Possibly one of the other Direct3D 11 Return Codes </li> </ul> <dd> <p>The name of the constant buffer for rebinding.</p> </dd> <dd> <p>The destination slot number for rebinding.</p> </dd> <dd> <p>The offset in bytes of the destination slot for rebinding. The offset must have 16-byte alignment.</p> </dd> <p>Rebinds a texture or buffer from source slot to destination slot.</p> <p>Returns:</p><ul> <li><strong>{{S_OK}}</strong> for a valid rebinding</li> <li><strong>{{S_FALSE}}</strong> for rebinding a nonexistent slot; that is, for which the shader reflection doesn?t have any data</li> <li><strong>{{E_FAIL}}</strong> for an invalid rebinding, for example, the rebinding is out-of-bounds</li> <li>Possibly one of the other Direct3D 11 Return Codes </li> </ul> <dd> <p>The first source slot number for rebinding.</p> </dd> <dd> <p>The first destination slot number for rebinding.</p> </dd> <dd> <p>The number of slots for rebinding. </p> </dd> <p>Rebinds a texture or buffer by name to destination slots.</p> <p>Returns:</p><ul> <li><strong>{{S_OK}}</strong> for a valid rebinding</li> <li><strong>{{S_FALSE}}</strong> for rebinding a nonexistent slot; that is, for which the shader reflection doesn?t have any data</li> <li><strong>{{E_FAIL}}</strong> for an invalid rebinding, for example, the rebinding is out-of-bounds</li> <li>Possibly one of the other Direct3D 11 Return Codes </li> </ul> <dd> <p>The name of the texture or buffer for rebinding.</p> </dd> <dd> <p>The first destination slot number for rebinding.</p> </dd> <dd> <p>The number of slots for rebinding. </p> </dd> <p>Rebinds a sampler from source slot to destination slot.</p> <p>Returns:</p><ul> <li><strong>{{S_OK}}</strong> for a valid rebinding</li> <li><strong>{{S_FALSE}}</strong> for rebinding a nonexistent slot; that is, for which the shader reflection doesn?t have any data</li> <li><strong>{{E_FAIL}}</strong> for an invalid rebinding, for example, the rebinding is out-of-bounds</li> <li>Possibly one of the other Direct3D 11 Return Codes </li> </ul> <dd> <p>The first source slot number for rebinding.</p> </dd> <dd> <p>The first destination slot number for rebinding.</p> </dd> <dd> <p>The number of slots for rebinding. </p> </dd> <p>Rebinds a sampler by name to destination slots.</p> <p>Returns:</p><ul> <li><strong>{{S_OK}}</strong> for a valid rebinding</li> <li><strong>{{S_FALSE}}</strong> for rebinding a nonexistent slot; that is, for which the shader reflection doesn?t have any data</li> <li><strong>{{E_FAIL}}</strong> for an invalid rebinding, for example, the rebinding is out-of-bounds</li> <li>Possibly one of the other Direct3D 11 Return Codes </li> </ul> <dd> <p>The name of the sampler for rebinding.</p> </dd> <dd> <p>The first destination slot number for rebinding.</p> </dd> <dd> <p>The number of slots for rebinding. </p> </dd> <p>Rebinds an unordered access view ({{UAV}}) from source slot to destination slot.</p> <p>Returns:</p><ul> <li><strong>{{S_OK}}</strong> for a valid rebinding</li> <li><strong>{{S_FALSE}}</strong> for rebinding a nonexistent slot; that is, for which the shader reflection doesn?t have any data</li> <li><strong>{{E_FAIL}}</strong> for an invalid rebinding, for example, the rebinding is out-of-bounds</li> <li>Possibly one of the other Direct3D 11 Return Codes </li> </ul> <dd> <p>The first source slot number for rebinding.</p> </dd> <dd> <p>The first destination slot number for rebinding.</p> </dd> <dd> <p>The number of slots for rebinding. </p> </dd> <p>Rebinds an unordered access view ({{UAV}}) by name to destination slots.</p> <p>Returns:</p><ul> <li><strong>{{S_OK}}</strong> for a valid rebinding</li> <li><strong>{{S_FALSE}}</strong> for rebinding a nonexistent slot; that is, for which the shader reflection doesn?t have any data</li> <li><strong>{{E_FAIL}}</strong> for an invalid rebinding, for example, the rebinding is out-of-bounds</li> <li>Possibly one of the other Direct3D 11 Return Codes </li> </ul> <dd> <p>The name of the {{UAV}} for rebinding.</p> </dd> <dd> <p>The first destination slot number for rebinding.</p> </dd> <dd> <p>The number of slots for rebinding. </p> </dd> <p>Rebinds a resource as an unordered access view ({{UAV}}) from source slot to destination slot.</p> <p>Returns:</p><ul> <li><strong>{{S_OK}}</strong> for a valid rebinding</li> <li><strong>{{S_FALSE}}</strong> for rebinding a nonexistent slot; that is, for which the shader reflection doesn?t have any data</li> <li><strong>{{E_FAIL}}</strong> for an invalid rebinding, for example, the rebinding is out-of-bounds</li> <li>Possibly one of the other Direct3D 11 Return Codes </li> </ul> <dd> <p>The first source slot number for rebinding.</p> </dd> <dd> <p>The first destination slot number for rebinding.</p> </dd> <dd> <p>The number of slots for rebinding. </p> </dd> <p>Rebinds a resource by name as an unordered access view ({{UAV}}) to destination slots.</p> <p>Returns:</p><ul> <li><strong>{{S_OK}}</strong> for a valid rebinding</li> <li><strong>{{S_FALSE}}</strong> for rebinding a nonexistent slot; that is, for which the shader reflection doesn?t have any data</li> <li><strong>{{E_FAIL}}</strong> for an invalid rebinding, for example, the rebinding is out-of-bounds</li> <li>Possibly one of the other Direct3D 11 Return Codes </li> </ul> <dd> <p>The name of the resource for rebinding.</p> </dd> <dd> <p>The first destination slot number for rebinding.</p> </dd> <dd> <p>The number of slots for rebinding. </p> </dd> <p> A linker interface is used to link a shader module. </p><strong>Note</strong>?? This interface is part of the {{HLSL}} shader linking technology that you can use on all Direct3D?11 platforms to create precompiled {{HLSL}} functions, package them into libraries, and link them into full shaders at run time.? <p> To get a linker interface, call <strong>{{D3DCreateLinker}}</strong>. </p><strong>Note</strong>??<strong>{{ID3D11Linker}}</strong> requires the {{D3dcompiler_47}}.dll or a later version of the {{DLL}}.? <p> Links the shader and produces a shader blob that the Direct3D runtime can use. </p> <p> Returns {{S_OK}} if successful; otherwise, returns one of the Direct3D 11 Return Codes. </p> <dd> <p> A reference to the <strong>{{ID3D11ModuleInstance}}</strong> interface for the shader module instance to link from. </p> </dd> <dd> <p> The name of the shader module instance to link from. </p> </dd> <dd> <p> The name for the shader blob that is produced. </p> </dd> <dd> <p> Reserved. </p> </dd> <dd> <p> A reference to a variable that receives a reference to the <strong>{{ID3DBlob}}</strong> interface that you can use to access the compiled shader code. </p> </dd> <dd> <p> A reference to a variable that receives a reference to the <strong>{{ID3DBlob}}</strong> interface that you can use to access compiler error messages. </p> </dd> <p>Adds an instance of a library module to be used for linking.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the Direct3D 11 Return Codes.</p> <dd> <p>A reference to the <strong>{{ID3D11ModuleInstance}}</strong> interface for the library module instance.</p> </dd> <p>Adds a clip plane with the plane coefficients taken from a cbuffer entry for 10Level9 shaders.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the Direct3D 11 Return Codes.</p> <p>Indicates the tier level at which view instancing is supported.</p> <dd> <p>View instancing is not supported.</p> </dd> <dd> <p>View instancing is supported by draw-call level looping only.</p> </dd> <dd> <p>View instancing is supported by draw-call level looping at worst, but the {{GPU}} can perform view instancing more efficiently in certain circumstances which are architecture-dependent.</p> </dd> <dd> <p>View instancing is supported and instancing begins with the first shader stage that references {{SV_ViewID}} or with rasterization if no shader stage references {{SV_ViewID}}. This means that redundant work is eliminated across view instances when it's not dependent on {{SV_ViewID}}. Before rasterization, work that doesn't directly depend on {{SV_ViewID}} is shared across all views; only work that depends on {{SV_ViewID}} is repeated for each view.</p> <strong>Note</strong> If a hull shader produces tessellation factors that are dependent on {{SV_ViewID}}, then tessellation and all subsequent work must be repeated per-view. Similarly, if the amount of geometry produced by the geometry shader depends on {{SV_ViewID}}, then the geometry shader must be repeated per-view before proceeding to rasterization. <p>View instance masking only effects whether work that directly depends on {{SV_ViewID}} is performed, not the entire loop iteration (per-view). If the view instance mask is non-0, some work that depends on {{SV_ViewID}} might still be performed on masked-off pixels but will have no externally-visible effect; for example, no {{UAV}} writes are performed and clipping/rasterzation is not invoked. If the view instance mask is 0 no work is performed, including work that's not dependent on {{SV_ViewID}}.</p> </dd> <p> A linking-node interface is used for shader linking. </p><strong>Note</strong>?? This interface is part of the {{HLSL}} shader linking technology that you can use on all Direct3D?11 platforms to create precompiled {{HLSL}} functions, package them into libraries, and link them into full shaders at run time.? <p> To get a linking-node interface, call <strong>{{ID3D11FunctionLinkingGraph::SetInputSignature}}</strong>, <strong>{{ID3D11FunctionLinkingGraph::SetOutputSignature}}</strong>, or <strong>{{ID3D11FunctionLinkingGraph::CallFunction}}</strong>. </p><strong>Note</strong>??<strong>{{ID3D11LinkingNode}}</strong> requires the {{D3dcompiler_47}}.dll or a later version of the {{DLL}}.? <p>A function-linking-graph interface is used for constructing shaders that consist of a sequence of precompiled function calls that pass values to each other. </p><strong>Note</strong>??This interface is part of the {{HLSL}} shader linking technology that you can use on all Direct3D?11 platforms to create precompiled {{HLSL}} functions, package them into libraries, and link them into full shaders at run time.? <p>To get a function-linking-graph interface, call <strong>{{D3DCreateFunctionLinkingGraph}}</strong>. </p><p>You can use the function-linking-graph ({{FLG}}) interface methods to construct shaders that consist of a sequence of precompiled function calls that pass values to each other. You don't need to write {{HLSL}} and then call the {{HLSL}} compiler. Instead, the shader structure is specified programmatically via a C++ {{API}}. {{FLG}} nodes represent input and output signatures and invocations of precompiled library functions. The order of registering the function-call nodes defines the sequence of invocations. You must specify the input signature node first and the output signature node last. {{FLG}} edges define how values are passed from one node to another. The data types of passed values must be the same; there is no implicit type conversion. Shape and swizzling rules follow the {{HLSL}} behavior. Values can only be passed forward in this sequence.</p><strong>Note</strong>??<strong>{{ID3D11FunctionLinkingGraph}}</strong> requires the {{D3dcompiler_47}}.dll or a later version of the {{DLL}}.? <p>Initializes a shader module from the function-linking-graph object.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the Direct3D 11 Return Codes.</p> <dd> <p>The address of a reference to an <strong>{{ID3D11ModuleInstance}}</strong> interface for the shader module to initialize.</p> </dd> <dd> <p>An optional reference to a variable that receives a reference to the <strong>{{ID3DBlob}}</strong> interface that you can use to access compiler error messages, or <strong>{{NULL}}</strong> if there are no errors.</p> </dd> <p>Sets the input signature of the function-linking-graph.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the Direct3D 11 Return Codes.</p> <dd> <p>An array of <strong>{{D3D11_PARAMETER_DESC}}</strong> structures for the parameters of the input signature.</p> </dd> <dd> <p>The number of input parameters in the <em>pInputParameters</em> array.</p> </dd> <dd> <p>A reference to a variable that receives a reference to the <strong>{{ID3D11LinkingNode}}</strong> interface that represents the input signature of the function-linking-graph.</p> </dd> <p>Sets the output signature of the function-linking-graph.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the Direct3D 11 Return Codes.</p> <dd> <p>An array of <strong>{{D3D11_PARAMETER_DESC}}</strong> structures for the parameters of the output signature.</p> </dd> <dd> <p>The number of output parameters in the <em>pOutputParameters</em> array.</p> </dd> <dd> <p>A reference to a variable that receives a reference to the <strong>{{ID3D11LinkingNode}}</strong> interface that represents the output signature of the function-linking-graph.</p> </dd> <p>Creates a call-function linking node to use in the function-linking-graph.</p> <p> Returns {{S_OK}} if successful; otherwise, returns one of the Direct3D 11 Return Codes. </p> <dd> <p> The optional namespace for the function, or <strong>{{NULL}}</strong> if no namespace is needed. </p> </dd> <dd> <p> A reference to the <strong>{{ID3D11ModuleInstance}}</strong> interface for the library module that contains the function prototype. </p> </dd> <dd> <p>The name of the function.</p> </dd> <dd> <p> A reference to a variable that receives a reference to the <strong>{{ID3D11LinkingNode}}</strong> interface that represents the function in the function-linking-graph. </p> </dd> <p>Passes a value from a source linking node to a destination linking node.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the Direct3D 11 Return Codes.</p> <dd> <p>A reference to the <strong>{{ID3D11LinkingNode}}</strong> interface for the source linking node.</p> </dd> <dd> <p>The zero-based index of the source parameter.</p> </dd> <dd> <p>A reference to the <strong>{{ID3D11LinkingNode}}</strong> interface for the destination linking node.</p> </dd> <dd> <p>The zero-based index of the destination parameter.</p> </dd> <p>Passes a value with swizzle from a source linking node to a destination linking node.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the Direct3D 11 Return Codes.</p> <dd> <p>A reference to the <strong>{{ID3D11LinkingNode}}</strong> interface for the source linking node.</p> </dd> <dd> <p>The zero-based index of the source parameter.</p> </dd> <dd> <p>The name of the source swizzle.</p> </dd> <dd> <p>A reference to the <strong>{{ID3D11LinkingNode}}</strong> interface for the destination linking node.</p> </dd> <dd> <p>The zero-based index of the destination parameter.</p> </dd> <dd> <p>The name of the destination swizzle.</p> </dd> <p>Gets the error from the last function call of the function-linking-graph.</p> <p> Returns {{S_OK}} if successful; otherwise, returns one of the Direct3D 11 Return Codes. </p> <dd> <p> An reference to a variable that receives a reference to the <strong>{{ID3DBlob}}</strong> interface that you can use to access the error. </p> </dd> <p>Generates Microsoft High Level Shader Language ({{HLSL}}) shader code that represents the function-linking-graph.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the Direct3D 11 Return Codes.</p> <dd> <p>Reserved</p> </dd> <dd> <p>An reference to a variable that receives a reference to the <strong>{{ID3DBlob}}</strong> interface that you can use to access the {{HLSL}} shader source code that represents the function-linking-graph. You can compile this {{HLSL}} code, but first you must add code or include statements for the functions called in the function-linking-graph.</p> </dd> <p>Driver type options.</p> <p>The driver type is required when calling <strong>{{D3D11CreateDevice}}</strong> or <strong>{{D3D11CreateDeviceAndSwapChain}}</strong>.</p> <dd> <p>The driver type is unknown.</p> </dd> <dd> <p>A hardware driver, which implements Direct3D features in hardware. This is the primary driver that you should use in your Direct3D applications because it provides the best performance. A hardware driver uses hardware acceleration (on supported hardware) but can also use software for parts of the pipeline that are not supported in hardware. This driver type is often referred to as a hardware abstraction layer or {{HAL}}.</p> </dd> <dd> <p>A reference driver, which is a software implementation that supports every Direct3D feature. A reference driver is designed for accuracy rather than speed and as a result is slow but accurate. The rasterizer portion of the driver does make use of special {{CPU}} instructions whenever it can, but it is not intended for retail applications; use it only for feature testing, demonstration of functionality, debugging, or verifying bugs in other drivers. The reference device for this driver is installed by the Windows {{SDK}} 8.0 or later and is intended only as a debug aid for development purposes. This driver may be referred to as a {{REF}} driver, a reference driver, or a reference rasterizer.</p> <strong>Note</strong>??When you use the {{REF}} driver in Windows Store apps, the {{REF}} driver renders correctly but doesn't display any output on the screen. To verify bugs in hardware drivers for Windows Store apps, use <strong>{{D3D_DRIVER_TYPE_WARP}}</strong> for the {{WARP}} driver instead. ? </dd> <dd> <p>A {{NULL}} driver, which is a reference driver without render capability. This driver is commonly used for debugging non-rendering {{API}} calls, it is not appropriate for retail applications. This driver is installed by the DirectX {{SDK}}.</p> </dd> <dd> <p>A software driver, which is a driver implemented completely in software. The software implementation is not intended for a high-performance application due to its very slow performance.</p> </dd> <dd> <p>A {{WARP}} driver, which is a high-performance software rasterizer. The rasterizer supports <strong>feature levels</strong> 9_1 through level 10_1 with a high performance software implementation. For information about limitations creating a {{WARP}} device on certain feature levels, see Limitations Creating {{WARP}} and Reference Devices. For more information about using a {{WARP}} driver, see Windows Advanced Rasterization Platform ({{WARP}}) In-Depth Guide.</p> <strong>Note</strong>??The {{WARP}} driver that Windows?8 includes supports feature levels 9_1 through level 11_1. ? <strong>Note</strong>??The {{WARP}} driver that Windows?8.1 includes fully supports feature level 11_1, including tiled resources, <strong>{{IDXGIDevice3::Trim}}</strong>, shared {{BCn}} surfaces, minblend, and map default. ? </dd> <p> Describes the set of features targeted by a Direct3D device. </p> <p> For an overview of the capabilities of each feature level, see Overview For Each Feature Level. </p><p> For information about limitations creating non-hardware-type devices on certain feature levels, see Limitations Creating {{WARP}} and Reference Devices. </p> <dd> <p> Targets features supported by feature level 9.1 including shader model 2. </p> </dd> <dd> <p> Targets features supported by feature level 9.2 including shader model 2. </p> </dd> <dd> <p> Targets features supported by feature level 9.3 including shader model 2.0b. </p> </dd> <dd> <p> Targets features supported by Direct3D 10.0 including shader model 4. </p> </dd> <dd> <p> Targets features supported by Direct3D 10.1 including shader model 4. </p> </dd> <dd> <p> Targets features supported by Direct3D 11.0 including shader model 5. </p> </dd> <dd> <p> Targets features supported by Direct3D 11.1 including shader model 5 and logical blend operations. This feature level requires a display driver that is at least implemented to {{WDDM}} for Windows?8 ({{WDDM}} 1.2). </p> </dd> <dd> <p> Targets features supported by Direct3D 12.0 including shader model 5. </p> </dd> <dd> <p> Targets features supported by Direct3D 12.1 including shader model 5. </p> </dd> <p>Values that indicate how the pipeline interprets vertex data that is bound to the input-assembler stage. These primitive topology values determine how the vertex data is rendered on screen.</p> <p>Use the <strong>{{ID3D11DeviceContext::IASetPrimitiveTopology}}</strong> method and a value from <strong>{{D3D_PRIMITIVE_TOPOLOGY}}</strong> to bind a primitive topology to the input-assembler stage. Use the <strong>{{ID3D11DeviceContext::IAGetPrimitiveTopology}}</strong> method to retrieve the primitive topology for the input-assembler stage.</p><p>The following diagram shows the various primitive types for a geometry shader object.</p> <p>Values that indicate how the pipeline interprets geometry or hull shader input primitives.</p> <p> The <strong>{{ID3D11ShaderReflection::GetGSInputPrimitive}}</strong> method returns a <strong>{{D3D_PRIMITIVE}}</strong>-typed value. </p> <dd> <p> The shader has not been initialized with an input primitive type. </p> </dd> <dd> <p> Interpret the input primitive as a point. </p> </dd> <dd> <p> Interpret the input primitive as a line. </p> </dd> <dd> <p> Interpret the input primitive as a triangle. </p> </dd> <dd> <p> Interpret the input primitive as a line with adjacency data. </p> </dd> <dd> <p> Interpret the input primitive as a triangle with adjacency data. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p>The type is undefined.</p> </dd> <dd> <p>The data is organized in a point list.</p> </dd> <dd> <p>The data is organized in a line list.</p> </dd> <dd> <p>The data is organized in a triangle list.</p> </dd> <dd> <p>The data is organized in a line list with adjacency data.</p> </dd> <dd> <p>The data is organized in a triangle list with adjacency data.</p> </dd> <dd> <p> The shader has not been initialized with an input primitive type. </p> </dd> <dd> <p> Interpret the input primitive as a point. </p> </dd> <dd> <p> Interpret the input primitive as a line. </p> </dd> <dd> <p> Interpret the input primitive as a triangle. </p> </dd> <dd> <p> Interpret the input primitive as a line with adjacency data. </p> </dd> <dd> <p> Interpret the input primitive as a triangle with adjacency data. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <dd> <p> Interpret the input primitive as a control point patch. </p> </dd> <p>Values that identify the type of resource to be viewed as a shader resource.</p> <p>A <strong>{{D3D_SRV_DIMENSION}}</strong>-typed value is specified in the <strong>ViewDimension</strong> member of the <strong>{{D3D11_SHADER_RESOURCE_VIEW_DESC}}</strong> structure or the <strong>Dimension</strong> member of the <strong>{{D3D11_SHADER_INPUT_BIND_DESC}}</strong> structure.</p> <dd> <p>The type is unknown.</p> </dd> <dd> <p>The resource is a buffer.</p> </dd> <dd> <p>The resource is a 1D texture.</p> </dd> <dd> <p>The resource is an array of 1D textures.</p> </dd> <dd> <p>The resource is a 2D texture.</p> </dd> <dd> <p>The resource is an array of 2D textures.</p> </dd> <dd> <p>The resource is a multisampling 2D texture.</p> </dd> <dd> <p>The resource is an array of multisampling 2D textures.</p> </dd> <dd> <p>The resource is a 3D texture.</p> </dd> <dd> <p>The resource is a cube texture.</p> </dd> <dd> <p>The resource is an array of cube textures.</p> </dd> <dd> <p>The resource is a raw buffer. For more info about raw viewing of buffers, see Raw Views of Buffers.</p> </dd> <dd> <p>The type is unknown.</p> </dd> <dd> <p>The resource is a buffer.</p> </dd> <dd> <p>The resource is a 1D texture.</p> </dd> <dd> <p>The resource is an array of 1D textures.</p> </dd> <dd> <p>The resource is a 2D texture.</p> </dd> <dd> <p>The resource is an array of 2D textures.</p> </dd> <dd> <p>The resource is a multisampling 2D texture.</p> </dd> <dd> <p>The resource is an array of multisampling 2D textures.</p> </dd> <dd> <p>The resource is a 3D texture.</p> </dd> <dd> <p>The resource is a cube texture.</p> </dd> <dd> <p>The type is unknown.</p> </dd> <dd> <p>The resource is a buffer.</p> </dd> <dd> <p>The resource is a 1D texture.</p> </dd> <dd> <p>The resource is an array of 1D textures.</p> </dd> <dd> <p>The resource is a 2D texture.</p> </dd> <dd> <p>The resource is an array of 2D textures.</p> </dd> <dd> <p>The resource is a multisampling 2D texture.</p> </dd> <dd> <p>The resource is an array of multisampling 2D textures.</p> </dd> <dd> <p>The resource is a 3D texture.</p> </dd> <dd> <p>The resource is a cube texture.</p> </dd> <dd> <p>The resource is an array of cube textures.</p> </dd> <dd> <p>The type is unknown.</p> </dd> <dd> <p>The resource is a buffer.</p> </dd> <dd> <p>The resource is a 1D texture.</p> </dd> <dd> <p>The resource is an array of 1D textures.</p> </dd> <dd> <p>The resource is a 2D texture.</p> </dd> <dd> <p>The resource is an array of 2D textures.</p> </dd> <dd> <p>The resource is a multisampling 2D texture.</p> </dd> <dd> <p>The resource is an array of multisampling 2D textures.</p> </dd> <dd> <p>The resource is a 3D texture.</p> </dd> <dd> <p>The resource is a cube texture.</p> </dd> <dd> <p>The resource is an array of cube textures.</p> </dd> <dd> <p>The resource is a raw buffer. For more info about raw viewing of buffers, see Raw Views of Buffers.</p> </dd> <p>Values that indicate the location of a shader #include file. </p> <p>You pass a <strong>{{D3D_INCLUDE_TYPE}}</strong>-typed value to the <em>IncludeType</em> parameter in a call to the <strong>{{ID3DInclude::Open}}</strong> method to indicate the location of the #include file.</p> <dd> <p>The local directory.</p> </dd> <dd> <p>The system directory.</p> </dd> <dd> <p>The local directory.</p> </dd> <dd> <p>The system directory.</p> </dd> <dd> <p>Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. </p> <p>Do not use this value.</p> </dd> <p>Values that identify the class of a shader variable.</p> <p>The class of a shader variable is not a programming class; the class identifies the variable class such as scalar, vector, object, and so on. <strong>{{D3D_SHADER_VARIABLE_CLASS}}</strong>-typed values are specified in the <strong>Class</strong> member of the <strong>{{D3D11_SHADER_TYPE_DESC}}</strong> structure.</p> <dd> <p>The shader variable is a scalar.</p> </dd> <dd> <p>The shader variable is a vector.</p> </dd> <dd> <p>The shader variable is a row-major matrix.</p> </dd> <dd> <p>The shader variable is a column-major matrix.</p> </dd> <dd> <p>The shader variable is an object.</p> </dd> <dd> <p>The shader variable is a structure.</p> </dd> <dd> <p>The shader variable is a class.</p> </dd> <dd> <p>The shader variable is an interface.</p> </dd> <dd> <p>The shader variable is a scalar.</p> </dd> <dd> <p>The shader variable is a vector.</p> </dd> <dd> <p>The shader variable is a row-major matrix.</p> </dd> <dd> <p>The shader variable is a column-major matrix.</p> </dd> <dd> <p>The shader variable is an object.</p> </dd> <dd> <p>The shader variable is a structure.</p> </dd> <dd> <p>The shader variable is a class.</p> </dd> <dd> <p>The shader variable is an interface.</p> </dd> <dd> <p>This value is not used by a programmer; it exists to force the enumeration to compile to 32 bits.</p> </dd> <p>Values that identify information about a shader variable.</p> <p>A call to the <strong>{{ID3D11ShaderReflectionVariable::GetDesc}}</strong> method returns <strong>{{D3D_SHADER_VARIABLE_FLAGS}}</strong> values in the <strong>uFlags</strong> member of a <strong>{{D3D11_SHADER_VARIABLE_DESC}}</strong> structure.</p> <dd> <p>Indicates that the registers assigned to this shader variable were explicitly declared in shader code (instead of automatically assigned by the compiler).</p> </dd> <dd> <p>Indicates that this variable is used by this shader. This value confirms that a particular shader variable (which can be common to many different shaders) is indeed used by a particular shader.</p> </dd> <dd> <p>Indicates that this variable is an interface.</p> </dd> <dd> <p>Indicates that this variable is a parameter of an interface.</p> </dd> <dd> <p>Indicates that the registers assigned to this shader variable were explicitly declared in shader code (instead of automatically assigned by the compiler).</p> </dd> <dd> <p>Indicates that this variable is used by this shader. This value confirms that a particular shader variable (which can be common to many different shaders) is indeed used by a particular shader.</p> </dd> <dd> <p>Indicates that this variable is an interface.</p> </dd> <dd> <p>Indicates that this variable is a parameter of an interface.</p> </dd> <dd> <p>This value is not used by a programmer; it exists to force the enumeration to compile to 32 bits.</p> </dd> <p>Values that identify various data, texture, and buffer types that can be assigned to a shader variable.</p> <p> A call to the <strong>{{ID3D11ShaderReflectionType::GetDesc}}</strong> method returns a <strong>{{D3D_SHADER_VARIABLE_TYPE}}</strong> value in the <strong>Type</strong> member of a <strong>{{D3D11_SHADER_TYPE_DESC}}</strong> structure. </p><p> The types in a structured buffer describe the structure of the elements in the buffer. The layout of these types generally match their C++ struct counterparts. The following examples show structured buffers: </p><pre>struct mystruct {float4 val; uint ind;}; {{RWStructuredBuffer}}&lt;mystruct&gt; rwbuf; {{RWStructuredBuffer}}&lt;float3&gt; rwbuf2;</pre> <dd> <p>The variable is a void reference.</p> </dd> <dd> <p>The variable is a boolean.</p> </dd> <dd> <p>The variable is an integer.</p> </dd> <dd> <p>The variable is a floating-point number.</p> </dd> <dd> <p>The variable is a string.</p> </dd> <dd> <p>The variable is a texture.</p> </dd> <dd> <p>The variable is a 1D texture.</p> </dd> <dd> <p>The variable is a 2D texture.</p> </dd> <dd> <p>The variable is a 3D texture.</p> </dd> <dd> <p>The variable is a texture cube.</p> </dd> <dd> <p>The variable is a sampler.</p> </dd> <dd> <p> The variable is a 1D sampler. </p> </dd> <dd> <p> The variable is a 2D sampler. </p> </dd> <dd> <p> The variable is a 3D sampler. </p> </dd> <dd> <p> The variable is a cube sampler. </p> </dd> <dd> <p>The variable is a pixel shader.</p> </dd> <dd> <p>The variable is a vertex shader.</p> </dd> <dd> <p> The variable is a pixel fragment. </p> </dd> <dd> <p> The variable is a vertex fragment. </p> </dd> <dd> <p>The variable is an unsigned integer.</p> </dd> <dd> <p>The variable is an 8-bit unsigned integer.</p> </dd> <dd> <p>The variable is a geometry shader.</p> </dd> <dd> <p>The variable is a rasterizer-state object.</p> </dd> <dd> <p>The variable is a depth-stencil-state object.</p> </dd> <dd> <p>The variable is a blend-state object.</p> </dd> <dd> <p>The variable is a buffer.</p> </dd> <dd> <p>The variable is a constant buffer.</p> </dd> <dd> <p>The variable is a texture buffer.</p> </dd> <dd> <p>The variable is a 1D-texture array.</p> </dd> <dd> <p>The variable is a 2D-texture array.</p> </dd> <dd> <p>The variable is a render-target view.</p> </dd> <dd> <p>The variable is a depth-stencil view.</p> </dd> <dd> <p>The variable is a 2D-multisampled texture.</p> </dd> <dd> <p>The variable is a 2D-multisampled-texture array.</p> </dd> <dd> <p>The variable is a texture-cube array.</p> </dd> <dd> <p>The variable holds a compiled hull-shader binary.</p> </dd> <dd> <p>The variable holds a compiled domain-shader binary.</p> </dd> <dd> <p>The variable is an interface.</p> </dd> <dd> <p>The variable holds a compiled compute-shader binary.</p> </dd> <dd> <p>The variable is a double precision (64-bit) floating-point number.</p> </dd> <dd> <p>The variable is a 1D read-and-write texture.</p> </dd> <dd> <p>The variable is an array of 1D read-and-write textures.</p> </dd> <dd> <p>The variable is a 2D read-and-write texture.</p> </dd> <dd> <p>The variable is an array of 2D read-and-write textures.</p> </dd> <dd> <p>The variable is a 3D read-and-write texture.</p> </dd> <dd> <p>The variable is a read-and-write buffer.</p> </dd> <dd> <p>The variable is a byte-address buffer.</p> </dd> <dd> <p>The variable is a read-and-write byte-address buffer.</p> </dd> <dd> <p>The variable is a structured buffer. </p> <p> For more information about structured buffer, see the <strong>Remarks</strong> section. </p> </dd> <dd> <p>The variable is a read-and-write structured buffer.</p> </dd> <dd> <p>The variable is an append structured buffer.</p> </dd> <dd> <p>The variable is a consume structured buffer.</p> </dd> <dd> <p> The variable is an 8-byte {{FLOAT}}. </p> </dd> <dd> <p> The variable is a 10-byte {{FLOAT}}. </p> </dd> <dd> <p> The variable is a 16-byte {{FLOAT}}. </p> </dd> <dd> <p> The variable is a 12-byte {{INT}}. </p> </dd> <dd> <p> The variable is a 16-byte {{INT}}. </p> </dd> <dd> <p> The variable is a 16-byte {{INT}}. </p> </dd> <dd> <p>The variable is a void reference.</p> </dd> <dd> <p>The variable is a boolean.</p> </dd> <dd> <p>The variable is an integer.</p> </dd> <dd> <p>The variable is a floating-point number.</p> </dd> <dd> <p>The variable is a string.</p> </dd> <dd> <p>The variable is a texture.</p> </dd> <dd> <p>The variable is a 1D texture.</p> </dd> <dd> <p>The variable is a 2D texture.</p> </dd> <dd> <p>The variable is a 3D texture.</p> </dd> <dd> <p>The variable is a texture cube.</p> </dd> <dd> <p>The variable is a sampler.</p> </dd> <dd> <p> The variable is a 1D sampler. </p> </dd> <dd> <p> The variable is a 2D sampler. </p> </dd> <dd> <p> The variable is a 3D sampler. </p> </dd> <dd> <p> The variable is a cube sampler. </p> </dd> <dd> <p>The variable is a pixel shader.</p> </dd> <dd> <p>The variable is a vertex shader.</p> </dd> <dd> <p> The variable is a pixel fragment. </p> </dd> <dd> <p> The variable is a vertex fragment. </p> </dd> <dd> <p>The variable is an unsigned integer.</p> </dd> <dd> <p>The variable is an 8-bit unsigned integer.</p> </dd> <dd> <p>The variable is a geometry shader.</p> </dd> <dd> <p>The variable is a rasterizer-state object.</p> </dd> <dd> <p>The variable is a depth-stencil-state object.</p> </dd> <dd> <p>The variable is a blend-state object.</p> </dd> <dd> <p>The variable is a buffer.</p> </dd> <dd> <p>The variable is a constant buffer.</p> </dd> <dd> <p>The variable is a texture buffer.</p> </dd> <dd> <p>The variable is a 1D-texture array.</p> </dd> <dd> <p>The variable is a 2D-texture array.</p> </dd> <dd> <p>The variable is a render-target view.</p> </dd> <dd> <p>The variable is a depth-stencil view.</p> </dd> <dd> <p>The variable is a 2D-multisampled texture.</p> </dd> <dd> <p>The variable is a 2D-multisampled-texture array.</p> </dd> <dd> <p>The variable is a texture-cube array.</p> </dd> <dd> <p>The variable holds a compiled hull-shader binary.</p> </dd> <dd> <p>The variable holds a compiled domain-shader binary.</p> </dd> <dd> <p>The variable is an interface.</p> </dd> <dd> <p>The variable holds a compiled compute-shader binary.</p> </dd> <dd> <p>The variable is a double precision (64-bit) floating-point number.</p> </dd> <dd> <p>The variable is a 1D read-and-write texture.</p> </dd> <dd> <p>The variable is an array of 1D read-and-write textures.</p> </dd> <dd> <p>The variable is a 2D read-and-write texture.</p> </dd> <dd> <p>The variable is an array of 2D read-and-write textures.</p> </dd> <dd> <p>The variable is a 3D read-and-write texture.</p> </dd> <dd> <p>The variable is a read-and-write buffer.</p> </dd> <dd> <p>The variable is a byte-address buffer.</p> </dd> <dd> <p>The variable is a read and write byte-address buffer.</p> </dd> <dd> <p>The variable is a structured buffer. </p> </dd> <dd> <p>The variable is a read-and-write structured buffer.</p> </dd> <dd> <p>The variable is an append structured buffer.</p> </dd> <dd> <p>The variable is a consume structured buffer.</p> </dd> <dd> <p>This value is not used by a programmer; it exists to force the enumeration to compile to 32 bits.</p> </dd> <p>Values that identify shader-input options.</p> <p><strong>{{D3D_SHADER_INPUT_FLAGS}}</strong>-typed values are specified in the <strong>uFlags</strong> member of the <strong>{{D3D11_SHADER_INPUT_BIND_DESC}}</strong> structure. </p> <dd> <p> Assign a shader input to a register based on the register assignment in the {{HLSL}} code (instead of letting the compiler choose the register). </p> </dd> <dd> <p> Use a comparison sampler, which uses the SampleCmp (DirectX {{HLSL}} Texture Object) and SampleCmpLevelZero (DirectX {{HLSL}} Texture Object) sampling functions. </p> </dd> <dd> <p> A 2-bit value for encoding texture components. </p> </dd> <dd> <p> A 2-bit value for encoding texture components. </p> </dd> <dd> <p> A 2-bit value for encoding texture components. </p> </dd> <dd> <p> This value is reserved. </p> </dd> <dd> <p> Assign a shader input to a register based on the register assignment in the {{HLSL}} code (instead of letting the compiler choose the register). </p> </dd> <dd> <p> Use a comparison sampler, which uses the SampleCmp (DirectX {{HLSL}} Texture Object) and SampleCmpLevelZero (DirectX {{HLSL}} Texture Object) sampling functions. </p> </dd> <dd> <p> A 2-bit value for encoding texture components. </p> </dd> <dd> <p> A 2-bit value for encoding texture components. </p> </dd> <dd> <p> A 2-bit value for encoding texture components. </p> </dd> <dd> <p> Forces the enumeration to compile to 32 bits. This value is not used directly by titles. </p> </dd> <p>Values that identify resource types that can be bound to a shader and that are reflected as part of the resource description for the shader.</p> <p><strong>{{D3D_SHADER_INPUT_TYPE}}</strong>-typed values are specified in the <strong>Type</strong> member of the <strong>{{D3D11_SHADER_INPUT_BIND_DESC}}</strong> structure.</p> <dd> <p>The shader resource is a constant buffer.</p> </dd> <dd> <p>The shader resource is a texture buffer.</p> </dd> <dd> <p>The shader resource is a texture.</p> </dd> <dd> <p>The shader resource is a sampler.</p> </dd> <dd> <p>The shader resource is a read-and-write buffer.</p> </dd> <dd> <p>The shader resource is a structured buffer.</p> <p>For more information about structured buffer, see the <strong>Remarks</strong> section.</p> </dd> <dd> <p>The shader resource is a read-and-write structured buffer.</p> </dd> <dd> <p>The shader resource is a byte-address buffer.</p> </dd> <dd> <p>The shader resource is a read-and-write byte-address buffer.</p> </dd> <dd> <p>The shader resource is an append-structured buffer.</p> </dd> <dd> <p>The shader resource is a consume-structured buffer.</p> </dd> <dd> <p>The shader resource is a read-and-write structured buffer that uses the built-in counter to append or consume.</p> </dd> <dd> <p>The shader resource is a constant buffer.</p> </dd> <dd> <p>The shader resource is a texture buffer.</p> </dd> <dd> <p>The shader resource is a texture.</p> </dd> <dd> <p>The shader resource is a sampler.</p> </dd> <dd> <p>The shader resource is a read-and-write buffer.</p> </dd> <dd> <p>The shader resource is a structured buffer.</p> <p>For more information about structured buffer, see the <strong>Remarks</strong> section.</p> </dd> <dd> <p>The shader resource is a read-and-write structured buffer.</p> </dd> <dd> <p>The shader resource is a byte-address buffer.</p> </dd> <dd> <p>The shader resource is a read-and-write byte-address buffer.</p> </dd> <dd> <p>The shader resource is an append-structured buffer.</p> </dd> <dd> <p>The shader resource is a consume-structured buffer.</p> </dd> <dd> <p>The shader resource is a read-and-write structured buffer that uses the built-in counter to append or consume.</p> </dd> <p>Values that identify the indended use of a constant-data buffer.</p> <p><strong>{{D3D_SHADER_CBUFFER_FLAGS}}</strong>-typed values are specified in the <strong>uFlags</strong> member of the <strong>{{D3D11_SHADER_BUFFER_DESC}}</strong> structure.</p> <dd> <p>Bind the constant buffer to an input slot defined in {{HLSL}} code (instead of letting the compiler choose the input slot).</p> </dd> <dd> <p>Bind the constant buffer to an input slot defined in {{HLSL}} code (instead of letting the compiler choose the input slot).</p> </dd> <dd> <p>This value is not used by a programmer; it exists to force the enumeration to compile to 32 bits.</p> </dd> <p>Values that identify the intended use of constant-buffer data. </p> <dd> <p>A buffer containing scalar constants.</p> </dd> <dd> <p>A buffer containing texture data.</p> </dd> <dd> <p>A buffer containing interface references.</p> </dd> <dd> <p>A buffer containing binding information.</p> </dd> <dd> <p>A buffer containing scalar constants.</p> </dd> <dd> <p>A buffer containing texture data.</p> </dd> <dd> <p>A buffer containing scalar constants.</p> </dd> <dd> <p>A buffer containing texture data.</p> </dd> <dd> <p>A buffer containing interface references.</p> </dd> <dd> <p>A buffer containing binding information.</p> </dd> <p>Values that identify shader parameters that use system-value semantics.</p> <p> The <strong>{{D3D_NAME}}</strong> values identify shader parameters that have predefined system-value semantics. These values are used in a shader-signature description. For more information about shader-signature description, see <strong>{{D3D11_SIGNATURE_PARAMETER_DESC}}</strong>. </p> <dd> <p>This parameter does not use a predefined system-value semantic.</p> </dd> <dd> <p>This parameter contains position data.</p> </dd> <dd> <p>This parameter contains clip-distance data.</p> </dd> <dd> <p>This parameter contains cull-distance data.</p> </dd> <dd> <p>This parameter contains a render-target-array index.</p> </dd> <dd> <p>This parameter contains a viewport-array index.</p> </dd> <dd> <p>This parameter contains a vertex {{ID}}.</p> </dd> <dd> <p>This parameter contains a primitive {{ID}}.</p> </dd> <dd> <p>This parameter contains an instance {{ID}}.</p> </dd> <dd> <p>This parameter contains data that identifies whether or not the primitive faces the camera.</p> </dd> <dd> <p>This parameter contains a sampler-array index.</p> </dd> <dd> <p>This parameter contains one of four tessellation factors that correspond to the amount of parts that a quad patch is broken into along the given edge. This flag is used to tessellate a quad patch.</p> </dd> <dd> <p>This parameter contains one of two tessellation factors that correspond to the amount of parts that a quad patch is broken into vertically and horizontally within the patch. This flag is used to tessellate a quad patch.</p> </dd> <dd> <p>This parameter contains one of three tessellation factors that correspond to the amount of parts that a tri patch is broken into along the given edge. This flag is used to tessellate a tri patch.</p> </dd> <dd> <p>This parameter contains the tessellation factor that corresponds to the amount of parts that a tri patch is broken into within the patch. This flag is used to tessellate a tri patch.</p> </dd> <dd> <p>This parameter contains the tessellation factor that corresponds to the number of lines broken into within the patch. This flag is used to tessellate an isolines patch.</p> </dd> <dd> <p>This parameter contains the tessellation factor that corresponds to the number of lines that are created within the patch. This flag is used to tessellate an isolines patch.</p> </dd> <dd> <p>This parameter contains render-target data.</p> </dd> <dd> <p>This parameter contains depth data.</p> </dd> <dd> <p>This parameter contains alpha-coverage data.</p> </dd> <dd> <p>This parameter signifies that the value is greater than or equal to a reference value. This flag is used to specify conservative depth for a pixel shader.</p> </dd> <dd> <p>This parameter signifies that the value is less than or equal to a reference value. This flag is used to specify conservative depth for a pixel shader.</p> </dd> <dd> <p> This parameter contains a stencil reference. See Shader Specified Stencil Reference Value. </p> </dd> <dd> <p> This parameter contains inner input coverage data. See Conservative Rasterization. </p> </dd> <dd> <p>This parameter does not use a predefined system-value semantic.</p> </dd> <dd> <p>This parameter contains position data.</p> </dd> <dd> <p>This parameter contains clip-distance data.</p> </dd> <dd> <p>This parameter contains cull-distance data.</p> </dd> <dd> <p>This parameter contains a render-target-array index.</p> </dd> <dd> <p>This parameter contains a viewport-array index.</p> </dd> <dd> <p>This parameter contains a vertex {{ID}}.</p> </dd> <dd> <p>This parameter contains a primitive {{ID}}.</p> </dd> <dd> <p>This parameter contains a instance {{ID}}.</p> </dd> <dd> <p>This parameter contains data that identifies whether or not the primitive faces the camera.</p> </dd> <dd> <p>This parameter contains a sampler-array index.</p> </dd> <dd> <p>This parameter contains render-target data.</p> </dd> <dd> <p>This parameter contains depth data.</p> </dd> <dd> <p>This parameter contains alpha-coverage data.</p> </dd> <dd> <p>This parameter contains one of four tessellation factors that correspond to the amount of parts that a quad patch is broken into along the given edge. This flag is used to tessellate a quad patch.</p> </dd> <dd> <p>This parameter contains one of two tessellation factors that correspond to the amount of parts that a quad patch is broken into vertically and horizontally within the patch. This flag is used to tessellate a quad patch.</p> </dd> <dd> <p>This parameter contains one of three tessellation factors that correspond to the amount of parts that a tri patch is broken into along the given edge. This flag is used to tessellate a tri patch.</p> </dd> <dd> <p>This parameter contains the tessellation factor that corresponds to the amount of parts that a tri patch is broken into within the patch. This flag is used to tessellate a tri patch.</p> </dd> <dd> <p>This parameter contains the tessellation factor that corresponds to the amount of lines broken into within the patch. This flag is used to tessellate an isolines patch.</p> </dd> <dd> <p>This parameter contains the tessellation factor that corresponds to the amount of lines that are created within the patch. This flag is used to tessellate an isolines patch.</p> </dd> <dd> <p>This parameter signifies that the value is greater than or equal to a reference value. This flag is used to specify conservative depth for a pixel shader.</p> </dd> <dd> <p>This parameter signifies that the value is less than or equal to a reference value. This flag is used to specify conservative depth for a pixel shader.</p> </dd> <dd> <p> This parameter contains a stencil reference. See Shader Specified Stencil Reference Value. </p> </dd> <dd> <p> This parameter contains inner input coverage data. See Conservative Rasterization. </p> </dd> <p>Values that identify the return type of a resource.</p> <p>A resource return type is specified in the <strong>ReturnType</strong> member of the <strong>{{D3D11_SHADER_INPUT_BIND_DESC}}</strong> structure.</p> <dd> <p>Return type is an unsigned integer value normalized to a value between 0 and 1.</p> </dd> <dd> <p>Return type is a signed integer value normalized to a value between -1 and 1.</p> </dd> <dd> <p>Return type is a signed integer.</p> </dd> <dd> <p>Return type is an unsigned integer.</p> </dd> <dd> <p>Return type is a floating-point number.</p> </dd> <dd> <p>Return type is unknown.</p> </dd> <dd> <p>Return type is a double-precision value.</p> </dd> <dd> <p>Return type is a multiple-dword type, such as a double or uint64, and the component is continued from the previous component that was declared. The first component represents the lower bits.</p> </dd> <dd> <p>Unsigned integer value normalized to a value between 0 and 1.</p> </dd> <dd> <p>Signed integer value normalized to a value between -1 and 1.</p> </dd> <dd> <p>Signed integer.</p> </dd> <dd> <p>Unsigned integer.</p> </dd> <dd> <p>Floating-point number.</p> </dd> <dd> <p>Return type is unknown.</p> </dd> <dd> <p>Return type is an unsigned integer value normalized to a value between 0 and 1.</p> </dd> <dd> <p>Return type is a signed integer value normalized to a value between -1 and 1.</p> </dd> <dd> <p>Return type is a signed integer.</p> </dd> <dd> <p>Return type is an unsigned integer.</p> </dd> <dd> <p>Return type is a floating-point number.</p> </dd> <dd> <p>Return type is unknown.</p> </dd> <dd> <p>Return type is a double-precision value.</p> </dd> <dd> <p>Return type is a multiple-dword type, such as a double or uint64, and the component is continued from the previous component that was declared. The first component represents the lower bits.</p> </dd> <p>Values that identify the data types that can be stored in a register.</p> <p>A register component type is specified in the <strong>ComponentType</strong> member of the <strong>{{D3D11_SIGNATURE_PARAMETER_DESC}}</strong> structure.</p> <dd> <p>The data type is unknown.</p> </dd> <dd> <p>32-bit unsigned integer.</p> </dd> <dd> <p>32-bit signed integer.</p> </dd> <dd> <p>32-bit floating-point number.</p> </dd> <dd> <p>The data type is unknown.</p> </dd> <dd> <p>32-bit unsigned integer.</p> </dd> <dd> <p>32-bit signed integer.</p> </dd> <dd> <p>32-bit floating-point number.</p> </dd> <p>Values that identify domain options for tessellator data.</p> <p>The data domain defines the type of data. This enumeration is used by <strong>{{D3D11_SHADER_DESC}}</strong>.</p> <dd> <p>The data type is undefined.</p> </dd> <dd> <p>Isoline data.</p> </dd> <dd> <p>Triangle data.</p> </dd> <dd> <p>Quad data.</p> </dd> <dd> <p>The data type is undefined.</p> </dd> <dd> <p>Isoline data.</p> </dd> <dd> <p>Triangle data.</p> </dd> <dd> <p>Quad data.</p> </dd> <p>Values that identify partitioning options.</p> <p>During tessellation, the partition option helps to determine how the algorithm chooses the next partition value; this enumeration is used by <strong>{{D3D11_SHADER_DESC}}</strong>.</p> <dd> <p>The partitioning type is undefined.</p> </dd> <dd> <p>Partition with integers only.</p> </dd> <dd> <p>Partition with a power-of-two number only.</p> </dd> <dd> <p>Partition with an odd, fractional number.</p> </dd> <dd> <p>Partition with an even, fractional number.</p> </dd> <dd> <p>The partitioning type is undefined.</p> </dd> <dd> <p>Partition with integers only.</p> </dd> <dd> <p>Partition with a power-of-two number only.</p> </dd> <dd> <p>Partition with an odd, fractional number.</p> </dd> <dd> <p>Partition with an even, fractional number.</p> </dd> <p>Values that identify output primitive types.</p> <p>The output primitive type determines how the tessellator output data is organized; this enumeration is used by <strong>{{D3D11_SHADER_DESC}}</strong>.</p> <dd> <p>The output primitive type is undefined.</p> </dd> <dd> <p>The output primitive type is a point.</p> </dd> <dd> <p>The output primitive type is a line.</p> </dd> <dd> <p>The output primitive type is a clockwise triangle.</p> </dd> <dd> <p>The output primitive type is a counter clockwise triangle.</p> </dd> <dd> <p>The output primitive type is undefined.</p> </dd> <dd> <p>The output primitive type is a point.</p> </dd> <dd> <p>The output primitive type is a line.</p> </dd> <dd> <p>The output primitive type is a clockwise triangle.</p> </dd> <dd> <p>The output primitive type is a counter clockwise triangle.</p> </dd> <p>Values that indicate the minimum desired interpolation precision.</p> <p>For more info, see <strong>Scalar Types</strong> and Using {{HLSL}} minimum precision.</p> <dd> <p>Default minimum precision, which is 32-bit precision.</p> </dd> <dd> <p>Minimum precision is min16float, which is 16-bit floating point. </p> </dd> <dd> <p>Minimum precision is min10float, which is 10-bit floating point. </p> </dd> <dd> <p>Reserved</p> </dd> <dd> <p>Minimum precision is min16int, which is 16-bit signed integer. </p> </dd> <dd> <p>Minimum precision is min16uint, which is 16-bit unsigned integer. </p> </dd> <dd> <p>Minimum precision is any 16-bit value. </p> </dd> <dd> <p>Minimum precision is any 10-bit value. </p> </dd> <p>Specifies interpolation mode, which affects how values are calculated during rasterization.</p> <dd> <p>The interpolation mode is undefined.</p> </dd> <dd> <p>Don't interpolate between register values.</p> </dd> <dd> <p>Interpolate linearly between register values.</p> </dd> <dd> <p>Interpolate linearly between register values but centroid clamped when multisampling.</p> </dd> <dd> <p>Interpolate linearly between register values but with no perspective correction.</p> </dd> <dd> <p>Interpolate linearly between register values but with no perspective correction and centroid clamped when multisampling.</p> </dd> <dd> <p>Interpolate linearly between register values but sample clamped when multisampling.</p> </dd> <dd> <p>Interpolate linearly between register values but with no perspective correction and sample clamped when multisampling.</p> </dd> <p>Indicates semantic flags for function parameters.</p> <dd> <p>The parameter has no semantic flags.</p> </dd> <dd> <p>Indicates an input parameter.</p> </dd> <dd> <p>Indicates an output parameter.</p> </dd> <dd> <p>Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used.</p> </dd> <p>Defines a shader macro.</p> <p>You can use shader macros in your shaders. The <strong>{{D3D_SHADER_MACRO}}</strong> structure defines a single shader macro as shown in the following example:</p><pre> {{D3D_SHADER_MACRO}} Shader_Macros[] = { "zero", "0", {{NULL}}, {{NULL}} }; </pre><p>The following shader or effect creation functions take an array of shader macros as an input parameter:</p><ul> <li> <strong>{{D3D10CompileShader}}</strong> </li> <li> <strong>{{D3DX10CreateEffectFromFile}}</strong> </li> <li> <strong>{{D3DX10PreprocessShaderFromFile}}</strong> </li> <li> <strong>{{D3DX11CreateAsyncShaderPreprocessProcessor}}</strong> </li> </ul> <dd> <p>The macro name.</p> </dd> <dd> <p>The macro definition.</p> </dd> <p>This interface is used to return arbitrary length data.</p> <p>An <strong>{{ID3D10Blob}}</strong> is obtained by calling <strong>{{D3D10CreateBlob}}</strong>.</p><p>The <strong>{{ID3DBlob}}</strong> interface is type defined in the {{D3DCommon}}.h header file as a <strong>{{ID3D10Blob}}</strong> interface, which is fully defined in the {{D3DCommon}}.h header file. <strong>{{ID3DBlob}}</strong> is version neutral and can be used in code for any Direct3D version.</p><p>Blobs can be used as a data buffer, storing vertex, adjacency, and material information during mesh optimization and loading operations. Also, these objects are used to return object code and error messages in {{APIs}} that compile vertex, geometry and pixel shaders.</p> <p>Get a reference to the data.</p> <p>Returns a reference.</p> <p>Get the size.</p> <p>The size of the data, in bytes.</p> <p><strong>{{ID3DInclude}}</strong> is an include interface that the user implements to allow an application to call user-overridable methods for opening and closing shader #include files. </p> <p> To use this interface, create an interface that inherits from <strong>{{ID3DInclude}}</strong> and implement custom behavior for the methods. </p> <p>A user-implemented method for opening and reading the contents of a shader #include file.</p> <p> The user-implemented method must return {{S_OK}}. If <strong>Open</strong> fails when it reads the #include file, the application programming interface ({{API}}) that caused <strong>Open</strong> to be called fails. This failure can occur in one of the following situations: </p><ul> <li> The high-level shader language ({{HLSL}}) shader fails one of the <strong>{{D3D10CompileShader}}***</strong> functions. </li> <li> The effect fails one of the <strong>{{D3D10CreateEffect}}***</strong> functions. </li> </ul> <dd> <p> A <strong>{{D3D_INCLUDE_TYPE}}</strong>-typed value that indicates the location of the #include file. </p> </dd> <dd> <p>Name of the #include file.</p> </dd> <dd> <p> Pointer to the container that includes the #include file. The compiler might pass {{NULL}} in <em>pParentData</em>. For more information, see the "Searching for Include Files" section in Compile an Effect (Direct3D 11). </p> </dd> <dd> <p> Pointer to the buffer that contains the include directives. This reference remains valid until you call<strong>{{ID3DInclude::Close}}</strong>. </p> </dd> <dd> <p> Pointer to the number of bytes that <strong>Open</strong> returns in <em>ppData</em>. </p> </dd> <p>A user-implemented method for closing a shader #include file.</p> <p> If <strong>{{ID3DInclude::Open}}</strong> was successful, <strong>Close</strong> is guaranteed to be called before the {{API}} using the <strong>{{ID3DInclude}}</strong> interface returns. </p> <p> The user-implemented <strong>Close</strong> method should return {{S_OK}}. If <strong>Close</strong> fails when it closes the #include file, the application programming interface ({{API}}) that caused <strong>Close</strong> to be called fails. This failure can occur in one of the following situations: </p><ul> <li> The high-level shader language ({{HLSL}}) shader fails one of the <strong>{{D3D10CompileShader}}***</strong> functions. </li> <li> The effect fails one of the <strong>{{D3D10CreateEffect}}***</strong> functions. </li> </ul> <dd> <p> Pointer to the buffer that contains the include directives. This is the reference that was returned by the corresponding <strong>{{ID3DInclude::Open}}</strong> call. </p> </dd> <p>The type of a font represented by a single font file. Font formats that consist of multiple files, for example Type 1 .{{PFM}} and .{{PFB}}, have separate enum values for each of the file types.</p> <dd> <p>Font type is not recognized by the DirectWrite font system.</p> </dd> <dd> <p>OpenType font with {{CFF}} outlines.</p> </dd> <dd> <p>OpenType font with TrueType outlines.</p> </dd> <dd> <p>OpenType font that contains a TrueType collection.</p> </dd> <dd> <p>Type 1 {{PFM}} font.</p> </dd> <dd> <p>Type 1 {{PFB}} font.</p> </dd> <dd> <p>Vector .{{FON}} font.</p> </dd> <dd> <p>Bitmap .{{FON}} font.</p> </dd> <p>Indicates the file format of a complete font face.</p> <p>Font formats that consist of multiple files, such as Type 1 .{{PFM}} and .{{PFB}}, have a single enum entry.</p> <dd> <p>OpenType font face with {{CFF}} outlines.</p> </dd> <dd> <p>The font data includes only the {{CFF}} table from an OpenType {{CFF}} font. This font face type can be used only for embedded fonts (i.e., custom font file loaders) and the resulting font face object supports only the minimum functionality necessary to render glyphs.</p> </dd> <dd> <p>OpenType font face with TrueType outlines.</p> </dd> <dd> <p>OpenType font face that is a part of a TrueType collection.</p> </dd> <dd> <p>A Type 1 font face.</p> </dd> <dd> <p>A vector .{{FON}} format font face.</p> </dd> <dd> <p>A bitmap .{{FON}} format font face.</p> </dd> <dd> <p>Font face type is not recognized by the DirectWrite font system.</p> </dd> <p>Specifies algorithmic style simulations to be applied to the font face. Bold and oblique simulations can be combined via bitwise {{OR}} operation.</p> <p> Style simulations are not recommended for good typographic quality.</p> <dd> <p>Indicates that no simulations are applied to the font face.</p> </dd> <dd> <p>Indicates that algorithmic emboldening is applied to the font face. <strong>{{DWRITE_FONT_SIMULATIONS_BOLD}}</strong> increases weight by applying a widening algorithm to the glyph outline. This may be used to simulate a bold weight where no designed bold weight is available.</p> </dd> <dd> <p>Indicates that algorithmic italicization is applied to the font face. <strong>{{DWRITE_FONT_SIMULATIONS_OBLIQUE}}</strong> applies obliquing (shear) to the glyph outline. This may be used to simulate an oblique/italic style where no designed oblique/italic style is available.</p> </dd> <p>Represents the density of a typeface, in terms of the lightness or heaviness of the strokes. The enumerated values correspond to the usWeightClass definition in the OpenType specification. The <em>usWeightClass</em> represents an integer value between 1 and 999. Lower values indicate lighter weights; higher values indicate heavier weights.</p> <p>Weight differences are generally differentiated by an increased stroke or thickness that is associated with a given character in a typeface, as compared to a "normal" character from that same typeface. The following illustration shows an example of Normal and UltraBold weights for the Palatino Linotype typeface.</p><p></p><strong>Note</strong>??Not all weights are available for all typefaces. When a weight is not available for a typeface, the closest matching weight is returned.?<p>Font weight values less than 1 or greater than 999 are considered invalid, and they are rejected by font {{API}} functions.</p> <dd> <p>Predefined font weight : Thin (100).</p> </dd> <dd> <p>Predefined font weight : Extra-light (200).</p> </dd> <dd> <p>Predefined font weight : Ultra-light (200).</p> </dd> <dd> <p>Predefined font weight : Light (300).</p> </dd> <dd> <p>Predefined font weight : Semi-Light (350).</p> </dd> <dd> <p>Predefined font weight : Normal (400).</p> </dd> <dd> <p>Predefined font weight : Regular (400).</p> </dd> <dd> <p>Predefined font weight : Medium (500).</p> </dd> <dd> <p>Predefined font weight : Demi-bold (600).</p> </dd> <dd> <p>Predefined font weight : Semi-bold (600).</p> </dd> <dd> <p>Predefined font weight : Bold (700).</p> </dd> <dd> <p>Predefined font weight : Extra-bold (800).</p> </dd> <dd> <p>Predefined font weight : Ultra-bold (800).</p> </dd> <dd> <p>Predefined font weight : Black (900).</p> </dd> <dd> <p>Predefined font weight : Heavy (900).</p> </dd> <dd> <p>Predefined font weight : Extra-black (950).</p> </dd> <dd> <p>Predefined font weight : Ultra-black (950).</p> </dd> <p>Represents the degree to which a font has been stretched compared to a font's normal aspect ratio. The enumerated values correspond to the <em>usWidthClass</em> definition in the OpenType specification. The usWidthClass represents an integer value between 1 and 9?lower values indicate narrower widths; higher values indicate wider widths.</p> <p>A font stretch describes the degree to which a font form is stretched from its normal aspect ratio, which is the original width to height ratio specified for the glyphs in the font. The following illustration shows an example of Normal and Condensed stretches for the Rockwell Bold typeface.</p><p></p><strong>Note</strong>??Values other than the ones defined in the enumeration are considered to be invalid, and are rejected by font {{API}} functions.? <dd> <p>Predefined font stretch : Not known (0).</p> </dd> <dd> <p>Predefined font stretch : Ultra-condensed (1).</p> </dd> <dd> <p>Predefined font stretch : Extra-condensed (2).</p> </dd> <dd> <p>Predefined font stretch : Condensed (3).</p> </dd> <dd> <p>Predefined font stretch : Semi-condensed (4).</p> </dd> <dd> <p>Predefined font stretch : Normal (5).</p> </dd> <dd> <p>Predefined font stretch : Medium (5).</p> </dd> <dd> <p>Predefined font stretch : Semi-expanded (6).</p> </dd> <dd> <p>Predefined font stretch : Expanded (7).</p> </dd> <dd> <p>Predefined font stretch : Extra-expanded (8).</p> </dd> <dd> <p>Predefined font stretch : Ultra-expanded (9).</p> </dd> <p>Represents the style of a font face as normal, italic, or oblique.</p> <p>Three terms categorize the slant of a font: normal, italic, and oblique. </p><table> <tr><th>Font style</th><th>Description</th></tr> <tr><td>Normal</td><td>The characters in a normal, or roman, font are upright. </td></tr> <tr><td>Italic </td><td>The characters in an italic font are truly slanted and appear as they were designed. </td></tr> <tr><td>Oblique</td><td>The characters in an oblique font are artificially slanted.</td></tr> </table><p>?</p><p>For Oblique, the slant is achieved by performing a shear transformation on the characters from a normal font. When a true italic font is not available on a computer or printer, an oblique style can be generated from the normal font and used to simulate an italic font. The following illustration shows the normal, italic, and oblique font styles for the Palatino Linotype font. Notice how the italic font style has a more flowing and visually appealing appearance than the oblique font style, which is simply created by skewing the normal font style version of the text.</p><p></p><strong>Note</strong>?? Values other than the ones defined in the enumeration are considered to be invalid, and they are rejected by font {{API}} functions.? <dd> <p>Font style : Normal.</p> </dd> <dd> <p>Font style : Oblique. </p> </dd> <dd> <p>Font style : Italic.</p> </dd> <p>The informational string enumeration which identifies a string embedded in a font file.</p> <dd> <p>Indicates the string containing the unspecified name {{ID}}.</p> </dd> <dd> <p>Indicates the string containing the copyright notice provided by the font.</p> </dd> <dd> <p>Indicates the string containing a version number.</p> </dd> <dd> <p>Indicates the string containing the trademark information provided by the font.</p> </dd> <dd> <p>Indicates the string containing the name of the font manufacturer.</p> </dd> <dd> <p>Indicates the string containing the name of the font designer.</p> </dd> <dd> <p>Indicates the string containing the {{URL}} of the font designer (with protocol, e.g., http://, ftp://).</p> </dd> <dd> <p>Indicates the string containing the description of the font. This may also contain revision information, usage recommendations, history, features, and so on.</p> </dd> <dd> <p>Indicates the string containing the {{URL}} of the font vendor (with protocol, e.g., http://, ftp://). If a unique serial number is embedded in the {{URL}}, it can be used to register the font.</p> </dd> <dd> <p>The full name of the font, like Arial Bold, from <em>name id 4</em> in the name table</p> </dd> <dd> <p>Indicates the string containing the description of how the font may be legally used, or different example scenarios for licensed use.</p> </dd> <dd> <p>Indicates the string containing the {{URL}} where additional licensing information can be found.</p> </dd> <dd> <p>Indicates the string containing the {{GDI}}-compatible family name. Since {{GDI}} allows a maximum of four fonts per family, fonts in the same family may have different {{GDI}}-compatible family names (e.g., "Arial", "Arial Narrow", "Arial Black").</p> </dd> <dd> <p>Indicates the string containing a {{GDI}}-compatible subfamily name.</p> </dd> <dd> <p>Indicates the string containing the family name preferred by the designer. This enables font designers to group more than four fonts in a single family without losing compatibility with {{GDI}}. This name is typically only present if it differs from the {{GDI}}-compatible family name.</p> </dd> <dd> <p>Indicates the string containing the subfamily name preferred by the designer. This name is typically only present if it differs from the {{GDI}}-compatible subfamily name.</p> </dd> <dd> <p>Contains sample text for display in font lists. This can be the font name or any other text that the designer thinks is the best example to display the font in.</p> </dd> <dd> <p>The postscript name of the font, like GillSans-Bold, from <em>name id 6</em> in the name table.</p> </dd> <dd> <p>The postscript {{CID}} findfont name, from <em>name id 20</em> in the name table</p> </dd> <p>Specifies the type of DirectWrite factory object.</p> <p>A DirectWrite factory object contains information about its internal state, such as font loader registration and cached font data. In most cases you should use the shared factory object, because it allows multiple components that use DirectWrite to share internal DirectWrite state information, thereby reducing memory usage. However, there are cases when it is desirable to reduce the impact of a component on the rest of the process, such as a plug-in from an untrusted source, by sandboxing and isolating it from the rest of the process components. In such cases, you should use an isolated factory for the sandboxed component.</p> <dd> <p>Indicates that the DirectWrite factory is a shared factory and that it allows for the reuse of cached font data across multiple in-process components. Such factories also take advantage of cross process font caching components for better performance.</p> </dd> <dd> <p>Indicates that the DirectWrite factory object is isolated. Objects created from the isolated factory do not interact with internal DirectWrite state from other components.</p> </dd> <p> Represents the internal structure of a device pixel (that is, the physical arrangement of red, green, and blue color components) that is assumed for purposes of rendering text. </p> <dd> <p>The red, green, and blue color components of each pixel are assumed to occupy the same point.</p> </dd> <dd> <p>Each pixel is composed of three vertical stripes, with red on the left, green in the center, and blue on the right. This is the most common pixel geometry for {{LCD}} monitors. </p> </dd> <dd> <p>Each pixel is composed of three vertical stripes, with blue on the left, green in the center, and red on the right.</p> </dd> <p> Represents a method of rendering glyphs. </p><strong>Note</strong>?? This topic is about <strong>{{DWRITE_RENDERING_MODE}}</strong> in Windows?8 and later. For info on the previous version see <strong>this topic</strong>.? <p> Specifies the direction in which reading progresses. </p><strong>Note</strong>??<strong>{{DWRITE_READING_DIRECTION_TOP_TO_BOTTOM}}</strong> and <strong>{{DWRITE_READING_DIRECTION_BOTTOM_TO_TOP}}</strong> are available in Windows?8.1 and later, only.? <dd> <p>Indicates that reading progresses from left to right.</p> </dd> <dd> <p>Indicates that reading progresses from right to left.</p> </dd> <dd> <strong>Note</strong>??Windows?8.1 and later only. ? <p>Indicates that reading progresses from top to bottom.</p> </dd> <dd> <strong>Note</strong>??Windows?8.1 and later only. ? <p> Indicates that reading progresses from bottom to top.</p> </dd> <p> Indicates the direction of how lines of text are placed relative to one another. </p> <dd> <p>Specifies that text lines are placed from top to bottom.</p> </dd> <dd> <p>Specifies that text lines are placed from bottom to top.</p> </dd> <dd> <p>Specifies that text lines are placed from left to right.</p> </dd> <dd> <p>Specifies that text lines are placed from right to left.</p> </dd> <p>Specifies the alignment of paragraph text along the reading direction axis, relative to the leading and trailing edge of the layout box.</p> <dd> <p>The leading edge of the paragraph text is aligned to the leading edge of the layout box.</p> </dd> <dd> <p>The trailing edge of the paragraph text is aligned to the trailing edge of the layout box.</p> </dd> <dd> <p>The center of the paragraph text is aligned to the center of the layout box.</p> </dd> <dd> <p>Align text to the leading side, and also justify text to fill the lines.</p> </dd> <p> Specifies the alignment of paragraph text along the flow direction axis, relative to the top and bottom of the flow's layout box. </p> <dd> <p>The top of the text flow is aligned to the top edge of the layout box.</p> </dd> <dd> <p>The bottom of the text flow is aligned to the bottom edge of the layout box.</p> </dd> <dd> <p>The center of the flow is aligned to the center of the layout box.</p> </dd> <p> Specifies the word wrapping to be used in a particular multiline paragraph. </p><strong>Note</strong>??<strong>{{DWRITE_WORD_WRAPPING_EMERGENCY_BREAK}}</strong>, <strong>{{DWRITE_WORD_WRAPPING_WHOLE}} _WORD</strong>, and <strong>{{DWRITE_WORD_WRAPPING_CHARACTER}}</strong> are available in Windows?8.1 and later, only.? <dd> <p>Indicates that words are broken across lines to avoid text overflowing the layout box.</p> </dd> <dd> <p>Indicates that words are kept within the same line even when it overflows the layout box. This option is often used with scrolling to reveal overflow text.</p> </dd> <dd> <strong>Note</strong>??Windows?8.1 and later only. ? <p>Words are broken across lines to avoid text overflowing the layout box. Emergency wrapping occurs if the word is larger than the maximum width. </p> </dd> <dd> <strong>Note</strong>??Windows?8.1 and later only. ? <p> When emergency wrapping, only wrap whole words, never breaking words when the layout width is too small for even a single word. </p> </dd> <dd> <strong>Note</strong>??Windows?8.1 and later only. ? <p>Wrap between any valid character clusters.</p> </dd> <p>The method used for line spacing in a text layout.</p> <p>The line spacing method is set by using the <strong>SetLineSpacing</strong> method of the <strong>{{IDWriteTextFormat}}</strong> or <strong>{{IDWriteTextLayout}}</strong> interfaces. To get the current line spacing method of a text format or text layou use the <strong>GetLineSpacing</strong>.</p> <dd> <p>Line spacing depends solely on the content, adjusting to accommodate the size of fonts and inline objects.</p> </dd> <dd> <p>Lines are explicitly set to uniform spacing, regardless of the size of fonts and inline objects. This can be useful to avoid the uneven appearance that can occur from font fallback.</p> </dd> <dd> <p>Line spacing and baseline distances are proportional to the computed values based on the content, the size of the fonts and inline objects. </p> <strong>Note</strong>??This value is only available on Windows?10 or later and it can be used with <strong>{{IDWriteTextLayout3::SetLineSpacing}}</strong>, but can not be used with <strong>{{IDWriteTextFormat::SetLineSpacing}}</strong>. ? </dd> <p>Specifies the text granularity used to trim text overflowing the layout box.</p> <dd> <p>No trimming occurs. Text flows beyond the layout width.</p> </dd> <dd> <p>Trimming occurs at a character cluster boundary.</p> </dd> <dd> <p>Trimming occurs at a word boundary.</p> </dd> <p>A value that indicates the typographic feature of text supplied by the font.</p> <dd> <p>The default.</p> </dd> <dd> <p>Indicates that the font is displayed vertically.</p> </dd> <dd> <p>Replaces normal figures with figures adjusted for vertical display.</p> </dd> <dd> <p> Replaces figures separated by a slash with an alternative form.</p> <p><strong>Equivalent OpenType tag:</strong> 'afrc' </p> </dd> <dd> <p> Turns capital characters into petite capitals. It is generally used for words which would otherwise be set in all caps, such as acronyms, but which are desired in petite-cap form to avoid disrupting the flow of text. See the pcap feature description for notes on the relationship of caps, smallcaps and petite caps.</p> <p><strong>Equivalent OpenType tag:</strong> 'c2pc'</p> </dd> <dd> <p>Turns capital characters into small capitals. It is generally used for words which would otherwise be set in all caps, such as acronyms, but which are desired in small-cap form to avoid disrupting the flow of text. </p> <p><strong>Equivalent OpenType tag:</strong> 'c2sc'</p> </dd> <dd> <p> In specified situations, replaces default glyphs with alternate forms which provide better joining behavior. Used in script typefaces which are designed to have some or all of their glyphs join.</p> <p><strong>Equivalent OpenType tag:</strong> 'calt'</p> </dd> <dd> <p> Shifts various punctuation marks up to a position that works better with all-capital sequences or sets of lining figures; also changes oldstyle figures to lining figures. By default, glyphs in a text face are designed to work with lowercase characters. Some characters should be shifted vertically to fit the higher visual center of all-capital or lining text. Also, lining figures are the same height (or close to it) as capitals, and fit much better with all-capital text.</p> <p><strong>Equivalent OpenType tag:</strong> 'case'</p> </dd> <dd> <p> To minimize the number of glyph alternates, it is sometimes desired to decompose a character into two glyphs. Additionally, it may be preferable to compose two characters into a single glyph for better glyph processing. This feature permits such composition/decomposition. The feature should be processed as the first feature processed, and should be processed only when it is called.</p> <p><strong>Equivalent OpenType tag:</strong> 'ccmp'</p> </dd> <dd> <p> Replaces a sequence of glyphs with a single glyph which is preferred for typographic purposes. Unlike other ligature features, clig specifies the context in which the ligature is recommended. This capability is important in some script designs and for swash ligatures.</p> <p><strong>Equivalent OpenType tag:</strong> 'clig'</p> </dd> <dd> <p> Globally adjusts inter-glyph spacing for all-capital text. Most typefaces contain capitals and lowercase characters, and the capitals are positioned to work with the lowercase. When capitals are used for words, they need more space between them for legibility and esthetics. This feature would not apply to monospaced designs. Of course the user may want to override this behavior in order to do more pronounced letterspacing for esthetic reasons. </p> <p><strong>Equivalent OpenType tag:</strong> 'cpsp'</p> </dd> <dd> <p>Replaces default character glyphs with corresponding swash glyphs in a specified context. Note that there may be more than one swash alternate for a given character. </p> <p><strong>Equivalent OpenType tag:</strong> 'cswh'</p> </dd> <dd> <p> In cursive scripts like Arabic, this feature cursively positions adjacent glyphs.</p> <p><strong>Equivalent OpenType tag:</strong> 'curs'</p> </dd> <dd> <p> Replaces a sequence of glyphs with a single glyph which is preferred for typographic purposes. This feature covers those ligatures which may be used for special effect, at the user's preference.</p> <p><strong>Equivalent OpenType tag:</strong> 'dlig'</p> </dd> <dd> <p> Replaces standard forms in Japanese fonts with corresponding forms preferred by typographers. For example, a user would invoke this feature to replace kanji character U+5516 with U+555E. </p> <p><strong>Equivalent OpenType tag:</strong> 'expt'</p> </dd> <dd> <p> Replaces figures separated by a slash with 'common' (diagonal) fractions.</p> <p><strong>Equivalent OpenType tag:</strong> 'frac'</p> </dd> <dd> <p> Replaces glyphs set on other widths with glyphs set on full (usually em) widths. In a {{CJKV}} font, this may include "lower {{ASCII}}" Latin characters and various symbols. In a European font, this feature replaces proportionally-spaced glyphs with monospaced glyphs, which are generally set on widths of 0.6 em. For example, a user may invoke this feature in a Japanese font to get full monospaced Latin glyphs instead of the corresponding proportionally-spaced versions.</p> <p><strong>Equivalent OpenType tag:</strong> 'fwid'</p> </dd> <dd> <p> Produces the half forms of consonants in Indic scripts. For example, in Hindi (Devanagari script), the conjunct {{KKa}}, obtained by doubling the Ka, is denoted with a half form of Ka followed by the full form. </p> <p><strong>Equivalent OpenType tag:</strong> 'half'</p> </dd> <dd> <p> Produces the halant forms of consonants in Indic scripts. For example, in Sanskrit (Devanagari script), syllable final consonants are frequently required in their halant form.</p> <p><strong>Equivalent OpenType tag:</strong> 'haln'</p> </dd> <dd> <p> Respaces glyphs designed to be set on full-em widths, fitting them onto half-em widths. This differs from hwid in that it does not substitute new glyphs.</p> <p><strong>Equivalent OpenType tag:</strong> 'halt'</p> </dd> <dd> <p> Replaces the default (current) forms with the historical alternates. While some ligatures are also used for historical effect, this feature deals only with single characters. Some fonts include the historical forms as alternates, so they can be used for a 'period' effect. </p> <p><strong>Equivalent OpenType tag:</strong> 'hist'</p> </dd> <dd> <p> Replaces standard kana with forms that have been specially designed for only horizontal writing. This is a typographic optimization for improved fit and more even color.</p> <p><strong>Equivalent OpenType tag:</strong> 'hkna'</p> </dd> <dd> <p> Replaces the default (current) forms with the historical alternates. Some ligatures were in common use in the past, but appear anachronistic today. Some fonts include the historical forms as alternates, so they can be used for a 'period' effect.</p> <p><strong>Equivalent OpenType tag:</strong> 'hlig'</p> </dd> <dd> <p> Replaces glyphs on proportional widths, or fixed widths other than half an em, with glyphs on half-em (en) widths. Many {{CJKV}} fonts have glyphs which are set on multiple widths; this feature selects the half-em version. There are various contexts in which this is the preferred behavior, including compatibility with older desktop documents.</p> <p><strong>Equivalent OpenType tag:</strong> 'hwid'</p> </dd> <dd> <p> Used to access the {{JIS}} X 0212-1990 glyphs for the cases when the {{JIS}} X 0213:2004 form is encoded. The {{JIS}} X 0212-1990 (aka, "Hojo Kanji") and {{JIS}} X 0213:2004 character sets overlap significantly. In some cases their prototypical glyphs differ. When building fonts that support both {{JIS}} X 0212-1990 and {{JIS}} X 0213:2004 (such as those supporting the Adobe-Japan 1-6 character collection), it is recommended that {{JIS}} X 0213:2004 forms be the preferred encoded form.</p> <p><strong>Equivalent OpenType tag:</strong> 'hojo'</p> </dd> <dd> <p> The National Language Council ({{NLC}}) of Japan has defined new glyph shapes for a number of {{JIS}} characters, which were incorporated into {{JIS}} X 0213:2004 as new prototypical forms. The 'jp04' feature is A subset of the 'nlck' feature, and is used to access these prototypical glyphs in a manner that maintains the integrity of {{JIS}} X 0213:2004.</p> <p><strong>Equivalent OpenType tag:</strong> 'jp04'</p> </dd> <dd> <p>Replaces default ({{JIS90}}) Japanese glyphs with the corresponding forms from the {{JIS}} C 6226-1978 ({{JIS78}}) specification.</p> <p><strong>Equivalent OpenType tag:</strong> 'jp78'</p> </dd> <dd> <p>Replaces default ({{JIS90}}) Japanese glyphs with the corresponding forms from the {{JIS}} X 0208-1983 ({{JIS83}}) specification.</p> <p><strong>Equivalent OpenType tag:</strong> 'jp83'</p> </dd> <dd> <p> Replaces Japanese glyphs from the {{JIS78}} or {{JIS83}} specifications with the corresponding forms from the {{JIS}} X 0208-1990 ({{JIS90}}) specification.</p> <p><strong>Equivalent OpenType tag:</strong> 'jp90'</p> </dd> <dd> <p> Adjusts amount of space between glyphs, generally to provide optically consistent spacing between glyphs. Although a well-designed typeface has consistent inter-glyph spacing overall, some glyph combinations require adjustment for improved legibility. Besides standard adjustment in the horizontal direction, this feature can supply size-dependent kerning data via device tables, "cross-stream" kerning in the Y text direction, and adjustment of glyph placement independent of the advance adjustment. Note that this feature may apply to runs of more than two glyphs, and would not be used in monospaced fonts. Also note that this feature does not apply to text set vertically.</p> <p><strong>Equivalent OpenType tag:</strong> 'kern'</p> </dd> <dd> <p> Replaces a sequence of glyphs with a single glyph which is preferred for typographic purposes. This feature covers the ligatures which the designer/manufacturer judges should be used in normal conditions.</p> <p><strong>Equivalent OpenType tag:</strong> 'liga'</p> </dd> <dd> <p>Changes selected figures from oldstyle to the default lining form. For example, a user may invoke this feature in order to get lining figures, which fit better with all-capital text. This feature overrides results of the Oldstyle Figures feature (onum).</p> <p><strong>Equivalent OpenType tag:</strong> 'lnum'</p> </dd> <dd> <p> Enables localized forms of glyphs to be substituted for default forms. Many scripts used to write multiple languages over wide geographical areas have developed localized variant forms of specific letters, which are used by individual literary communities. For example, a number of letters in the Bulgarian and Serbian alphabets have forms distinct from their Russian counterparts and from each other. In some cases the localized form differs only subtly from the script 'norm', in others the forms are radically distinct. </p> <p><strong>Equivalent OpenType tag:</strong> 'locl'</p> </dd> <dd> <p> Positions mark glyphs with respect to base glyphs. For example, in Arabic script positioning the Hamza above the Yeh.</p> <p><strong>Equivalent OpenType tag: </strong> 'mark'</p> </dd> <dd> <p> Replaces standard typographic forms of Greek glyphs with corresponding forms commonly used in mathematical notation (which are a subset of the Greek alphabet).</p> <p><strong>Equivalent OpenType tag:</strong> 'mgrk'</p> </dd> <dd> <p> Positions marks with respect to other marks. Required in various non-Latin scripts like Arabic. For example, in Arabic, the ligaturised mark Ha with Hamza above it can also be obtained by positioning these marks relative to one another.</p> <p><strong>Equivalent OpenType tag:</strong> 'mkmk'</p> </dd> <dd> <p> Replaces default glyphs with various notational forms (such as glyphs placed in open or solid circles, squares, parentheses, diamonds or rounded boxes). In some cases an annotation form may already be present, but the user may want a different one.</p> <p><strong>Equivalent OpenType tag:</strong> 'nalt'</p> </dd> <dd> <p> Used to access glyphs made from glyph shapes defined by the National Language Council ({{NLC}}) of Japan for a number of {{JIS}} characters in 2000. </p> <p><strong>Equivalent OpenType tag:</strong> 'nlck'</p> </dd> <dd> <p> Changes selected figures from the default lining style to oldstyle form. For example, a user may invoke this feature to get oldstyle figures, which fit better into the flow of normal upper- and lowercase text. This feature overrides results of the Lining Figures feature (lnum).</p> <p><strong>Equivalent OpenType tag:</strong> 'onum'</p> </dd> <dd> <p> Replaces default alphabetic glyphs with the corresponding ordinal forms for use after figures. One exception to the follows-a-figure rule is the numero character (U+2116), which is actually a ligature substitution, but is best accessed through this feature.</p> <p><strong>Equivalent OpenType tag:</strong> 'ordn'</p> </dd> <dd> <p> Respaces glyphs designed to be set on full-em widths, fitting them onto individual (more or less proportional) horizontal widths. This differs from pwid in that it does not substitute new glyphs ({{GPOS}}, not {{GSUB}} feature). The user may prefer the monospaced form, or may simply want to ensure that the glyph is well-fit and not rotated in vertical setting (Latin forms designed for proportional spacing would be rotated).</p> <p><strong>Equivalent OpenType tag:</strong> 'palt'</p> </dd> <dd> <p>Turns lowercase characters into petite capitals. Forms related to petite capitals, such as specially designed figures, may be included. Some fonts contain an additional size of capital letters, shorter than the regular smallcaps and it is referred to as petite caps. Such forms are most likely to be found in designs with a small lowercase x-height, where they better harmonise with lowercase text than the taller smallcaps (for examples of petite caps, see the Emigre type families Mrs Eaves and Filosofia). </p> <p><strong>Equivalent OpenType tag:</strong> 'pcap'</p> </dd> <dd> <p> Replaces figure glyphs set on uniform (tabular) widths with corresponding glyphs set on glyph-specific (proportional) widths. Tabular widths will generally be the default, but this cannot be safely assumed. Of course this feature would not be present in monospaced designs.</p> <p><strong>Equivalent OpenType tag:</strong> 'pnum'</p> </dd> <dd> <p> Replaces glyphs set on uniform widths (typically full or half-em) with proportionally spaced glyphs. The proportional variants are often used for the Latin characters in {{CJKV}} fonts, but may also be used for Kana in Japanese fonts.</p> <p><strong>Equivalent OpenType tag:</strong> 'pwid'</p> </dd> <dd> <p> Replaces glyphs on other widths with glyphs set on widths of one quarter of an em (half an en). The characters involved are normally figures and some forms of punctuation.</p> <p><strong>Equivalent OpenType tag:</strong> 'qwid'</p> </dd> <dd> <p> Replaces a sequence of glyphs with a single glyph which is preferred for typographic purposes. This feature covers those ligatures, which the script determines as required to be used in normal conditions. This feature is important for some scripts to ensure correct glyph formation. </p> <p><strong>Equivalent OpenType tag:</strong> 'rlig'</p> </dd> <dd> <p> Identifies glyphs in the font which have been designed for "ruby", from the old typesetting term for four-point-sized type. Japanese typesetting often uses smaller kana glyphs, generally in superscripted form, to clarify the meaning of kanji which may be unfamiliar to the reader. </p> <p><strong>Equivalent OpenType tag:</strong> 'ruby'</p> </dd> <dd> <p> Replaces the default forms with the stylistic alternates. Many fonts contain alternate glyph designs for a purely esthetic effect; these don't always fit into a clear category like swash or historical. As in the case of swash glyphs, there may be more than one alternate form. </p> <p><strong>Equivalent OpenType tag:</strong> 'salt'</p> </dd> <dd> <p> Replaces lining or oldstyle figures with inferior figures (smaller glyphs which sit lower than the standard baseline, primarily for chemical or mathematical notation). May also replace lowercase characters with alphabetic inferiors.</p> <p><strong>Equivalent OpenType tag:</strong> 'sinf'</p> </dd> <dd> <p> Turns lowercase characters into small capitals. This corresponds to the common {{SC}} font layout. It is generally used for display lines set in Large &amp; small caps, such as titles. Forms related to small capitals, such as oldstyle figures, may be included.</p> <p><strong>Equivalent OpenType tag:</strong> 'smcp'</p> </dd> <dd> <p> Replaces 'traditional' Chinese or Japanese forms with the corresponding 'simplified' forms.</p> <p><strong>Equivalent OpenType tag:</strong> 'smpl'</p> </dd> <dd> <p> In addition to, or instead of, stylistic alternatives of individual glyphs (see 'salt' feature), some fonts may contain sets of stylistic variant glyphs corresponding to portions of the character set, such as multiple variants for lowercase letters in a Latin font. Glyphs in stylistic sets may be designed to harmonise visually, interract in particular ways, or otherwise work together. Examples of fonts including stylistic sets are Zapfino Linotype and Adobe's Poetica. Individual features numbered sequentially with the tag name convention 'ss01' 'ss02' 'ss03' . 'ss20' provide a mechanism for glyphs in these sets to be associated via {{GSUB}} lookup indexes to default forms and to each other, and for users to select from available stylistic sets</p> <p><strong>Equivalent OpenType tag:</strong> 'ss01'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss02'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss03'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss04'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss05'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss06'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss07'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss08'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss09'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss10'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss11'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss12'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss13'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss14'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss15'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss16'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss17'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss18'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss19'</p> </dd> <dd> <p>See the description for <strong>{{DWRITE_FONT_FEATURE_TAG_STYLISTIC_SET_1}}</strong>.</p> <p><strong>Equivalent OpenType tag:</strong> 'ss20'</p> </dd> <dd> <p> May replace a default glyph with a subscript glyph, or it may combine a glyph substitution with positioning adjustments for proper placement.</p> <p><strong>Equivalent OpenType tag:</strong> 'subs'</p> </dd> <dd> <p> Replaces lining or oldstyle figures with superior figures (primarily for footnote indication), and replaces lowercase letters with superior letters (primarily for abbreviated French titles).</p> <p><strong>Equivalent OpenType tag:</strong> 'sups'</p> </dd> <dd> <p> Replaces default character glyphs with corresponding swash glyphs. Note that there may be more than one swash alternate for a given character.</p> <p><strong>Equivalent OpenType tag:</strong> 'swsh'</p> </dd> <dd> <p> Replaces the default glyphs with corresponding forms designed specifically for titling. These may be all-capital and/or larger on the body, and adjusted for viewing at larger sizes.</p> <p><strong>Equivalent OpenType tag:</strong> 'titl'</p> </dd> <dd> <p> Replaces 'simplified' Japanese kanji forms with the corresponding 'traditional' forms. This is equivalent to the Traditional Forms feature, but explicitly limited to the traditional forms considered proper for use in personal names (as many as 205 glyphs in some fonts).</p> <p><strong>Equivalent OpenType tag:</strong> 'tnam'</p> </dd> <dd> <p> Replaces figure glyphs set on proportional widths with corresponding glyphs set on uniform (tabular) widths. Tabular widths will generally be the default, but this cannot be safely assumed. Of course this feature would not be present in monospaced designs.</p> <p><strong>Equivalent OpenType tag:</strong> 'tnum'</p> </dd> <dd> <p> Replaces 'simplified' Chinese hanzi or Japanese kanji forms with the corresponding 'traditional' forms.</p> <p><strong>Equivalent OpenType tag:</strong> 'trad'</p> </dd> <dd> <p> Replaces glyphs on other widths with glyphs set on widths of one third of an em. The characters involved are normally figures and some forms of punctuation.</p> <p><strong>Equivalent OpenType tag:</strong> 'twid'</p> </dd> <dd> <p> Maps upper- and lowercase letters to a mixed set of lowercase and small capital forms, resulting in a single case alphabet (for an example of unicase, see the Emigre type family Filosofia). The letters substituted may vary from font to font, as appropriate to the design. If aligning to the x-height, smallcap glyphs may be substituted, or specially designed unicase forms might be used. Substitutions might also include specially designed figures. </p> <p><strong>Equivalent OpenType tag:</strong> 'unic'</p> </dd> <dd> <p>Allows the user to change from the default 0 to a slashed form. Some fonts contain both a default form of zero, and an alternative form which uses a diagonal slash through the counter. Especially in condensed designs, it can be difficult to distinguish between 0 and O (zero and capital O) in any situation where capitals and lining figures may be arbitrarily mixed. </p> <p><strong>Equivalent OpenType tag:</strong> 'zero'</p> </dd> <p>Indicates additional shaping requirements for text.</p> <dd> <p>Indicates that there is no additional shaping requirements for text. Text is shaped with the writing system default behavior.</p> </dd> <dd> <p>Indicates that text should leave no visible control or format control characters.</p> </dd> <p> Indicates the condition at the edges of inline object or text used to determine line-breaking behavior.</p> <dd> <p> Indicates whether a break is allowed by determining the condition of the neighboring text span or inline object.</p> </dd> <dd> <p> Indicates that a line break is allowed, unless overruled by the condition of the neighboring text span or inline object, either prohibited by a "may not break" condition or forced by a "must break" condition. </p> </dd> <dd> <p> Indicates that there should be no line break, unless overruled by a "must break" condition from the neighboring text span or inline object. </p> </dd> <dd> <p> Indicates that the line break must happen, regardless of the condition of the adjacent text span or inline object. </p> </dd> <p>Specifies how to apply number substitution on digits and related punctuation.</p> <dd> <p>Specifies that the substitution method should be determined based on the {{LOCALE_IDIGITSUBSTITUTION}} value of the specified text culture.</p> </dd> <dd> <p>If the culture is Arabic or Persian, specifies that the number shapes depend on the context. Either traditional or nominal number shapes are used, depending on the nearest preceding strong character or (if there is none) the reading direction of the paragraph.</p> </dd> <dd> <p>Specifies that code points 0x30-0x39 are always rendered as nominal numeral shapes (ones of the European number), that is, no substitution is performed.</p> </dd> <dd> <p>Specifies that numbers are rendered using the national number shapes as specified by the {{LOCALE_SNATIVEDIGITS}} value of the specified text culture.</p> </dd> <dd> <p>Specifies that numbers are rendered using the traditional shapes for the specified culture. For most cultures, this is the same as NativeNational. However, NativeNational results in Latin numbers for some Arabic cultures, whereasDWRITE_NUMBER_SUBSTITUTION_METHOD_TRADITIONAL results in arabic numbers for all Arabic cultures.</p> </dd> <p>Identifies a type of alpha texture.</p> <p>An alpha texture is a bitmap of alpha values, each representing opacity of a pixel or subpixel.</p> <dd> <p>Specifies an alpha texture for aliased text rendering (that is, each pixel is either fully opaque or fully transparent), with one byte per pixel.</p> </dd> <dd> <p>Specifies an alpha texture for ClearType text rendering, with three bytes per pixel in the horizontal dimension and one byte per pixel in the vertical dimension.</p> </dd> <p>The <strong>{{DWRITE_FONT_METRICS}}</strong> structure specifies the metrics that are applicable to all glyphs within the font face.</p> <dd> <p>The number of font design units per em unit. Font files use their own coordinate system of font design units. A font design unit is the smallest measurable unit in the em square, an imaginary square that is used to size and align glyphs. The concept of em square is used as a reference scale factor when defining font size and device transformation semantics. The size of one em square is also commonly used to compute the paragraph identation value.</p> </dd> <dd> <p>The ascent value of the font face in font design units. Ascent is the distance from the top of font character alignment box to the English baseline.</p> </dd> <dd> <p>The descent value of the font face in font design units. Descent is the distance from the bottom of font character alignment box to the English baseline.</p> </dd> <dd> <p>The line gap in font design units. Recommended additional white space to add between lines to improve legibility. The recommended line spacing (baseline-to-baseline distance) is the sum of <strong>ascent</strong>, <strong>descent</strong>, and <strong>lineGap</strong>. The line gap is usually positive or zero but can be negative, in which case the recommended line spacing is less than the height of the character alignment box.</p> </dd> <dd> <p>The cap height value of the font face in font design units. Cap height is the distance from the English baseline to the top of a typical English capital. Capital "H" is often used as a reference character for the purpose of calculating the cap height value.</p> </dd> <dd> <p>The x-height value of the font face in font design units. x-height is the distance from the English baseline to the top of lowercase letter "x", or a similar lowercase character.</p> </dd> <dd> <p>The underline position value of the font face in font design units. Underline position is the position of underline relative to the English baseline. The value is usually made negative in order to place the underline below the baseline.</p> </dd> <dd> <p>The suggested underline thickness value of the font face in font design units.</p> </dd> <dd> <p>The strikethrough position value of the font face in font design units. Strikethrough position is the position of strikethrough relative to the English baseline. The value is usually made positive in order to place the strikethrough above the baseline.</p> </dd> <dd> <p>The suggested strikethrough thickness value of the font face in font design units.</p> </dd> <p>Specifies the metrics of an individual glyph. The units depend on how the metrics are obtained.</p> <dd> <p>Specifies the X offset from the glyph origin to the left edge of the black box. The glyph origin is the current horizontal writing position. A negative value means the black box extends to the left of the origin (often true for lowercase italic 'f').</p> </dd> <dd> <p>Specifies the X offset from the origin of the current glyph to the origin of the next glyph when writing horizontally.</p> </dd> <dd> <p>Specifies the X offset from the right edge of the black box to the origin of the next glyph when writing horizontally. The value is negative when the right edge of the black box overhangs the layout box.</p> </dd> <dd> <p>Specifies the vertical offset from the vertical origin to the top of the black box. Thus, a positive value adds whitespace whereas a negative value means the glyph overhangs the top of the layout box.</p> </dd> <dd> <p>Specifies the Y offset from the vertical origin of the current glyph to the vertical origin of the next glyph when writing vertically. Note that the term "origin" by itself denotes the horizontal origin. The vertical origin is different. Its Y coordinate is specified by <strong>verticalOriginY</strong> value, and its X coordinate is half the <strong>advanceWidth</strong> to the right of the horizontal origin.</p> </dd> <dd> <p>Specifies the vertical distance from the bottom edge of the black box to the advance height. This is positive when the bottom edge of the black box is within the layout box, or negative when the bottom edge of black box overhangs the layout box.</p> </dd> <dd> <p>Specifies the Y coordinate of a glyph's vertical origin, in the font's design coordinate system. The y coordinate of a glyph's vertical origin is the sum of the glyph's top side bearing and the top (that is, yMax) of the glyph's bounding box.</p> </dd> <p>The optional adjustment to a glyph's position.</p> <p>An glyph offset changes the position of a glyph without affecting the pen position. Offsets are in logical, pre-transform units.</p> <dd> <p>The offset in the advance direction of the run. A positive advance offset moves the glyph to the right (in pre-transform coordinates) if the run is left-to-right or to the left if the run is right-to-left.</p> </dd> <dd> <p>The offset in the ascent direction, that is, the direction ascenders point. A positive ascender offset moves the glyph up (in pre-transform coordinates). A negative ascender offset moves the glyph down.</p> </dd> <p>The <strong>{{DWRITE_MATRIX}}</strong> structure specifies the graphics transform to be applied to rendered glyphs.</p> <dd> <p>A value indicating the horizontal scaling / cosine of rotation.</p> </dd> <dd> <p>A value indicating the vertical shear / sine of rotation.</p> </dd> <dd> <p>A value indicating the horizontal shear / negative sine of rotation.</p> </dd> <dd> <p>A value indicating the vertical scaling / cosine of rotation.</p> </dd> <dd> <p>A value indicating the horizontal shift (always orthogonal regardless of rotation).</p> </dd> <dd> <p>A value indicating the vertical shift (always orthogonal regardless of rotation.)</p> </dd> <p>Specifies a range of text positions where format is applied in the text represented by an <strong>{{IDWriteTextLayout}}</strong> object.</p> <p>Specifies properties used to identify and execute typographic features in the current font face.</p> <p>A non-zero value generally enables the feature execution, while the zero value disables it. A feature requiring a selector uses this value to indicate the selector index.</p><p>The OpenType standard provides access to typographic features available in the font by means of a feature tag with the associated parameters. The OpenType feature tag is a 4-byte identifier of the registered name of a feature. For example, the 'kern' feature name tag is used to identify the 'Kerning' feature in OpenType font. Similarly, the OpenType feature tag for 'Standard Ligatures' and 'Fractions' is 'liga' and 'frac' respectively. Since a single run can be associated with more than one typographic features, the Text String {{API}} accepts typographic settings for a run as a list of features and are executed in the order they are specified.</p><p>The value of the tag member represents the OpenType name tag of the feature, while the param value represents additional parameter for the execution of the feature referred by the tag member. Both <strong>nameTag</strong> and <strong>parameter</strong> are stored as little endian, the same convention followed by {{GDI}}. Most features treat the Param value as a binary value that indicates whether to turn the execution of the feature on or off, with it being off by default in the majority of cases. Some features, however, treat this value as an integral value representing the integer index to the list of alternate results it may produce during the execution; for instance, the feature 'Stylistic Alternates' or 'salt' uses the <strong>parameter</strong> value as an index to the list of alternate substituting glyphs it could produce for a specified glyph. </p> <dd> <p>The feature OpenType name identifier.</p> </dd> <dd> <p>The execution parameter of the feature.</p> </dd> <p>Contains a set of typographic features to be applied during text shaping.</p> <dd> <p>A reference to a structure that specifies properties used to identify and execute typographic features in the font.</p> </dd> <dd> <p>A value that indicates the number of features being applied to a font face.</p> </dd> <p>Specifies the trimming option for text overflowing the layout box. </p> <dd> <p>A value that specifies the text granularity used to trim text overflowing the layout box.</p> </dd> <dd> <p>A character code used as the delimiter that signals the beginning of the portion of text to be preserved. Text starting from the Nth occurence of the delimiter (where N equals delimiterCount) counting backwards from the end of the text block will be preserved. For example, given the text is a path like c:\A\B\C\D\file.txt and delimiter equal to '\' and delimiterCount equal to 1, the file.txt portion of the text would be preserved. Specifying a delimiterCount of 2 would preserve D\file.txt. </p> </dd> <dd> <p>The delimiter count, counting from the end of the text, to preserve text from.</p> </dd> <p>Stores the association of text and its writing system script, as well as some display attributes.</p> <dd> <p>The zero-based index representation of writing system script.</p> </dd> <dd> <p>A value that indicates additional shaping requirement of text.</p> </dd> <p>Line breakpoint characteristics of a character.</p> <dd> <p>Indicates a breaking condition before the character.</p> </dd> <dd> <p>Indicates a breaking condition after the character.</p> </dd> <dd> <p>Indicates that the character is some form of whitespace, which may be meaningful for justification.</p> </dd> <dd> <p>Indicates that the character is a soft hyphen, often used to indicate hyphenation points inside words.</p> </dd> <dd> <p>Reserved for future use.</p> </dd> <p>Shaping output properties for an output glyph.</p> <dd> <p>Indicates that the glyph is shaped alone.</p> </dd> <dd> <p>Reserved for future use.</p> </dd> <p>Contains shaping output properties for an output glyph.</p> <dd> <p>Indicates that the glyph has justification applied.</p> </dd> <dd> <p>Indicates that the glyph is the start of a cluster.</p> </dd> <dd> <p>Indicates that the glyph is a diacritic mark.</p> </dd> <dd> <p>Indicates that the glyph is a word boundary with no visible space.</p> </dd> <dd> <p>Reserved for future use.</p> </dd> <p>Contains the information needed by renderers to draw glyph runs. All coordinates are in device independent pixels ({{DIPs}}). </p> <dd> <p>The physical font face object to draw with.</p> </dd> <dd> <p>The logical size of the font in {{DIPs}} (equals 1/96 inch), not points.</p> </dd> <dd> <p>The number of glyphs in the glyph run.</p> </dd> <dd> <p>A reference to an array of indices to render for the glyph run.</p> </dd> <dd> <p>A reference to an array containing glyph advance widths for the glyph run.</p> </dd> <dd> <p>A reference to an array containing glyph offsets for the glyph run.</p> </dd> <dd> <p>If true, specifies that glyphs are rotated 90 degrees to the left and vertical metrics are used. Vertical writing is achieved by specifying <strong>isSideways</strong> = true and rotating the entire run 90 degrees to the right via a rotate transform.</p> </dd> <dd> <p>The implicit resolved bidi level of the run. Odd levels indicate right-to-left languages like Hebrew and Arabic, while even levels indicate left-to-right languages like English and Japanese (when written horizontally). For right-to-left languages, the text origin is on the right, and text should be drawn to the left.</p> </dd> <p>Contains additional properties related to those in <strong>{{DWRITE_GLYPH_RUN}}</strong>.</p> <p>Contains information about the width, thickness, offset, run height, reading direction, and flow direction of an underline. </p> <p>All coordinates are in device independent pixels ({{DIPs}}).</p> <dd> <p>A value that indicates the width of the underline, measured parallel to the baseline.</p> </dd> <dd> <p>A value that indicates the thickness of the underline, measured perpendicular to the baseline.</p> </dd> <dd> <p>A value that indicates the offset of the underline from the baseline. A positive offset represents a position below the baseline (away from the text) and a negative offset is above (toward the text).</p> </dd> <dd> <p>A value that indicates the height of the tallest run where the underline is applied.</p> </dd> <dd> <p>A value that indicates the reading direction of the text associated with the underline. This value is used to interpret whether the width value runs horizontally or vertically.</p> </dd> <dd> <p>A value that indicates the flow direction of the text associated with the underline. This value is used to interpret whether the thickness value advances top to bottom, left to right, or right to left.</p> </dd> <dd> <p>An array of characters which contains the locale of the text that the underline is being drawn under. For example, in vertical text, the underline belongs on the left for Chinese but on the right for Japanese. </p> </dd> <dd> <p>The measuring mode can be useful to the renderer to determine how underlines are rendered, such as rounding the thickness to a whole pixel in {{GDI}}-compatible modes.</p> </dd> <p>Contains information regarding the size and placement of strikethroughs. All coordinates are in device independent pixels ({{DIPs}}).</p> <dd> <p>A value that indicates the width of the strikethrough, measured parallel to the baseline.</p> </dd> <dd> <p>A value that indicates the thickness of the strikethrough, measured perpendicular to the baseline.</p> </dd> <dd> <p>A value that indicates the offset of the strikethrough from the baseline. A positive offset represents a position below the baseline and a negative offset is above. Typically, the offset will be negative.</p> </dd> <dd> <p>Reading direction of the text associated with the strikethrough. This value is used to interpret whether the width value runs horizontally or vertically.</p> </dd> <dd> <p>Flow direction of the text associated with the strikethrough. This value is used to interpret whether the thickness value advances top to bottom, left to right, or right to left.</p> </dd> <dd> <p>An array of characters containing the locale of the text that is the strikethrough is being drawn over. </p> </dd> <dd> <p>The measuring mode can be useful to the renderer to determine how underlines are rendered, such as rounding the thickness to a whole pixel in {{GDI}}-compatible modes.</p> </dd> <p>Contains information about a formatted line of text.</p> <dd> <p>The number of text positions in the text line. This includes any trailing whitespace and newline characters.</p> </dd> <dd> <p>The number of whitespace positions at the end of the text line. Newline sequences are considered whitespace.</p> </dd> <dd> <p>The number of characters in the newline sequence at the end of the text line. If the count is zero, then the text line was either wrapped or it is the end of the text.</p> </dd> <dd> <p>The height of the text line.</p> </dd> <dd> <p>The distance from the top of the text line to its baseline.</p> </dd> <dd> <p>The line is trimmed.</p> </dd> <p>Contains information about a glyph cluster.</p> <dd> <p>The total advance width of all glyphs in the cluster.</p> </dd> <dd> <p>The number of text positions in the cluster.</p> </dd> <dd> <p>Indicates whether a line can be broken right after the cluster.</p> </dd> <dd> <p>Indicates whether the cluster corresponds to a whitespace character.</p> </dd> <dd> <p>Indicates whether the cluster corresponds to a newline character.</p> </dd> <dd> <p>Indicates whether the cluster corresponds to a soft hyphen character.</p> </dd> <dd> <p>Indicates whether the cluster is read from right to left.</p> </dd> <dd> <p>Reserved for future use.</p> </dd> <p>Contains the metrics associated with text after layout. All coordinates are in device independent pixels ({{DIPs}}).</p> <dd> <p>A value that indicates the left-most point of formatted text relative to the layout box, while excluding any glyph overhang.</p> </dd> <dd> <p>A value that indicates the top-most point of formatted text relative to the layout box, while excluding any glyph overhang.</p> </dd> <dd> <p>A value that indicates the width of the formatted text, while ignoring trailing whitespace at the end of each line.</p> </dd> <dd> <p>The width of the formatted text, taking into account the trailing whitespace at the end of each line.</p> </dd> <dd> <p>The height of the formatted text. The height of an empty string is set to the same value as that of the default font.</p> </dd> <dd> <p>The initial width given to the layout. It can be either larger or smaller than the text content width, depending on whether the text was wrapped.</p> </dd> <dd> <p>Initial height given to the layout. Depending on the length of the text, it may be larger or smaller than the text content height.</p> </dd> <dd> <p>The maximum reordering count of any line of text, used to calculate the most number of hit-testing boxes needed. If the layout has no bidirectional text, or no text at all, the minimum level is 1.</p> </dd> <dd> <p>Total number of lines.</p> </dd> <p>Contains properties describing the geometric measurement of an application-defined inline object.</p> <dd> <p>The width of the inline object.</p> </dd> <dd> <p>The height of the inline object.</p> </dd> <dd> <p>The distance from the top of the object to the point where it is lined up with the adjacent text. If the baseline is at the bottom, then <strong>baseline</strong> simply equals <strong>height</strong>.</p> </dd> <dd> <p>A Boolean flag that indicates whether the object is to be placed upright or alongside the text baseline for vertical text.</p> </dd> <p>Indicates how much any visible {{DIPs}} (device independent pixels) overshoot each side of the layout or inline objects.</p><p>Positive overhangs indicate that the visible area extends outside the layout box or inline object, while negative values mean there is whitespace inside. The returned values are unaffected by rendering transforms or pixel snapping. Additionally, they may not exactly match the final target's pixel bounds after applying grid fitting and hinting.</p> <dd> <p>The distance from the left-most visible {{DIP}} to its left-alignment edge.</p> </dd> <dd> <p>The distance from the top-most visible {{DIP}} to its top alignment edge.</p> </dd> <dd> <p>The distance from the right-most visible {{DIP}} to its right-alignment edge.</p> </dd> <dd> <p>The distance from the bottom-most visible {{DIP}} to its lower-alignment edge.</p> </dd> <p>Describes the region obtained by a hit test.</p> <dd> <p>The first text position within the hit region. </p> </dd> <dd> <p>The number of text positions within the hit region. </p> </dd> <dd> <p>The x-coordinate of the upper-left corner of the hit region.</p> </dd> <dd> <p>The y-coordinate of the upper-left corner of the hit region.</p> </dd> <dd> <p>The width of the hit region.</p> </dd> <dd> <p>The height of the hit region.</p> </dd> <dd> <p>The <strong>{{BIDI}} level</strong> of the text positions within the hit region.</p> </dd> <dd> <p>true if the hit region contains text; otherwise, false.</p> </dd> <dd> <p>true if the text range is trimmed; otherwise, false.</p> </dd> <p> Reads a fragment from a font file. </p> <p> Note that <strong>ReadFileFragment</strong> implementations must check whether the requested font file fragment is within the file bounds. Otherwise, an error should be returned from <strong>ReadFileFragment</strong>. </p><p> DirectWrite may invoke <strong>{{IDWriteFontFileStream}}</strong> methods on the same object from multiple threads simultaneously. Therefore, <strong>ReadFileFragment</strong> implementations that rely on internal mutable state must serialize access to such state across multiple threads. For example, an implementation that uses separate Seek and Read operations to read a file fragment must place the code block containing Seek and Read calls under a lock or a critical section.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains an address of a reference to the start of the font file fragment. This parameter is passed uninitialized.</p> </dd> <dd> <p>The offset of the fragment, in bytes, from the beginning of the font file.</p> </dd> <dd> <p>The size of the file fragment, in bytes.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to a reference to the client-defined context to be passed to <strong>ReleaseFileFragment</strong>.</p> </dd> <p> Reads a fragment from a font file. </p> <p> Note that <strong>ReadFileFragment</strong> implementations must check whether the requested font file fragment is within the file bounds. Otherwise, an error should be returned from <strong>ReadFileFragment</strong>. </p><p> DirectWrite may invoke <strong>{{IDWriteFontFileStream}}</strong> methods on the same object from multiple threads simultaneously. Therefore, <strong>ReadFileFragment</strong> implementations that rely on internal mutable state must serialize access to such state across multiple threads. For example, an implementation that uses separate Seek and Read operations to read a file fragment must place the code block containing Seek and Read calls under a lock or a critical section.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains an address of a reference to the start of the font file fragment. This parameter is passed uninitialized.</p> </dd> <dd> <p>The offset of the fragment, in bytes, from the beginning of the font file.</p> </dd> <dd> <p>The size of the file fragment, in bytes.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to a reference to the client-defined context to be passed to <strong>ReleaseFileFragment</strong>.</p> </dd> <p> Releases a fragment from a file. </p> <p>This method does not return a value.</p> <dd> <p>A reference to the client-defined context of a font fragment returned from <strong>ReadFileFragment</strong>.</p> </dd> <p> Obtains the total size of a file. </p> <p> Implementing <strong>GetFileSize</strong>() for asynchronously loaded font files may require downloading the complete file contents. Therefore, this method should be used only for operations that either require a complete font file to be loaded (for example, copying a font file) or that need to make decisions based on the value of the file size (for example, validation against a persisted file size). </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains the total size of the file.</p> </dd> <p> Obtains the last modified time of the file. </p> <p>The "last modified time" is used by DirectWrite font selection algorithms to determine whether one font resource is more up to date than another one.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains the last modified time of the file in the format that represents the number of 100-nanosecond intervals since January 1, 1601 ({{UTC}}).</p> </dd> <p> Handles loading font file resources of a particular type from a font file reference key into a font file stream object. </p> <p>The font file loader interface is recommended to be implemented by a singleton object. Note that font file loader implementations must not register themselves with DirectWrite factory inside their constructors and must not unregister themselves in their destructors, because registration and unregistraton operations increment and decrement the object reference count respectively. Instead, registration and unregistration of font file loaders with DirectWrite factory should be performed outside of the font file loader implementation as a separate step.</p> <p> Creates a font file stream object that encapsulates an open file resource. </p> <p>The resource is closed when the last reference to <em>fontFileStream</em> is released. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a font file reference key that uniquely identifies the font file resource within the scope of the font loader being used. The buffer allocated for this key must at least be the size, in bytes, specified by <em> fontFileReferenceKeySize</em>.</p> </dd> <dd> <p>The size of font file reference key, in bytes.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to the newly created <strong>{{IDWriteFontFileStream}}</strong> object.</p> </dd> <p>A built-in implementation of the <strong>{{IDWriteFontFileLoader}}</strong> interface, that operates on local font files and exposes local font file information from the font file reference key. Font file references created using <strong>CreateFontFileReference</strong> use this font file loader.</p> <p>Obtains the length of the absolute file path from the font file reference key.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Font file reference key that uniquely identifies the local font file within the scope of the font loader being used.</p> </dd> <dd> <p>Size of font file reference key in bytes.</p> </dd> <dd> <p>Length of the file path string, not including the terminated <strong>{{NULL}}</strong> character.</p> </dd> <p>Obtains the absolute font file path from the font file reference key.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The font file reference key that uniquely identifies the local font file within the scope of the font loader being used.</p> </dd> <dd> <p>The size of font file reference key in bytes.</p> </dd> <dd> <p>The character array that receives the local file path.</p> </dd> <dd> <p>The length of the file path character array.</p> </dd> <p>Obtains the last write time of the file from the font file reference key.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The font file reference key that uniquely identifies the local font file within the scope of the font loader being used.</p> </dd> <dd> <p>The size of font file reference key in bytes.</p> </dd> <dd> <p>The time of the last font file modification.</p> </dd> <p> Represents a font file. Applications such as font managers or font viewers can call <strong>{{IDWriteFontFile::Analyze}}</strong> to find out if a particular file is a font file, and whether it is a font type that is supported by the font system.</p> <p> Obtains the reference to the reference key of a font file. The returned reference is valid until the font file object is released. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains an address of a reference to the font file reference key. Note that the reference value is only valid until the font file object it is obtained from is released. This parameter is passed uninitialized.</p> </dd> <dd> <p>When this method returns, contains the size of the font file reference key in bytes. This parameter is passed uninitialized.</p> </dd> <p> Obtains the file loader associated with a font file object. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains the address of a reference to the font file loader associated with the font file object.</p> </dd> <p> Analyzes a file and returns whether it represents a font, and whether the font type is supported by the font system. </p> <strong>Important</strong>??Certain font file types are recognized, but not supported by the font system. For example, the font system will recognize a file as a Type 1 font file but will not be able to construct a font face object from it. In such situations, <strong>Analyze</strong> will set <em>isSupportedFontType</em> output parameter to <strong>{{FALSE}}</strong>.? <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p><strong>{{TRUE}}</strong> if the font type is supported by the font system; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <dd> <p>When this method returns, contains a value that indicates the type of the font file. Note that even if <em> isSupportedFontType</em> is <strong>{{FALSE}}</strong>, the <em>fontFileType</em> value may be different from <strong>{{DWRITE_FONT_FILE_TYPE_UNKNOWN}}</strong>.</p> </dd> <dd> <p>When this method returns, contains a value that indicates the type of the font face. If <em>fontFileType</em> is not equal to <strong>{{DWRITE_FONT_FILE_TYPE_UNKNOWN}}</strong>, then that can be constructed from the font file. </p> </dd> <dd> <p>When this method returns, contains the number of font faces contained in the font file.</p> </dd> <p> Represents text rendering settings such as ClearType level, enhanced contrast, and gamma correction for glyph rasterization and filtering.</p><p>An application typically obtains a rendering parameters object by calling the <strong>{{IDWriteFactory::CreateMonitorRenderingParams}}</strong> method.</p> <p>Gets the gamma value used for gamma correction. Valid values must be greater than zero and cannot exceed 256.</p> <p>The gamma value is used for gamma correction, which compensates for the non-linear luminosity response of most monitors.</p> <p>Returns the gamma value used for gamma correction. Valid values must be greater than zero and cannot exceed 256.</p> <p>Gets the enhanced contrast property of the rendering parameters object. Valid values are greater than or equal to zero.</p> <p>Enhanced contrast is the amount to increase the darkness of text, and typically ranges from 0 to 1. Zero means no contrast enhancement.</p> <p>Returns the amount of contrast enhancement. Valid values are greater than or equal to zero.</p> <p>Gets the ClearType level of the rendering parameters object. </p> <p>The ClearType level represents the amount of ClearType ? that is, the degree to which the red, green, and blue subpixels of each pixel are treated differently. Valid values range from zero (meaning no ClearType, which is equivalent to grayscale anti-aliasing) to one (meaning full ClearType)</p> <p>The ClearType level of the rendering parameters object.</p> <p>Gets the pixel geometry of the rendering parameters object.</p> <p> A value that indicates the type of pixel geometry used in the rendering parameters object.</p> <p>Gets the rendering mode of the rendering parameters object.</p> <p>By default, the rendering mode is initialized to {{DWRITE_RENDERING_MODE_DEFAULT}}, which means the rendering mode is determined automatically based on the font and size. To determine the recommended rendering mode to use for a given font and size and rendering parameters object, use the <strong>{{IDWriteFontFace::GetRecommendedRenderingMode}}</strong> method.</p> <p>A value that indicates the rendering mode of the rendering parameters object.</p> <p>Represents an absolute reference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines. </p> <p> Obtains the file format type of a font face. </p> <p>A value that indicates the type of format for the font face (such as Type 1, TrueType, vector, or bitmap).</p> <p> Obtains the font files representing a font face. </p> <p>The <strong>{{IDWriteFontFace::GetFiles}}</strong> method should be called twice. The first time you call <strong>GetFiles</strong><em>fontFiles</em> should be <strong>{{NULL}}</strong>. When the method returns, <em>numberOfFiles</em> receives the number of font files that represent the font face.</p><p>Then, call the method a second time, passing the <em>numberOfFiles</em> value that was output the first call, and a non-null buffer of the correct size to store the <strong>{{IDWriteFontFile}}</strong> references.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>If <em>fontFiles</em> is <strong>{{NULL}}</strong>, receives the number of files representing the font face. Otherwise, the number of font files being requested should be passed. See the Remarks section below for more information.</p> </dd> <dd> <p>When this method returns, contains a reference to a user-provided array that stores references to font files representing the font face. This parameter can be <strong>{{NULL}}</strong> if the user wants only the number of files representing the font face. This {{API}} increments reference count of the font file references returned according to {{COM}} conventions, and the client should release them when finished.</p> </dd> <p> Obtains the index of a font face in the context of its font files. </p> <p>The zero-based index of a font face in cases when the font files contain a collection of font faces. If the font files contain a single face, this value is zero.</p> <p> Obtains the algorithmic style simulation flags of a font face. </p> <p>Font face simulation flags for algorithmic means of making text bold or italic.</p> <p> Determines whether the font is a symbol font. </p> <p>Returns <strong>{{TRUE}}</strong> if the font is a symbol font, otherwise <strong>{{FALSE}}</strong>.</p> <p> Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a font face and are used by applications for layout calculations. </p> <p>This method does not return a value.</p> <dd> <p>When this method returns, a?<strong>{{DWRITE_FONT_METRICS}}</strong> structure that holds metrics (such as ascent, descent, or cap height) for the current font face element. The metrics returned by this function are in font design units.</p> </dd> <p> Obtains the number of glyphs in the font face. </p> <p>The number of glyphs in the font face.</p> <p> Obtains ideal (resolution-independent) glyph metrics in font design units. </p> <p>Design glyph metrics are used for glyph positioning.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> An array of glyph indices for which to compute metrics. The array must contain at least as many elements as specified by <em>glyphCount</em>.</p> </dd> <dd> <p>The number of elements in the <em>glyphIndices</em> array.</p> </dd> <dd> <p>When this method returns, contains an array of {{DWRITE_GLYPH_METRICS}} structures. <em>glyphMetrics</em> must be initialized with an empty buffer that contains at least as many elements as <em>glyphCount</em>. The metrics returned by this function are in font design units.</p> </dd> <dd> <p>Indicates whether the font is being used in a sideways run. This can affect the glyph metrics if the font has oblique simulation because sideways oblique simulation differs from non-sideways oblique simulation</p> </dd> <p> Returns the nominal mapping of {{UCS4}} Unicode code points to glyph indices as defined by the font '{{CMAP}}' table. </p> <p>Note that this mapping is primarily provided for line layout engines built on top of the physical font {{API}}. Because of OpenType glyph substitution and line layout character substitution, the nominal conversion does not always correspond to how a Unicode string will map to glyph indices when rendering using a particular font face. Also, note that Unicode variant selectors provide for alternate mappings for character to glyph. This call will always return the default variant.</p><p> When characters are not present in the font this method returns the index 0, which is the undefined glyph or ".notdef" glyph. If a character isn't in a font, {{IDWriteFont::HasCharacter}} returns false and GetUnicodeRanges doesn't return it in the range.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An array of {{USC4}} code points from which to obtain nominal glyph indices. The array must be allocated and be able to contain the number of elements specified by <em>codePointCount</em>.</p> </dd> <dd> <p>The number of elements in the <em>codePoints</em> array.</p> </dd> <dd> <p>When this method returns, contains a reference to an array of nominal glyph indices filled by this function.</p> </dd> <p> Finds the specified OpenType font table if it exists and returns a reference to it. The function accesses the underlying font data through the <strong>{{IDWriteFontFileStream}}</strong> interface implemented by the font file loader. </p> <p> The context for the same tag may be different for each call, so each one must be held and released separately. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Releases the table obtained earlier from <strong>TryGetFontTable</strong>. </p> <p>This method does not return a value.</p> <p> Computes the outline of a run of glyphs by calling back to the outline sink interface. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The logical size of the font in {{DIP}} units. A {{DIP}} ("device-independent pixel") equals 1/96 inch.</p> </dd> <dd> <p>An array of glyph indices. The glyphs are in logical order and the advance direction depends on the <em>isRightToLeft</em> parameter. The array must be allocated and be able to contain the number of elements specified by <em>glyphCount</em>.</p> </dd> <dd> <p>An optional array of glyph advances in {{DIPs}}. The advance of a glyph is the amount to advance the position (in the direction of the baseline) after drawing the glyph. <em>glyphAdvances</em> contains the number of elements specified by <em>glyphCount</em>.</p> </dd> <dd> <p>An optional array of glyph offsets, each of which specifies the offset along the baseline and offset perpendicular to the baseline of a glyph relative to the current pen position. <em>glyphOffsets</em> contains the number of elements specified by <em>glyphCount</em>.</p> </dd> <dd> <p>The number of glyphs in the run.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, the ascender of the glyph runs alongside the baseline. If <strong>{{FALSE}}</strong>, the glyph ascender runs perpendicular to the baseline. For example, an English alphabet on a vertical baseline would have <em>isSideways</em> set to <strong>{{FALSE}}</strong>.</p> <p>A client can render a vertical run by setting <em>isSideways</em> to <strong>{{TRUE}}</strong> and rotating the resulting geometry 90 degrees to the right using a transform. The <em>isSideways</em> and <em>isRightToLeft</em> parameters cannot both be true.</p> </dd> <dd> <p>The visual order of the glyphs. If this parameter is <strong>{{FALSE}}</strong>, then glyph advances are from left to right. If <strong>{{TRUE}}</strong>, the advance direction is right to left. By default, the advance direction is left to right.</p> </dd> <dd> <p>A reference to the interface that is called back to perform outline drawing operations.</p> </dd> <p> Determines the recommended rendering mode for the font, using the specified size and rendering parameters. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The logical size of the font in {{DIP}} units. A {{DIP}} ("device-independent pixel") equals 1/96 inch.</p> </dd> <dd> <p>The number of physical pixels per {{DIP}}. For example, if the {{DPI}} of the rendering surface is 96, this value is 1.0f. If the {{DPI}} is 120, this value is 120.0f/96.</p> </dd> <dd> <p>The measuring method that will be used for glyphs in the font. Renderer implementations may choose different rendering modes for different measuring methods, for example: </p> <ul> <li>{{DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL}} for <strong>{{DWRITE_MEASURING_MODE_NATURAL}}</strong> </li> <li> {{DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC}} for <strong>{{DWRITE_MEASURING_MODE_GDI_CLASSIC}}</strong> </li> <li> {{DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL}} for <strong>{{DWRITE_MEASURING_MODE_GDI_NATURAL}}</strong> </li> </ul> </dd> <dd> <p>A reference to an object that contains rendering settings such as gamma level, enhanced contrast, and ClearType level. This parameter is necessary in case the rendering parameters object overrides the rendering mode.</p> </dd> <dd> <p>When this method returns, contains a value that indicates the recommended rendering mode to use.</p> </dd> <p>Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a fontface and are used by applications for layout calculations.</p> <p>Standard {{HRESULT}} error code.</p> <dd> <p>The logical size of the font in {{DIP}} units.</p> </dd> <dd> <p>The number of physical pixels per {{DIP}}.</p> </dd> <dd> <p>An optional transform applied to the glyphs and their positions. This transform is applied after the scaling specified by the font size and <em>pixelsPerDip</em>.</p> </dd> <dd> <p>A reference to a <strong>{{DWRITE_FONT_METRIC}}</strong>S structure to fill in. The metrics returned by this function are in font design units.</p> </dd> <p>Obtains glyph metrics in font design units with the return values compatible with what {{GDI}} would produce.</p> <p>Standard <strong>{{HRESULT}}</strong> error code. If any of the input glyph indices are outside of the valid glyph index range for the current font face, <strong>{{E_INVALIDARG}}</strong> will be returned.</p> <dd> <p>The ogical size of the font in {{DIP}} units.</p> </dd> <dd> <p>The number of physical pixels per {{DIP}}.</p> </dd> <dd> <p>An optional transform applied to the glyphs and their positions. This transform is applied after the scaling specified by the font size and <em>pixelsPerDip</em>.</p> </dd> <dd> <p>When set to <strong>{{FALSE}}</strong>, the metrics are the same as the metrics of {{GDI}} aliased text. When set to <strong>{{TRUE}}</strong>, the metrics are the same as the metrics of text measured by {{GDI}} using a font created with <strong>{{CLEARTYPE_NATURAL_QUALITY}}</strong>.</p> </dd> <dd> <p>An array of glyph indices for which to compute the metrics.</p> </dd> <dd> <p>The number of elements in the <em>glyphIndices</em> array.</p> </dd> <dd> <p>An array of <strong>{{DWRITE_GLYPH_METRICS}}</strong> structures filled by this function. The metrics are in font design units.</p> </dd> <dd> <p>A {{BOOL}} value that indicates whether the font is being used in a sideways run. This can affect the glyph metrics if the font has oblique simulation because sideways oblique simulation differs from non-sideways oblique simulation.</p> </dd> <p>Used to create all subsequent DirectWrite objects. This interface is the root factory interface for all DirectWrite objects.</p> <p> Create an <strong>{{IDWriteFactory}}</strong> object by using the <strong>{{DWriteCreateFactory}}</strong> function. </p><pre> if ({{SUCCEEDED}}(hr)) { hr = {{DWriteCreateFactory}}( {{DWRITE_FACTORY_TYPE_SHARED}}, __uuidof({{IDWriteFactory}}), reinterpret_cast&lt;{{IUnknown}}**&gt;(&amp;pDWriteFactory_) ); } </pre><p>An <strong>{{IDWriteFactory}}</strong> object holds state information, such as font loader registration and cached font data. This state can be shared or isolated. Shared is recommended for most applications because it saves memory. However, isolated can be useful in situations where you want to have a separate state for some objects.</p> <p> Gets an object which represents the set of installed fonts. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains the address of a reference to the system font collection object, or <strong>{{NULL}}</strong> in case of failure.</p> </dd> <dd> <p>If this parameter is nonzero, the function performs an immediate check for changes to the set of installed fonts. If this parameter is <strong>{{FALSE}}</strong>, the function will still detect changes if the font cache service is running, but there may be some latency. For example, an application might specify <strong>{{TRUE}}</strong> if it has itself just installed a font and wants to be sure the font collection contains that font.</p> </dd> <p> Creates a font collection using a custom font collection loader. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An application-defined font collection loader, which must have been previously registered using <strong>RegisterFontCollectionLoader</strong>.</p> </dd> <dd> <p>The key used by the loader to identify a collection of font files. The buffer allocated for this key should at least be the size of <em>collectionKeySize</em>.</p> </dd> <dd> <p>The size, in bytes, of the collection key.</p> </dd> <dd> <p>Contains an address of a reference to the system font collection object if the method succeeds, or <strong>{{NULL}}</strong> in case of failure.</p> </dd> <p>Registers a custom font collection loader with the factory object. </p> <p>This function registers a font collection loader with DirectWrite. The font collection loader interface, which should be implemented by a singleton object, handles enumerating font files in a font collection given a particular type of key. A given instance can only be registered once. Succeeding attempts will return an error, indicating that it has already been registered. Note that font file loader implementations must not register themselves with DirectWrite inside their constructors, and must not unregister themselves inside their destructors, because registration and unregistraton operations increment and decrement the object reference count respectively. Instead, registration and unregistration with DirectWrite of font file loaders should be performed outside of the font file loader implementation.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to a <strong>{{IDWriteFontCollectionLoader}}</strong> object to be registered.</p> </dd> <p> Unregisters a custom font collection loader that was previously registered using <strong>RegisterFontCollectionLoader</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Creates a font file reference object from a local font file. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An array of characters that contains the absolute file path for the font file. Subsequent operations on the constructed object may fail if the user provided <em>filePath</em> doesn't correspond to a valid file on the disk.</p> </dd> <dd> <p>The last modified time of the input file path. If the parameter is omitted, the function will access the font file to obtain its last write time. You should specify this value to avoid extra disk access. Subsequent operations on the constructed object may fail if the user provided <em>lastWriteTime</em> doesn't match the file on the disk.</p> </dd> <dd> <p>When this method returns, contains an address of a reference to the newly created font file reference object, or <strong>{{NULL}}</strong> in case of failure.</p> </dd> <p> Creates a reference to an application-specific font file resource. </p> <p> This function is provided for cases when an application or a document needs to use a private font without having to install it on the system. <em>fontFileReferenceKey</em> has to be unique only in the scope of the <em>fontFileLoader</em> used in this call. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A font file reference key that uniquely identifies the font file resource during the lifetime of <em>fontFileLoader</em>.</p> </dd> <dd> <p>The size of the font file reference key in bytes.</p> </dd> <dd> <p>The font file loader that will be used by the font system to load data from the file identified by <em>fontFileReferenceKey</em>.</p> </dd> <dd> <p>Contains an address of a reference to the newly created font file object when this method succeeds, or <strong>{{NULL}}</strong> in case of failure.</p> </dd> <p> Creates an object that represents a font face. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A value that indicates the type of file format of the font face.</p> </dd> <dd> <p>The number of font files, in element count, required to represent the font face.</p> </dd> <dd> <p>A font file object representing the font face. Because <strong>{{IDWriteFontFace}}</strong> maintains its own references to the input font file objects, you may release them after this call.</p> </dd> <dd> <p>The zero-based index of a font face, in cases when the font files contain a collection of font faces. If the font files contain a single face, this value should be zero.</p> </dd> <dd> <p>A value that indicates which, if any, font face simulation flags for algorithmic means of making text bold or italic are applied to the current font face.</p> </dd> <dd> <p>When this method returns, contains an address of a reference to the newly created font face object, or <strong>{{NULL}}</strong> in case of failure.</p> </dd> <p> Creates a rendering parameters object with default settings for the primary monitor. Different monitors may have different rendering parameters, for more information see the How to Add Support for Multiple Monitors topic.</p> <p>Standard {{HRESULT}} error code.</p> <p> Creates a rendering parameters object with default settings for the specified monitor. In most cases, this is the preferred way to create a rendering parameters object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A handle for the specified monitor.</p> </dd> <dd> <p>When this method returns, contains an address of a reference to the rendering parameters object created by this method.</p> </dd> <p>Creates a rendering parameters object with the specified properties.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The gamma level to be set for the new rendering parameters object.</p> </dd> <dd> <p>The enhanced contrast level to be set for the new rendering parameters object.</p> </dd> <dd> <p>The ClearType level to be set for the new rendering parameters object.</p> </dd> <dd> <p>Represents the internal structure of a device pixel (that is, the physical arrangement of red, green, and blue color components) that is assumed for purposes of rendering text.</p> </dd> <dd> <p>A value that represents the method (for example, ClearType natural quality) for rendering glyphs.</p> </dd> <dd> <p>When this method returns, contains an address of a reference to the newly created rendering parameters object.</p> </dd> <p> Registers a font file loader with DirectWrite. </p> <p> This function registers a font file loader with DirectWrite. The font file loader interface, which should be implemented by a singleton object, handles loading font file resources of a particular type from a key. A given instance can only be registered once. Succeeding attempts will return an error, indicating that it has already been registered. Note that font file loader implementations must not register themselves with DirectWrite inside their constructors, and must not unregister themselves inside their destructors, because registration and unregistraton operations increment and decrement the object reference count respectively. Instead, registration and unregistration with DirectWrite of font file loaders should be performed outside of the font file loader implementation. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to a <strong>{{IDWriteFontFileLoader}}</strong> object for a particular file resource type.</p> </dd> <p> Unregisters a font file loader that was previously registered with the DirectWrite font system using <strong>RegisterFontFileLoader</strong>. </p> <p> This function unregisters font file loader callbacks with the DirectWrite font system. You should implement the font file loader interface by a singleton object. Note that font file loader implementations must not register themselves with DirectWrite inside their constructors and must not unregister themselves in their destructors, because registration and unregistraton operations increment and decrement the object reference count respectively. Instead, registration and unregistration of font file loaders with DirectWrite should be performed outside of the font file loader implementation. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Creates a text format object used for text layout. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An array of characters that contains the name of the font family</p> </dd> <dd> <p>A reference to a font collection object. When this is <strong>{{NULL}}</strong>, indicates the system font collection.</p> </dd> <dd> <p>A value that indicates the font weight for the text object created by this method.</p> </dd> <dd> <p>A value that indicates the font style for the text object created by this method.</p> </dd> <dd> <p>A value that indicates the font stretch for the text object created by this method.</p> </dd> <dd> <p>The logical size of the font in {{DIP}} ("device-independent pixel") units. A {{DIP}} equals 1/96 inch.</p> </dd> <dd> <p>An array of characters that contains the locale name.</p> </dd> <dd> <p>When this method returns, contains an address of a reference to a newly created text format object, or <strong>{{NULL}}</strong> in case of failure.</p> </dd> <p> Creates a typography object for use in a text layout. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains the address of a reference to a newly created typography object, or <strong>{{NULL}}</strong> in case of failure.</p> </dd> <p> Creates an object that is used for interoperability with {{GDI}}. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains an address of a reference to a {{GDI}} interop object if successful, or <strong>{{NULL}}</strong> in case of failure.</p> </dd> <p> Takes a string, text format, and associated constraints, and produces an object that represents the fully analyzed and formatted result. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An array of characters that contains the string to create a new <strong>{{IDWriteTextLayout}}</strong> object from. This array must be of length <em>stringLength</em> and can contain embedded <strong>{{NULL}}</strong> characters.</p> </dd> <dd> <p>The number of characters in the string.</p> </dd> <dd> <p>A reference to an object that indicates the format to apply to the string.</p> </dd> <dd> <p>The width of the layout box.</p> </dd> <dd> <p>The height of the layout box.</p> </dd> <dd> <p>When this method returns, contains an address of a reference to the resultant text layout object.</p> </dd> <p> Takes a string, format, and associated constraints, and produces an object representing the result, formatted for a particular display resolution and measuring mode. </p> <p>The resulting text layout should only be used for the intended resolution, and for cases where text scalability is desired <strong>CreateTextLayout</strong> should be used instead.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An array of characters that contains the string to create a new <strong>{{IDWriteTextLayout}}</strong> object from. This array must be of length <em>stringLength</em> and can contain embedded <strong>{{NULL}}</strong> characters.</p> </dd> <dd> <p>The length of the string, in character count.</p> </dd> <dd> <p>The text formatting object to apply to the string.</p> </dd> <dd> <p>The width of the layout box.</p> </dd> <dd> <p>The height of the layout box.</p> </dd> <dd> <p>The number of physical pixels per {{DIP}} (device independent pixel). For example, if rendering onto a 96 {{DPI}} device <em>pixelsPerDip</em> is 1. If rendering onto a 120 {{DPI}} device <em>pixelsPerDip</em> is 1.25 (120/96).</p> </dd> <dd> <p>An optional transform applied to the glyphs and their positions. This transform is applied after the scaling specifies the font size and pixels per {{DIP}}.</p> </dd> <dd> <p> Instructs the text layout to use the same metrics as {{GDI}} bi-level text when set to <strong>{{FALSE}}</strong>. When set to <strong>{{TRUE}}</strong>, instructs the text layout to use the same metrics as text measured by {{GDI}} using a font created with <strong>{{CLEARTYPE_NATURAL_QUALITY}}</strong>. </p> </dd> <dd> <p>When this method returns, contains an address to the reference of the resultant text layout object.</p> </dd> <p> Creates an inline object for trimming, using an ellipsis as the omission sign. </p> <p>The ellipsis will be created using the current settings of the format, including base font, style, and any effects. Alternate omission signs can be created by the application by implementing <strong>{{IDWriteInlineObject}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A text format object, created with <strong>CreateTextFormat</strong>, used for text layout.</p> </dd> <dd> <p>When this method returns, contains an address of a reference to the omission (that is, ellipsis trimming) sign created by this method.</p> </dd> <p> Returns an interface for performing text analysis. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains an address of a reference to the newly created text analyzer object.</p> </dd> <p> Creates a number substitution object using a locale name, substitution method, and an indicator whether to ignore user overrides (use {{NLS}} defaults for the given culture instead). </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A value that specifies how to apply number substitution on digits and related punctuation.</p> </dd> <dd> <p>The name of the locale to be used in the <em>numberSubstitution</em> object.</p> </dd> <dd> <p>A Boolean flag that indicates whether to ignore user overrides.</p> </dd> <dd> <p>When this method returns, contains an address to a reference to the number substitution object created by this method.</p> </dd> <p>Specifies the mode used by a <strong>WriteBufferImmediate</strong> operation.</p> <dd> <p>The write operation behaves the same as normal copy-write operations.</p> </dd> <dd> <p>The write operation is guaranteed to occur after all preceding commands in the command stream have started, including previous <strong>WriteBufferImmediate</strong> operations.</p> </dd> <dd> <p>The write operation is deferred until all previous commands in the command stream have completed through the {{GPU}} pipeline, including previous <strong>WriteBufferImmediate</strong> operations. Write operations that specify <strong>{{D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_OUT}}</strong> don't block subsequent operations from starting. If there are no previous operations in the command stream, then the write operation behaves as if <strong>{{D3D12_WRITEBUFFERIMMEDIATE_MODE_MARKER_IN}}</strong> was specified.</p> </dd> <p> Creates a glyph run analysis object, which encapsulates information used to render a glyph run. </p> <p>The glyph run analysis object contains the results of analyzing the glyph run, including the positions of all the glyphs and references to all of the rasterized glyphs in the font cache. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A structure that contains the properties of the glyph run (font face, advances, and so on).</p> </dd> <dd> <p>Number of physical pixels per {{DIP}} (device independent pixel). For example, if rendering onto a 96 {{DPI}} bitmap then <em>pixelsPerDip</em> is 1. If rendering onto a 120 {{DPI}} bitmap then <em>pixelsPerDip</em> is 1.25.</p> </dd> <dd> <p>Optional transform applied to the glyphs and their positions. This transform is applied after the scaling specified the <em>emSize</em> and <em>pixelsPerDip</em>.</p> </dd> <dd> <p>A value that specifies the rendering mode, which must be one of the raster rendering modes (that is, not default and not outline).</p> </dd> <dd> <p>Specifies the measuring mode to use with glyphs.</p> </dd> <dd> <p>The horizontal position (X-coordinate) of the baseline origin, in {{DIPs}}.</p> </dd> <dd> <p>Vertical position (Y-coordinate) of the baseline origin, in {{DIPs}}.</p> </dd> <dd> <p>When this method returns, contains an address of a reference to the newly created glyph run analysis object.</p> </dd> <p> Advances to the next font file in the collection. When it is first created, the enumerator is positioned before the first element of the collection and the first call to <strong>MoveNext</strong> advances to the first file. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When the method returns, contains the value <strong>{{TRUE}}</strong> if the enumerator advances to a file; otherwise, <strong>{{FALSE}}</strong> if the enumerator advances past the last file in the collection.</p> </dd> <p> Advances to the next font file in the collection. When it is first created, the enumerator is positioned before the first element of the collection and the first call to <strong>MoveNext</strong> advances to the first file. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When the method returns, contains the value <strong>{{TRUE}}</strong> if the enumerator advances to a file; otherwise, <strong>{{FALSE}}</strong> if the enumerator advances past the last file in the collection.</p> </dd> <p> Gets a reference to the current font file. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, the address of a reference to the newly created <strong>{{IDWriteFontFile}}</strong> object.</p> </dd> <p> Used to construct a collection of fonts given a particular type of key. </p> <p>The font collection loader interface is recommended to be implemented by a singleton object. Note that font collection loader implementations must not register themselves with DirectWrite factory inside their constructors and must not unregister themselves in their destructors, because registration and unregistraton operations increment and decrement the object reference count respectively. Instead, registration and unregistration of font file loaders with DirectWrite factory should be performed outside of the font file loader implementation as a separate step.</p> <p> Creates a font file enumerator object that encapsulates a collection of font files. The font system calls back to this interface to create a font collection. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to the <strong>{{IDWriteFactory}}</strong> object that was used to create the current font collection.</p> </dd> <dd> <p>A font collection key that uniquely identifies the collection of font files within the scope of the font collection loader being used. The buffer allocated for this key must be at least the size, in bytes, specified by <em>collectionKeySize</em>.</p> </dd> <dd> <p>The size of the font collection key, in bytes.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to the newly created font file enumerator.</p> </dd> <p> Represents a collection of strings indexed by locale name.</p> <p>The set of strings represented by an <strong>{{IDWriteLocalizedStrings}}</strong> are indexed by a zero based <em>{{UINT32}}</em> number that maps to a locale. The numeric index for a specific locale is retreived by using the <strong>FindLocaleName</strong> method.</p><p>A common use for the <strong>{{IDWriteLocalizedStrings}}</strong> interface is to hold a list of localized font family names created by using the <strong>{{IDWriteFontFamily::GetFamilyNames}}</strong> method. The following example shows how to get the family name for the "en-us" locale.</p><pre>{{IDWriteLocalizedStrings}}* pFamilyNames = {{NULL}}; // Get a list of localized strings for the family name. if ({{SUCCEEDED}}(hr)) { hr = pFontFamily-&gt;GetFamilyNames(&amp;pFamilyNames); } {{UINT32}} index = 0; {{BOOL}} exists = false; wchar_t localeName[{{LOCALE_NAME_MAX_LENGTH}}]; if ({{SUCCEEDED}}(hr)) { // Get the default locale for this user. int defaultLocaleSuccess = GetUserDefaultLocaleName(localeName, {{LOCALE_NAME_MAX_LENGTH}}); // If the default locale is returned, find that locale name, otherwise use "en-us". if (defaultLocaleSuccess) { hr = pFamilyNames-&gt;FindLocaleName(localeName, &amp;index, &amp;exists); } if ({{SUCCEEDED}}(hr) &amp;&amp; !exists) // if the above find did not find a match, retry with {{US}} English { hr = pFamilyNames-&gt;FindLocaleName(L"en-us", &amp;index, &amp;exists); } } // If the specified locale doesn't exist, select the first on the list. if (!exists) index = 0; {{UINT32}} length = 0; // Get the string length. if ({{SUCCEEDED}}(hr)) { hr = pFamilyNames-&gt;GetStringLength(index, &amp;length); } // Allocate a string big enough to hold the name. wchar_t* name = new (std::nothrow) wchar_t[length+1]; if (name == {{NULL}}) { hr = {{E_OUTOFMEMORY}}; } // Get the family name. if ({{SUCCEEDED}}(hr)) { hr = pFamilyNames-&gt;GetString(index, name, length+1); } </pre> <p> Gets the number of language/string pairs. </p> <p>The number of language/string pairs.</p> <p> Gets the zero-based index of the locale name/string pair with the specified locale name. </p> <p>Note that if the locale name does not exist, the return value is a success and the <em>exists</em> parameter is <strong>{{FALSE}}</strong>. If you are getting the font family name for a font and the specified locale name does not exist, one option is to set the index to 0 as shown below. There is always at least one locale for a font family.</p><pre>{{UINT32}} index = 0; {{BOOL}} exists = false; wchar_t localeName[{{LOCALE_NAME_MAX_LENGTH}}]; if ({{SUCCEEDED}}(hr)) { // Get the default locale for this user. int defaultLocaleSuccess = GetUserDefaultLocaleName(localeName, {{LOCALE_NAME_MAX_LENGTH}}); // If the default locale is returned, find that locale name, otherwise use "en-us". if (defaultLocaleSuccess) { hr = pFamilyNames-&gt;FindLocaleName(localeName, &amp;index, &amp;exists); } if ({{SUCCEEDED}}(hr) &amp;&amp; !exists) // if the above find did not find a match, retry with {{US}} English { hr = pFamilyNames-&gt;FindLocaleName(L"en-us", &amp;index, &amp;exists); } } // If the specified locale doesn't exist, select the first on the list. if (!exists) index = 0; </pre> <p>If the specified locale name does not exist, the return value is <strong>{{S_OK}}</strong>, but <em>index</em> is <strong>{{UINT_MAX}}</strong> and <em>exists</em> is <strong>{{FALSE}}</strong>. </p> <dd> <p>A null-terminated array of characters containing the locale name to look for.</p> </dd> <dd> <p>The zero-based index of the locale name/string pair. This method initializes <em>index</em> to <strong>{{UINT_MAX}}</strong>.</p> </dd> <dd> <p>When this method returns, contains <strong>{{TRUE}}</strong> if the locale name exists; otherwise, <strong>{{FALSE}}</strong>. This method initializes <em>exists</em> to <strong>{{FALSE}}</strong>.</p> </dd> <p> Gets the length in characters (not including the null terminator) of the locale name with the specified index. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Zero-based index of the locale name to be retrieved.</p> </dd> <dd> <p>When this method returns, contains the length in characters of the locale name, not including the null terminator.</p> </dd> <p> Copies the locale name with the specified index to the specified array. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Zero-based index of the locale name to be retrieved.</p> </dd> <dd> <p>When this method returns, contains a character array, which is null-terminated, that receives the locale name from the language/string pair. The buffer allocated for this array must be at least the size of <em>size</em>, in element count.</p> </dd> <dd> <p>The size of the array in characters. The size must include space for the terminating null character.</p> </dd> <p> Gets the length in characters (not including the null terminator) of the string with the specified index. </p> <p>Use <strong>GetStringLength</strong> to get the string length before calling the <strong>{{IDWriteLocalizedStrings::GetString}}</strong> method, as shown in the following code.</p><pre>{{UINT32}} length = 0; // Get the string length. if ({{SUCCEEDED}}(hr)) { hr = pFamilyNames-&gt;GetStringLength(index, &amp;length); } // Allocate a string big enough to hold the name. wchar_t* name = new (std::nothrow) wchar_t[length+1]; if (name == {{NULL}}) { hr = {{E_OUTOFMEMORY}}; } // Get the family name. if ({{SUCCEEDED}}(hr)) { hr = pFamilyNames-&gt;GetString(index, name, length+1); } </pre> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A zero-based index of the language/string pair.</p> </dd> <dd> <p>The length in characters of the string, not including the null terminator, from the language/string pair.</p> </dd> <p> Copies the string with the specified index to the specified array. </p> <p>The string returned must be allocated by the caller. You can get the size of the string by using the <strong>GetStringLength</strong> method prior to calling <strong>GetString</strong>, as shown in the following example.</p><pre>{{UINT32}} length = 0; // Get the string length. if ({{SUCCEEDED}}(hr)) { hr = pFamilyNames-&gt;GetStringLength(index, &amp;length); } // Allocate a string big enough to hold the name. wchar_t* name = new (std::nothrow) wchar_t[length+1]; if (name == {{NULL}}) { hr = {{E_OUTOFMEMORY}}; } // Get the family name. if ({{SUCCEEDED}}(hr)) { hr = pFamilyNames-&gt;GetString(index, name, length+1); } </pre> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the language/string pair to be examined.</p> </dd> <dd> <p>The null terminated array of characters that receives the string from the language/string pair. The buffer allocated for this array should be at least the size of <em>size</em>. <strong>GetStringLength</strong> can be used to get the size of the array before using this method.</p> </dd> <dd> <p>The size of the array in characters. The size must include space for the terminating null character. <strong>GetStringLength</strong> can be used to get the size of the array before using this method.</p> </dd> <p>Represents a family of related fonts.</p> <p>A font family is a set of fonts that share the same family name, such as "Times New Roman", but that differ in features. These feature differences include style, such as italic, and weight, such as bold. The following illustration shows examples of fonts that are members of the "Times New Roman" font family.</p><p>An <strong>{{IDWriteFontFamily}}</strong> object can be retrieved from a font collection using the <strong>{{IDWriteFontCollection::GetFontFamily}}</strong> method shown in the following example. <strong>GetFontFamily</strong> takes a <strong>{{UINT32}}</strong> index and returns the font family for the font at that index.</p><pre>{{IDWriteFontFamily}}* pFontFamily = {{NULL}}; // Get the font family. if ({{SUCCEEDED}}(hr)) { hr = pFontCollection-&gt;GetFontFamily(i, &amp;pFontFamily); } </pre><p>The font family name is used to specify the font family for text layout and text format objects. You can get a list of localized font family names from an <strong>{{IDWriteFontFamily}}</strong> object in the form of an <strong>{{IDWriteLocalizedStrings}}</strong> object by using the <strong>{{IDWriteFontFamily::GetFamilyNames}}</strong> method, as shown in the following code.</p><pre>{{IDWriteLocalizedStrings}}* pFamilyNames = {{NULL}}; // Get a list of localized strings for the family name. if ({{SUCCEEDED}}(hr)) { hr = pFontFamily-&gt;GetFamilyNames(&amp;pFamilyNames); } </pre> <p> Creates a localized strings object that contains the family names for the font family, indexed by locale name. </p> <p> The following code example shows how to get the font family name from a <strong>{{IDWriteFontFamily}}</strong> object.</p><pre>{{IDWriteLocalizedStrings}}* pFamilyNames = {{NULL}}; // Get a list of localized strings for the family name. if ({{SUCCEEDED}}(hr)) { hr = pFontFamily-&gt;GetFamilyNames(&amp;pFamilyNames); } {{UINT32}} index = 0; {{BOOL}} exists = false; wchar_t localeName[{{LOCALE_NAME_MAX_LENGTH}}]; if ({{SUCCEEDED}}(hr)) { // Get the default locale for this user. int defaultLocaleSuccess = GetUserDefaultLocaleName(localeName, {{LOCALE_NAME_MAX_LENGTH}}); // If the default locale is returned, find that locale name, otherwise use "en-us". if (defaultLocaleSuccess) { hr = pFamilyNames-&gt;FindLocaleName(localeName, &amp;index, &amp;exists); } if ({{SUCCEEDED}}(hr) &amp;&amp; !exists) // if the above find did not find a match, retry with {{US}} English { hr = pFamilyNames-&gt;FindLocaleName(L"en-us", &amp;index, &amp;exists); } } // If the specified locale doesn't exist, select the first on the list. if (!exists) index = 0; {{UINT32}} length = 0; // Get the string length. if ({{SUCCEEDED}}(hr)) { hr = pFamilyNames-&gt;GetStringLength(index, &amp;length); } // Allocate a string big enough to hold the name. wchar_t* name = new (std::nothrow) wchar_t[length+1]; if (name == {{NULL}}) { hr = {{E_OUTOFMEMORY}}; } // Get the family name. if ({{SUCCEEDED}}(hr)) { hr = pFamilyNames-&gt;GetString(index, name, length+1); } </pre> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The address of a reference to the newly created <strong>{{IDWriteLocalizedStrings}}</strong> object.</p> </dd> <p> Gets the font that best matches the specified properties. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A value that is used to match a requested font weight.</p> </dd> <dd> <p>A value that is used to match a requested font stretch.</p> </dd> <dd> <p>A value that is used to match a requested font style.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to the newly created <strong>{{IDWriteFont}}</strong> object.</p> </dd> <p> Gets a list of fonts in the font family ranked in order of how well they match the specified properties. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A value that is used to match a requested font weight.</p> </dd> <dd> <p>A value that is used to match a requested font stretch.</p> </dd> <dd> <p>A value that is used to match a requested font style.</p> </dd> <dd> <p>An address of a reference to the newly created <strong>{{IDWriteFontList}}</strong> object.</p> </dd> <p> Represents a physical font in a font collection. This interface is used to create font faces from physical fonts, or to retrieve information such as font face metrics or face names from existing font faces.</p> <p> Gets the font family to which the specified font belongs. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains an address of a reference to the font family object to which the specified font belongs.</p> </dd> <p> Gets the weight, or stroke thickness, of the specified font. </p> <p>A value that indicates the weight for the specified font.</p> <p> Gets the stretch, or width, of the specified font. </p> <p>A value that indicates the type of stretch, or width, applied to the specified font.</p> <p> Gets the style, or slope, of the specified font. </p> <p>A value that indicates the type of style, or slope, of the specified font.</p> <p> Determines whether the font is a symbol font. </p> <p><strong>{{TRUE}}</strong> if the font is a symbol font; otherwise, <strong>{{FALSE}}</strong>.</p> <p> Gets a localized strings collection containing the face names for the font (such as Regular or Bold), indexed by locale name. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains an address to a reference to the newly created localized strings object.</p> </dd> <p> Gets a localized strings collection containing the specified informational strings, indexed by locale name. </p> <p> If the font does not contain the string specified by <em>informationalStringID</em>, the return value is <strong>{{S_OK}}</strong> but <em>informationalStrings</em> receives a <strong>{{NULL}}</strong> reference and <em>exists</em> receives the value <strong>{{FALSE}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A value that identifies the informational string to get. For example, <strong>{{DWRITE_INFORMATIONAL_STRING_DESCRIPTION}}</strong> specifies a string that contains a description of the font. </p> </dd> <dd> <p>When this method returns, contains an address of a reference to the newly created localized strings object.</p> </dd> <dd> <p>When this method returns, <strong>{{TRUE}}</strong> if the font contains the specified string {{ID}}; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p> Gets a value that indicates what simulations are applied to the specified font. </p> <p> A value that indicates one or more of the types of simulations (none, bold, or oblique) applied to the specified font.</p> <p> Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a font face and are used by applications for layout calculations. </p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains a structure that has font metrics for the current font face. The metrics returned by this function are in font design units.</p> </dd> <p> Determines whether the font supports a specified character. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A Unicode ({{UCS}}-4) character value for the method to inspect.</p> </dd> <dd> <p>When this method returns, <strong>{{TRUE}}</strong> if the font supports the specified character; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p> Creates a font face object for the font. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains an address of a reference to the newly created font face object.</p> </dd> <p> An object that encapsulates a set of fonts, such as the set of fonts installed on the system, or the set of fonts in a particular directory. The font collection {{API}} can be used to discover what font families and fonts are available, and to obtain some metadata about the fonts.</p> <p>The <strong>{{IDWriteFactory::GetSystemFontCollection}}</strong> method will give you an <strong>{{IDWriteFontCollection}}</strong> object, which encapsulates the set of fonts installed on the system, as shown in the following code example.</p><pre>{{IDWriteFontCollection}}* pFontCollection = {{NULL}}; // Get the system font collection. if ({{SUCCEEDED}}(hr)) { hr = pDWriteFactory-&gt;GetSystemFontCollection(&amp;pFontCollection); } </pre><p> <strong>{{IDWriteTextFormat}}</strong> and <strong>{{IDWriteTextLayout}}</strong> both have a <strong>GetFontCollection</strong> method that returns the font collection being used by the object. These interfaces use the system font collection by default, but can use a custom font collection instead.</p><p>To determine what fonts are available on the system, get a reference to the system font collection. You can then use the <strong>{{IDWriteFontCollection::GetFontFamilyCount}}</strong> method to determine the number of fonts and loop through the list. The following example enumerates the fonts in the system font collection, and prints the font family names to the console.</p><pre> #include &lt;dwrite.h&gt; #include &lt;string.h&gt; #include &lt;stdio.h&gt; #include &lt;new&gt; // SafeRelease inline function. template &lt;class T&gt; inline void SafeRelease(T **ppT) { if (*ppT) { (*ppT)-&gt;Release(); *ppT = {{NULL}}; } } void wmain() { {{IDWriteFactory}}* pDWriteFactory = {{NULL}}; {{HRESULT}} hr = {{DWriteCreateFactory}}( {{DWRITE_FACTORY_TYPE_SHARED}}, __uuidof({{IDWriteFactory}}), reinterpret_cast&lt;{{IUnknown}}**&gt;(&amp;pDWriteFactory) ); {{IDWriteFontCollection}}* pFontCollection = {{NULL}}; // Get the system font collection. if ({{SUCCEEDED}}(hr)) { hr = pDWriteFactory-&gt;GetSystemFontCollection(&amp;pFontCollection); } {{UINT32}} familyCount = 0; // Get the number of font families in the collection. if ({{SUCCEEDED}}(hr)) { familyCount = pFontCollection-&gt;GetFontFamilyCount(); } for ({{UINT32}} i = 0; i &lt; familyCount; ++i) { {{IDWriteFontFamily}}* pFontFamily = {{NULL}}; // Get the font family. if ({{SUCCEEDED}}(hr)) { hr = pFontCollection-&gt;GetFontFamily(i, &amp;pFontFamily); } {{IDWriteLocalizedStrings}}* pFamilyNames = {{NULL}}; // Get a list of localized strings for the family name. if ({{SUCCEEDED}}(hr)) { hr = pFontFamily-&gt;GetFamilyNames(&amp;pFamilyNames); } {{UINT32}} index = 0; {{BOOL}} exists = false; wchar_t localeName[{{LOCALE_NAME_MAX_LENGTH}}]; if ({{SUCCEEDED}}(hr)) { // Get the default locale for this user. int defaultLocaleSuccess = GetUserDefaultLocaleName(localeName, {{LOCALE_NAME_MAX_LENGTH}}); // If the default locale is returned, find that locale name, otherwise use "en-us". if (defaultLocaleSuccess) { hr = pFamilyNames-&gt;FindLocaleName(localeName, &amp;index, &amp;exists); } if ({{SUCCEEDED}}(hr) &amp;&amp; !exists) // if the above find did not find a match, retry with {{US}} English { hr = pFamilyNames-&gt;FindLocaleName(L"en-us", &amp;index, &amp;exists); } } // If the specified locale doesn't exist, select the first on the list. if (!exists) index = 0; {{UINT32}} length = 0; // Get the string length. if ({{SUCCEEDED}}(hr)) { hr = pFamilyNames-&gt;GetStringLength(index, &amp;length); } // Allocate a string big enough to hold the name. wchar_t* name = new (std::nothrow) wchar_t[length+1]; if (name == {{NULL}}) { hr = {{E_OUTOFMEMORY}}; } // Get the family name. if ({{SUCCEEDED}}(hr)) { hr = pFamilyNames-&gt;GetString(index, name, length+1); } if ({{SUCCEEDED}}(hr)) { // Print out the family name. wprintf(L"%s\n", name); } SafeRelease(&amp;pFontFamily); SafeRelease(&amp;pFamilyNames); delete [] name; } SafeRelease(&amp;pFontCollection); SafeRelease(&amp;pDWriteFactory); } </pre> <p> Gets the number of font families in the collection. </p> <p>The number of font families in the collection.</p> <p> Creates a font family object given a zero-based font family index. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Zero-based index of the font family.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to the newly created font family object.</p> </dd> <p> Finds the font family with the specified family name. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An array of characters, which is null-terminated, containing the name of the font family. The name is not case-sensitive but must otherwise exactly match a family name in the collection.</p> </dd> <dd> <p>When this method returns, contains the zero-based index of the matching font family if the family name was found; otherwise, <strong>{{UINT_MAX}}</strong>.</p> </dd> <dd> <p>When this method returns, <strong>{{TRUE}}</strong> if the family name exists; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p> Gets the font object that corresponds to the same physical font as the specified font face object. The specified physical font must belong to the font collection. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A font face object that specifies the physical font.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to the newly created font object if successful; otherwise, <strong>{{NULL}}</strong>.</p> </dd> <p> Gets the number of fonts in the font list. </p> <p>The number of fonts in the font list.</p> <p> Gets the font collection that contains the fonts in the font list.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains the address of a reference to the current <strong>{{IDWriteFontCollection}}</strong> object.</p> </dd> <p> Gets the number of fonts in the font list. </p> <p>The number of fonts in the font list.</p> <p> Gets a font given its zero-based index. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Zero-based index of the font in the font list.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to the newly created <strong>{{IDWriteFont}}</strong> object.</p> </dd> <p> Represents a font typography setting.</p> <p> Adds an OpenType font feature. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A structure that contains the OpenType name identifier and the execution parameter for the font feature being added.</p> </dd> <p> Gets the number of OpenType font features for the current font. </p> <p>A single run of text can be associated with more than one typographic feature. The <strong>{{IDWriteTypography}}</strong> object holds a list of these font features.</p> <p>The number of font features for the current text format.</p> <p> Gets the font feature at the specified index. </p> <p>A single run of text can be associated with more than one typographic feature. The <strong>{{IDWriteTypography}}</strong> object holds a list of these font features.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the font feature to retrieve.</p> </dd> <dd> <p>When this method returns, contains the font feature which is at the specified index.</p> </dd> <p> Wraps an application-defined inline graphic, allowing {{DWrite}} to query metrics as if the graphic were a glyph inline with the text.</p> <p> The application implemented rendering callback (<strong>{{IDWriteTextRenderer::DrawInlineObject}}</strong>) can use this to draw the inline object without needing to cast or query the object type. The text layout does not call this method directly. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> <strong>{{IDWriteTextLayout}}</strong> calls this callback function to get the measurement of the inline object. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> <strong>{{IDWriteTextLayout}}</strong> calls this callback function to get the visible extents (in {{DIPs}}) of the inline object. In the case of a simple bitmap, with no padding and no overhang, all the overhangs will simply be zeroes.</p><p>The overhangs should be returned relative to the reported size of the object (see <strong>{{DWRITE_INLINE_OBJECT_METRICS}}</strong>), and should not be baseline adjusted.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Layout uses this to determine the line-breaking behavior of the inline object among the text. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains a value which indicates the line-breaking condition between the object and the content immediately preceding it.</p> </dd> <dd> <p>When this method returns, contains a value which indicates the line-breaking condition between the object and the content immediately following it.</p> </dd> <p> The <strong>{{IDWriteTextFormat}}</strong> interface describes the font and paragraph properties used to format text, and it describes locale information. </p> <p> To get a reference to the <strong>{{IDWriteTextFormat}}</strong> interface, the application must call the <strong>{{IDWriteFactory::CreateTextFormat}}</strong> method as shown in the following code.</p><pre> if ({{SUCCEEDED}}(hr)) { hr = pDWriteFactory_-&gt;CreateTextFormat( L"Gabriola", {{NULL}}, {{DWRITE_FONT_WEIGHT_REGULAR}}, {{DWRITE_FONT_STYLE_NORMAL}}, {{DWRITE_FONT_STRETCH_NORMAL}}, 72.0f, L"en-us", &amp;pTextFormat_ ); } </pre><p>When creating an <strong>{{IDWriteTextFormat}}</strong> object using the <strong>CreateTextFormat</strong> function, the application specifies the font family, font collection, font weight, font size, and locale name for the text format.</p><p>These properties cannot be changed after the <strong>{{IDWriteTextFormat}}</strong> object is created. To change these properties, a new <strong>{{IDWriteTextFormat}}</strong> object must be created with the desired properties.</p><p> The <strong>{{IDWriteTextFormat}}</strong> interface is used to draw text with a single format</p><p> To draw text with multiple formats, or to use a custom text renderer, use the <strong>{{IDWriteTextLayout}}</strong> interface. <strong>{{IDWriteTextLayout}}</strong> enables the application to change the format for ranges of text within the string. The <strong>{{IDWriteFactory::CreateTextLayout}}</strong> takes an <strong>{{IDWriteTextFormat}}</strong> object as a parameter and initially applies the format information to the entire string. </p><p> This object may not be thread-safe, and it may carry the state of text format change. </p> <p>Sets the alignment of text in a paragraph, relative to the leading and trailing edge of a layout box for a <strong>{{IDWriteTextFormat}}</strong> interface.</p> <p> The text can be aligned to the leading or trailing edge of the layout box, or it can be centered. The following illustration shows text with the alignment set to <strong>{{DWRITE_TEXT_ALIGNMENT_LEADING}}</strong>, <strong>{{DWRITE_TEXT_ALIGNMENT_CENTER}}</strong>, and <strong>{{DWRITE_TEXT_ALIGNMENT_TRAILING}}</strong>, respectively. </p><p></p><strong>Note</strong>??The alignment is dependent on reading direction, the above is for left-to-right reading direction. For right-to-left reading direction it would be the opposite.?<p>See <strong>{{DWRITE_TEXT_ALIGNMENT}}</strong> for more information. </p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>The textAlignment argument is invalid.</p> </td></tr> </table><p>?</p> <p> Sets the alignment option of a paragraph relative to the layout box's top and bottom edge. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The paragraph alignment option being set for a paragraph; see <strong>{{DWRITE_PARAGRAPH_ALIGNMENT}}</strong> for more information.</p> </dd> <p> Sets the word wrapping option. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The word wrapping option being set for a paragraph; see <strong>{{DWRITE_WORD_WRAPPING}}</strong> for more information.</p> </dd> <p> Sets the paragraph reading direction. </p> <p> The reading direction and flow direction must always be set 90 degrees orthogonal to each other, or else you will get the error {{DWRITE_E_FLOWDIRECTIONCONFLICTS}} when you use layout functions like Draw or GetMetrics. So if you set a vertical reading direction (for example, to {{DWRITE_READING_DIRECTION_TOP_TO_BOTTOM}}), then you must also use SetFlowDirection to set the flow direction appropriately (for example, to {{DWRITE_FLOW_DIRECTION_RIGHT_TO_LEFT}}). </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The text reading direction (for example, <strong>{{DWRITE_READING_DIRECTION_RIGHT_TO_LEFT}}</strong> for languages, such as Arabic, that read from right to left) for a paragraph. </p> </dd> <p> Sets the paragraph flow direction. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The paragraph flow direction; see <strong>{{DWRITE_FLOW_DIRECTION}}</strong> for more information.</p> </dd> <p> Sets a fixed distance between two adjacent tab stops. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The fixed distance between two adjacent tab stops.</p> </dd> <p> Sets trimming options for text overflowing the layout width. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Text trimming options.</p> </dd> <dd> <p>Application-defined omission sign. This parameter may be <strong>{{NULL}}</strong>. See <strong>{{IDWriteInlineObject}}</strong> for more information.</p> </dd> <p> Sets the line spacing. </p> <p> For the default method, spacing depends solely on the content. For uniform spacing, the specified line height overrides the content. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Specifies how line height is being determined; see <strong>{{DWRITE_LINE_SPACING_METHOD}}</strong> for more information.</p> </dd> <dd> <p>The line height, or distance between one baseline to another.</p> </dd> <dd> <p>The distance from top of line to baseline. A reasonable ratio to <em>lineSpacing</em> is 80 percent.</p> </dd> <p> Gets the alignment option of text relative to the layout box's leading and trailing edge. </p> <p>Returns the text alignment option of the current paragraph.</p> <p> Gets the alignment option of a paragraph which is relative to the top and bottom edges of a layout box. </p> <p>A value that indicates the current paragraph alignment option.</p> <p> Gets the word wrapping option. </p> <p>Returns the word wrapping option; see <strong>{{DWRITE_WORD_WRAPPING}}</strong> for more information.</p> <p> Gets the current reading direction for text in a paragraph. </p> <p>A value that indicates the current reading direction for text in a paragraph.</p> <p> Gets the direction that text lines flow. </p> <p>The direction that text lines flow within their parent container. For example, <strong>{{DWRITE_FLOW_DIRECTION_TOP_TO_BOTTOM}}</strong> indicates that text lines are placed from top to bottom.</p> <p> Gets the incremental tab stop position. </p> <p>The incremental tab stop value.</p> <p> Gets the trimming options for text that overflows the layout box. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, it contains a reference to a <strong>{{DWRITE_TRIMMING}}</strong> structure that holds the text trimming options for the overflowing text.</p> </dd> <dd> <p>When this method returns, contains an address of a reference to a trimming omission sign. This parameter may be <strong>{{NULL}}</strong>.</p> </dd> <p> Gets the line spacing adjustment set for a multiline text paragraph. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A value that indicates how line height is determined.</p> </dd> <dd> <p>When this method returns, contains the line height, or distance between one baseline to another.</p> </dd> <dd> <p>When this method returns, contains the distance from top of line to baseline. A reasonable ratio to <em>lineSpacing</em> is 80 percent.</p> </dd> <p> Gets the current font collection. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains an address of a reference to the font collection being used for the current text.</p> </dd> <p> Gets the length of the font family name. </p> <p>The size of the character array, in character count, not including the terminated <strong>{{NULL}}</strong> character.</p> <p> Gets a copy of the font family name. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains a reference to a character array, which is null-terminated, that receives the current font family name. The buffer allocated for this array should be at least the size, in elements, of <em>nameSize</em>.</p> </dd> <dd> <p>The size of the <em>fontFamilyName</em> character array, in character count, including the terminated <strong>{{NULL}}</strong> character. To find the size of <em>fontFamilyName</em>, use <strong>GetFontFamilyNameLength</strong>.</p> </dd> <p> Gets the font weight of the text. </p> <p>A value that indicates the type of weight (such as normal, bold, or black). </p> <p> Gets the font style of the text.</p> <p>A value which indicates the type of font style (such as slope or incline).</p> <p> Gets the font stretch of the text. </p> <p>A value which indicates the type of font stretch (such as normal or condensed).</p> <p> Gets the font size in {{DIP}} unites. </p> <p>The current font size in {{DIP}} units.</p> <p> Gets the length of the locale name. </p> <p>The size of the character array in character count, not including the terminated <strong>{{NULL}}</strong> character.</p> <p> Gets a copy of the locale name. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Contains a character array that receives the current locale name.</p> </dd> <dd> <p>The size of the character array, in character count, including the terminated <strong>{{NULL}}</strong> character. Use <strong>GetLocaleNameLength</strong> to get the size of the locale name character array.</p> </dd> <p>Holds the appropriate digits and numeric punctuation for a specified locale.</p> <p>Implemented by the text analyzer's client to provide text to the analyzer. It allows the separation between the logical view of text as a continuous stream of characters identifiable by unique text positions, and the actual memory layout of potentially discrete blocks of text in the client's backing store. </p> <p>If any of these callbacks returns an error, then the analysis functions will stop prematurely and return a callback error. Note that rather than return {{E_NOTIMPL}}, an application should stub the method and return a constant/null and {{S_OK}}.</p> <p>Gets a block of text starting at the specified text position. </p> <p>Returning <strong>{{NULL}}</strong> indicates the end of text, which is the position after the last character. This function is called iteratively for each consecutive block, tying together several fragmented blocks in the backing store into a virtual contiguous string.</p><p>Although applications can implement sparse textual content that maps only part of the backing store, the application must map any text that is in the range passed to any analysis functions.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The first position of the piece to obtain. All positions are in <strong>{{UTF16}}</strong> code units, not whole characters, which matters when supplementary characters are used.</p> </dd> <dd> <p>When this method returns, contains an address of the block of text as an array of characters to be retrieved from the text analysis.</p> </dd> <dd> <p>When this method returns, contains the number of <strong>{{UTF16}}</strong> units of the retrieved chunk. The returned length is not the length of the block, but the length remaining in the block, from the specified position until its end. For example, querying for a position that is 75 positions into a 100-position block would return 25.</p> </dd> <p>Gets a block of text immediately preceding the specified position.</p> <p>{{NULL}} indicates no chunk available at the specified position, either because <em>textPosition</em> equals 0, <em>textPosition</em> is greater than the entire text content length, or the queried position is not mapped into the application's backing store.</p><p>Although applications can implement sparse textual content that maps only part of the backing store, the application must map any text that is in the range passed to any analysis functions.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The position immediately after the last position of the block of text to obtain.</p> </dd> <dd> <p>When this method returns, contains an address of a reference to the block of text, as an array of characters from the specified range. The text range will be from <em>textPosition</em> to the front of the block.</p> </dd> <dd> <p>Number of {{UTF16}} units of the retrieved block. The length returned is from the specified position to the front of the block.</p> </dd> <p>Gets the paragraph reading direction.</p> <p>The reading direction of the current paragraph.</p> <p>Gets the locale name on the range affected by the text analysis.</p> <p>The <em>localeName</em> reference must remain valid until the next call or until the analysis returns.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The text position to examine.</p> </dd> <dd> <p>Contains the length of the text being affected by the text analysis up to the next differing locale.</p> </dd> <dd> <p>Contains an address of a reference to an array of characters which receives the locale name from the text affected by the text analysis. The array of characters is null-terminated.</p> </dd> <p>Gets the number substitution from the text range affected by the text analysis.</p> <p>Any implementation should return the number substitution with an incremented reference count, and the analysis will release when finished with it (either before the next call or before it returns). However, the sink callback may hold onto it after that.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The starting position from which to report.</p> </dd> <dd> <p>Contains the length of the text, in characters, remaining in the text range up to the next differing number substitution.</p> </dd> <dd> <p>Contains an address of a reference to an object, which was created with <strong>{{IDWriteFactory::CreateNumberSubstitution}}</strong>, that holds the appropriate digits and numeric punctuation for a given locale.</p> </dd> <p>This interface is implemented by the text analyzer's client to receive the output of a given text analysis. </p> <p>The text analyzer disregards any current state of the analysis sink, therefore, a Set method call on a range overwrites the previously set analysis result of the same range.</p> <p>Reports script analysis for the specified text range.</p> <p>A successful code or error code to stop analysis.</p> <dd> <p>The starting position from which to report.</p> </dd> <dd> <p>The number of {{UTF16}} units of the reported range.</p> </dd> <dd> <p>A reference to a structure that contains a zero-based index representation of a writing system script and a value indicating whether additional shaping of text is required.</p> </dd> <p>Sets line-break opportunities for each character, starting from the specified position.</p> <p>A successful code or error code to stop analysis.</p> <dd> <p>The starting text position from which to report.</p> </dd> <dd> <p>The number of {{UTF16}} units of the reported range.</p> </dd> <dd> <p>A reference to a structure that contains breaking conditions set for each character from the starting position to the end of the specified range.</p> </dd> <p>Sets a bidirectional level on the range, which is called once per run change (either explicit or resolved implicit).</p> <p>A successful code or error code to stop analysis.</p> <dd> <p>The starting position from which to report.</p> </dd> <dd> <p>The number of {{UTF16}} units of the reported range.</p> </dd> <dd> <p>The explicit level from the paragraph reading direction and any embedded control codes {{RLE}}/{{RLO}}/{{LRE}}/{{LRO}}/{{PDF}}, which is determined before any additional rules.</p> </dd> <dd> <p>The final implicit level considering the explicit level and characters' natural directionality, after all Bidi rules have been applied.</p> </dd> <p>Sets the number substitution on the text range affected by the text analysis.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The starting position from which to report.</p> </dd> <dd> <p>The number of {{UTF16}} units of the reported range.</p> </dd> <dd> <p>An object that holds the appropriate digits and numeric punctuation for a given locale. Use <strong>{{IDWriteFactory::CreateNumberSubstitution}}</strong> to create this object.</p> </dd> <p> Analyzes various text properties for complex script processing such as bidirectional (bidi) support for languages like Arabic, determination of line break opportunities, glyph placement, and number substitution.</p> <p> Analyzes a text range for script boundaries, reading text attributes from the source and reporting the Unicode script {{ID}} to the sink callback <strong>SetScript</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Analyzes a text range for script directionality, reading attributes from the source and reporting levels to the sink callback <strong>SetBidiLevel</strong>. </p> <p> While the function can handle multiple paragraphs, the text range should not arbitrarily split the middle of paragraphs. Otherwise, the returned levels may be wrong, because the Bidi algorithm is meant to apply to the paragraph as a whole. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Analyzes a text range for spans where number substitution is applicable, reading attributes from the source and reporting substitutable ranges to the sink callback <strong>SetNumberSubstitution</strong>. </p> <p> Although the function can handle multiple ranges of differing number substitutions, the text ranges should not arbitrarily split the middle of numbers. Otherwise, it will treat the numbers separately and will not translate any intervening punctuation. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Analyzes a text range for potential breakpoint opportunities, reading attributes from the source and reporting breakpoint opportunities to the sink callback <strong>SetLineBreakpoints</strong>. </p> <p> Although the function can handle multiple paragraphs, the text range should not arbitrarily split the middle of paragraphs, unless the specified text span is considered a whole unit. Otherwise, the returned properties for the first and last characters will inappropriately allow breaks. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Parses the input text string and maps it to the set of glyphs and associated glyph data according to the font and the writing system's rendering rules. </p> <p> Note that the mapping from characters to glyphs is, in general, many-to-many. The recommended estimate for the per-glyph output buffers is (3 * <em>textLength</em> / 2 + 16). This is not guaranteed to be sufficient. The value of the <em>actualGlyphCount</em> parameter is only valid if the call succeeds. In the event that <em>maxGlyphCount</em> is not big enough, <strong>{{HRESULT_FROM_WIN32}}({{ERROR_INSUFFICIENT_BUFFER}})</strong> will be returned. The application should allocate a larger buffer and try again. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An array of characters to convert to glyphs.</p> </dd> <dd> <p>The length of <em>textString</em>.</p> </dd> <dd> <p>The font face that is the source of the output glyphs.</p> </dd> <dd> <p>A Boolean flag set to <strong>{{TRUE}}</strong> if the text is intended to be drawn vertically.</p> </dd> <dd> <p>A Boolean flag set to <strong>{{TRUE}}</strong> for right-to-left text.</p> </dd> <dd> <p>A reference to a Script analysis result from an <strong>AnalyzeScript</strong> call.</p> </dd> <dd> <p>The locale to use when selecting glyphs. For example the same character may map to different glyphs for ja-jp versus zh-chs. If this is <strong>{{NULL}}</strong>, then the default mapping based on the script is used.</p> </dd> <dd> <p>A reference to an optional number substitution which selects the appropriate glyphs for digits and related numeric characters, depending on the results obtained from <strong>AnalyzeNumberSubstitution</strong>. Passing <strong>{{NULL}}</strong> indicates that no substitution is needed and that the digits should receive nominal glyphs.</p> </dd> <dd> <p>An array of references to the sets of typographic features to use in each feature range.</p> </dd> <dd> <p>The length of each feature range, in characters. The sum of all lengths should be equal to <em>textLength</em>.</p> </dd> <dd> <p>The number of feature ranges.</p> </dd> <dd> <p>The maximum number of glyphs that can be returned.</p> </dd> <dd> <p>When this method returns, contains the mapping from character ranges to glyph ranges.</p> </dd> <dd> <p>When this method returns, contains a reference to an array of structures that contains shaping properties for each character.</p> </dd> <dd> <p>The output glyph indices.</p> </dd> <dd> <p>When this method returns, contains a reference to an array of structures that contain shaping properties for each output glyph.</p> </dd> <dd> <p>When this method returns, contains the actual number of glyphs returned if the call succeeds.</p> </dd> <p> Places glyphs output from the <strong>GetGlyphs</strong> method according to the font and the writing system's rendering rules. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Place glyphs output from the <strong>GetGlyphs</strong> method according to the font and the writing system's rendering rules.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Represents a set of application-defined callbacks that perform rendering of text, inline objects, and decorations such as underlines.</p> <p> {{IDWriteTextLayout::}}<strong>Draw</strong> calls this function to instruct the client to render a run of glyphs. </p> <p>The <strong>{{IDWriteTextLayout::Draw}}</strong> function calls this callback function with all the information about glyphs to render. The application implements this callback by mostly delegating the call to the underlying platform's graphics {{API}} such as Direct2D to draw glyphs on the drawing context. An application that uses {{GDI}} can implement this callback in terms of the <strong>{{IDWriteBitmapRenderTarget::DrawGlyphRun}}</strong> method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> {{IDWriteTextLayout::}}<strong>Draw</strong> calls this function to instruct the client to draw an underline. </p> <p> A single underline can be broken into multiple calls, depending on how the formatting changes attributes. If font sizes/styles change within an underline, the thickness and offset will be averaged weighted according to characters. To get an appropriate starting pixel position, add underline::offset to the baseline. Otherwise there will be no spacing between the text. The x coordinate will always be passed as the left side, regardless of text directionality. This simplifies drawing and reduces the problem of round-off that could potentially cause gaps or a double stamped alpha blend. To avoid alpha overlap, round the end points to the nearest device pixel. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> {{IDWriteTextLayout::}}<strong>Draw</strong> calls this function to instruct the client to draw a strikethrough. </p> <p> A single strikethrough can be broken into multiple calls, depending on how the formatting changes attributes. Strikethrough is not averaged across font sizes/styles changes. To get an appropriate starting pixel position, add strikethrough::offset to the baseline. Like underlines, the x coordinate will always be passed as the left side, regardless of text directionality. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> {{IDWriteTextLayout::}}<strong>Draw</strong> calls this application callback when it needs to draw an inline object. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Defines the pixel snapping properties such as pixels per {{DIP}}(device-independent pixel) and the current transform matrix of a text renderer.</p> <p> Determines whether pixel snapping is disabled. The recommended default is <strong>{{FALSE}}</strong>, unless doing animation that requires subpixel vertical placement. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The context passed to <strong>{{IDWriteTextLayout::Draw}}</strong>.</p> </dd> <dd> <p>Receives <strong>{{TRUE}}</strong> if pixel snapping is disabled; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p> Gets a transform that maps abstract coordinates to {{DIPs}}. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The drawing context passed to <strong>{{IDWriteTextLayout::Draw}}</strong>.</p> </dd> <dd> <p>When this method returns, contains a structure which has transform information for pixel snapping.</p> </dd> <p> Gets the number of physical pixels per {{DIP}}. </p> <p> Because a {{DIP}} (device-independent pixel) is 1/96 inch, the <em>pixelsPerDip</em> value is the number of logical pixels per inch divided by 96.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The drawing context passed to <strong>{{IDWriteTextLayout::Draw}}</strong>.</p> </dd> <dd> <p>When this method returns, contains the number of physical pixels per {{DIP}}.</p> </dd> <p>The <strong>{{IDWriteTextLayout}}</strong> interface represents a block of text after it has been fully analyzed and formatted.</p> <p>To get a reference to the <strong>{{IDWriteTextLayout}}</strong> interface, the application must call the <strong>{{IDWriteFactory::CreateTextLayout}}</strong> method, as shown in the following code. </p><pre> // Create a text layout using the text format. if ({{SUCCEEDED}}(hr)) { {{RECT}} rect; GetClientRect(hwnd_, &amp;rect); float width = rect.right / dpiScaleX_; float height = rect.bottom / dpiScaleY_; hr = pDWriteFactory_-&gt;CreateTextLayout( wszText_, // The string to be laid out and formatted. cTextLength_, // The length of the string. pTextFormat_, // The text format to apply to the string (contains font information, etc). width, // The width of the layout box. height, // The height of the layout box. &amp;pTextLayout_ // The {{IDWriteTextLayout}} interface reference. ); } </pre><p>The <strong>{{IDWriteTextLayout}}</strong> interface allows the application to change the format for ranges of the text it represents, specified by a <strong>{{DWRITE_TEXT_RANGE}}</strong> structure. The following example shows how to set the font weight for a text range.</p><pre> // Set the font weight to bold for the first 5 letters. {{DWRITE_TEXT_RANGE}} textRange = {0, 4}; if ({{SUCCEEDED}}(hr)) { hr = pTextLayout_-&gt;SetFontWeight({{DWRITE_FONT_WEIGHT_BOLD}}, textRange); } </pre><p><strong>{{IDWriteTextLayout}}</strong> also provides methods for adding strikethrough, underline, and inline objects to the text.</p><p>To draw the block of text represented by an <strong>{{IDWriteTextLayout}}</strong> object, Direct2D provides the <strong>{{ID2D1RenderTarget::DrawTextLayout}}</strong> method. To draw using a custom renderer implement an <strong>{{IDWriteTextRenderer}}</strong> interface and call the <strong>{{IDWriteTextLayout::Draw}}</strong> method</p> <p> Sets the layout maximum width.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A value that indicates the maximum width of the layout box.</p> </dd> <p> Sets the layout maximum height. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A value that indicates the maximum height of the layout box. </p> </dd> <p> Sets the font collection. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The font collection to set.</p> </dd> <dd> <p>Text range to which this change applies.</p> </dd> <p> Sets null-terminated font family name for text within a specified text range. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The font family name that applies to the entire text string within the range specified by <em>textRange</em>.</p> </dd> <dd> <p>Text range to which this change applies.</p> </dd> <p> Sets the font weight for text within a text range specified by a <strong>{{DWRITE_TEXT_RANGE}}</strong> structure. </p> <p>The font weight can be set to one of the predefined font weight values provided in the <strong>{{DWRITE_FONT_WEIGHT}}</strong> enumeration or an integer from 1 to 999. Values outside this range will cause the method to fail with an <strong>{{E_INVALIDARG}}</strong> return value.</p><p>The following illustration shows an example of Normal and UltraBold weights for the Palatino Linotype typeface.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Sets the font style for text within a text range specified by a <strong>{{DWRITE_TEXT_RANGE}}</strong> structure.</p> <p>The font style can be set to Normal, Italic or Oblique. The following illustration shows three styles for the Palatino font. For more information, see <strong>{{DWRITE_FONT_STYLE}}</strong>.</p><p></p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Sets the font stretch for text within a specified text range. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A value which indicates the type of font stretch for text within the range specified by <em>textRange</em>.</p> </dd> <dd> <p>Text range to which this change applies.</p> </dd> <p>Sets the font size in {{DIP}} units for text within a specified text range. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The font size in {{DIP}} units to be set for text in the range specified by <em>textRange</em>. </p> </dd> <dd> <p>Text range to which this change applies.</p> </dd> <p>The <strong>{{IDWriteTextLayout}}</strong> interface represents a block of text after it has been fully analyzed and formatted.</p> <p>To get a reference to the <strong>{{IDWriteTextLayout}}</strong> interface, the application must call the <strong>{{IDWriteFactory::CreateTextLayout}}</strong> method, as shown in the following code. </p><pre> // Create a text layout using the text format. if ({{SUCCEEDED}}(hr)) { {{RECT}} rect; GetClientRect(hwnd_, &amp;rect); float width = rect.right / dpiScaleX_; float height = rect.bottom / dpiScaleY_; hr = pDWriteFactory_-&gt;CreateTextLayout( wszText_, // The string to be laid out and formatted. cTextLength_, // The length of the string. pTextFormat_, // The text format to apply to the string (contains font information, etc). width, // The width of the layout box. height, // The height of the layout box. &amp;pTextLayout_ // The {{IDWriteTextLayout}} interface reference. ); } </pre><p>The <strong>{{IDWriteTextLayout}}</strong> interface allows the application to change the format for ranges of the text it represents, specified by a <strong>{{DWRITE_TEXT_RANGE}}</strong> structure. The following example shows how to set the font weight for a text range.</p><pre> // Set the font weight to bold for the first 5 letters. {{DWRITE_TEXT_RANGE}} textRange = {0, 4}; if ({{SUCCEEDED}}(hr)) { hr = pTextLayout_-&gt;SetFontWeight({{DWRITE_FONT_WEIGHT_BOLD}}, textRange); } </pre><p><strong>{{IDWriteTextLayout}}</strong> also provides methods for adding strikethrough, underline, and inline objects to the text.</p><p>To draw the block of text represented by an <strong>{{IDWriteTextLayout}}</strong> object, Direct2D provides the <strong>{{ID2D1RenderTarget::DrawTextLayout}}</strong> method. To draw using a custom renderer implement an <strong>{{IDWriteTextRenderer}}</strong> interface and call the <strong>{{IDWriteTextLayout::Draw}}</strong> method</p> <p>Sets strikethrough for text within a specified text range. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A Boolean flag that indicates whether strikethrough takes place in the range specified by <em>textRange</em>.</p> </dd> <dd> <p>Text range to which this change applies.</p> </dd> <p> Sets the application-defined drawing effect. </p> <p>An <strong>{{ID2D1Brush}}</strong>, such as a color or gradient brush, can be set as a drawing effect if you are using the <strong>{{ID2D1RenderTarget::DrawTextLayout}}</strong> to draw text and that brush will be used to draw the specified range of text.</p><p> This drawing effect is associated with the specified range and will be passed back to the application by way of the callback when the range is drawn at drawing time. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Application-defined drawing effects that apply to the range. This data object will be passed back to the application's drawing callbacks for final rendering.</p> </dd> <dd> <p>The text range to which this change applies.</p> </dd> <p> Sets the inline object. </p> <p>The application may call this function to specify the set of properties describing an application-defined inline object for specific range.</p><p> This inline object applies to the specified range and will be passed back to the application by way of the <strong>DrawInlineObject</strong> callback when the range is drawn. Any text in that range will be suppressed. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An application-defined inline object. </p> </dd> <dd> <p>Text range to which this change applies.</p> </dd> <p> Sets font typography features for text within a specified text range. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to font typography settings. </p> </dd> <dd> <p>Text range to which this change applies.</p> </dd> <p> Sets the locale name for text within a specified text range.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A null-terminated locale name string.</p> </dd> <dd> <p>Text range to which this change applies.</p> </dd> <p> Gets the layout maximum width. </p> <p>Returns the layout maximum width.</p> <p> Gets the layout maximum height. </p> <p>The layout maximum height.</p> <p> Gets the font collection associated with the text at the specified position. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The position of the text to inspect.</p> </dd> <dd> <p>Contains an address of a reference to the current font collection.</p> </dd> <dd> <p>The range of text that has the same formatting as the text at the position specified by <em>currentPosition</em>. This means the run has the exact formatting as the position specified, including but not limited to the underline.</p> </dd> <p> Get the length of the font family name at the current position. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The current text position.</p> </dd> <dd> <p>When this method returns, contains the size of the character array containing the font family name, in character count, not including the terminated <strong>{{NULL}}</strong> character.</p> </dd> <dd> <p>The range of text that has the same formatting as the text at the position specified by <em>currentPosition</em>. This means the run has the exact formatting as the position specified, including but not limited to the font family.</p> </dd> <p> Copies the font family name of the text at the specified position. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The position of the text to examine.</p> </dd> <dd> <p>When this method returns, contains an array of characters that receives the current font family name. You must allocate storage for this parameter.</p> </dd> <dd> <p>The size of the character array in character count including the terminated <strong>{{NULL}}</strong> character.</p> </dd> <dd> <p>The range of text that has the same formatting as the text at the position specified by <em>currentPosition</em>. This means the run has the exact formatting as the position specified, including but not limited to the font family name.</p> </dd> <p> Gets the font weight of the text at the specified position. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The position of the text to inspect.</p> </dd> <dd> <p>When this method returns, contains a value which indicates the type of font weight being applied at the specified position.</p> </dd> <dd> <p>The range of text that has the same formatting as the text at the position specified by <em>currentPosition</em>. This means the run has the exact formatting as the position specified, including but not limited to the font weight.</p> </dd> <p> Gets the font style (also known as slope) of the text at the specified position. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The position of the text to inspect.</p> </dd> <dd> <p>When this method returns, contains a value which indicates the type of font style (also known as slope or incline) being applied at the specified position.</p> </dd> <dd> <p>The range of text that has the same formatting as the text at the position specified by <em>currentPosition</em>. This means the run has the exact formatting as the position specified, including but not limited to the font style.</p> </dd> <p> Gets the font stretch of the text at the specified position. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The position of the text to inspect.</p> </dd> <dd> <p>When this method returns, contains a value which indicates the type of font stretch (also known as width) being applied at the specified position.</p> </dd> <dd> <p>The range of text that has the same formatting as the text at the position specified by <em>currentPosition</em>. This means the run has the exact formatting as the position specified, including but not limited to the font stretch.</p> </dd> <p> Gets the font em height of the text at the specified position. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The position of the text to inspect.</p> </dd> <dd> <p>When this method returns, contains the size of the font in ems of the text at the specified position.</p> </dd> <dd> <p>The range of text that has the same formatting as the text at the position specified by <em>currentPosition</em>. This means the run has the exact formatting as the position specified, including but not limited to the font size.</p> </dd> <p> Gets the underline presence of the text at the specified position. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The current text position.</p> </dd> <dd> <p>A Boolean flag that indicates whether underline is present at the position indicated by <em>currentPosition</em>.</p> </dd> <dd> <p>The range of text that has the same formatting as the text at the position specified by <em>currentPosition</em>. This means the run has the exact formatting as the position specified, including but not limited to the underline.</p> </dd> <p> Get the strikethrough presence of the text at the specified position. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The position of the text to inspect.</p> </dd> <dd> <p>A Boolean flag that indicates whether strikethrough is present at the position indicated by <em>currentPosition</em>.</p> </dd> <dd> <p>Contains the range of text that has the same formatting as the text at the position specified by <em>currentPosition</em>. This means the run has the exact formatting as the position specified, including but not limited to strikethrough.</p> </dd> <p> Gets the application-defined drawing effect at the specified text position. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The position of the text whose drawing effect is to be retrieved.</p> </dd> <dd> <p>When this method returns, contains an address of a reference to the current application-defined drawing effect. Usually this effect is a foreground brush that is used in glyph drawing.</p> </dd> <dd> <p>Contains the range of text that has the same formatting as the text at the position specified by <em>currentPosition</em>. This means the run has the exact formatting as the position specified, including but not limited to the drawing effect.</p> </dd> <p> Gets the inline object at the specified position. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The specified text position.</p> </dd> <dd> <p>Contains the application-defined inline object.</p> </dd> <dd> <p>The range of text that has the same formatting as the text at the position specified by <em>currentPosition</em>. This means the run has the exact formatting as the position specified, including but not limited to the inline object.</p> </dd> <p> Gets the typography setting of the text at the specified position. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The position of the text to inspect.</p> </dd> <dd> <p>When this method returns, contains an address of a reference to the current typography setting.</p> </dd> <dd> <p>The range of text that has the same formatting as the text at the position specified by <em>currentPosition</em>. This means the run has the exact formatting as the position specified, including but not limited to the typography.</p> </dd> <p> Gets the length of the locale name of the text at the specified position. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The position of the text to inspect.</p> </dd> <dd> <p>Size of the character array, in character count, not including the terminated <strong>{{NULL}}</strong> character.</p> </dd> <dd> <p>The range of text that has the same formatting as the text at the position specified by <em>currentPosition</em>. This means the run has the exact formatting as the position specified, including but not limited to the locale name.</p> </dd> <p> Gets the locale name of the text at the specified position. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The position of the text to inspect.</p> </dd> <dd> <p>When this method returns, contains the character array receiving the current locale name.</p> </dd> <dd> <p>Size of the character array, in character count, including the terminated <strong>{{NULL}}</strong> character.</p> </dd> <dd> <p>The range of text that has the same formatting as the text at the position specified by <em>currentPosition</em>. This means the run has the exact formatting as the position specified, including but not limited to the locale name.</p> </dd> <p> Draws text using the specified client drawing context.</p> <p>To draw text with this method, a <em>textLayout</em> object needs to be created by the application using <strong>{{IDWriteFactory::CreateTextLayout}}</strong>. </p><p>After the <em>textLayout</em> object is obtained, the application calls the <strong>{{IDWriteTextLayout::Draw}}</strong> method to draw the text, decorations, and inline objects. The actual drawing is done through the callback interface passed in as the <em>textRenderer</em> argument; there, the corresponding <strong>DrawGlyphRun</strong> {{API}} is called. </p><p>If you set a vertical text reading direction on {{IDWriteTextLayout}} via SetReadingDirection with {{DWRITE_READING_DIRECTION_TOP_TO_BOTTOM}} (or bottom to top), then you must pass an interface that implements {{IDWriteTextRenderer1}}. Otherwise you get the error {{DWRITE_E_TEXTRENDERERINCOMPATIBLE}} because the original {{IDWriteTextRenderer}} interface only supported horizontal text.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An application-defined drawing context. </p> </dd> <dd> <p>Pointer to the set of callback functions used to draw parts of a text string.</p> </dd> <dd> <p>The x-coordinate of the layout's left side.</p> </dd> <dd> <p>The y-coordinate of the layout's top side.</p> </dd> <p> Retrieves the information about each individual text line of the text string. </p> <p> If <em>maxLineCount</em> is not large enough {{E_NOT_SUFFICIENT_BUFFER}}, which is equivalent to {{HRESULT_FROM_WIN32}}({{ERROR_INSUFFICIENT_BUFFER}}), is returned and <em>*actualLineCount</em> is set to the number of lines needed. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains a reference to an array of structures containing various calculated length values of individual text lines.</p> </dd> <dd> <p>The maximum size of the <em>lineMetrics</em> array.</p> </dd> <dd> <p>When this method returns, contains the actual size of the <em>lineMetrics</em> array that is needed.</p> </dd> <p> Retrieves overall metrics for the formatted string. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains the measured distances of text and associated content after being formatted.</p> </dd> <p>Returns the overhangs (in {{DIPs}}) of the layout and all objects contained in it, including text glyphs and inline objects.</p> <p>Underlines and strikethroughs do not contribute to the black box determination, since these are actually drawn by the renderer, which is allowed to draw them in any variety of styles.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Overshoots of visible extents (in {{DIPs}}) outside the layout.</p> </dd> <p> Retrieves logical properties and measurements of each glyph cluster. </p> <p> If <em>maxClusterCount</em> is not large enough, then {{E_NOT_SUFFICIENT_BUFFER}}, which is equivalent to {{HRESULT_FROM_WIN32}}({{ERROR_INSUFFICIENT_BUFFER}}), is returned and <em>actualClusterCount</em> is set to the number of clusters needed. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains metrics, such as line-break or total advance width, for a glyph cluster.</p> </dd> <dd> <p>The maximum size of the <em>clusterMetrics</em> array.</p> </dd> <dd> <p>When this method returns, contains the actual size of the <em>clusterMetrics</em> array that is needed.</p> </dd> <p>Determines the minimum possible width the layout can be set to without emergency breaking between the characters of whole words occurring.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Minimum width.</p> </dd> <p> The application calls this function passing in a specific pixel location relative to the top-left location of the layout box and obtains the information about the correspondent hit-test metrics of the text string where the hit-test has occurred. When the specified pixel location is outside the text string, the function sets the output value <em>*isInside</em> to <strong>{{FALSE}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The pixel location X to hit-test, relative to the top-left location of the layout box.</p> </dd> <dd> <p>The pixel location Y to hit-test, relative to the top-left location of the layout box.</p> </dd> <dd> <p>An output flag that indicates whether the hit-test location is at the leading or the trailing side of the character. When the output <em>*isInside</em> value is set to <strong>{{FALSE}}</strong>, this value is set according to the output <em>hitTestMetrics-&gt;textPosition</em> value to represent the edge closest to the hit-test location.</p> </dd> <dd> <p>An output flag that indicates whether the hit-test location is inside the text string. When <strong>{{FALSE}}</strong>, the position nearest the text's edge is returned.</p> </dd> <dd> <p>The output geometry fully enclosing the hit-test location. When the output <em>*isInside</em> value is set to <strong>{{FALSE}}</strong>, this structure represents the geometry enclosing the edge closest to the hit-test location.</p> </dd> <p> The application calls this function to get the pixel location relative to the top-left of the layout box given the text position and the logical side of the position. This function is normally used as part of caret positioning of text where the caret is drawn at the location corresponding to the current text editing position. It may also be used as a way to programmatically obtain the geometry of a particular text position in {{UI}} automation. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The text position used to get the pixel location.</p> </dd> <dd> <p>A Boolean flag that indicates whether the pixel location is of the leading or the trailing side of the specified text position.</p> </dd> <dd> <p>When this method returns, contains the output pixel location X, relative to the top-left location of the layout box.</p> </dd> <dd> <p>When this method returns, contains the output pixel location Y, relative to the top-left location of the layout box.</p> </dd> <dd> <p>When this method returns, contains the output geometry fully enclosing the specified text position.</p> </dd> <p> The application calls this function to get a set of hit-test metrics corresponding to a range of text positions. One of the main usages is to implement highlight selection of the text string. The function returns {{E_NOT_SUFFICIENT_BUFFER}}, which is equivalent to {{HRESULT_FROM_WIN32}}({{ERROR_INSUFFICIENT_BUFFER}}), when the buffer size of hitTestMetrics is too small to hold all the regions calculated by the function. In this situation, the function sets the output value *actualHitTestMetricsCount to the number of geometries calculated. The application is responsible for allocating a new buffer of greater size and calling the function again. A good value to use as an initial value for maxHitTestMetricsCount may be calculated from the following equation: maxHitTestMetricsCount = lineCount * maxBidiReorderingDepth where lineCount is obtained from the value of the output argument *actualLineCount (from the function <strong>{{IDWriteTextLayout}}</strong>::GetLineLengths), and the maxBidiReorderingDepth value from the <strong>{{DWRITE_TEXT_METRICS}}</strong> structure of the output argument *textMetrics (from the function <strong>{{IDWriteFactory}}</strong>::<strong>CreateTextLayout</strong>). </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Encapsulates a 32-bit device independent bitmap and device context, which can be used for rendering glyphs.</p> <p>You create an <strong>{{IDWriteBitmapRenderTarget}}</strong> by using the <strong>{{IDWriteGdiInterop::CreateBitmapRenderTarget}}</strong> method, as shown in the following code.</p><pre>if ({{SUCCEEDED}}(hr)) { hr = g_pGdiInterop-&gt;CreateBitmapRenderTarget(hdc, r.right, r.bottom, &amp;g_pBitmapRenderTarget); } </pre><p> <strong>{{IDWriteGdiInterop::CreateBitmapRenderTarget}}</strong> takes a handle to a {{DC}} and the desired width and height. In the above example, the width and height given are the size of the window rect.</p> <p> Draws a run of glyphs to a bitmap target at the specified position.</p> <p>You can use the <strong>{{IDWriteBitmapRenderTarget::DrawGlyphRun}}</strong> to render to a bitmap from a custom text renderer that you implement. The custom text renderer should call this method from within the <strong>{{IDWriteTextRenderer::DrawGlyphRun}}</strong> callback method as shown in the following code.</p><pre>{{STDMETHODIMP}} GdiTextRenderer::DrawGlyphRun( __maybenull void* clientDrawingContext, {{FLOAT}} baselineOriginX, {{FLOAT}} baselineOriginY, {{DWRITE_MEASURING_MODE}} measuringMode, __in {{DWRITE_GLYPH_RUN}} const* glyphRun, __in {{DWRITE_GLYPH_RUN_DESCRIPTION}} const* glyphRunDescription, {{IUnknown}}* clientDrawingEffect ) { {{HRESULT}} hr = {{S_OK}}; // Pass on the drawing call to the render target to do the real work. {{RECT}} dirtyRect = {0}; hr = pRenderTarget_-&gt;DrawGlyphRun( baselineOriginX, baselineOriginY, measuringMode, glyphRun, pRenderingParams_, {{RGB}}(0,200,255), &amp;dirtyRect ); return hr; } </pre><p>The <em>baselineOriginX</em>, <em>baslineOriginY</em>, <em>measuringMethod</em>, and <em>glyphRun</em> parameters are provided (as arguments) when the callback method is invoked. The <em>renderingParams</em>, <em>textColor</em> and <em>blackBoxRect</em> are not.</p><p>Default rendering params can be retrieved by using the <strong>{{IDWriteFactory::CreateMonitorRenderingParams}}</strong> method.</p><p></p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The horizontal position of the baseline origin, in {{DIPs}}, relative to the upper-left corner of the {{DIB}}.</p> </dd> <dd> <p> The vertical position of the baseline origin, in {{DIPs}}, relative to the upper-left corner of the {{DIB}}.</p> </dd> <dd> <p> The measuring method for glyphs in the run, used with the other properties to determine the rendering mode.</p> </dd> <dd> <p> The structure containing the properties of the glyph run.</p> </dd> <dd> <p> The object that controls rendering behavior.</p> </dd> <dd> <p> The foreground color of the text.</p> </dd> <dd> <p> The optional rectangle that receives the bounding box (in pixels not {{DIPs}}) of all the pixels affected by drawing the glyph run. The black box rectangle may extend beyond the dimensions of the bitmap.</p> </dd> <p> Gets a handle to the memory device context. </p> <p> An application can use the device context to draw using {{GDI}} functions. An application can obtain the bitmap handle ({{HBITMAP}}) by calling <strong>GetCurrentObject</strong>. An application that wants information about the underlying bitmap, including a reference to the pixel data, can call <strong>GetObject</strong> to fill in a <strong>{{DIBSECTION}}</strong> structure. The bitmap is always a 32-bit top-down {{DIB}}. </p><p>Note that this method takes no parameters and returns an {{HDC}} variable, not an {{HRESULT}}.</p><pre>memoryHdc = g_pBitmapRenderTarget-&gt;GetMemoryDC(); </pre><p>The {{HDC}} returned here is still owned by the bitmap render targer object and should not be released or deleted by the client.</p> <p>Returns a device context handle to the memory device context.</p> <p> Gets the number of bitmap pixels per {{DIP}}. </p> <p>A {{DIP}} (device-independent pixel) is 1/96 inch. Therefore, this value is the number if pixels per inch divided by 96.</p> <p>The number of bitmap pixels per {{DIP}}.</p> <p> Sets the number of bitmap pixels per {{DIP}} (device-independent pixel). A {{DIP}} is 1/96 inch, so this value is the number if pixels per inch divided by 96. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A value that specifies the number of pixels per {{DIP}}.</p> </dd> <p> Gets the transform that maps abstract coordinates to {{DIPs}}. By default this is the identity transform. Note that this is unrelated to the world transform of the underlying device context. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains a transform matrix.</p> </dd> <p> Sets the transform that maps abstract coordinate to {{DIPs}} (device-independent pixel). This does not affect the world transform of the underlying device context. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Specifies the new transform. This parameter can be <strong>{{NULL}}</strong>, in which case the identity transform is implied.</p> </dd> <p> Gets the dimensions of the target bitmap. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Returns the width and height of the bitmap in pixels.</p> </dd> <p> Resizes the bitmap. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The new bitmap width, in pixels.</p> </dd> <dd> <p>The new bitmap height, in pixels.</p> </dd> <p>Provides interoperability with {{GDI}}, such as methods to convert a font face to a {{LOGFONT}} structure, or to convert a {{GDI}} font description into a font face. It is also used to create bitmap render target objects.</p> <p> Creates a font object that matches the properties specified by the <strong>{{LOGFONT}}</strong> structure. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A structure containing a {{GDI}}-compatible font description.</p> </dd> <dd> <p>When this method returns, contains an address of a reference to a newly created <strong>{{IDWriteFont}}</strong> object if successful; otherwise, <strong>{{NULL}}</strong>.</p> </dd> <p> Initializes a <strong>{{LOGFONT}}</strong> structure based on the {{GDI}}-compatible properties of the specified font. </p> <p>The conversion to a <strong>{{LOGFONT}}</strong> by using <strong>ConvertFontToLOGFONT</strong> operates at the logical font level and does not guarantee that it will map to a specific physical font. It is not guaranteed that {{GDI}} will select the same physical font for displaying text formatted by a <strong>{{LOGFONT}}</strong> as the <strong>{{IDWriteFont}}</strong> object that was converted.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An <strong>{{IDWriteFont}}</strong> object to be converted into a {{GDI}}-compatible <strong>{{LOGFONT}}</strong> structure.</p> </dd> <dd> <p>When this method returns, contains a structure that receives a {{GDI}}-compatible font description.</p> </dd> <dd> <p>When this method returns, contains <strong>{{TRUE}}</strong> if the specified font object is part of the system font collection; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p> Initializes a {{LOGFONT}} structure based on the {{GDI}}-compatible properties of the specified font. </p> <p>The conversion to a {{LOGFONT}} by using <strong>ConvertFontFaceToLOGFONT</strong> operates at the logical font level and does not guarantee that it will map to a specific physical font. It is not guaranteed that {{GDI}} will select the same physical font for displaying text formatted by a {{LOGFONT}} as the <strong>{{IDWriteFont}}</strong> object that was converted.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An <strong>{{IDWriteFontFace}}</strong> object to be converted into a {{GDI}}-compatible {{LOGFONT}} structure.</p> </dd> <dd> <p>When this method returns, contains a reference to a structure that receives a {{GDI}}-compatible font description.</p> </dd> <p> Creates an <strong>{{IDWriteFontFace}}</strong> object that corresponds to the currently selected <strong>{{HFONT}}</strong> of the specified <strong>{{HDC}}</strong>. </p> <p>This function is intended for scenarios in which an application wants to use {{GDI}} and Uniscribe 1.x for text layout and shaping, but DirectWrite for final rendering. This function assumes the client is performing text output using glyph indexes.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A handle to a device context into which a font has been selected. It is assumed that the client has already performed font mapping and that the font selected into the device context is the actual font to be used for rendering glyphs.</p> </dd> <dd> <p>Contains an address of a reference to the newly created font face object, or <strong>{{NULL}}</strong> in case of failure. The font face returned is guaranteed to reference the same physical typeface that would be used for drawing glyphs (but not necessarily characters) using ExtTextOut.</p> </dd> <p> Creates an object that encapsulates a bitmap and memory {{DC}} (device context) which can be used for rendering glyphs. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A handle to the optional device context used to create a compatible memory {{DC}} (device context).</p> </dd> <dd> <p>The width of the bitmap render target.</p> </dd> <dd> <p>The height of the bitmap render target.</p> </dd> <dd> <p>When this method returns, contains an address of a reference to the newly created <strong>{{IDWriteBitmapRenderTarget}}</strong> object.</p> </dd> <p> Contains low-level information used to render a glyph run.</p> <p>The alpha texture can be a bi-level alpha texture or a ClearType alpha texture. </p><p>A bi-level alpha texture contains one byte per pixel, therefore the size of the buffer for a bi-level texture will be the area of the texture bounds, in bytes. Each byte in a bi-level alpha texture created by <strong>CreateAlphaTexture</strong> is either set to {{DWRITE_ALPHA_MAX}} (that is, 255) or zero.</p><p>A ClearType alpha texture contains three bytes per pixel, therefore the size of the buffer for a ClearType alpha texture is three times the area of the texture bounds, in bytes.</p> <p> Gets the bounding rectangle of the physical pixels affected by the glyph run. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Specifies the type of texture requested. If a bi-level texture is requested, the bounding rectangle includes only bi-level glyphs. Otherwise, the bounding rectangle includes only antialiased glyphs.</p> </dd> <dd> <p>When this method returns, contains the bounding rectangle of the physical pixels affected by the glyph run, or an empty rectangle if there are no glyphs of the specified texture type.</p> </dd> <p> Creates an alpha texture of the specified type for glyphs within a specified bounding rectangle. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A value that specifies the type of texture requested. This can be <strong>{{DWRITE_TEXTURE_BILEVEL_1x1}}</strong> or <strong>{{DWRITE_TEXTURE_CLEARTYPE_3x1}}</strong>. If a bi-level texture is requested, the texture contains only bi-level glyphs. Otherwise, the texture contains only antialiased glyphs.</p> </dd> <dd> <p>The bounding rectangle of the texture, which can be different than the bounding rectangle returned by <strong>GetAlphaTextureBounds</strong>.</p> </dd> <dd> <p>When this method returns, contains the array of alpha values from the texture. The buffer allocated for this array must be at least the size of <em>bufferSize</em>.</p> </dd> <dd> <p>The size of the <em>alphaValues</em> array, in bytes. The minimum size depends on the dimensions of the rectangle and the type of texture requested.</p> </dd> <p> Gets alpha blending properties required for ClearType blending. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An object that specifies the ClearType level and enhanced contrast, gamma, pixel geometry, and rendering mode. In most cases, the values returned by the output parameters of this method are based on the properties of this object, unless a {{GDI}}-compatible rendering mode was specified.</p> </dd> <dd> <p>When this method returns, contains the gamma value to use for gamma correction.</p> </dd> <dd> <p>When this method returns, contains the enhanced contrast value to be used for blending.</p> </dd> <dd> <p>When this method returns, contains the ClearType level used in the alpha blending.</p> </dd> <p>Creates a DirectWrite factory object that is used for subsequent creation of individual DirectWrite objects.</p> <p>This function creates a DirectWrite factory object that is used for subsequent creation of individual DirectWrite objects. DirectWrite factory contains internal state data such as font loader registration and cached font data. In most cases it is recommended you use the shared factory object, because it allows multiple components that use DirectWrite to share internal DirectWrite state data, and thereby reduce memory usage. However, there are cases when it is desirable to reduce the impact of a component, such as a plug-in from an untrusted source, on the rest of the process, by sandboxing and isolating it from the rest of the process components. In such cases, it is recommended you use an isolated factory for the sandboxed component.</p><p>The following example shows how to create a shared DirectWrite factory.</p><pre> if ({{SUCCEEDED}}(hr)) { hr = {{DWriteCreateFactory}}( {{DWRITE_FACTORY_TYPE_SHARED}}, __uuidof({{IDWriteFactory}}), reinterpret_cast&lt;{{IUnknown}}**&gt;(&amp;pDWriteFactory_) ); } </pre> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A value that specifies whether the factory object will be shared or isolated.</p> </dd> <dd> <p>A {{GUID}} value that identifies the DirectWrite factory interface, such as __uuidof(<strong>{{IDWriteFactory}}</strong>).</p> </dd> <dd> <p>An address of a reference to the newly created DirectWrite factory object.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_FAMILY}}</strong> enumeration contains values that specify the kind of typeface classification.</p> <dd> <p>Any typeface classification.</p> </dd> <dd> <p>No fit typeface classification.</p> </dd> <dd> <p>Text display typeface classification.</p> </dd> <dd> <p>Script (or hand written) typeface classification.</p> </dd> <dd> <p>Decorative typeface classification.</p> </dd> <dd> <p>Symbol typeface classification.</p> </dd> <dd> <p>Pictorial (or symbol) typeface classification.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_SERIF_STYLE}}</strong> enumeration contains values that specify the appearance of the serif text.</p> <dd> <p>Any appearance of the serif text.</p> </dd> <dd> <p>No fit appearance of the serif text.</p> </dd> <dd> <p>Cove appearance of the serif text.</p> </dd> <dd> <p>Obtuse cove appearance of the serif text.</p> </dd> <dd> <p>Square cove appearance of the serif text.</p> </dd> <dd> <p>Obtuse square cove appearance of the serif text.</p> </dd> <dd> <p>Square appearance of the serif text.</p> </dd> <dd> <p>Thin appearance of the serif text.</p> </dd> <dd> <p>Oval appearance of the serif text.</p> </dd> <dd> <p>Exaggerated appearance of the serif text.</p> </dd> <dd> <p>Triangle appearance of the serif text.</p> </dd> <dd> <p>Normal sans appearance of the serif text.</p> </dd> <dd> <p>Obtuse sans appearance of the serif text.</p> </dd> <dd> <p>Perpendicular sans appearance of the serif text.</p> </dd> <dd> <p>Flared appearance of the serif text.</p> </dd> <dd> <p>Rounded appearance of the serif text.</p> </dd> <dd> <p>Script appearance of the serif text.</p> </dd> <dd> <p>Perpendicular sans appearance of the serif text.</p> </dd> <dd> <p>Oval appearance of the serif text.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_WEIGHT}}</strong> enumeration contains values that specify the weight of characters.</p> <p>The <strong>{{DWRITE_PANOSE_WEIGHT}}</strong> values roughly correspond to the <strong>{{DWRITE_FONT_WEIGHT}}</strong> values by using (panose_weight - 2) * 100 = font_weight.</p> <dd> <p>Any weight.</p> </dd> <dd> <p>No fit weight.</p> </dd> <dd> <p>Very light weight.</p> </dd> <dd> <p>Light weight.</p> </dd> <dd> <p>Thin weight.</p> </dd> <dd> <p>Book weight.</p> </dd> <dd> <p>Medium weight.</p> </dd> <dd> <p>Demi weight.</p> </dd> <dd> <p>Bold weight.</p> </dd> <dd> <p>Heavy weight.</p> </dd> <dd> <p>Black weight.</p> </dd> <dd> <p>Extra black weight.</p> </dd> <dd> <p>Extra black weight.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_PROPORTION}}</strong> enumeration contains values that specify the proportion of the glyph shape by considering additional detail to standard characters.</p> <dd> <p>Any proportion for the text.</p> </dd> <dd> <p>No fit proportion for the text.</p> </dd> <dd> <p>Old style proportion for the text.</p> </dd> <dd> <p>Modern proportion for the text.</p> </dd> <dd> <p>Extra width proportion for the text.</p> </dd> <dd> <p>Expanded proportion for the text.</p> </dd> <dd> <p>Condensed proportion for the text.</p> </dd> <dd> <p>Very expanded proportion for the text.</p> </dd> <dd> <p>Very condensed proportion for the text.</p> </dd> <dd> <p>Monospaced proportion for the text.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_CONTRAST}}</strong> enumeration contains values that specify the ratio between thickest and thinnest point of the stroke for a letter such as uppercase 'O'.</p> <dd> <p>Any contrast.</p> </dd> <dd> <p>No fit contrast.</p> </dd> <dd> <p>No contrast.</p> </dd> <dd> <p>Very low contrast.</p> </dd> <dd> <p>Low contrast.</p> </dd> <dd> <p>Medium low contrast.</p> </dd> <dd> <p>Medium contrast.</p> </dd> <dd> <p>Medium high contrast.</p> </dd> <dd> <p>High contrast.</p> </dd> <dd> <p>Very high contrast.</p> </dd> <dd> <p>Horizontal low contrast.</p> </dd> <dd> <p>Horizontal medium contrast.</p> </dd> <dd> <p>Horizontal high contrast.</p> </dd> <dd> <p>Broken contrast.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_STROKE_VARIATION}}</strong> enumeration contains values that specify the relationship between thin and thick stems of text characters.</p> <dd> <p>Any stroke variation for text characters.</p> </dd> <dd> <p>No fit stroke variation for text characters.</p> </dd> <dd> <p>No stroke variation for text characters.</p> </dd> <dd> <p>The stroke variation for text characters is gradual diagonal.</p> </dd> <dd> <p>The stroke variation for text characters is gradual transitional.</p> </dd> <dd> <p>The stroke variation for text characters is gradual vertical.</p> </dd> <dd> <p>The stroke variation for text characters is gradual horizontal.</p> </dd> <dd> <p>The stroke variation for text characters is rapid vertical.</p> </dd> <dd> <p>The stroke variation for text characters is rapid horizontal.</p> </dd> <dd> <p>The stroke variation for text characters is instant vertical.</p> </dd> <dd> <p>The stroke variation for text characters is instant horizontal.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_ARM_STYLE}}</strong> enumeration contains values that specify the style of termination of stems and rounded letterforms for text.</p> <dd> <p>Any arm style.</p> </dd> <dd> <p>No fit arm style.</p> </dd> <dd> <p>The arm style is straight horizontal.</p> </dd> <dd> <p>The arm style is straight wedge.</p> </dd> <dd> <p>The arm style is straight vertical.</p> </dd> <dd> <p>The arm style is straight single serif.</p> </dd> <dd> <p>The arm style is straight double serif.</p> </dd> <dd> <p>The arm style is non-straight horizontal.</p> </dd> <dd> <p>The arm style is non-straight wedge.</p> </dd> <dd> <p>The arm style is non-straight vertical.</p> </dd> <dd> <p>The arm style is non-straight single serif.</p> </dd> <dd> <p>The arm style is non-straight double serif.</p> </dd> <dd> <p>The arm style is straight horizontal.</p> </dd> <dd> <p>The arm style is straight vertical.</p> </dd> <dd> <p>The arm style is non-straight horizontal.</p> </dd> <dd> <p>The arm style is non-straight wedge.</p> </dd> <dd> <p>The arm style is non-straight vertical.</p> </dd> <dd> <p>The arm style is non-straight single serif.</p> </dd> <dd> <p>The arm style is non-straight double serif.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_LETTERFORM}}</strong> enumeration contains values that specify the roundness of letterform for text.</p> <dd> <p>Any letterform.</p> </dd> <dd> <p>No fit letterform.</p> </dd> <dd> <p>Normal contact letterform.</p> </dd> <dd> <p>Normal weighted letterform.</p> </dd> <dd> <p>Normal boxed letterform.</p> </dd> <dd> <p>Normal flattened letterform.</p> </dd> <dd> <p>Normal rounded letterform.</p> </dd> <dd> <p>Normal off-center letterform.</p> </dd> <dd> <p>Normal square letterform.</p> </dd> <dd> <p>Oblique contact letterform.</p> </dd> <dd> <p>Oblique weighted letterform.</p> </dd> <dd> <p>Oblique boxed letterform.</p> </dd> <dd> <p>Oblique flattened letterform.</p> </dd> <dd> <p>Oblique rounded letterform.</p> </dd> <dd> <p>Oblique off-center letterform.</p> </dd> <dd> <p>Oblique square letterform.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_MIDLINE}}</strong> enumeration contains values that specify info about the placement of midline across uppercase characters and the treatment of diagonal stem apexes.</p> <dd> <p>Any midline.</p> </dd> <dd> <p>No fit midline.</p> </dd> <dd> <p>Standard trimmed midline.</p> </dd> <dd> <p>Standard pointed midline.</p> </dd> <dd> <p>Standard serifed midline.</p> </dd> <dd> <p>High trimmed midline.</p> </dd> <dd> <p>High pointed midline.</p> </dd> <dd> <p>High serifed midline.</p> </dd> <dd> <p>Constant trimmed midline.</p> </dd> <dd> <p>Constant pointed midline.</p> </dd> <dd> <p>Constant serifed midline.</p> </dd> <dd> <p>Low trimmed midline.</p> </dd> <dd> <p>Low pointed midline.</p> </dd> <dd> <p>Low serifed midline.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_XHEIGHT}}</strong> enumeration contains values that specify info about the relative size of lowercase letters and the treatment of diacritic marks (xheight).</p> <dd> <p>Any xheight.</p> </dd> <dd> <p>No fit xheight.</p> </dd> <dd> <p>Constant small xheight.</p> </dd> <dd> <p>Constant standard xheight.</p> </dd> <dd> <p>Constant large xheight.</p> </dd> <dd> <p>Ducking small xheight.</p> </dd> <dd> <p>Ducking standard xheight.</p> </dd> <dd> <p>Ducking large xheight.</p> </dd> <dd> <p>Constant standard xheight.</p> </dd> <dd> <p>Ducking standard xheight.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_TOOL_KIND}}</strong> enumeration contains values that specify the kind of tool that is used to create character forms.</p> <dd> <p>Any kind of tool.</p> </dd> <dd> <p>No fit for the kind of tool.</p> </dd> <dd> <p>Flat {{NIB}} tool.</p> </dd> <dd> <p>Pressure point tool.</p> </dd> <dd> <p>Engraved tool.</p> </dd> <dd> <p>Ball tool.</p> </dd> <dd> <p>Brush tool.</p> </dd> <dd> <p>Rough tool.</p> </dd> <dd> <p>Felt-pen-brush-tip tool.</p> </dd> <dd> <p>Wild-brush tool.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_SPACING}}</strong> enumeration contains values that specify character spacing (monospace versus proportional).</p> <dd> <p>Any spacing.</p> </dd> <dd> <p>No fit for spacing.</p> </dd> <dd> <p>Spacing is proportional.</p> </dd> <dd> <p>Spacing is monospace.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_ASPECT_RATIO}}</strong> enumeration contains values that specify info about the ratio between width and height of the character face.</p> <dd> <p>Any aspect ratio.</p> </dd> <dd> <p>No fit for aspect ratio.</p> </dd> <dd> <p>Very condensed aspect ratio.</p> </dd> <dd> <p>Condensed aspect ratio.</p> </dd> <dd> <p>Normal aspect ratio.</p> </dd> <dd> <p>Expanded aspect ratio.</p> </dd> <dd> <p>Very expanded aspect ratio.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_SCRIPT_TOPOLOGY}}</strong> enumeration contains values that specify the topology of letterforms.</p> <dd> <p>Any script topology.</p> </dd> <dd> <p>No fit for script topology.</p> </dd> <dd> <p>Script topology is roman disconnected.</p> </dd> <dd> <p>Script topology is roman trailing.</p> </dd> <dd> <p>Script topology is roman connected.</p> </dd> <dd> <p>Script topology is cursive disconnected.</p> </dd> <dd> <p>Script topology is cursive trailing.</p> </dd> <dd> <p>Script topology is cursive connected.</p> </dd> <dd> <p>Script topology is black-letter disconnected.</p> </dd> <dd> <p>Script topology is black-letter trailing.</p> </dd> <dd> <p>Script topology is black-letter connected.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_SCRIPT_FORM}}</strong> enumeration contains values that specify the general look of the character face, with consideration of its slope and tails.</p> <dd> <p>Any script form.</p> </dd> <dd> <p>No fit for script form.</p> </dd> <dd> <p>Script form is upright with no wrapping.</p> </dd> <dd> <p>Script form is upright with some wrapping.</p> </dd> <dd> <p>Script form is upright with more wrapping.</p> </dd> <dd> <p>Script form is upright with extreme wrapping.</p> </dd> <dd> <p>Script form is oblique with no wrapping.</p> </dd> <dd> <p>Script form is oblique with some wrapping.</p> </dd> <dd> <p>Script form is oblique with more wrapping.</p> </dd> <dd> <p>Script form is oblique with extreme wrapping.</p> </dd> <dd> <p>Script form is exaggerated with no wrapping.</p> </dd> <dd> <p>Script form is exaggerated with some wrapping.</p> </dd> <dd> <p>Script form is exaggerated with more wrapping.</p> </dd> <dd> <p>Script form is exaggerated with extreme wrapping.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_FINIALS}}</strong> enumeration contains values that specify how character ends and miniscule ascenders are treated.</p> <dd> <p>Any finials.</p> </dd> <dd> <p>No fit for finials.</p> </dd> <dd> <p>No loops.</p> </dd> <dd> <p>No closed loops.</p> </dd> <dd> <p>No open loops.</p> </dd> <dd> <p>Sharp with no loops.</p> </dd> <dd> <p>Sharp with closed loops.</p> </dd> <dd> <p>Sharp with open loops.</p> </dd> <dd> <p>Tapered with no loops.</p> </dd> <dd> <p>Tapered with closed loops.</p> </dd> <dd> <p>Tapered with open loops.</p> </dd> <dd> <p>Round with no loops.</p> </dd> <dd> <p>Round with closed loops.</p> </dd> <dd> <p>Round with open loops.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_XASCENT}}</strong> enumeration contains values that specify the relative size of the lowercase letters.</p> <dd> <p>Any xascent.</p> </dd> <dd> <p>No fit for xascent.</p> </dd> <dd> <p>Very low xascent.</p> </dd> <dd> <p>Low xascent.</p> </dd> <dd> <p>Medium xascent.</p> </dd> <dd> <p>High xascent.</p> </dd> <dd> <p>Very high xascent.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_DECORATIVE_CLASS}}</strong> enumeration contains values that specify the general look of the character face.</p> <dd> <p>Any class of decorative typeface.</p> </dd> <dd> <p>No fit for decorative typeface.</p> </dd> <dd> <p>Derivative decorative typeface.</p> </dd> <dd> <p>Nonstandard topology decorative typeface.</p> </dd> <dd> <p>Nonstandard elements decorative typeface.</p> </dd> <dd> <p>Nonstandard aspect decorative typeface.</p> </dd> <dd> <p>Initials decorative typeface.</p> </dd> <dd> <p>Cartoon decorative typeface.</p> </dd> <dd> <p>Picture stems decorative typeface.</p> </dd> <dd> <p>Ornamented decorative typeface.</p> </dd> <dd> <p>Text and background decorative typeface.</p> </dd> <dd> <p>Collage decorative typeface.</p> </dd> <dd> <p>Montage decorative typeface.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_ASPECT}}</strong> enumeration contains values that specify the ratio between the width and height of the character face.</p> <dd> <p>Any aspect.</p> </dd> <dd> <p>No fit for aspect.</p> </dd> <dd> <p>Super condensed aspect.</p> </dd> <dd> <p>Very condensed aspect.</p> </dd> <dd> <p>Condensed aspect.</p> </dd> <dd> <p>Normal aspect.</p> </dd> <dd> <p>Extended aspect.</p> </dd> <dd> <p>Very extended aspect.</p> </dd> <dd> <p>Super extended aspect.</p> </dd> <dd> <p>Monospace aspect.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_FILL}}</strong> enumeration contains values that specify the type of fill and line treatment.</p> <dd> <p>Any fill.</p> </dd> <dd> <p>No fit for fill.</p> </dd> <dd> <p>The fill is the standard solid fill.</p> </dd> <dd> <p>No fill.</p> </dd> <dd> <p>The fill is patterned fill.</p> </dd> <dd> <p>The fill is complex fill.</p> </dd> <dd> <p>The fill is shaped fill.</p> </dd> <dd> <p>The fill is drawn distressed.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_LINING}}</strong> enumeration contains values that specify the handling of the outline for the decorative typeface.</p> <dd> <p>Any lining.</p> </dd> <dd> <p>No fit for lining.</p> </dd> <dd> <p>No lining.</p> </dd> <dd> <p>The lining is inline.</p> </dd> <dd> <p>The lining is outline.</p> </dd> <dd> <p>The lining is engraved.</p> </dd> <dd> <p>The lining is shadowed.</p> </dd> <dd> <p>The lining is relief.</p> </dd> <dd> <p>The lining is backdrop.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_DECORATIVE_TOPOLOGY}}</strong> enumeration contains values that specify the overall shape characteristics of the font.</p> <dd> <p>Any decorative topology.</p> </dd> <dd> <p>No fit for decorative topology.</p> </dd> <dd> <p>Standard decorative topology.</p> </dd> <dd> <p>Square decorative topology.</p> </dd> <dd> <p>Multiple segment decorative topology.</p> </dd> <dd> <p>Art deco decorative topology.</p> </dd> <dd> <p>Uneven weighting decorative topology.</p> </dd> <dd> <p>Diverse arms decorative topology.</p> </dd> <dd> <p>Diverse forms decorative topology.</p> </dd> <dd> <p>Lombardic forms decorative topology.</p> </dd> <dd> <p>Upper case in lower case decorative topology.</p> </dd> <dd> <p>The decorative topology is implied.</p> </dd> <dd> <p>Horseshoe E and A decorative topology.</p> </dd> <dd> <p>Cursive decorative topology.</p> </dd> <dd> <p>Blackletter decorative topology.</p> </dd> <dd> <p>Swash variance decorative topology.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_CHARACTER_RANGES}}</strong> enumeration contains values that specify the type of characters available in the font.</p> <dd> <p>Any range.</p> </dd> <dd> <p>No fit for range.</p> </dd> <dd> <p>The range includes extended collection.</p> </dd> <dd> <p>The range includes literals.</p> </dd> <dd> <p>The range doesn't include lower case.</p> </dd> <dd> <p>The range includes small capitals.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_SYMBOL_KIND}}</strong> enumeration contains values that specify the kind of symbol set.</p> <dd> <p>Any kind of symbol set.</p> </dd> <dd> <p>No fit for the kind of symbol set.</p> </dd> <dd> <p>The kind of symbol set is montages.</p> </dd> <dd> <p>The kind of symbol set is pictures.</p> </dd> <dd> <p>The kind of symbol set is shapes.</p> </dd> <dd> <p>The kind of symbol set is scientific symbols.</p> </dd> <dd> <p>The kind of symbol set is music symbols.</p> </dd> <dd> <p>The kind of symbol set is expert symbols.</p> </dd> <dd> <p>The kind of symbol set is patterns.</p> </dd> <dd> <p>The kind of symbol set is boarders.</p> </dd> <dd> <p>The kind of symbol set is icons.</p> </dd> <dd> <p>The kind of symbol set is logos.</p> </dd> <dd> <p>The kind of symbol set is industry specific.</p> </dd> <p>The <strong>{{DWRITE_PANOSE_SYMBOL_ASPECT_RATIO}}</strong> enumeration contains values that specify the aspect ratio of symbolic characters.</p> <dd> <p>Any aspect ratio of symbolic characters.</p> </dd> <dd> <p>No fit for aspect ratio of symbolic characters.</p> </dd> <dd> <p>No width aspect ratio of symbolic characters.</p> </dd> <dd> <p>Exceptionally wide symbolic characters.</p> </dd> <dd> <p>Super wide symbolic characters.</p> </dd> <dd> <p>Very wide symbolic characters.</p> </dd> <dd> <p>Wide symbolic characters.</p> </dd> <dd> <p>Normal aspect ratio of symbolic characters.</p> </dd> <dd> <p>Narrow symbolic characters.</p> </dd> <dd> <p>Very narrow symbolic characters.</p> </dd> <p>The <strong>{{DWRITE_OUTLINE_THRESHOLD}}</strong> enumeration contains values that specify the policy used by the <strong>{{IDWriteFontFace1::GetRecommendedRenderingMode}}</strong> method to determine whether to render glyphs in outline mode.</p> <p>Glyphs are rendered in outline mode by default at large sizes for performance reasons, but how large (that is, the outline threshold) depends on the quality of outline rendering. If the graphics system renders anti-aliased outlines, a relatively low threshold is used. But if the graphics system renders aliased outlines, a much higher threshold is used.</p> <p>The <strong>{{DWRITE_BASELINE}}</strong> enumeration contains values that specify the baseline for text alignment.</p> <dd> <p>The Roman baseline for horizontal; the Central baseline for vertical.</p> </dd> <dd> <p>The baseline that is used by alphabetic scripts such as Latin, Greek, and Cyrillic.</p> </dd> <dd> <p>Central baseline, which is generally used for vertical text.</p> </dd> <dd> <p>Mathematical baseline, which math characters are centered on.</p> </dd> <dd> <p>Hanging baseline, which is used in scripts like Devanagari.</p> </dd> <dd> <p>Ideographic bottom baseline for {{CJK}}, left in vertical.</p> </dd> <dd> <p>Ideographic top baseline for {{CJK}}, right in vertical.</p> </dd> <dd> <p>The bottom-most extent in horizontal, left-most in vertical.</p> </dd> <dd> <p>The top-most extent in horizontal, right-most in vertical.</p> </dd> <p>The <strong>{{DWRITE_VERTICAL_GLYPH_ORIENTATION}}</strong> enumeration contains values that specify the desired kind of glyph orientation for the text.</p> <p>The client specifies a <strong>{{DWRITE_VERTICAL_GLYPH_ORIENTATION}}</strong>-typed value to the analyzer as the desired orientation.</p><strong>Note</strong>??This is the client preference, and the constraints of the script determine the final presentation.? <dd> <p>The default glyph orientation. In vertical layout, naturally horizontal scripts (Latin, Thai, Arabic, Devanagari) rotate 90 degrees clockwise, while ideographic scripts (Chinese, Japanese, Korean) remain upright, 0 degrees.</p> </dd> <dd> <p>Stacked glyph orientation. Ideographic scripts and scripts that permit stacking (Latin, Hebrew) are stacked in vertical reading layout. Connected scripts (Arabic, Syriac, 'Phags-pa, Ogham), which would otherwise look broken if glyphs were kept at 0 degrees, remain connected and rotate.</p> </dd> <p>The <strong>{{DWRITE_GLYPH_ORIENTATION_ANGLE}}</strong> enumeration contains values that specify how the glyph is oriented to the x-axis.</p> <p>The text analyzer outputs <strong>{{DWRITE_GLYPH_ORIENTATION_ANGLE}}</strong> values. The value that it outputs depends on the desired orientation, bidi level, and character properties.</p> <dd> <p>Glyph orientation is upright.</p> </dd> <dd> <p>Glyph orientation is rotated 90 degrees clockwise.</p> </dd> <dd> <p>Glyph orientation is upside-down.</p> </dd> <dd> <p>Glyph orientation is rotated 270 degrees clockwise.</p> </dd> <p>The <strong>{{DWRITE_TEXT_ANTIALIAS_MODE}}</strong> enumeration contains values that specify the type of antialiasing to use for text when the rendering mode calls for antialiasing.</p> <dd> <p>ClearType antialiasing computes coverage independently for the red, green, and blue color elements of each pixel. This allows for more detail than conventional antialiasing. However, because there is no one alpha value for each pixel, ClearType is not suitable for rendering text onto a transparent intermediate bitmap.</p> </dd> <dd> <p>Grayscale antialiasing computes one coverage value for each pixel. Because the alpha value of each pixel is well-defined, text can be rendered onto a transparent bitmap, which can then be composited with other content.</p> <strong>Note</strong>??Grayscale rendering with <strong>{{IDWriteBitmapRenderTarget1}}</strong> uses premultiplied alpha. ? </dd> <p>The <strong>{{DWRITE_FONT_METRICS1}}</strong> structure specifies the metrics that are applicable to all glyphs within the font face.</p> <p><strong>{{DWRITE_FONT_METRICS1}}</strong> inherits from <strong>{{DWRITE_FONT_METRICS}}</strong>:</p><code> struct {{DWRITE_FONT_METRICS1}} : public {{DWRITE_FONT_METRICS}} { ... };</code> <dd> <p>Left edge of accumulated bounding blackbox of all glyphs in the font.</p> </dd> <dd> <p>Top edge of accumulated bounding blackbox of all glyphs in the font.</p> </dd> <dd> <p>Right edge of accumulated bounding blackbox of all glyphs in the font.</p> </dd> <dd> <p>Bottom edge of accumulated bounding blackbox of all glyphs in the font.</p> </dd> <dd> <p>Horizontal position of the subscript relative to the baseline origin. This is typically negative (to the left) in italic and oblique fonts, and zero in regular fonts.</p> </dd> <dd> <p>Vertical position of the subscript relative to the baseline. This is typically negative.</p> </dd> <dd> <p>Horizontal size of the subscript em box in design units, used to scale the simulated subscript relative to the full em box size. This is the numerator of the scaling ratio where denominator is the design units per em. If this member is zero, the font does not specify a scale factor, and the client uses its own policy.</p> </dd> <dd> <p>Vertical size of the subscript em box in design units, used to scale the simulated subscript relative to the full em box size. This is the numerator of the scaling ratio where denominator is the design units per em. If this member is zero, the font does not specify a scale factor, and the client uses its own policy.</p> </dd> <dd> <p>Horizontal position of the superscript relative to the baseline origin. This is typically positive (to the right) in italic and oblique fonts, and zero in regular fonts.</p> </dd> <dd> <p>Vertical position of the superscript relative to the baseline. This is typically positive.</p> </dd> <dd> <p>Horizontal size of the superscript em box in design units, used to scale the simulated superscript relative to the full em box size. This is the numerator of the scaling ratio where denominator is the design units per em. If this member is zero, the font does not specify a scale factor, and the client should use its own policy.</p> </dd> <dd> <p>Vertical size of the superscript em box in design units, used to scale the simulated superscript relative to the full em box size. This is the numerator of the scaling ratio where denominator is the design units per em. If this member is zero, the font does not specify a scale factor, and the client should use its own policy.</p> </dd> <dd> <p>A Boolean value that indicates that the ascent, descent, and lineGap are based on newer 'typographic' values in the font, rather than legacy values.</p> </dd> <p>The <strong>{{DWRITE_CARET_METRICS}}</strong> structure specifies the metrics for caret placement in a font.</p> <dd> <p>Vertical rise of the caret in font design units. Rise / Run yields the caret angle. Rise = 1 for perfectly upright fonts (non-italic).</p> </dd> <dd> <p>Horizontal run of the caret in font design units. Rise / Run yields the caret angle. Run = 0 for perfectly upright fonts (non-italic).</p> </dd> <dd> <p>Horizontal offset of the caret, in font design units, along the baseline for good appearance. Offset = 0 for perfectly upright fonts (non-italic).</p> </dd> <p>The <strong>{{DWRITE_PANOSE}}</strong> union describes typeface classification values that you use with <strong>{{IDWriteFont1::GetPanose}}</strong> to select and match the font.</p> <strong>Note</strong>??The <strong>familyKind</strong> member (index 0) is the only stable entry in the 10-byte array because all the entries that follow can change dynamically depending on the context of the first member.? <p>The <strong>{{DWRITE_UNICODE_RANGE}}</strong> structure specifies the range of Unicode code points.</p> <dd> <p>The first code point in the Unicode range.</p> </dd> <dd> <p>The last code point in the Unicode range.</p> </dd> <p>The <strong>{{DWRITE_SCRIPT_PROPERTIES}}</strong> structure specifies script properties for caret navigation and justification.</p> <dd> <p>The standardized four character code for the given script. </p> <strong>Note</strong>??These only include the general Unicode scripts, not any additional {{ISO}} 15924 scripts for bibliographic distinction. ? </dd> <dd> <p>The standardized numeric code, ranging 0-999.</p> </dd> <dd> <p>Number of characters to estimate look-ahead for complex scripts. Latin and all Kana are generally 1. Indic scripts are up to 15, and most others are 8.</p> <strong>Note</strong>??Combining marks and variation selectors can produce clusters that are longer than these look-aheads, so this estimate is considered typical language use. Diacritics must be tested explicitly separately. ? </dd> <dd> <p>Appropriate character to elongate the given script for justification. For example:</p> <ul> <li>Arabic - U+0640 Tatweel</li> <li>Ogham - U+1680 Ogham Space Mark</li> </ul> </dd> <dd> <p>Restrict the caret to whole clusters, like Thai and Devanagari. Scripts such as Arabic by default allow navigation between clusters. Others like Thai always navigate across whole clusters.</p> </dd> <dd> <p>The language uses dividers between words, such as spaces between Latin or the Ethiopic wordspace. Examples include Latin, Greek, Devanagari, and Ethiopic. Chinese, Korean, and Thai are excluded.</p> </dd> <dd> <p>The characters are discrete units from each other. This includes both block scripts and clustered scripts. Examples include Latin, Greek, Cyrillic, Hebrew, Chinese, and Thai.</p> </dd> <dd> <p>The language is a block script, expanding between characters. Examples include Chinese, Japanese, Korean, and Bopomofo.</p> </dd> <dd> <p>The language is justified within glyph clusters, not just between glyph clusters, such as the character sequence of Thai Lu and Sara Am (U+{{E026}}, U+{{E033}}), which form a single cluster but still expand between them. Examples include Thai, Lao, and Khmer.</p> </dd> <dd> <p>The script's clusters are connected to each other (such as the baseline-linked Devanagari), and no separation is added between characters.</p> <strong>Note</strong>??Cursively linked scripts like Arabic are also connected (but not all connected scripts are cursive). ? <p>Examples include Devanagari, Arabic, Syriac, Bengala, Gurmukhi, and Ogham. Latin, Chinese, and Thaana are excluded.</p> </dd> <dd> <p>The script is naturally cursive (Arabic and Syriac), meaning it uses other justification methods like kashida extension rather than inter-character spacing.</p> <strong>Note</strong>?? Although other scripts like Latin and Japanese might actually support handwritten cursive forms, they are not considered cursive scripts. ? <p>Examples include Arabic, Syriac, and Mongolian. Thaana, Devanagari, Latin, and Chinese are excluded.</p> </dd> <dd> <p>Reserved</p> </dd> <p>The <strong>{{DWRITE_JUSTIFICATION_OPPORTUNITY}}</strong> structure specifies justification info per glyph.</p> <dd> <p>Minimum amount of expansion to apply to the side of the glyph. This might vary from zero to infinity, typically being zero except for kashida.</p> </dd> <dd> <p>Maximum amount of expansion to apply to the side of the glyph. This might vary from zero to infinity, being zero for fixed-size characters and connected scripts, and non-zero for discrete scripts, and non-zero for cursive scripts at expansion points.</p> </dd> <dd> <p>Maximum amount of compression to apply to the side of the glyph. This might vary from zero up to the glyph cluster size.</p> </dd> <dd> <p>Priority of this expansion point. Larger priorities are applied later, while priority zero does nothing.</p> </dd> <dd> <p>Priority of this compression point. Larger priorities are applied later, while priority zero does nothing.</p> </dd> <dd> <p>Allow this expansion point to use up any remaining slack space even after all expansion priorities have been used up.</p> </dd> <dd> <p>Allow this compression point to use up any remaining space even after all compression priorities have been used up.</p> </dd> <dd> <p>Apply expansion and compression to the leading edge of the glyph. This bit is <strong>{{FALSE}}</strong> (0) for connected scripts, fixed-size characters, and diacritics. It is generally <strong>{{FALSE}}</strong> within a multi-glyph cluster, unless the script allows expansion of glyphs within a cluster, like Thai.</p> </dd> <dd> <p>Apply expansion and compression to the trailing edge of the glyph. This bit is <strong>{{FALSE}}</strong> (0) for connected scripts, fixed-size characters, and diacritics. It is generally <strong>{{FALSE}}</strong> within a multi-glyph cluster, unless the script allows expansion of glyphs within a cluster, like Thai.</p> </dd> <dd> <p>Reserved</p> </dd> <p>The interface you implement to provide needed information to the text analyzer, like the text and associated text properties.</p><p> </p><strong>Note</strong>?? If any of these callbacks return an error, the analysis functions will stop prematurely and return a callback error.? <p>Used by the text analyzer to obtain the desired glyph orientation and resolved bidi level.</p> <p>The text analyzer calls back to this to get the desired glyph orientation and resolved bidi level, which it uses along with the script properties of the text to determine the actual orientation of each character, which it reports back to the client via the sink SetGlyphOrientation method.</p> <p>Returning an error will abort the analysis.</p> <dd> <p>The text position.</p> </dd> <dd> <p>A reference to the text length.</p> </dd> <dd> <p>A <strong>{{DWRITE_VERTICAL_GLYPH_ORIENTATION}}</strong>-typed value that specifies the desired kind of glyph orientation for the text.</p> </dd> <dd> <p>A reference to the resolved bidi level.</p> </dd> <p> The interface you implement to receive the output of the text analyzers.</p> <p>The text analyzer calls back to this to report the actual orientation of each character for shaping and drawing.</p> <p>Returns a successful code or an error code to abort analysis.</p> <dd> <p>The starting position to report from.</p> </dd> <dd> <p>Number of {{UTF}}-16 units of the reported range.</p> </dd> <dd> <p>A <strong>{{DWRITE_GLYPH_ORIENTATION_ANGLE}}</strong>-typed value that specifies the angle of the glyphs within the text range (pass to <strong>{{IDWriteTextAnalyzer1::GetGlyphOrientationTransform}}</strong> to get the world relative transform).</p> </dd> <dd> <p>The adjusted bidi level to be used by the client layout for reordering runs. This will differ from the resolved bidi level retrieved from the source for cases such as Arabic stacked top-to-bottom, where the glyphs are still shaped as {{RTL}}, but the runs are {{TTB}} along with any {{CJK}} or Latin.</p> </dd> <dd> <p>Whether the glyphs are rotated on their side, which is the default case for {{CJK}} and the case stacked Latin</p> </dd> <dd> <p>Whether the script should be shaped as right-to-left. For Arabic stacked top-to-bottom, even when the adjusted bidi level is coerced to an even level, this will still be true.</p> </dd> <p>Represents text rendering settings for glyph rasterization and filtering.</p> <p>Gets the amount of contrast enhancement to use for grayscale antialiasing.</p> <p>The contrast enhancement value. Valid values are greater than or equal to zero.</p> <p>The root factory interface for all DirectWrite objects.</p> <p>Gets a font collection representing the set of {{EUDC}} (end-user defined characters) fonts.</p> <p>Note that if no {{EUDC}} is set on the system, the returned collection will be empty, meaning it will return success but GetFontFamilyCount will be zero.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The font collection to fill.</p> </dd> <dd> <p>Whether to check for updates.</p> </dd> <p>Creates a rendering parameters object with the specified properties.</p> <p>Standard {{HRESULT}} error code.</p> <dd> <p>The gamma level to be set for the new rendering parameters object.</p> </dd> <dd> <p>The enhanced contrast level to be set for the new rendering parameters object.</p> </dd> <dd> <p>The amount of contrast enhancement to use for grayscale antialiasing, zero or greater.</p> </dd> <dd> <p>The ClearType level to be set for the new rendering parameters object.</p> </dd> <dd> <p>Represents the internal structure of a device pixel (that is, the physical arrangement of red, green, and blue color components) that is assumed for purposes of rendering text.</p> </dd> <dd> <p>A value that represents the method (for example, ClearType natural quality) for rendering glyphs.</p> </dd> <dd> <p>When this method returns, contains an address of a reference to the newly created rendering parameters object.</p> </dd> <p>Represents an absolute reference to a font face. </p><p>This interface contains the font face type, appropriate file references, and face identification data. </p><p>You obtain various font data like metrics, names, and glyph outlines from the <strong>{{IDWriteFontFace1}}</strong> interface.</p> <p> Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a font face and are used by applications for layout calculations. </p> <p>This method does not return a value.</p> <dd> <p>A filled <strong>{{DWRITE_FONT_METRICS1}}</strong> structure that holds metrics for the current font face element. The metrics returned by this method are in font design units.</p> </dd> <p>Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a fontface and are used by applications for layout calculations.</p> <p>Standard {{HRESULT}} error code.</p> <dd> <p>The logical size of the font in {{DIP}} units.</p> </dd> <dd> <p>The number of physical pixels per {{DIP}}.</p> </dd> <dd> <p>An optional transform applied to the glyphs and their positions. This transform is applied after the scaling specified by the font size and <em>pixelsPerDip</em>.</p> </dd> <dd> <p>A reference to a <strong>{{DWRITE_FONT_METRICS1}}</strong> structure to fill in. The metrics returned by this function are in font design units.</p> </dd> <p>Gets caret metrics for the font in design units.</p> <p>Caret metrics are used by text editors for drawing the correct caret placement and slant.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{DWRITE_CARET_METRICS}}</strong> structure that is filled.</p> </dd> <p>Retrieves a list of character ranges supported by a font.</p> <p>A list of character ranges supported by the font is useful for scenarios like character picking, glyph display, and efficient font selection lookup. This is similar to {{GDI}}'s <strong>GetFontUnicodeRanges</strong>, except that it returns the full Unicode range, not just 16-bit {{UCS}}-2.</p><p>These ranges are from the cmap, not the {{OS}}/2::ulCodePageRange1.</p><p>If this method is unavailable, you can use the <strong>{{IDWriteFontFace::GetGlyphIndices}}</strong> method to check for missing glyphs. The method returns the 0 index for glyphs that aren't present in the font.</p><p> The <strong>{{IDWriteFont::HasCharacter}}</strong> method is often simpler in cases where you need to check a single character or a series of single characters in succession, such as in font fallback.</p> <p>This method can return one of these values.</p><table> <tr><th>Return value</th><th>Description</th></tr> <tr><td> <dl> <dt>{{S_OK}}</dt> </dl> </td><td> <p>The method executed successfully.</p> </td></tr> <tr><td> <dl> <dt>{{E_NOT_SUFFICIENT_BUFFER}}</dt> </dl> </td><td> <p>The buffer is too small. The <em>actualRangeCount</em> was more than the <em>maxRangeCount</em>.</p> </td></tr> </table><p>?</p> <dd> <p>Maximum number of character ranges passed in from the client.</p> </dd> <dd> <p>An array of <strong>{{DWRITE_UNICODE_RANGE}}</strong> structures that are filled with the character ranges.</p> </dd> <dd> <p>A reference to the actual number of character ranges, regardless of the maximum count.</p> </dd> <p>Determines whether the font of a text range is monospaced, that is, the font characters are the same fixed-pitch width.</p> <p>Returns {{TRUE}} if the font is monospaced, otherwise it returns {{FALSE}}.</p> <p>Retrieves the advances in design units for a sequences of glyphs.</p> <p> This is equivalent to calling GetGlyphMetrics and using only the advance width and height.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The number of glyphs to retrieve advances for.</p> </dd> <dd> <p>An array of glyph id's to retrieve advances for.</p> </dd> <dd> <p>The returned advances in font design units for each glyph.</p> </dd> <dd> <p>Retrieve the glyph's vertical advance height rather than horizontal advance widths.</p> </dd> <p>Returns the pixel-aligned advances for a sequences of glyphs.</p> <p>This is equivalent to calling <strong>GetGdiCompatibleGlyphMetrics</strong> and using only the advance width and height. </p><p>Like <strong>GetGdiCompatibleGlyphMetrics</strong>, these are in design units, meaning they must be scaled down by {{DWRITE_FONT_METRICS::designUnitsPerEm}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Logical size of the font in {{DIP}} units. A {{DIP}} ("device-independent pixel") equals 1/96 inch.</p> </dd> <dd> <p>Number of physical pixels per {{DIP}}. For example, if the {{DPI}} of the rendering surface is 96 this value is 1.0f. If the {{DPI}} is 120, this value is 120.0f/96.</p> </dd> <dd> <p>Optional transform applied to the glyphs and their positions. This transform is applied after the scaling specified by the font size and pixelsPerDip.</p> </dd> <dd> <p>When {{FALSE}}, the metrics are the same as {{GDI}} aliased text ({{DWRITE_MEASURING_MODE_GDI_CLASSIC}}). When {{TRUE}}, the metrics are the same as those measured by {{GDI}} using a font using {{CLEARTYPE_NATURAL_QUALITY}} ({{DWRITE_MEASURING_MODE_GDI_NATURAL}}).</p> </dd> <dd> <p>Retrieve the glyph's vertical advances rather than horizontal advances.</p> </dd> <dd> <p>Total glyphs to retrieve adjustments for.</p> </dd> <dd> <p>An array of glyph id's to retrieve advances.</p> </dd> <dd> <p>The returned advances in font design units for each glyph.</p> </dd> <p>Retrieves the kerning pair adjustments from the font's kern table.</p> <p><strong>GetKerningPairAdjustments</strong> isn't a direct replacement for {{GDI}}'s character based <strong>GetKerningPairs</strong>, but it serves the same role, without the client needing to cache them locally. <strong>GetKerningPairAdjustments</strong> also uses glyph id's directly rather than {{UCS}}-2 characters (how the kern table actually stores them), which avoids glyph collapse and ambiguity, such as the dash and hyphen, or space and non-breaking space. </p><p>Newer fonts may have only {{GPOS}} kerning instead of the legacy pair-table kerning. Such fonts, like Gabriola, will only return 0's for adjustments. <strong>GetKerningPairAdjustments</strong> doesn't virtualize and flatten these {{GPOS}} entries into kerning pairs.</p><p>You can realize a performance benefit by calling <strong>{{IDWriteFontFace1::HasKerningPairs}}</strong> to determine whether you need to call <strong>GetKerningPairAdjustments</strong>. If you previously called <strong>{{IDWriteFontFace1::HasKerningPairs}}</strong> and it returned {{FALSE}}, you can avoid calling <strong>GetKerningPairAdjustments</strong> because the font has no kerning pair-table entries. That is, in this situation, a call to <strong>GetKerningPairAdjustments</strong> would be a no-op.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Number of glyphs to retrieve adjustments for.</p> </dd> <dd> <p>An array of glyph id's to retrieve adjustments for.</p> </dd> <dd> <p>The advances, returned in font design units, for each glyph. The last glyph adjustment is zero.</p> </dd> <p>Determines whether the font supports pair-kerning.</p> <p>If the font doesn't support pair table kerning, you don't need to call <strong>{{IDWriteFontFace1::GetKerningPairAdjustments}}</strong> because it would retrieve all zeroes.</p> <p>Returns {{TRUE}} if the font supports kerning pairs, otherwise {{FALSE}}.</p> <p> Determines the recommended rendering mode for the font, using the specified size and rendering parameters. </p> <p>This method should be used to determine the actual rendering mode in cases where the rendering mode of the rendering params object is {{DWRITE_RENDERING_MODE_DEFAULT}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The logical size of the font in {{DIP}} units. A {{DIP}} ("device-independent pixel") equals 1/96 inch.</p> </dd> <dd> <p>The number of physical pixels per {{DIP}} in a horizontal position. For example, if the {{DPI}} of the rendering surface is 96, this value is 1.0f. If the {{DPI}} is 120, this value is 120.0f/96.</p> </dd> <dd> <p>The number of physical pixels per {{DIP}} in a vertical position. For example, if the {{DPI}} of the rendering surface is 96, this value is 1.0f. If the {{DPI}} is 120, this value is 120.0f/96.</p> </dd> <dd> <p>Specifies the world transform.</p> </dd> <dd> <p>Whether the glyphs in the run are sideways or not.</p> </dd> <dd> <p>A <strong>{{DWRITE_OUTLINE_THRESHOLD}}</strong>-typed value that specifies the quality of the graphics system's outline rendering, affects the size threshold above which outline rendering is used.</p> </dd> <dd> <p>The measuring method that will be used for glyphs in the font. Renderer implementations may choose different rendering modes for different measuring methods, for example: </p> <ul> <li>{{DWRITE_RENDERING_MODE_CLEARTYPE_NATURAL}} for <strong>{{DWRITE_MEASURING_MODE_NATURAL}}</strong> </li> <li> {{DWRITE_RENDERING_MODE_CLEARTYPE_GDI_CLASSIC}} for <strong>{{DWRITE_MEASURING_MODE_GDI_CLASSIC}}</strong> </li> <li> {{DWRITE_RENDERING_MODE_CLEARTYPE_GDI_NATURAL}} for <strong>{{DWRITE_MEASURING_MODE_GDI_NATURAL}}</strong> </li> </ul> </dd> <dd> <p>When this method returns, contains a value that indicates the recommended rendering mode to use.</p> </dd> <p>Retrieves the vertical forms of the nominal glyphs retrieved from GetGlyphIndices.</p> <p> The retrieval uses the font's 'vert' table. This is used in {{CJK}} vertical layout so the correct characters are shown.</p><p>Call <strong>GetGlyphIndices</strong> to get the nominal glyph indices, followed by calling this to remap the to the substituted forms, when the run is sideways, and the font has vertical glyph variants. See <strong>HasVerticalGlyphVariants</strong> for more info. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The number of glyphs to retrieve.</p> </dd> <dd> <p>Original glyph indices from cmap.</p> </dd> <dd> <p>The vertical form of glyph indices.</p> </dd> <p>Determines whether the font has any vertical glyph variants.</p> <p>For OpenType fonts, <strong>HasVerticalGlyphVariants</strong> returns {{TRUE}} if the font contains a "vert" feature. </p><p> <strong>{{IDWriteFontFace1::GetVerticalGlyphVariants}}</strong> retrieves the vertical forms of the nominal glyphs that are retrieved from <strong>{{IDWriteFontFace::GetGlyphIndices}}</strong>. </p> <p>Returns {{TRUE}} if the font contains vertical glyph variants, otherwise {{FALSE}}.</p> <p>Represents a physical font in a font collection.</p> <p> Obtains design units and common metrics for the font face. These metrics are applicable to all the glyphs within a font face and are used by applications for layout calculations. </p> <p>This method does not return a value.</p> <dd> <p> A filled <strong>{{DWRITE_FONT_METRICS1}}</strong> structure that has font metrics for the current font face. The metrics returned by this method are in font design units.</p> </dd> <p>Gets the {{PANOSE}} values from the font and is used for font selection and matching.</p> <p>If the font has no {{PANOSE}} values, they are set to 'any' (0) and DirectWrite doesn't simulate those values.</p> <p>This method does not return a value.</p> <dd> <p>A reference to the <strong>{{DWRITE_PANOSE}}</strong> structure to fill in.</p> </dd> <p>Retrieves the list of character ranges supported by a font.</p> <p>The list of character ranges supported by a font, is useful for scenarios like character picking, glyph display, and efficient font selection lookup. GetUnicodeRanges is similar to {{GDI}}'s GetFontUnicodeRanges, except that it returns the full Unicode range, not just 16-bit {{UCS}}-2.</p><p>These ranges are from the cmap, not the {{OS}}/2::ulCodePageRange1.</p><p>If this method is unavailable, you can use the <strong>{{IDWriteFontFace::GetGlyphIndices}}</strong> method to check for missing glyphs. The method returns the 0 index for glyphs that aren't present in the font.</p><p> The <strong>{{IDWriteFont::HasCharacter}}</strong> method is often simpler in cases where you need to check a single character or a series of single characters in succession, such as in font fallback.</p> <p>This method can return one of these values.</p><table> <tr><th>Return value</th><th>Description</th></tr> <tr><td> <dl> <dt>{{S_OK}}</dt> </dl> </td><td> <p>The method executed successfully.</p> </td></tr> <tr><td> <dl> <dt>{{E_NOT_SUFFICIENT_BUFFER}}</dt> </dl> </td><td> <p>The buffer is too small. The <em>actualRangeCount</em> was more than the <em>maxRangeCount</em>.</p> </td></tr> </table><p>?</p> <dd> <p>The maximum number of character ranges passed in from the client.</p> </dd> <dd> <p>An array of <strong>{{DWRITE_UNICODE_RANGE}}</strong> structures that are filled with the character ranges.</p> </dd> <dd> <p>A reference to the actual number of character ranges, regardless of the maximum count.</p> </dd> <p>Determines if the font is monospaced, that is, the characters are the same fixed-pitch width (non-proportional).</p> <p>Returns true if the font is monospaced, else it returns false.</p> <p>Analyzes various text properties for complex script processing.</p> <p>Applies spacing between characters, properly adjusting glyph clusters and diacritics.</p> <p>The input and output advances/offsets are allowed to alias the same array.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The spacing before each character, in reading order.</p> </dd> <dd> <p>The spacing after each character, in reading order.</p> </dd> <dd> <p>The minimum advance of each character, to prevent characters from becoming too thin or zero-width. This must be zero or greater.</p> </dd> <dd> <p>The length of the clustermap and original text.</p> </dd> <dd> <p>The number of glyphs.</p> </dd> <dd> <p>Mapping from character ranges to glyph ranges.</p> </dd> <dd> <p>The advance width of each glyph.</p> </dd> <dd> <p>The offset of the origin of each glyph.</p> </dd> <dd> <p>Properties of each glyph, from GetGlyphs.</p> </dd> <dd> <p>The new advance width of each glyph.</p> </dd> <dd> <p>The new offset of the origin of each glyph.</p> </dd> <p>Retrieves the given baseline from the font.</p> <p>If the baseline does not exist in the font, it is not considered an error, but the function will return exists = false. You may then use heuristics to calculate the missing base, or, if the flag simulationAllowed is true, the function will compute a reasonable approximation for you.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The font face to read.</p> </dd> <dd> <p>A <strong>{{DWRITE_BASELINE}}</strong>-typed value that specifies the baseline of interest.</p> </dd> <dd> <p>Whether the baseline is vertical or horizontal.</p> </dd> <dd> <p>Simulate the baseline if it is missing in the font.</p> </dd> <dd> <p>Script analysis result from AnalyzeScript.</p> <strong>Note</strong>??You can pass an empty script analysis structure, like this <code>{{DWRITE_SCRIPT_ANALYSIS}} scriptAnalysis = {};</code>, and this method will return the default baseline. ? </dd> <dd> <p>The language of the run.</p> </dd> <dd> <p>The baseline coordinate value in design units.</p> </dd> <dd> <p>Whether the returned baseline exists in the font.</p> </dd> <p>Analyzes a text range for script orientation, reading text and attributes from the source and reporting results to the sink callback <strong>SetGlyphOrientation</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Returns 2x3 transform matrix for the respective angle to draw the glyph run.</p> <p>The translation component of the transform returned is zero.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A <strong>{{DWRITE_GLYPH_ORIENTATION_ANGLE}}</strong>-typed value that specifies the angle that was reported into <strong>{{IDWriteTextAnalysisSink1::SetGlyphOrientation}}</strong>.</p> </dd> <dd> <p>Whether the run's glyphs are sideways or not.</p> </dd> <dd> <p>Returned transform.</p> </dd> <p>Retrieves the properties for a given script.</p> <p>Returns properties for the given script. If the script is invalid, it returns generic properties for the unknown script and {{E_INVALIDARG}}.</p> <dd> <p>The script for a run of text returned from <strong>{{IDWriteTextAnalyzer::AnalyzeScript}}</strong>.</p> </dd> <dd> <p>A reference to a <strong>{{DWRITE_SCRIPT_PROPERTIES}}</strong> structure that describes info for the script.</p> </dd> <p>Determines the complexity of text, and whether you need to call <strong>{{IDWriteTextAnalyzer::GetGlyphs}}</strong> for full script shaping. </p> <p>Text is not simple if the characters are part of a script that has complex shaping requirements, require bidi analysis, combine with other characters, reside in the supplementary planes, or have glyphs that participate in standard OpenType features. The length returned will not split combining marks from their base characters.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Retrieves justification opportunity information for each of the glyphs given the text and shaping glyph properties.</p> <p>This function is called per-run, after shaping is done via the <strong>{{IDWriteTextAnalyzer::GetGlyphs}}</strong> method. </p><strong>Note</strong>??this function only supports natural metrics (<strong>{{DWRITE_MEASURING_MODE_NATURAL}}</strong>).? <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Font face that was used for shaping. This is mainly important for returning correct results of the kashida width. </p> <p>May be {{NULL}}. </p> </dd> <dd> <p>Font em size used for the glyph run.</p> </dd> <dd> <p>Script of the text from the itemizer.</p> </dd> <dd> <p>Length of the text.</p> </dd> <dd> <p>Number of glyphs.</p> </dd> <dd> <p>Characters used to produce the glyphs.</p> </dd> <dd> <p>Clustermap produced from shaping.</p> </dd> <dd> <p>Glyph properties produced from shaping.</p> </dd> <dd> <p>A reference to a <strong>{{DWRITE_JUSTIFICATION_OPPORTUNITY}}</strong> structure that receives info for the allowed justification expansion/compression for each glyph.</p> </dd> <p>Justifies an array of glyph advances to fit the line width.</p> <p>You call <strong>JustifyGlyphAdvances</strong> after you call <strong>{{IDWriteTextAnalyzer1::GetJustificationOpportunities}}</strong> to collect all the opportunities, and <strong>JustifyGlyphAdvances</strong> spans across the entire line. The input and output arrays are allowed to alias each other, permitting in-place update.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The line width.</p> </dd> <dd> <p>The glyph count.</p> </dd> <dd> <p>A reference to a <strong>{{DWRITE_JUSTIFICATION_OPPORTUNITY}}</strong> structure that contains info for the allowed justification expansion/compression for each glyph. Get this info from <strong>{{IDWriteTextAnalyzer1::GetJustificationOpportunities}}</strong>. </p> </dd> <dd> <p>An array of glyph advances.</p> </dd> <dd> <p>An array of glyph offsets.</p> </dd> <dd> <p>The returned array of justified glyph advances.</p> </dd> <dd> <p>The returned array of justified glyph offsets.</p> </dd> <p>Fills in new glyphs for complex scripts where justification increased the advances of glyphs, such as Arabic with kashida.</p> <p>You call <strong>GetJustifiedGlyphs</strong> after the line has been justified, and it is per-run. </p><p>You should call <strong>GetJustifiedGlyphs</strong> if <strong>{{IDWriteTextAnalyzer1::GetScriptProperties}}</strong> returns a non-null <strong>{{DWRITE_SCRIPT_PROPERTIES}}.justificationCharacter</strong> for that script.</p><p> Use <strong>GetJustifiedGlyphs</strong> mainly for cursive scripts like Arabic. If <em>maxGlyphCount</em> is not large enough, <strong>GetJustifiedGlyphs</strong> returns the error {{E_NOT_SUFFICIENT_BUFFER}} and fills the variable to which <em>actualGlyphCount</em> points with the needed glyph count.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Font face used for shaping.</p> <p>May be {{NULL}}.</p> </dd> <dd> <p>Font em size used for the glyph run.</p> </dd> <dd> <p>Script of the text from the itemizer.</p> </dd> <dd> <p>Length of the text.</p> </dd> <dd> <p>Number of glyphs.</p> </dd> <dd> <p>Maximum number of output glyphs allocated by caller.</p> </dd> <dd> <p>Clustermap produced from shaping.</p> </dd> <dd> <p>Original glyphs produced from shaping.</p> </dd> <dd> <p>Original glyph advances produced from shaping.</p> </dd> <dd> <p>Justified glyph advances from <strong>{{IDWriteTextAnalyzer1::JustifyGlyphAdvances}}</strong>. </p> </dd> <dd> <p>Justified glyph offsets from <strong>{{IDWriteTextAnalyzer1::JustifyGlyphAdvances}}</strong>. </p> </dd> <dd> <p>Properties of each glyph, from <strong>{{IDWriteTextAnalyzer::GetGlyphs}}</strong>. </p> </dd> <dd> <p>The new glyph count written to the modified arrays, or the needed glyph count if the size is not large enough.</p> </dd> <dd> <p>Updated clustermap.</p> </dd> <dd> <p>Updated glyphs with new glyphs inserted where needed.</p> </dd> <dd> <p>Updated glyph advances.</p> </dd> <dd> <p>Updated glyph offsets.</p> </dd> <p>Represents a block of text after it has been fully analyzed and formatted.</p> <p>Enables or disables pair-kerning on a given text range.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The flag that indicates whether text is pair-kerned.</p> </dd> <dd> <p>The text range to which the change applies.</p> </dd> <p>Gets whether or not pair-kerning is enabled at given position.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The current text position.</p> </dd> <dd> <p>The flag that indicates whether text is pair-kerned.</p> </dd> <dd> <p>The position range of the current format.</p> </dd> <p>Sets the spacing between characters.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The spacing before each character, in reading order.</p> </dd> <dd> <p>The spacing after each character, in reading order.</p> </dd> <dd> <p>The minimum advance of each character, to prevent characters from becoming too thin or zero-width. This must be zero or greater.</p> </dd> <dd> <p>Text range to which this change applies.</p> </dd> <p>Gets the spacing between characters.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The current text position.</p> </dd> <dd> <p>The spacing before each character, in reading order.</p> </dd> <dd> <p>The spacing after each character, in reading order.</p> </dd> <dd> <p>The minimum advance of each character, to prevent characters from becoming too thin or zero-width. This must be zero or greater.</p> </dd> <dd> <p>The position range of the current format.</p> </dd> <p>Encapsulates a 32-bit device independent bitmap and device context, which you can use for rendering glyphs.</p> <p>Gets the current text antialiasing mode of the bitmap render target.</p> <p>Returns a <strong>{{DWRITE_TEXT_ANTIALIAS_MODE}}</strong>-typed value that specifies the antialiasing mode.</p> <p>Sets the current text antialiasing mode of the bitmap render target.</p> <p>The antialiasing mode of a newly-created bitmap render target defaults to <strong>{{DWRITE_TEXT_ANTIALIAS_MODE_CLEARTYPE}}</strong>. An app can change the antialiasing mode by calling <strong>SetTextAntialiasMode</strong>. For example, an app might specify <strong>{{DWRITE_TEXT_ANTIALIAS_MODE_GRAYSCALE}}</strong> for grayscale antialiasing when it renders text onto a transparent bitmap.</p> <p>Returns {{S_OK}} if successful, or {{E_INVALIDARG}} if the argument is not valid.</p> <dd> <p>A <strong>{{DWRITE_TEXT_ANTIALIAS_MODE}}</strong>-typed value that specifies the antialiasing mode.</p> </dd> <p>The optical margin alignment mode.</p><p> By default, glyphs are aligned to the margin by the default origin and side-bearings of the glyph. If you specify <strong>{{DWRITE_OPTICAL_ALIGNMENT_NO_SIDE_BEARINGS}}</strong>, then the alignment uses the side bearings to offset the glyph from the aligned edge to ensure the ink of the glyphs are aligned. </p> <dd> <p>Align to the default origin and side-bearings of the glyph.</p> </dd> <dd> <p>Align to the ink of the glyphs, such that the black box abuts the margins.</p> </dd> <p>Specifies whether to enable grid-fitting of glyph outlines (also known as hinting).</p> <dd> <p>Choose grid fitting based on the font's table information.</p> </dd> <dd> <p>Always disable grid fitting, using the ideal glyph outlines.</p> </dd> <dd> <p>Enable grid fitting, adjusting glyph outlines for device pixel display.</p> </dd> <p>Contains the metrics associated with text after layout. All coordinates are in device independent pixels ({{DIPs}}).</p> <dd> <p>A value that indicates the left-most point of formatted text relative to the layout box, while excluding any glyph overhang.</p> </dd> <dd> <p>A value that indicates the top-most point of formatted text relative to the layout box, while excluding any glyph overhang.</p> </dd> <dd> <p>A value that indicates the width of the formatted text, while ignoring trailing whitespace at the end of each line.</p> </dd> <dd> <p>The width of the formatted text, taking into account the trailing whitespace at the end of each line.</p> </dd> <dd> <p>The height of the formatted text. The height of an empty string is set to the same value as that of the default font.</p> </dd> <dd> <p>The initial width given to the layout. It can be either larger or smaller than the text content width, depending on whether the text was wrapped.</p> </dd> <dd> <p>Initial height given to the layout. Depending on the length of the text, it may be larger or smaller than the text content height.</p> </dd> <dd> <p>The maximum reordering count of any line of text, used to calculate the most number of hit-testing boxes needed. If the layout has no bidirectional text, or no text at all, the minimum level is 1.</p> </dd> <dd> <p>Total number of lines.</p> </dd> <p>Contains the information needed by renderers to draw glyph runs with glyph color information. All coordinates are in device independent pixels ({{DIPs}}).</p> <dd> <p>Glyph run to draw for this layer.</p> </dd> <dd> <p>Pointer to the glyph run description for this layer. This may be <strong>{{NULL}}</strong>. For example, when the original glyph run is split into multiple layers, one layer might have a description and the others have none.</p> </dd> <dd> <p>X coordinate of the baseline origin for the layer.</p> </dd> <dd> <p>Y coordinate of the baseline origin for the layer.</p> </dd> <dd> <p>Color value of the run; if all members are zero, the run should be drawn using the current brush.</p> </dd> <dd> <p>Zero-based index into the font?s color palette; if this is <strong>0xFFFF</strong>, the run should be drawn using the current brush.</p> </dd> <p>Allows you to access fallback fonts from the font list.</p><p>The <strong>{{IDWriteFontFallback}}</strong> interface defines a fallback sequence to map character ranges to fonts, which is either created via <strong>{{IDWriteFontFallbackBuilder}}</strong> or retrieved from <strong>{{IDWriteFactory2::GetSystemFontFallback}}</strong>. </p> <p>Determines an appropriate font to use to render the beginning range of text.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The text source implementation holds the text and locale.</p> </dd> <dd> <p>Starting position to analyze.</p> </dd> <dd> <p>Length of the text to analyze.</p> </dd> <dd> <p>Default font collection to use.</p> </dd> <dd> <p>Family name of the base font. If you pass null, no matching will be done against the family.</p> </dd> <dd> <p>The desired weight.</p> </dd> <dd> <p>The desired style.</p> </dd> <dd> <p>The desired stretch.</p> </dd> <dd> <p>Length of text mapped to the mapped font. This will always be less than or equal to the text length and greater than zero (if the text length is non-zero) so the caller advances at least one character.</p> </dd> <dd> <p>The font that should be used to render the first <em>mappedLength</em> characters of the text. If it returns {{NULL}}, that means that no font can render the text, and <em>mappedLength</em> is the number of characters to skip (rendered with a missing glyph). </p> </dd> <dd> <p>Scale factor to multiply the em size of the returned font by.</p> </dd> <p> Represents a set of application-defined callbacks that perform rendering of text, inline objects, and decorations such as underlines. </p> <p> {{IDWriteTextLayout::}}<strong>Draw</strong> calls this function to instruct the client to render a run of glyphs. </p> <p>The <strong>{{IDWriteTextLayout::Draw}}</strong> function calls this callback function with all the information about glyphs to render. The application implements this callback by mostly delegating the call to the underlying platform's graphics {{API}} such as Direct2D to draw glyphs on the drawing context. An application that uses {{GDI}} can implement this callback in terms of the <strong>{{IDWriteBitmapRenderTarget::DrawGlyphRun}}</strong> method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> {{IDWriteTextLayout::}}<strong>Draw</strong> calls this function to instruct the client to draw an underline. </p> <p> A single underline can be broken into multiple calls, depending on how the formatting changes attributes. If font sizes/styles change within an underline, the thickness and offset will be averaged weighted according to characters. To get an appropriate starting pixel position, add underline::offset to the baseline. Otherwise there will be no spacing between the text. The x coordinate will always be passed as the left side, regardless of text directionality. This simplifies drawing and reduces the problem of round-off that could potentially cause gaps or a double stamped alpha blend. To avoid alpha overlap, round the end points to the nearest device pixel. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> {{IDWriteTextLayout::}}<strong>Draw</strong> calls this function to instruct the client to draw a strikethrough. </p> <p> A single strikethrough can be broken into multiple calls, depending on how the formatting changes attributes. Strikethrough is not averaged across font sizes/styles changes. To get an appropriate starting pixel position, add strikethrough::offset to the baseline. Like underlines, the x coordinate will always be passed as the left side, regardless of text directionality. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> {{IDWriteTextLayout::}}<strong>Draw</strong> calls this application callback when it needs to draw an inline object. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Describes the font and paragraph properties used to format text, and it describes locale information. This interface has all the same methods as <strong>{{IDWriteTextFormat}}</strong> and adds the ability for you to apply an explicit orientation.</p> <p>Sets the orientation of a text format.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The orientation to apply to the text format.</p> </dd> <p>Get the preferred orientation of glyphs when using a vertical reading direction.</p> <p>The preferred orientation of glyphs when using a vertical reading direction.</p> <p>Sets the wrapping mode of the last line.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>If set to {{FALSE}}, the last line is not wrapped. If set to {{TRUE}}, the last line is wrapped.</p> <p>The last line is wrapped by default.</p> </dd> <p>Gets the wrapping mode of the last line.</p> <p>Returns {{FALSE}} if the last line is not wrapped; {{TRUE}} if the last line is wrapped.</p> <p>Sets the optical margin alignment for the text format.</p><p> By default, glyphs are aligned to the margin by the default origin and side-bearings of the glyph. If you specify <strong>{{DWRITE_OPTICAL_ALIGNMENT_USING_SIDE_BEARINGS}}</strong>, then the alignment Suses the side bearings to offset the glyph from the aligned edge to ensure the ink of the glyphs are aligned. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The optical alignment to set.</p> </dd> <p>Gets the optical margin alignment for the text format.</p> <p>The optical alignment.</p> <p> Applies the custom font fallback onto the layout. If none is set, it uses the default system fallback list. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The font fallback to apply to the layout.</p> </dd> <p>Gets the current fallback. If none was ever set since creating the layout, it will be nullptr.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Contains an address of a reference to the the current font fallback object.</p> </dd> <p>Represents a block of text after it has been fully analyzed and formatted.</p> <p> Retrieves overall metrics for the formatted string. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains the measured distances of text and associated content after being formatted.</p> </dd> <p>Set the preferred orientation of glyphs when using a vertical reading direction.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Preferred glyph orientation.</p> </dd> <p>Get the preferred orientation of glyphs when using a vertical reading direction.</p> <p>Set whether or not the last word on the last line is wrapped. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Line wrapping option.</p> </dd> <p>Get whether or not the last word on the last line is wrapped.</p> <p>Set how the glyphs align to the edges the margin. Default behavior is to align glyphs using their default glyphs metrics, which include side bearings. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Optical alignment option.</p> </dd> <p>Get how the glyphs align to the edges the margin. </p> <p>Apply a custom font fallback onto layout. If none is specified, the layout uses the system fallback list. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Custom font fallback created from <strong>{{IDWriteFontFallbackBuilder::CreateFontFallback}}</strong> or <strong>{{IDWriteFactory2::GetSystemFontFallback}}</strong>. </p> </dd> <p>Get the current font fallback object. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The current font fallback object.</p> </dd> <p>Analyzes various text properties for complex script processing.</p> <p>Returns 2x3 transform matrix for the respective angle to draw the glyph run.</p><p>Extends <strong>{{IDWriteTextAnalyzer1::GetGlyphOrientationTransform}}</strong> to pass valid values for the baseline origin rather than zeroes.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Returns a complete list of OpenType features available for a script or font. If a feature is partially supported, then this method indicates that it is supported. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The font face to get features from.</p> </dd> <dd> <p>The script analysis for the script or font to check.</p> </dd> <dd> <p>The locale name to check.</p> </dd> <dd> <p>The maximum number of tags to return.</p> </dd> <dd> <p>The actual number of tags returned.</p> </dd> <dd> <p>An array of OpenType font feature tags.</p> </dd> <p>Checks if a typographic feature is available for a glyph or a set of glyphs.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The font face to read glyph information from.</p> </dd> <dd> <p>The script analysis for the script or font to check.</p> </dd> <dd> <p>The locale name to check.</p> </dd> <dd> <p>The font feature tag to check.</p> </dd> <dd> <p>The number of glyphs to check.</p> </dd> <dd> <p>An array of glyph indices to check.</p> </dd> <dd> <p>An array of integers that indicate whether or not the font feature applies to each glyph specified.</p> </dd> <p>Allows you to create Unicode font fallback mappings and create a font fall back object from those mappings.</p> <p>Appends a single mapping to the list. Call this once for each additional mapping.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Unicode ranges that apply to this mapping.</p> </dd> <dd> <p>Number of Unicode ranges.</p> </dd> <dd> <p>List of target family name strings.</p> </dd> <dd> <p>Number of target family names.</p> </dd> <dd> <p>Optional explicit font collection for this mapping.</p> </dd> <dd> <p>Locale of the context.</p> </dd> <dd> <p>Base family name to match against, if applicable.</p> </dd> <dd> <p>Scale factor to multiply the result target font by.</p> </dd> <p>Add all the mappings from an existing font fallback object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An existing font fallback object.</p> </dd> <p>Creates the finalized fallback object from the mappings added.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Contains an address of a reference to the created fallback list.</p> </dd> <p>Represents a physical font in a font collection.</p><p>This interface adds the ability to check if a color rendering path is potentially necessary.</p> <p>Enables determining if a color rendering path is potentially necessary.</p> <p>Returns <strong>{{TRUE}}</strong> if the font has color information ({{COLR}} and {{CPAL}} tables); otherwise <strong>{{FALSE}}</strong>.</p> <p>Represents an absolute reference to a font face. </p><p>This interface contains the font face type, appropriate file references, and face identification data. </p><p>You obtain various font data like metrics, names, and glyph outlines from the <strong>{{IDWriteFontFace2}}</strong> interface.</p><p>This interface adds the ability to check if a color rendering path is potentially necessary.</p> <p>Allows you to determine if a color rendering path is potentially necessary.</p> <p>Returns <strong>{{TRUE}}</strong> if a color rendering path is potentially necessary.</p> <p>Gets the number of color palettes defined by the font. </p> <p>The return value is zero if the font has no color information. Color fonts are required to define at least one palette, with palette index zero reserved as the default palette.</p> <p>Get the number of entries in each color palette.</p> <p>The number of entries in each color palette. All color palettes in a font have the same number of palette entries. The return value is zero if the font has no color information. </p> <p>Gets color values from the font's color palette.</p> <p>This method can return one of these values.</p><table> <tr><th>Return value</th><th>Description</th></tr> <tr><td> <dl> <dt>{{E_INVALIDARG}}</dt> </dl> </td><td> <p>The sum of <em>firstEntryIndex</em> and <em>entryCount</em> is greater than the actual number of palette entries that's returned by the <strong>GetPaletteEntryCount</strong> method. </p> </td></tr> <tr><td> <dl> <dt>{{DWRITE_E_NOCOLOR}}</dt> </dl> </td><td> <p>The font doesn't have a palette with the specified palette index.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of the color palette. If the font does not have a palette with the specified index, the method returns <strong>{{DWRITE_E_NOCOLOR}}</strong>.</p> </dd> <dd> <p>Zero-based index of the first palette entry to read.</p> </dd> <dd> <p>Number of palette entries to read.</p> </dd> <dd> <p>Array that receives the color values.</p> </dd> <p>Determines the recommended text rendering and grid-fit mode to be used based on the font, size, world transform, and measuring mode.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Logical font size in {{DIPs}}.</p> </dd> <dd> <p>Number of pixels per logical inch in the horizontal direction.</p> </dd> <dd> <p>Number of pixels per logical inch in the vertical direction.</p> </dd> <dd> <p>A <strong>{{DWRITE_MATRIX}}</strong> structure that describes the world transform.</p> </dd> <dd> <p>Specifies whether the font is sideways. <strong>{{TRUE}}</strong> if the font is sideways; otherwise, <strong>{{FALSE}}</strong>. </p> </dd> <dd> <p>A <strong>{{DWRITE_OUTLINE_THRESHOLD}}</strong>-typed value that specifies the quality of the graphics system's outline rendering, affects the size threshold above which outline rendering is used.</p> </dd> <dd> <p>A <strong>{{DWRITE_MEASURING_MODE}}</strong>-typed value that specifies the method used to measure during text layout. For proper glyph spacing, this method returns a rendering mode that is compatible with the specified measuring mode.</p> </dd> <dd> <p>A reference to a <strong>{{IDWriteRenderingParams}}</strong> interface for the rendering parameters object. This parameter is necessary in case the rendering parameters object overrides the rendering mode.</p> </dd> <dd> <p>A reference to a variable that receives a <strong>{{DWRITE_RENDERING_MODE}}</strong>-typed value for the recommended rendering mode.</p> </dd> <dd> <p>A reference to a variable that receives a <strong>{{DWRITE_GRID_FIT_MODE}}</strong>-typed value for the recommended grid-fit mode.</p> </dd> <p>This interface allows the application to enumerate through the color glyph runs. The enumerator enumerates the layers in a back to front order for appropriate layering.</p> <p>Move to the next glyph run in the enumerator.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Returns <strong>{{TRUE}}</strong> if there is a next glyph run.</p> </dd> <p>Returns the current glyph run of the enumerator.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the current glyph run.</p> </dd> <p>Represents text rendering settings for glyph rasterization and filtering.</p> <p>Gets the grid fitting mode.</p> <p>Returns a <strong>{{DWRITE_GRID_FIT_MODE}}</strong>-typed value for the grid fitting mode.</p> <p>The root factory interface for all DirectWrite objects.</p> <p>Creates a font fallback object from the system font fallback list.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Contains an address of a reference to the newly created font fallback object.</p> </dd> <p>Creates a font fallback builder object.</p><p>A font fall back builder allows you to create Unicode font fallback mappings and create a font fall back object from those mappings.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Contains an address of a reference to the newly created font fallback builder object.</p> </dd> <p>This method is called on a glyph run to translate it in to multiple color glyph runs.</p> <p> If the code calls this method with a glyph run that contains no color information, the method returns <strong>{{DWRITE_E_NOCOLOR}}</strong> to let the application know that it can just draw the original glyph run. If the glyph run contains color information, the function returns an object that can be enumerated through to expose runs and associated colors. The application then calls <strong>DrawGlyphRun</strong> with each of the returned glyph runs and foreground colors. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The horizontal baseline origin of the original glyph run.</p> </dd> <dd> <p>The vertical baseline origin of the original glyph run.</p> </dd> <dd> <p>Original glyph run containing monochrome glyph {{IDs}}.</p> </dd> <dd> <p>Optional glyph run description.</p> </dd> <dd> <p>Measuring mode used to compute glyph positions if the run contains color glyphs.</p> </dd> <dd> <p> World transform multiplied by any {{DPI}} scaling. This is needed to compute glyph positions if the run contains color glyphs and the measuring mode is not <strong>{{DWRITE_MEASURING_MODE_NATURAL}}</strong>. If this parameter is <strong>{{NULL}}</strong>, and identity transform is assumed. </p> </dd> <dd> <p> Zero-based index of the color palette to use. Valid indices are less than the number of palettes in the font, as returned by <strong>{{IDWriteFontFace2::GetColorPaletteCount}}</strong>. </p> </dd> <dd> <p> If the original glyph run contains color glyphs, this parameter receives a reference to an <strong>{{IDWriteColorGlyphRunEnumerator}}</strong> interface. The client uses the returned interface to get information about glyph runs and associated colors to render instead of the original glyph run. If the original glyph run does not contain color glyphs, this method returns <strong>{{DWRITE_E_NOCOLOR}}</strong> and the output reference is <strong>{{NULL}}</strong>. </p> </dd> <p>Creates a rendering parameters object with the specified properties.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The gamma value used for gamma correction, which must be greater than zero and cannot exceed 256.</p> </dd> <dd> <p>The amount of contrast enhancement, zero or greater.</p> </dd> <dd> <p>The amount of contrast enhancement, zero or greater.</p> </dd> <dd> <p>The degree of ClearType level, from 0.0f (no ClearType) to 1.0f (full ClearType).</p> </dd> <dd> <p>The geometry of a device pixel.</p> </dd> <dd> <p>Method of rendering glyphs. In most cases, this should be {{DWRITE_RENDERING_MODE_DEFAULT}} to automatically use an appropriate mode.</p> </dd> <dd> <p>How to grid fit glyph outlines. In most cases, this should be {{DWRITE_GRID_FIT_DEFAULT}} to automatically choose an appropriate mode.</p> </dd> <dd> <p>Holds the newly created rendering parameters object, or {{NULL}} in case of failure.</p> </dd> <p>Creates a glyph run analysis object, which encapsulates information used to render a glyph run.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Structure specifying the properties of the glyph run.</p> </dd> <dd> <p>Optional transform applied to the glyphs and their positions. This transform is applied after the scaling specified by the emSize and pixelsPerDip.</p> </dd> <dd> <p>Specifies the rendering mode, which must be one of the raster rendering modes (i.e., not default and not outline).</p> </dd> <dd> <p>Specifies the method to measure glyphs.</p> </dd> <dd> <p>How to grid-fit glyph outlines. This must be non-default.</p> </dd> <dd> <p>Specifies the antialias mode.</p> </dd> <dd> <p>Horizontal position of the baseline origin, in {{DIPs}}.</p> </dd> <dd> <p>Vertical position of the baseline origin, in {{DIPs}}.</p> </dd> <dd> <p>Receives a reference to the newly created object.</p> </dd> <p>Identifies a string in a font.</p> <dd> <p>Unspecified font property identifier.</p> </dd> <dd> <p>Family name for the weight-width-slope model.</p> </dd> <dd> <p>Family name preferred by the designer. This enables font designers to group more than four fonts in a single family without losing compatibility with {{GDI}}. This name is typically only present if it differs from the {{GDI}}-compatible family name.</p> </dd> <dd> <p>Face name of the font, for example Regular or Bold.</p> </dd> <dd> <p>The full name of the font, for example "Arial Bold", from name id 4 in the name table.</p> </dd> <dd> <p>{{GDI}}-compatible family name. Because {{GDI}} allows a maximum of four fonts per family, fonts in the same family may have different {{GDI}}-compatible family names, for example "Arial", "Arial Narrow", "Arial Black".</p> </dd> <dd> <p>The postscript name of the font, for example "GillSans-Bold", from name id 6 in the name table.</p> </dd> <dd> <p>Script/language tag to identify the scripts or languages that the font was primarily designed to support.</p> </dd> <dd> <p>Script/language tag to identify the scripts or languages that the font declares it is able to support.</p> </dd> <dd> <p>Semantic tag to describe the font, for example Fancy, Decorative, Handmade, Sans-serif, Swiss, Pixel, Futuristic.</p> </dd> <dd> <p>Weight of the font represented as a decimal string in the range 1-999.</p> </dd> <dd> <p>Stretch of the font represented as a decimal string in the range 1-9.</p> </dd> <dd> <p>Style of the font represented as a decimal string in the range 0-2.</p> </dd> <dd> <p>Total number of properties.</p> </dd> <p>Specifies the location of a resource.</p> <dd> <p>The resource is remote, and information about it is unknown, including the file size and date. If you attempt to create a font or file stream, the creation will fail until locality becomes at least partial. </p> </dd> <dd> <p>The resource is partially local, which means you can query the size and date of the file stream. With this type, you also might be able to create a font face and retrieve the particular glyphs for metrics and drawing, but not all the glyphs will be present.</p> </dd> <dd> <p>The resource is completely local, and all font functions can be called without concern of missing data or errors related to network connectivity.</p> </dd> <p> Represents a method of rendering glyphs. </p><strong>Note</strong>?? This topic is about <strong>{{DWRITE_RENDERING_MODE}}</strong> in Windows?8 and later. For info on the previous version see <strong>this topic</strong>.? <p>Specify whether <strong>{{DWRITE_FONT_METRICS}}</strong>::lineGap value should be part of the line metrics</p> <p>Represents the degree to which a font has been stretched compared to a font's normal aspect ratio. The enumerated values correspond to the <em>usWidthClass</em> definition in the OpenType specification. The usWidthClass represents an integer value between 1 and 9?lower values indicate narrower widths; higher values indicate wider widths.</p> <p>A font stretch describes the degree to which a font form is stretched from its normal aspect ratio, which is the original width to height ratio specified for the glyphs in the font. The following illustration shows an example of Normal and Condensed stretches for the Rockwell Bold typeface.</p><p></p><strong>Note</strong>??Values other than the ones defined in the enumeration are considered to be invalid, and are rejected by font {{API}} functions.? <dd> <p>Predefined font stretch : Not known (0).</p> </dd> <dd> <p>Predefined font stretch : Ultra-condensed (1).</p> </dd> <dd> <p>Predefined font stretch : Extra-condensed (2).</p> </dd> <dd> <p>Predefined font stretch : Condensed (3).</p> </dd> <dd> <p>Predefined font stretch : Semi-condensed (4).</p> </dd> <dd> <p>Predefined font stretch : Normal (5).</p> </dd> <dd> <p>Predefined font stretch : Medium (5).</p> </dd> <dd> <p>Predefined font stretch : Semi-expanded (6).</p> </dd> <dd> <p>Predefined font stretch : Expanded (7).</p> </dd> <dd> <p>Predefined font stretch : Extra-expanded (8).</p> </dd> <dd> <p>Predefined font stretch : Ultra-expanded (9).</p> </dd> <p>Font property used for filtering font sets and building a font set with explicit properties.</p> <dd> <p>Specifies the requested font property, such as {{DWRITE_FONT_PROPERTY_ID_FAMILY_NAME}}.</p> </dd> <dd> <p>Specifies the value, such as "Segoe {{UI}}".</p> </dd> <dd> <p>Specifies the locale to use, such as "en-{{US}}". Simply leave this empty when used with the font set filtering functions, as they will find a match regardless of language. For passing to AddFontFaceReference, the localeName specifies the language of the property value.</p> </dd> <p>Contains information about a formatted line of text.</p> <dd> <p>The number of text positions in the text line. This includes any trailing whitespace and newline characters.</p> </dd> <dd> <p>The number of whitespace positions at the end of the text line. Newline sequences are considered whitespace.</p> </dd> <dd> <p>The number of characters in the newline sequence at the end of the text line. If the count is zero, then the text line was either wrapped or it is the end of the text.</p> </dd> <dd> <p>The height of the text line.</p> </dd> <dd> <p>The distance from the top of the text line to its baseline.</p> </dd> <dd> <p>The line is trimmed.</p> </dd> <dd> <p>White space before the content of the line. This is included in the line height and baseline distances. If the line is formatted horizontally either with a uniform line spacing or with proportional line spacing, this value represents the extra space above the content.</p> </dd> <dd> <p>White space after the content of the line. This is included in the height of the line. If the line is formatted horizontally either with a uniform line spacing or with proportional line spacing, this value represents the extra space below the content.</p> </dd> <p></p> <dd> <p>Method used to determine line spacing.</p> </dd> <dd> <p>Spacing between lines. The interpretation of this parameter depends upon the line spacing method, as follows: </p> <ul> <li>Line spacing: ignored</li> <li>uniform line spacing: explicit distance in {{DIPs}} between lines</li> <li>proportional line spacing: a scaling factor to be applied to the computed line height; for each line, the height of the line is computed as for default line spacing, and the scaling factor is applied to that value.</li> </ul> </dd> <dd> <p>Distance from top of line to baseline. The interpretation of this parameter depends upon the line spacing method, as follows: </p> <ul> <li>default line spacing: ignored</li> <li>uniform line spacing: explicit distance in {{DIPs}} from the top of the line to the baseline</li> <li>proportional line spacing: a scaling factor applied to the computed baseline; for each line, the baseline distance is computed as for default line spacing, and the scaling factor is applied to that value.</li> </ul> </dd> <dd> <p>Proportion of the entire leading distributed before the line. The allowed value is between 0 and 1.0. The remaining leading is distributed after the line. It is ignored for the default and uniform line spacing methods. The leading that is available to distribute before or after the line depends on the values of the height and baseline parameters.</p> </dd> <dd> <p>Specify whether <strong>{{DWRITE_FONT_METRICS}}</strong>::lineGap value should be part of the line metrics.</p> </dd> <p>Represents a color glyph run. The {{IDWriteFactory4::TranslateColorGlyphRun}} method returns an ordered collection of color glyph runs of varying types depending on what the font supports.</p> <dd> <p>Type of glyph image format for this color run. Exactly one type will be set since TranslateColorGlyphRun has already broken down the run into separate parts.</p> </dd> <dd> <p>Measuring mode to use for this glyph run.</p> </dd> <p>Data for a single glyph from GetGlyphImageData.</p> <dd> <p>Pointer to the glyph data.</p> </dd> <dd> <p>Size of glyph data in bytes.</p> </dd> <dd> <p>Unique identifier for the glyph data. Clients may use this to cache a parsed/decompressed version and tell whether a repeated call to the same font returns the same data.</p> </dd> <dd> <p>Pixels per em of the returned data. For non-scalable raster data ({{PNG}}/{{TIFF}}/{{JPG}}), this can be larger or smaller than requested from GetGlyphImageData when there isn't an exact match. For scaling intermediate sizes, use: desired pixels per em * font em size / actual pixels per em.</p> </dd> <dd> <p>Size of image when the format is pixel data.</p> </dd> <dd> <p>Left origin along the horizontal Roman baseline.</p> </dd> <dd> <p>Right origin along the horizontal Roman baseline.</p> </dd> <dd> <p>Top origin along the vertical central baseline.</p> </dd> <dd> <p>Bottom origin along vertical central baseline.</p> </dd> <p>Represents a reference to a font face. A uniquely identifying reference to a font, from which you can create a font face to query font metrics and use for rendering. A font face reference consists of a font file, font face index, and font face simulation. The file data may or may not be physically present on the local machine yet. </p> <p>Creates a font face from the reference for use with layout, shaping, or rendering.</p> <p>This function can fail with {{DWRITE_E_REMOTEFONT}} if the font is not local.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Newly created font face object, or nullptr in the case of failure.</p> </dd> <p>Creates a font face with alternate font simulations, for example, to explicitly simulate a bold font face out of a regular variant.</p> <p>This function can fail with {{DWRITE_E_REMOTEFONT}} if the font is not local.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Font face simulation flags for algorithmic emboldening and italicization.</p> </dd> <dd> <p>Newly created font face object, or nullptr in the case of failure.</p> </dd> <p>Obtains the zero-based index of the font face in its font file or files. If the font files contain a single face, the return value is zero. </p> <p> the zero-based index of the font face in its font file or files. If the font files contain a single face, the return value is zero.</p> <p>Obtains the algorithmic style simulation flags of a font face.</p> <p>Returns the algorithmic style simulation flags of a font face.</p> <p>Obtains the font file representing a font face.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> </dd> <p>Get the local size of the font face in bytes, which will always be less than or equal to GetFullSize. If the locality is remote, this value is zero. If full, this value will equal GetFileSize.</p> <p>the local size of the font face in bytes, which will always be less than or equal to GetFullSize. If the locality is remote, this value is zero. If full, this value will equal <strong>GetFileSize</strong>.</p> <p>Get the total size of the font face in bytes. </p> <p>Returns the total size of the font face in bytes. If the locality is remote, this value is unknown and will be zero.</p> <p>Get the last modified date.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Returns the last modified date. The time may be zero if the font file loader does not expose file time.</p> </dd> <p>Get the locality of this font face reference.</p> <p>You can always successfully create a font face from a fully local font. Attempting to create a font face on a remote or partially local font may fail with {{DWRITE_E_REMOTEFONT}}. This function may change between calls depending on background downloads and whether cached data expires.</p> <p>Returns the locality of this font face reference.</p> <p>Adds a request to the font download queue (<strong>{{IDWriteFontDownloadQueue}}</strong>).</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Adds a request to the font download queue (<strong>{{IDWriteFontDownloadQueue}}</strong>).</p> <p> Downloading a character involves downloading every glyph it depends on directly or indirectly, via font tables (cmap, {{GSUB}}, {{COLR}}, glyf).</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Adds a request to the font download queue (<strong>{{IDWriteFontDownloadQueue}}</strong>).</p> <p>Downloading a glyph involves downloading any other glyphs it depends on from the font tables ({{GSUB}}, {{COLR}}, glyf).</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Adds a request to the font download queue (<strong>{{IDWriteFontDownloadQueue}}</strong>).</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Represents a font in a font collection.</p> <p>Used with the EnqueuMakeResident function to choose how residency operations proceed when the memory budget is exceeded.</p> <p></p> <dd> <p>Specifies the default residency policy, which allows residency operations to succeed regardless of the application's current memory budget. EnqueueMakeResident returns {{E_OUTOFMEMORY}} only when there is no memory available.</p> </dd> <dd> <p>Specifies that the EnqueueMakeResident function should return {{E_OUTOFMEMORY}} when the residency operation would exceed the application's current memory budget.</p> </dd> <p>Creates a font face object for the font.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. </p><p>This method returns <strong>{{DWRITE_E_REMOTEFONT}}</strong> if it could not construct a remote font.</p> <dd> <p>A reference to a memory block that receives a reference to a <strong>{{IDWriteFontFace3}}</strong> interface for the newly created font face object.</p> </dd> <p>Compares two instances of font references for equality.</p> <p>Returns whether the two instances of font references are equal. Returns <strong>{{TRUE}}</strong> if the two instances are equal; otherwise, <strong>{{FALSE}}</strong>. </p> <dd> <p>A reference to a <strong>{{IDWriteFont}}</strong> interface for the other font instance to compare to this font instance.</p> </dd> <p>Gets a font face reference that identifies this font.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a memory block that receives a reference to a <strong>{{IDWriteFontFaceReference}}</strong> interface for the newly created font face reference object.</p> </dd> <p>Gets the current locality of the font.</p> <p>For fully local files, the result will always be {{DWRITE_LOCALITY_LOCAL}}. A downloadable file may be any of the states, and this function may change between calls.</p> <p>Returns the current locality of the font.</p> <p>Represents an absolute reference to a font face.</p> <p>Gets a font face reference that identifies this font.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a memory block that receives a reference to a <strong>{{IDWriteFontFaceReference}}</strong> interface for the newly created font face reference object.</p> </dd> <p>Gets the {{PANOSE}} values from the font, used for font selection and matching.</p> <p>This method doesn't simulate these values, such as substituting a weight or proportion inferred on other values. If the font doesn't specify them, they are all set to 'any' (0).</p> <p>This method does not return a value.</p> <dd> <p>A reference to a <strong>{{DWRITE_PANOSE}}</strong> structure that receives the {{PANOSE}} values from the font.</p> </dd> <p>Gets the weight of this font.</p> <p>Returns a <strong>{{DWRITE_FONT_WEIGHT}}</strong>-typed value that specifies the density of a typeface, in terms of the lightness or heaviness of the strokes. </p> <p>Gets the stretch (also known as width) of this font.</p> <p>Returns a <strong>{{DWRITE_FONT_STRETCH}}</strong>-typed value that specifies the degree to which a font has been stretched compared to a font's normal aspect ratio. </p> <p>Gets the style (also known as slope) of this font.</p> <p>Returns a <strong>{{DWRITE_FONT_STYLE}}</strong>-typed value that specifies the style of the font. </p> <p>Creates a localized strings object that contains the family names for the font family, indexed by locale name.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a memory block that receives a reference to a <strong>{{IDWriteLocalizedStrings}}</strong> interface for the newly created localized strings object.</p> </dd> <p>Creates a localized strings object that contains the face names for the font (for example, Regular or Bold), indexed by locale name.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a memory block that receives a reference to a <strong>{{IDWriteLocalizedStrings}}</strong> interface for the newly created localized strings object.</p> </dd> <p>Gets a localized strings collection that contains the specified informational strings, indexed by locale name.</p> <p>If the font doesn't contain the specified string, the return value is {{S_OK}}, but <em>informationalStrings</em> receives a <strong>{{NULL}}</strong> reference and <em>exists</em> receives the value <strong>{{FALSE}}</strong>.</p> <dd> <p>A <strong>{{DWRITE_INFORMATIONAL_STRING_ID}}</strong>-typed value that identifies the strings to get.</p> </dd> <dd> <p>A reference to a memory block that receives a reference to a <strong>{{IDWriteLocalizedStrings}}</strong> interface for the newly created localized strings object.</p> </dd> <dd> <p>A reference to a variable that receives whether the font contains the specified string {{ID}}. <strong>{{TRUE}}</strong> if the font contains the specified string {{ID}}; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p>Determines whether the font supports the specified character.</p> <p>Returns whether the font supports the specified character. Returns <strong>{{TRUE}}</strong> if the font has the specified character; otherwise, <strong>{{FALSE}}</strong>. </p> <dd> <p>A Unicode ({{UCS}}-4) character value.</p> </dd> <p>Determines the recommended text rendering and grid-fit mode to be used based on the font, size, world transform, and measuring mode.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Logical font size in {{DIPs}}.</p> </dd> <dd> <p>Number of pixels per logical inch in the horizontal direction.</p> </dd> <dd> <p>Number of pixels per logical inch in the vertical direction.</p> </dd> <dd> <p>A <strong>{{DWRITE_MATRIX}}</strong> structure that describes the world transform.</p> </dd> <dd> <p>Specifies whether the font is sideways. <strong>{{TRUE}}</strong> if the font is sideways; otherwise, <strong>{{FALSE}}</strong>. </p> </dd> <dd> <p>A <strong>{{DWRITE_OUTLINE_THRESHOLD}}</strong>-typed value that specifies the quality of the graphics system's outline rendering, affects the size threshold above which outline rendering is used.</p> </dd> <dd> <p>A <strong>{{DWRITE_MEASURING_MODE}}</strong>-typed value that specifies the method used to measure during text layout. For proper glyph spacing, this method returns a rendering mode that is compatible with the specified measuring mode.</p> </dd> <dd> <p>A reference to a <strong>{{IDWriteRenderingParams}}</strong> interface for the rendering parameters object. This parameter is necessary in case the rendering parameters object overrides the rendering mode.</p> </dd> <dd> <p>A reference to a variable that receives a <strong>{{DWRITE_RENDERING_MODE1}}</strong>-typed value for the recommended rendering mode.</p> </dd> <dd> <p>A reference to a variable that receives a <strong>{{DWRITE_GRID_FIT_MODE}}</strong>-typed value for the recommended grid-fit mode.</p> </dd> <p>Determines whether the character is locally downloaded from the font.</p> <p>Returns <strong>{{TRUE}}</strong> if the font has the specified character locally available, <strong>{{FALSE}}</strong> if not or if the font does not support that character. </p> <dd> <p>A Unicode ({{UCS}}-4) character value.</p> </dd> <p>Determines whether the glyph is locally downloaded from the font.</p> <p>Returns {{TRUE}} if the font has the specified glyph locally available.</p> <dd> <p>Glyph identifier.</p> </dd> <p>Determines whether the specified characters are local.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Array of characters.</p> </dd> <dd> <p>The number of elements in the character array.</p> </dd> <dd> <p>Specifies whether to enqueue a download request if any of the specified characters are not local.</p> </dd> <dd> <p>Receives {{TRUE}} if all of the specified characters are local, {{FALSE}} if any of the specified characters are remote.</p> </dd> <p>Determines whether the specified glyphs are local.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Array of glyph indices.</p> </dd> <dd> <p>The number of elements in the glyph index array.</p> </dd> <dd> <p>Specifies whether to enqueue a download request if any of the specified glyphs are not local.</p> </dd> <dd> <p>Receives {{TRUE}} if all of the specified glyphs are local, {{FALSE}} if any of the specified glyphs are remote.</p> </dd> <p></p> <p>Get the number of total fonts in the set.</p> <p>Returns the number of total fonts in the set.</p> <p>Gets a reference to the font at the specified index, which may be local or remote.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Zero-based index of the font.</p> </dd> <dd> <p>Receives a reference the font face reference object, or nullptr on failure.</p> </dd> <p>Gets the index of the matching font face reference in the font set, with the same file, face index, and simulations.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Font face object that specifies the physical font.</p> </dd> <dd> <p>Receives the zero-based index of the matching font if the font was found, or {{UINT_MAX}} otherwise.</p> </dd> <dd> <p>Receives {{TRUE}} if the font exists or {{FALSE}} otherwise.</p> </dd> <p>Gets the index of the matching font face reference in the font set, with the same file, face index, and simulations.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Font face object that specifies the physical font.</p> </dd> <dd> <p>Receives the zero-based index of the matching font if the font was found, or {{UINT_MAX}} otherwise.</p> </dd> <dd> <p>Receives {{TRUE}} if the font exists or {{FALSE}} otherwise.</p> </dd> <p>Returns all unique property values in the set, which can be used for purposes such as displaying a family list or tag cloud. Values are returned in priority order according to the language list, such that if a font contains more than one localized name, the preferred one will be returned.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Font property of interest.</p> </dd> <dd> <p>List of semicolon delimited language names in preferred order. When a particular string like font family has more than one localized name, the first match is returned. For example, suppose the font set includes the Meiryo family, which has both Japanese and English family names. The returned list of distinct family names would include either the Japanese name (if "ja-jp" was specified as a preferred locale) or the English name (in all other cases). </p> </dd> <dd> <p>Receives a reference to the newly created strings list.</p> </dd> <p>Returns how many times a given property value occurs in the set.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Font property of interest.</p> </dd> <dd> <p>Receives how many times the property occurs.</p> </dd> <p>Returns a subset of fonts filtered by the given properties.</p> <p>If no fonts matched the filter, the subset will be empty (GetFontCount returns 0), but the function does not return an error. The subset will always be equal to or less than the original set. If you only want to filter out remote fonts, you may pass null in properties and zero in propertyCount. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>List of properties to filter using.</p> </dd> <dd> <p>The number of properties to filter.</p> </dd> <dd> <p>The subset of fonts that match the properties, or nullptr on failure.</p> </dd> <p>Contains methods for building a font set.</p> <p>Adds a reference to a font to the set being built. The caller supplies enough information to search on, avoiding the need to open the potentially non-local font. Any properties not supplied by the caller will be missing, and those properties will not be available as filters in GetMatchingFonts. GetPropertyValues for missing properties will return an empty string list. The properties passed should generally be consistent with the actual font contents, but they need not be. You could, for example, alias a font using a different name or unique identifier, or you could set custom tags not present in the actual font.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Reference to the font.</p> </dd> <dd> <p>List of properties to associate with the reference.</p> </dd> <dd> <p>The number of properties defined.</p> </dd> <p>Appends an existing font set to the one being built, allowing one to aggregate two sets or to essentially extend an existing one.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Font set to append font face references from.</p> </dd> <p>Creates a font set from all the font face references added so far with AddFontFaceReference.</p> <p>Creating a font set takes less time if the references were added with metadata rather than needing to extract the metadata from the font file.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Contains the newly created font set object, or nullptr in case of failure.</p> </dd> <p> An object that encapsulates a set of fonts, such as the set of fonts installed on the system, or the set of fonts in a particular directory. The font collection {{API}} can be used to discover what font families and fonts are available, and to obtain some metadata about the fonts.</p> <p>Gets the underlying font set used by this collection.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Returns the font set used by the collection.</p> </dd> <p>Represents a family of related fonts.</p> <p>Gets the current location of a font given its zero-based index.</p> <p>For fully local files, the result will always be <strong>{{DWRITE_LOCALITY_LOCAL}}</strong>. For streamed files, the result depends on how much of the file has been downloaded. <strong>GetFont</strong> fails if the locality is <strong>{{DWRITE_LOCALITY_REMOTE}}</strong> and potentially fails if <strong>{{DWRITE_LOCALITY_PARTIAL}}</strong>. </p> <p>Returns a <strong>{{DWRITE_LOCALITY}}</strong>-typed value that specifies the location of the specified font.</p> <dd> <p>Zero-based index of the font in the font list.</p> </dd> <p>Gets a font given its zero-based index.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Zero-based index of the font in the font list.</p> </dd> <dd> <p>A reference to a memory block that receives a reference to a <strong>{{IDWriteFont3}}</strong> interface for the newly created font object.</p> </dd> <p>Gets a font face reference given its zero-based index.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Zero-based index of the font in the font list.</p> </dd> <dd> <p>A reference to a memory block that receives a reference to a <strong>{{IDWriteFontFaceReference}}</strong> interface for the newly created font face reference object.</p> </dd> <p>Represents a collection of strings indexed by number. An {{IDWriteStringList}} is identical to {{IDWriteLocalizedStrings}} except for the semantics, where localized strings are indexed on language (each language has one string property) whereas {{IDWriteStringList}} may contain multiple strings of the same language, such as a string list of family names from a font set. You can QueryInterface from an {{IDWriteLocalizedStrings}} to an {{IDWriteStringList}}. </p> <p>Gets the number of strings in the string list.</p> <p>Returns the number of strings in the string list.</p> <p>Gets the length in characters (not including the null terminator) of the locale name with the specified index.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Zero-based index of the locale name.</p> </dd> <dd> <p>Receives the length in characters, not including the null terminator.</p> </dd> <p>Copies the locale name with the specified index to the specified array.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Zero-based index of the locale name.</p> </dd> <dd> <p>Character array that receives the locale name.</p> </dd> <dd> <p>Size of the array in characters. The size must include space for the terminating null character.</p> </dd> <p>Gets the length in characters (not including the null terminator) of the string with the specified index.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Zero-based index of the string.</p> </dd> <dd> <p>Receives the length in characters of the string, not including the null terminator.</p> </dd> <p>Copies the string with the specified index to the specified array.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Zero-based index of the string.</p> </dd> <dd> <p>Character array that receives the string.</p> </dd> <dd> <p>Size of the array in characters. The size must include space for the terminating null character.</p> </dd> <p></p> <p>Registers a client-defined listener object that receives download notifications. All registered listener's DownloadCompleted will be called after <strong>BeginDownload</strong> completes. </p> <p>An <strong>{{IDWriteFontDownloadListener}}</strong> can also be passed to <strong>BeginDownload</strong> using the context parameter, rather than globally registered to the queue.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Unregisters a notification handler that was previously registered using <strong>AddListener</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Determines whether the download queue is empty. Note that the queue does not include requests that are already being downloaded. Calling <strong>BeginDownload</strong> clears the queue.</p> <p>{{TRUE}} if the queue is empty, {{FALSE}} if there are requests pending for <strong>BeginDownload</strong>.</p> <p>Begins an asynchronous download operation. The download operation executes in the background until it completes or is cancelled by a <strong>CancelDownload</strong> call.</p> <p>BeginDownload removes all download requests from the queue, transferring them to a background download operation. If any previous downloads are still ongoing when BeginDownload is called again, the new download does not complete until the previous downloads have finished. If the queue is empty and no active downloads are pending, the <strong>DownloadCompleted</strong> callback is called immediately with {{DWRITE_DOWNLOAD_RESULT_NONE}}.</p> <p> Returns {{S_OK}} if a download was successfully begun, {{S_FALSE}} if the queue was empty, or a standard {{HRESULT}} error code.</p> <p> Removes all download requests from the queue and cancels any active download operations.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets the current generation number of the download queue, which is incremented every time after a download completes, whether failed or successful. This cookie value can be compared against cached data to determine if it is stale.</p> <p>The current generation number of the download queue.</p> <p>Represents text rendering settings for glyph rasterization and filtering.</p> <p>Gets the rendering mode.</p> <p>Returns a <strong>{{DWRITE_RENDERING_MODE1}}</strong>-typed value for the rendering mode.</p> <p>Used to create all subsequent DirectWrite objects. This interface is the root factory interface for all DirectWrite objects.</p> <p> Create an <strong>{{IDWriteFactory}}</strong> object by using the <strong>{{DWriteCreateFactory}}</strong> function. </p><pre> if ({{SUCCEEDED}}(hr)) { hr = {{DWriteCreateFactory}}( {{DWRITE_FACTORY_TYPE_SHARED}}, __uuidof({{IDWriteFactory}}), reinterpret_cast&lt;{{IUnknown}}**&gt;(&amp;pDWriteFactory_) ); } </pre><p>An <strong>{{IDWriteFactory}}</strong> object holds state information, such as font loader registration and cached font data. This state can be shared or isolated. Shared is recommended for most applications because it saves memory. However, isolated can be useful in situations where you want to have a separate state for some objects.</p> <p> Creates a glyph-run-analysis object that encapsulates info that DirectWrite uses to render a glyph run. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a rendering parameters object with the specified properties.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The gamma value used for gamma correction, which must be greater than zero and cannot exceed 256.</p> </dd> <dd> <p> The amount of contrast enhancement, zero or greater. </p> </dd> <dd> <p>The amount of contrast enhancement to use for grayscale antialiasing, zero or greater.</p> </dd> <dd> <p>The degree of ClearType level, from 0.0f (no ClearType) to 1.0f (full ClearType).</p> </dd> <dd> <p> A <strong>{{DWRITE_PIXEL_GEOMETRY}}</strong>-typed value that specifies the internal structure of a device pixel (that is, the physical arrangement of red, green, and blue color components) that is assumed for purposes of rendering text. </p> </dd> <dd> <p> A <strong>{{DWRITE_RENDERING_MODE1}}</strong>-typed value that specifies the method (for example, ClearType natural quality) for rendering glyphs. In most cases, specify <strong>{{DWRITE_RENDERING_MODE1_DEFAULT}}</strong> to automatically use an appropriate mode. </p> </dd> <dd> <p> A <strong>{{DWRITE_GRID_FIT_MODE}}</strong>-typed value that specifies how to grid-fit glyph outlines. In most cases, specify <strong>{{DWRITE_GRID_FIT_DEFAULT}}</strong> to automatically choose an appropriate mode. </p> </dd> <dd> <p> A reference to a memory block that receives a reference to a <strong>{{IDWriteRenderingParams3}}</strong> interface for the newly created rendering parameters object, or <strong>{{NULL}}</strong> in case of failure. </p> </dd> <p>Creates a reference to a font given a full path. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Absolute file path. Subsequent operations on the constructed object may fail if the user provided filePath doesn't correspond to a valid file on the disk.</p> </dd> <dd> <p>Last modified time of the input file path. If the parameter is omitted, the function will access the font file to obtain its last write time, so the clients are encouraged to specify this value to avoid extra disk access. Subsequent operations on the constructed object may fail if the user provided lastWriteTime doesn't match the file on the disk.</p> </dd> <dd> <p>The zero based index of a font face in cases when the font files contain a collection of font faces. If the font files contain a single face, this value should be zero.</p> </dd> <dd> <p>Font face simulation flags for algorithmic emboldening and italicization.</p> </dd> <dd> <p>Contains newly created font face reference object, or nullptr in case of failure.</p> </dd> <p>Retrieves the list of system fonts.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Holds the newly created font set object, or {{NULL}} in case of failure.</p> </dd> <p>Creates an empty font set builder to add font face references and create a custom font set. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Holds the newly created font set builder object, or {{NULL}} in case of failure.</p> </dd> <p>Create a weight/width/slope tree from a set of fonts.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A set of fonts to use to build the collection.</p> </dd> <dd> <p>Holds the newly created font collection object, or {{NULL}} in case of failure.</p> </dd> <p>Retrieves a weight/width/slope tree of system fonts.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Indicates whether to include cloud fonts or only locally installed fonts.</p> </dd> <dd> <p>Holds the newly created font collection object, or {{NULL}} in case of failure.</p> </dd> <dd> <p>If this parameter is {{TRUE}}, the function performs an immediate check for changes to the set of system fonts. If this parameter is {{FALSE}}, the function will still detect changes if the font cache service is running, but there may be some latency. For example, an application might specify {{TRUE}} if it has just installed a font and wants to be sure the font collection contains that font.</p> </dd> <p>Gets the font download queue associated with this factory object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the font download queue interface.</p> </dd> <p>Represents a list of fonts.</p> <p>Gets the current location of a font given its zero-based index.</p> <p>For fully local files, the result will always be <strong>{{DWRITE_LOCALITY_LOCAL}}</strong>. For streamed files, the result depends on how much of the file has been downloaded. <strong>GetFont</strong> fails if the locality is <strong>{{DWRITE_LOCALITY_REMOTE}}</strong> and potentially fails if <strong>{{DWRITE_LOCALITY_PARTIAL}}</strong>. </p> <p>Returns a <strong>{{DWRITE_LOCALITY}}</strong>-typed value that specifies the location of the specified font.</p> <dd> <p>Zero-based index of the font in the font list.</p> </dd> <p>Gets a font given its zero-based index.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. </p><p>This method returns <strong>{{DWRITE_E_REMOTEFONT}}</strong> if it could not construct a remote font.</p> <dd> <p>Zero-based index of the font in the font list.</p> </dd> <dd> <p>A reference to a memory block that receives a reference to a <strong>{{IDWriteFont3}}</strong> interface for the newly created font object.</p> </dd> <p>Gets a font face reference given its zero-based index.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Zero-based index of the font in the font list.</p> </dd> <dd> <p>A reference to a memory block that receives a reference to a <strong>{{IDWriteFontFaceReference}}</strong> interface for the newly created font face reference object.</p> </dd> <p> Application-defined callback interface that receives notifications from the font download queue (<strong>{{IDWriteFontDownloadQueue}}</strong> interface). Callbacks will occur on the downloading thread, and objects must be prepared to handle calls on their methods from other threads at any time.</p> <p>The DownloadCompleted method is called back on an arbitrary thread when a download operation ends. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to the download queue interface on which the BeginDownload method was called.</p> </dd> <dd> <p>Optional context object that was passed to BeginDownload. AddRef is called on the context object by BeginDownload and Release is called after the DownloadCompleted method returns.</p> </dd> <dd> <p>Result of the download operation.</p> </dd> <p>Provides interoperability with {{GDI}}, such as methods to convert a font face to a {{LOGFONT}} structure, or to convert a {{GDI}} font description into a font face. It is also used to create bitmap render target objects.</p> <p>Creates a font object that matches the properties specified by the {{LOGFONT}} structure.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Structure containing a {{GDI}}-compatible font description.</p> </dd> <dd> <p>The font collection to search. If {{NULL}}, the local system font collection is used.</p> </dd> <dd> <p>Receives a newly created font object if successful, or {{NULL}} in case of error.</p> </dd> <p>Reads the font signature from the given font face.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Font face to read font signature from.</p> </dd> <dd> <p>Font signature from the {{OS}}/2 table, ulUnicodeRange and ulCodePageRange.</p> </dd> <p>Gets a list of matching fonts based on the specified {{LOGFONT}} values. Only fonts of that family name will be returned.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Structure containing a {{GDI}}-compatible font description.</p> </dd> <dd> <p>The font set to search.</p> </dd> <dd> <p>&gt;Receives the filtered font set if successful.</p> </dd> <p>Describes the font and paragraph properties used to format text, and it describes locale information. </p> <p>Set line spacing.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>How to manage space between lines.</p> </dd> <p>Gets the line spacing adjustment set for a multiline text paragraph. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A structure describing how the space between lines is managed for the paragraph.</p> </dd> <p></p> <p>Invalidates the layout, forcing layout to remeasure before calling the metrics or drawing functions. This is useful if the locality of a font changes, and layout should be redrawn, or if the size of a client implemented {{IDWriteInlineObject}} changes. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Set line spacing.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>How to manage space between lines.</p> </dd> <p>Gets line spacing information.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>How to manage space between lines.</p> </dd> <p>Retrieves properties of each line.</p> <p> If maxLineCount is not large enough {{E_NOT_SUFFICIENT_BUFFER}}, which is equivalent to {{HRESULT_FROM_WIN32}}({{ERROR_INSUFFICIENT_BUFFER}}), is returned and actualLineCount is set to the number of lines needed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The array to fill with line information.</p> </dd> <dd> <p>The maximum size of the lineMetrics array.</p> </dd> <dd> <p>The actual size of the lineMetrics array that is needed.</p> </dd> <p>Enumerator for an ordered collection of color glyph runs.</p> <p>Gets the current color glyph run.</p> <p>Standard {{HRESULT}} error code. An error is returned if there is no current glyph run, i.e., if MoveNext has not yet been called or if the end of the sequence has been reached.</p> <dd> <p>Receives a reference to the color glyph run. The reference remains valid until the next call to MoveNext or until the interface is released.</p> </dd> <p>Represents an absolute reference to a font face. It contains font face type, appropriate file references and face identification data. Various font data such as metrics, names and glyph outlines are obtained from {{IDWriteFontFace}}.</p> <p>Gets the available image formats of a specific glyph and ppem. </p> <p>Glyphs often have at least TrueType or {{CFF}} outlines, but they may also have {{SVG}} outlines, or they may have only bitmaps with no TrueType/{{CFF}} outlines. Some image formats, notably the {{PNG}}/{{JPEG}} ones, are size specific and will return no match when there isn't an entry in that size range.</p><p>Glyph ids beyond the glyph count return {{DWRITE_GLYPH_IMAGE_FORMATS_NONE}}.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an {{HRESULT}} error code.</p> <dd> <p>The {{ID}} of the glyph.</p> </dd> <dd> </dd> <dd> </dd> <dd> <p>Specifies which formats are supported in the font.</p> </dd> <p>Gets a reference to the glyph data based on the desired image format.</p> <p> The glyphDataContext must be released via <strong>ReleaseGlyphImageData</strong> when done if the data is not empty, similar to <strong>{{IDWriteFontFileStream::ReadFileFragment}}</strong> and <strong>{{IDWriteFontFileStream::ReleaseFileFragment}}</strong>. The data reference is valid so long as the <strong>{{IDWriteFontFace}}</strong> exists and <strong>ReleaseGlyphImageData</strong> has not been called. </p><p> The <strong>{{DWRITE_GLYPH_IMAGE_DATA::uniqueDataId}}</strong> is valuable for caching purposes so that if the same resource is returned more than once, an existing resource can be quickly retrieved rather than needing to reparse or decompress the data. </p><p> The function only returns {{SVG}} or raster data - requesting TrueType/{{CFF}}/{{COLR}} data returns {{DWRITE_E_INVALIDARG}}. Those must be drawn via DrawGlyphRun or queried using GetGlyphOutline instead. Exactly one format may be requested or else the function returns {{DWRITE_E_INVALIDARG}}. If the glyph does not have that format, the call is not an error, but the function returns empty data. </p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an {{HRESULT}} error code.</p> <dd> <p>The {{ID}} of the glyph to retrieve image data for.</p> </dd> <dd> <p>Requested pixels per em.</p> </dd> <dd> <p>Specifies which formats are supported in the font.</p> </dd> <dd> <p>On return contains data for a glyph.</p> </dd> <dd> </dd> <p>Releases the table data obtained from ReadGlyphData.</p> <p>This method does not return a value.</p> <dd> <p>Opaque context from ReadGlyphData.</p> </dd> <p>The root factory interface for all DirectWrite objects.</p> <p>Translates a glyph run to a sequence of color glyph runs, which can be rendered to produce a color representation of the original "base" run.</p> <p>Calling <strong>{{IDWriteFactory2::TranslateColorGlyphRun}}</strong> is equivalent to calling <strong>{{IDWriteFactory4::TranslateColorGlyph}}</strong> run with the following formats specified: {{DWRITE_GLYPH_IMAGE_FORMATS_TRUETYPE}}|{{DWRITE_GLYPH_IMAGE_FORMATS_CFF}}|{{DWRITE_GLYPH_IMAGE_FORMATS_COLR}}.</p> <p>Returns {{DWRITE_E_NOCOLOR}} if the font has no color information, the glyph run does not contain any color glyphs, or the specified color palette index is out of range. In this case, the client should render the original glyph run. Otherwise, returns a standard {{HRESULT}} error code.</p> <dd> <p>Horizontal and vertical origin of the base glyph run in pre-transform coordinates.</p> </dd> <dd> <p>Pointer to the original "base" glyph run.</p> </dd> <dd> <p>Optional glyph run description.</p> </dd> <dd> <p>Which data formats the runs should be split into.</p> </dd> <dd> <p>Measuring mode, needed to compute the origins of each glyph.</p> </dd> <dd> <p>Matrix converting from the client's coordinate space to device coordinates (pixels), i.e., the world transform multiplied by any {{DPI}} scaling.</p> </dd> <dd> <p>Zero-based index of the color palette to use. Valid indices are less than the number of palettes in the font, as returned by <strong>{{IDWriteFontFace2::GetColorPaletteCount}}</strong>.</p> </dd> <dd> <p>If the function succeeds, receives a reference to an enumerator object that can be used to obtain the color glyph runs. If the base run has no color glyphs, then the output reference is {{NULL}} and the method returns {{DWRITE_E_NOCOLOR}}.</p> </dd> <p>Converts glyph run placements to glyph origins.</p> <p>The transform and {{DPI}} have no effect on the origin scaling. They are solely used to compute glyph advances when not supplied and align glyphs in pixel aligned measuring modes.</p> <p>If this method succeeds, it returns {{S_OK}}. Otherwise, it returns an {{HRESULT}} error code.</p> <dd> <p>Structure containing the properties of the glyph run.</p> </dd> <dd> <p>The measuring method for glyphs in the run, used with the other properties to determine the rendering mode.</p> </dd> <dd> <p>The position of the baseline origin, in {{DIPs}}, relative to the upper-left corner of the {{DIB}}.</p> </dd> <dd> <p>World transform multiplied by any {{DPI}} scaling. This is needed to compute glyph positions if the run contains color glyphs and the measuring mode is not <strong>{{DWRITE_MEASURING_MODE_NATURAL}}</strong>. If this parameter is {{NULL}}, and identity transform is assumed. </p> </dd> <dd> <p>On return contains the glyph origins for the glyphrun.</p> </dd> <p>Represents an absolute reference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines. </p> <p>Used to indicate the level of support that the adapter provides for optional features of Direct3D 12.</p> <p></p> <dd> <p> Indicates whether timestamp queries are supported on copy queues. </p> </dd> <dd> <p> Indicates whether casting from one fully typed format to another, compatible, format is supported. </p> </dd> <dd> <p> Indicates the kinds of command lists that support the ability to write an immediate value directly from the command stream into a specified buffer. </p> </dd> <dd> <p> Indicates the level of support the adapter has for view instancing. </p> </dd> <dd> <p> Indicates whether barycentrics are supported. </p> </dd> <p>Represents an absolute reference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines. </p> <p>Represents an absolute reference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines. </p> <p>Represents an absolute reference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines. </p> <p>Represents an absolute reference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines. </p> <p>Used to create all subsequent DirectWrite objects. This interface is the root factory interface for all DirectWrite objects.</p> <p> Create an <strong>{{IDWriteFactory}}</strong> object by using the <strong>{{DWriteCreateFactory}}</strong> function. </p><pre> if ({{SUCCEEDED}}(hr)) { hr = {{DWriteCreateFactory}}( {{DWRITE_FACTORY_TYPE_SHARED}}, __uuidof({{IDWriteFactory}}), reinterpret_cast&lt;{{IUnknown}}**&gt;(&amp;pDWriteFactory_) ); } </pre><p>An <strong>{{IDWriteFactory}}</strong> object holds state information, such as font loader registration and cached font data. This state can be shared or isolated. Shared is recommended for most applications because it saves memory. However, isolated can be useful in situations where you want to have a separate state for some objects.</p> <p> </p><p>This topic describes various ways in which you can use custom fonts in your app.</p><p> </p><ul> <li>{{Introduction?}}</li> <li>{{Summary}}</li> <li>{{Key}}</li> <li>{{Fonts}}</li> <li>{{Font}}</li> <li>{{Common}}<ul> <li>{{Creating}}</li> <li>{{Creating}}</li> <li>{{Creating}}</li> <li>{{Creating}}</li> </ul> </li> <li>{{Advanced}}<ul> <li>{{Combining}}</li> <li>{{Using}}</li> <li>{{Using}}</li> <li>{{Supporting}}</li> </ul> </li> </ul> <p> </p><p>This topic describes various ways in which you can use custom fonts in your app.</p><p> </p><ul> <li>{{Introduction?}}</li> <li>{{Summary}}</li> <li>{{Key}}</li> <li>{{Fonts}}</li> <li>{{Font}}</li> <li>{{Common}}<ul> <li>{{Creating}}</li> <li>{{Creating}}</li> <li>{{Creating}}</li> <li>{{Creating}}</li> </ul> </li> <li>{{Advanced}}<ul> <li>{{Combining}}</li> <li>{{Using}}</li> <li>{{Using}}</li> <li>{{Supporting}}</li> </ul> </li> </ul> <p> Indicates the measuring method used for text layout.</p> <dd> <p> Specifies that text is measured using glyph ideal metrics whose values are independent to the current display resolution.</p> </dd> <dd> <p> Specifies that text is measured using glyph display-compatible metrics whose values tuned for the current display resolution.</p> </dd> <dd> <p> Specifies that text is measured using the same glyph display metrics as text measured by {{GDI}} using a font created with {{CLEARTYPE_NATURAL_QUALITY}}.</p> </dd> <p>Specifies which formats are supported in the font, either at a font-wide level or per glyph.</p> <dd> <p>Indicates no data is available for this glyph.</p> </dd> <dd> <p>The glyph has TrueType outlines.</p> </dd> <dd> <p>The glyph has {{CFF}} outlines.</p> </dd> <dd> <p>The glyph has multilayered {{COLR}} data.</p> </dd> <dd> <p>The glyph has {{SVG}} outlines as standard {{XML}}. Fonts may store the content gzip'd rather than plain text, indicated by the first two bytes as gzip header {0x1F 0x8B}.</p> </dd> <dd> <p>The glyph has {{PNG}} image data, with standard {{PNG}} {{IHDR}}.</p> </dd> <dd> <p>The glyph has {{JPEG}} image data, with standard {{JIFF}} {{SOI}} header.</p> </dd> <dd> <p>The glyph has {{TIFF}} image data.</p> </dd> <dd> <p>The glyph has raw 32-bit premultiplied {{BGRA}} data.</p> </dd> <p>Specifies how the alpha value of a bitmap or render target should be treated.</p> <p>The <strong>{{D2D1_ALPHA_MODE}}</strong> enumeration is used with the <strong>{{D2D1_PIXEL_FORMAT}}</strong> enumeration to specify the alpha mode of a render target or bitmap. Different render targets and bitmaps support different alpha modes. For a list, see Supported Pixel Formats and Alpha Modes.</p> <dd> <p>The alpha value might not be meaningful.</p> </dd> <dd> <p>The alpha value has been premultiplied. Each color is first scaled by the alpha value. The alpha value itself is the same in both straight and premultiplied alpha. Typically, no color channel value is greater than the alpha channel value. If a color channel value in a premultiplied format is greater than the alpha channel, the standard source-over blending math results in an additive blend.</p> </dd> <dd> <p>The alpha value has not been premultiplied. The alpha channel indicates the transparency of the color. </p> </dd> <dd> <p>The alpha value is ignored.</p> </dd> <p> Contains the data format and alpha mode for a bitmap or render target. </p> <p>For more information about the pixel formats and alpha modes supported by each render target, see Supported Pixel Formats and Alpha Modes.</p> <dd> <p>A value that specifies the size and arrangement of channels in each pixel.</p> </dd> <dd> <p>A value that specifies whether the alpha channel is using pre-multiplied alpha, straight alpha, whether it should be ignored and considered opaque, or whether it is unkown. </p> </dd> <p> Represents an x-coordinate and y-coordinate pair, expressed as an unsigned 32-bit integer value, in two-dimensional space.</p> <dd> <p>The x-coordinate value of the point. </p> </dd> <dd> <p>The y-coordinate value of the point.</p> </dd> <p> Represents an x-coordinate and y-coordinate pair, expressed as floating-point values, in two-dimensional space.</p> <dd> <p>The x-coordinate of the point. </p> </dd> <dd> <p>The y-coordinate of the point. </p> </dd> <p>A 2D vector that consists of two single-precision floating-point values (x, y). </p> <dd> <p>The x value of the vector.</p> </dd> <dd> <p>The y value of the vector.</p> </dd> <p>A 3D vector that consists of three single-precision floating-point values (x, y, z).</p> <dd> <p>The x value of the vector.</p> </dd> <dd> <p>The y value of the vector.</p> </dd> <dd> <p>The z value of the vector.</p> </dd> <p>A 4D vector that consists of four single-precision floating-point values (x, y, z, w).</p> <dd> <p>The x value of the vector.</p> </dd> <dd> <p>The y value of the vector.</p> </dd> <dd> <p>The z value of the vector.</p> </dd> <dd> <p>The w value of the vector.</p> </dd> <p>Represents a rectangle defined by the coordinates of the upper-left corner (left, top) and the coordinates of the lower-right corner (right, bottom). </p> <dd> <p>The x-coordinate of the upper-left corner of the rectangle.</p> </dd> <dd> <p>The y-coordinate of the upper-left corner of the rectangle. </p> </dd> <dd> <p>The x-coordinate of the lower-right corner of the rectangle. </p> </dd> <dd> <p>The y-coordinate of the lower-right corner of the rectangle. </p> </dd> <p> Represents a rectangle defined by the upper-left corner pair of coordinates (left,top) and the lower-right corner pair of coordinates (right, bottom). These coordinates are expressed as a 32-bit integer values.</p> <dd> <p>The x-coordinate of the upper-left corner of the rectangle.</p> </dd> <dd> <p>The y-coordinate of the upper-left corner of the rectangle. </p> </dd> <dd> <p>The x-coordinate of the lower-right corner of the rectangle. </p> </dd> <dd> <p>The y-coordinate of the lower-right corner of the rectangle. </p> </dd> <p>Stores an ordered pair of floating-point values, typically the width and height of a rectangle. </p> <dd> <p>The horizontal component of this size.</p> </dd> <dd> <p>The vertical component of this size.</p> </dd> <p> Stores an ordered pair of integers, typically the width and height of a rectangle.</p> <dd> <p>The horizontal component of this size.</p> </dd> <dd> <p>The vertical component of this size.</p> </dd> <p> Represents a 3-by-2 matrix.</p> <dd> <p> The value in the first row and first column of the matrix.</p> </dd> <dd> <p>The value in the first row and second column of the matrix.</p> </dd> <dd> <p>The value in the second row and first column of the matrix.</p> </dd> <dd> <p>The value in the second row and second column of the matrix.</p> </dd> <dd> <p>The value in the third row and first column of the matrix.</p> </dd> <dd> <p>The value in the third row and second column of the matrix.</p> </dd> <p>Describes a 4-by-3 floating point matrix.</p> <p>The <strong>{{D2D1_MATRIX_4X3_F}}</strong> structure is type defined from a <strong>{{D2D_MATRIX_4X3_F}}</strong> structure in {{D2d1_1}}.h.</p><code> typedef {{D2D_MATRIX_4X3_F}} {{D2D1_MATRIX_4X3_F}}; </code> <dd> <p> The values in the first row and first, second, and third columns of the matrix.</p> </dd> <dd> <p>The values in the second row and first, second, and third columns of the matrix.</p> </dd> <dd> <p>The values in the third row and first, second, and third columns of the matrix.</p> </dd> <dd> <p>The value in the fourth row and first, second, and third columns of the matrix.</p> </dd> <dd> <p>A 4-by-3 floating point array that describes the matrix.</p> </dd> <p>Describes a 4-by-4 floating point matrix.</p> <p>The <strong>{{D2D1_MATRIX_4X4_F}}</strong> structure is type defined from a <strong>{{D2D_MATRIX_4X4_F}}</strong> structure in {{D2d1_1}}.h.</p><code> typedef {{D2D_MATRIX_4X4_F}} {{D2D1_MATRIX_4X4_F}}; </code> <dd> <p> The values in the first row and first, second, third, and fourth columns of the matrix.</p> </dd> <dd> <p>The values in the second row and first, second, third, and fourth columns of the matrix.</p> </dd> <dd> <p>The values in the third row and first, second, third, and fourth columns of the matrix.</p> </dd> <dd> <p>The value in the fourth row and first, second, third, and fourth columns of the matrix.</p> </dd> <dd> <p>A 4-by-4 floating point array that describes the matrix.</p> </dd> <p>Describes a 5-by-4 floating point matrix.</p> <p>The <strong>{{D2D1_MATRIX_5X4_F}}</strong> structure is type defined from a <strong>{{D2D_MATRIX_5X4_F}}</strong> structure in {{D2d1_1}}.h.</p><code> typedef {{D2D_MATRIX_5X4_F}} {{D2D1_MATRIX_5X4_F}}; </code> <dd> <p> The values in the first row and first, second, third, and fourth columns of the matrix.</p> </dd> <dd> <p>The values in the second row and first, second, third, and fourth columns of the matrix.</p> </dd> <dd> <p>The values in the third row and first, second, third, and fourth columns of the matrix.</p> </dd> <dd> <p>The value in the fourth row and first, second, third, and fourth columns of the matrix.</p> </dd> <dd> <p>The value in the fifth row and first, second, third, and fourth columns of the matrix.</p> </dd> <dd> <p>A 5-by-4 floating point array that describes the matrix.</p> </dd> <p>Specifies which gamma is used for interpolation.</p> <p>Interpolating in a linear gamma space (<strong>{{D2D1_GAMMA_1_0}}</strong>) can avoid changes in perceived brightness caused by the effect of gamma correction in spaces where the gamma is not 1.0, such as the default sRGB color space, where the gamma is 2.2. For an example of the differences between these two blending modes, consider the following illustration, which shows two gradients, each of which blends from red to blue to green:</p><p></p><p>The first gradient is interpolated linearly in the space of the render target (sRGB in this case), and one can see the dark bands between each color. The second gradient uses a gamma-correct linear interpolation, and thus does not exhibit the same variations in brightness.</p> <dd> <p>Interpolation is performed in the standard {{RGB}} (sRGB) gamma.</p> </dd> <dd> <p>Interpolation is performed in the linear-gamma color space.</p> </dd> <p>Describes whether an opacity mask contains graphics or text. Direct2D uses this information to determine which gamma space to use when blending the opacity mask.</p> <dd> <p>The opacity mask contains graphics. The opacity mask is blended in the gamma 2.2 color space.</p> </dd> <dd> <p>The opacity mask contains non-{{GDI}} text. The gamma space used for blending is obtained from the render target's text rendering parameters. (<strong>{{ID2D1RenderTarget::SetTextRenderingParams}}</strong>).</p> </dd> <dd> <p>The opacity mask contains text rendered using the {{GDI}}-compatible rendering mode. The opacity mask is blended using the gamma for {{GDI}} rendering.</p> </dd> <p>Specifies how a brush paints areas outside of its normal content area.</p> <p>For an <strong>{{ID2D1BitmapBrush}}</strong>, the brush's content is the brush's bitmap. For an <strong>{{ID2D1LinearGradientBrush}}</strong>, the brush's content area is the gradient axis. For an <strong>{{ID2D1RadialGradientBrush}}</strong>, the brush's content is the area within the gradient ellipse. </p> <dd> <p>Repeat the edge pixels of the brush's content for all regions outside the normal content area.</p> </dd> <dd> <p>Repeat the brush's content.</p> </dd> <dd> <p> The same as {{D2D1_EXTEND_MODE_WRAP}}, except that alternate tiles of the brush's content are flipped. (The brush's normal content is drawn untransformed.)</p> </dd> <p>Specifies how the edges of nontext primitives are rendered.</p> <dd> <p>Edges are antialiased using the Direct2D per-primitive method of high-quality antialiasing.</p> </dd> <dd> <p>Objects are aliased in most cases. Objects are antialiased only when they are drawn to a render target created by the <strong>CreateDxgiSurfaceRenderTarget</strong> method and Direct3D multisampling has been enabled on the backing DirectX Graphics Infrastructure ({{DXGI}}) surface. </p> </dd> <p>Describes the antialiasing mode used for drawing text. </p> <p>This enumeration is used with the <strong>SetTextAntialiasMode</strong> of an <strong>{{ID2D1RenderTarget}}</strong> to specify how text and glyphs are antialiased.</p><p> By default, Direct2D renders text in ClearType mode. Factors that can downgrade the default quality to grayscale or aliased:</p><ul> <li>If the <strong>{{DWRITE_RENDERING_MODE}}</strong> value is <strong>{{DWRITE_RENDERING_MODE_ALIASED}} </strong>, then the default text antialiasing mode is aliased. To change the DirectWrite rendering mode of an <strong>{{ID2D1RenderTarget}}</strong>, use the <strong>{{ID2D1RenderTarget::SetTextRenderingParams}}</strong> method. </li> <li>If the <strong>{{DWRITE_RENDERING_MODE}}</strong> value is <strong>{{DWRITE_RENDERING_MODE_OUTLINE}}</strong>, then the default text antialiasing mode is grayscale.</li> <li>If the render target has an alpha channel and is not set to <strong>{{D2D1_ALPHA_MODE_IGNORE}}</strong>, then the default text antialiasing mode is grayscale.</li> <li>If <strong>{{ID2D1RenderTarget::PushLayer}}</strong> is called without <strong>{{D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE}}</strong> (and the corresponding <strong>PopLayer</strong> has not been called yet), then the default text antialiasing mode is grayscale.</li> </ul> <dd> <p>Use the system default. See Remarks.</p> </dd> <dd> <p>Use ClearType antialiasing.</p> </dd> <dd> <p>Use grayscale antialiasing.</p> </dd> <dd> <p>Do not use antialiasing.</p> </dd> <p>Specifies the algorithm that is used when images are scaled or rotated.</p><strong>Note</strong>??Starting in Windows?8, more interpolations modes are available. See <strong>{{D2D1_INTERPOLATION_MODE}}</strong> for more info.? <p> To stretch an image, each pixel in the original image must be mapped to a group of pixels in the larger image. To shrink an image, groups of pixels in the original image must be mapped to single pixels in the smaller image. The effectiveness of the algorithms that perform these mappings determines the quality of a scaled image. Algorithms that produce higher-quality scaled images tend to require more processing time. <strong>{{D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR}} </strong>provides faster but lower-quality interpolation, while <strong>{{D2D1_BITMAP_INTERPOLATION_MODE_LINEAR}}</strong> provides higher-quality interpolation. </p> <p>Specifies whether text snapping is suppressed or clipping to the layout rectangle is enabled. This enumeration allows a bitwise combination of its member values.</p> <dd> <p>Text is not vertically snapped to pixel boundaries. This setting is recommended for text that is being animated. </p> </dd> <dd> <p>Text is clipped to the layout rectangle.</p> </dd> <dd> <p>Text is vertically snapped to pixel boundaries and is not clipped to the layout rectangle. </p> </dd> <dd> <p>In Windows?8.1 and later, text is rendered using color versions of glyphs, if defined by the font.</p> </dd> <dd> <p>Bitmap origins of color glyph bitmaps are not snapped.</p> </dd> <p>Specifies whether an arc should be greater than 180 degrees.</p> <dd> <p> An arc's sweep should be 180 degrees or less.</p> </dd> <dd> <p> An arc's sweep should be 180 degrees or greater.</p> </dd> <p>Describes the shape at the end of a line or segment.</p> <p> The following illustration shows the available cap styles for lines or segments. The red portion of the line shows the extra area added by the line cap setting. </p> <dd> <p>A cap that does not extend past the last point of the line. Comparable to cap used for objects other than lines. </p> </dd> <dd> <p>Half of a square that has a length equal to the line thickness.</p> </dd> <dd> <p>A semicircle that has a diameter equal to the line thickness.</p> </dd> <dd> <p>An isosceles right triangle whose hypotenuse is equal in length to the thickness of the line.</p> </dd> <p>Describes the sequence of dashes and gaps in a stroke. </p> <p>The following illustration shows several available dash styles. </p> <dd> <p>A solid line with no breaks.</p> </dd> <dd> <p>A dash followed by a gap of equal length. The dash and the gap are each twice as long as the stroke thickness.</p> <p>The equivalent dash array for <strong>{{D2D1_DASH_STYLE_DASH}}</strong> is {2, 2}.</p> </dd> <dd> <p>A dot followed by a longer gap.</p> <p>The equivalent dash array for <strong>{{D2D1_DASH_STYLE_DOT}}</strong> is {0, 2}.</p> </dd> <dd> <p>A dash, followed by a gap, followed by a dot, followed by another gap.</p> <p>The equivalent dash array for <strong>{{D2D1_DASH_STYLE_DASH_DOT}}</strong> is {2, 2, 0, 2}.</p> </dd> <dd> <p>A dash, followed by a gap, followed by a dot, followed by another gap, followed by another dot, followed by another gap.</p> <p>The equivalent dash array for <strong>{{D2D1_DASH_STYLE_DASH_DOT_DOT}}</strong> is {2, 2, 0, 2, 0, 2}.</p> </dd> <dd> <p>The dash pattern is specified by an array of floating-point values.</p> </dd> <p>Describes the shape that joins two lines or segments. </p> <p> A miter limit affects how sharp miter joins are allowed to be. If the line join style is <strong>{{D2D1_LINE_JOIN_MITER_OR_BEVEL}}</strong>, then the join will be mitered with regular angular vertices if it doesn't extend beyond the miter limit; otherwise, the line join will be beveled.</p><p>The following illustration shows different line join settings for the same stroked path geometry. </p><p></p> <dd> <p>Regular angular vertices. </p> </dd> <dd> <p>Beveled vertices. </p> </dd> <dd> <p>Rounded vertices. </p> </dd> <dd> <p>Regular angular vertices unless the join would extend beyond the miter limit; otherwise, beveled vertices. </p> </dd> <p>Specifies the different methods by which two geometries can be combined.</p> <p>The following illustration shows the different geometry combine modes. </p> <dd> <p>The two regions are combined by taking the union of both. Given two geometries, <em>A</em> and <em>B</em>, the resulting geometry is geometry <em>A</em> + geometry <em>B</em>.</p> </dd> <dd> <p>The two regions are combined by taking their intersection. The new area consists of the overlapping region between the two geometries. </p> </dd> <dd> <p>The two regions are combined by taking the area that exists in the first region but not the second and the area that exists in the second region but not the first. Given two geometries, <em>A</em> and <em>B</em>, the new region consists of (<em>A</em>-<em>B</em>) + (<em>B</em>-<em>A</em>). </p> </dd> <dd> <p>The second region is excluded from the first. Given two geometries, <em>A</em> and <em>B</em>, the area of geometry <em>B</em> is removed from the area of geometry <em>A</em>, producing a region that is <em>A</em>-<em>B</em>.</p> </dd> <p>Describes how one geometry object is spatially related to another geometry object. </p> <dd> <p>The relationship between the two geometries cannot be determined. This value is never returned by any {{D2D}} method. </p> </dd> <dd> <p>The two geometries do not intersect at all.</p> </dd> <dd> <p>The instance geometry is entirely contained by the passed-in geometry.</p> </dd> <dd> <p>The instance geometry entirely contains the passed-in geometry.</p> </dd> <dd> <p>The two geometries overlap but neither completely contains the other. </p> </dd> <p>Specifies how a geometry is simplified to an <strong>{{ID2D1SimplifiedGeometrySink}}</strong>.</p> <p>Indicates whether a specific <strong>{{ID2D1SimplifiedGeometrySink}}</strong> figure is filled or hollow. </p> <p>Indicates whether a specific <strong>{{ID2D1SimplifiedGeometrySink}}</strong> figure is open or closed. </p> <p>Indicates whether a segment should be stroked and whether the join between this segment and the previous one should be smooth. This enumeration allows a bitwise combination of its member values. </p> <dd> <p>The segment is joined as specified by the <strong>{{ID2D1StrokeStyle}}</strong> interface, and it is stroked. </p> </dd> <dd> <p>The segment is not stroked.</p> </dd> <dd> <p>The segment is always joined with the one preceding it using a round line join, regardless of which <strong>{{D2D1_LINE_JOIN}}</strong>enumeration is specified by the <strong>{{ID2D1StrokeStyle}}</strong> interface. If this segment is the first segment and the figure is closed, a round line join is used to connect the closing segment with the first segment. If the figure is not closed, this setting has no effect on the first segment of the figure. If <strong>{{ID2D1SimplifiedGeometrySink::SetSegmentFlags}}</strong> is called just before <strong>{{ID2D1SimplifiedGeometrySink::EndFigure}}</strong>, the join between the closing segment and the last explicitly specified segment is affected.</p> </dd> <p>Defines the direction that an elliptical arc is drawn. </p> <dd> <p> Arcs are drawn in a counterclockwise (negative-angle) direction. </p> </dd> <dd> <p> Arcs are drawn in a clockwise (positive-angle) direction. </p> </dd> <p>Specifies how the intersecting areas of geometries or figures are combined to form the area of the composite geometry. </p> <p>Use the <strong>{{D2D1_FILL_MODE}}</strong> enumeration when creating an <strong>{{ID2D1GeometryGroup}}</strong> with the <strong>CreateGeometryGroup</strong> method, or when modifying the fill mode of an <strong>{{ID2D1SimplifiedGeometrySink}}</strong> with the <strong>{{ID2D1SimplifiedGeometrySink::SetFillMode}}</strong> method.</p><p>Direct2D fills the interior of a path by using one of the two fill modes specified by this enumeration: <strong>{{D2D1_FILL_MODE_ALTERNATE}}</strong> (alternate) or <strong>{{D2D1_FILL_MODE_WINDING}}</strong> (winding). Because the modes determine how to fill the interior of a closed shape, all shapes are treated as closed when they are filled. If there is a gap in a segment in a shape, draw an imaginary line to close it. </p><p> To see the difference between the winding and alternate fill modes, assume that you have four circles with the same center and a different radius, as shown in the following illustration. The first one has the radius of 25, the second 50, the third 75, and the fourth 100.</p><p>The following illustration shows the shape filled by using the alternate fill mode. Notice that the center and third ring are not filled. This is because a ray drawn from any point in either of those two rings passes through an even number of segments. </p><p>The following illustration explains this process. </p><p>The following illustration shows how the same shape is filled when the winding fill mode is specified. </p><p>Notice that all the rings are filled. This is because all the segments run in the same direction, so a ray drawn from any point will cross one or more segments, and the sum of the crossings will not equal zero. </p><p>The following illustration explains this process. The red arrows represent the direction in which the segments are drawn and the black arrow represents an arbitrary ray that runs from a point in the innermost ring. Starting with a value of zero, for each segment that the ray crosses, a value of one is added for every clockwise intersection. All points lie in the fill region in this illustration, because the count does not equal zero. </p> <dd> <p>Determines whether a point is in the fill region by drawing a ray from that point to infinity in any direction, and then counting the number of path segments within the given shape that the ray crosses. If this number is odd, the point is in the fill region; if even, the point is outside the fill region. </p> </dd> <dd> <p>Determines whether a point is in the fill region of the path by drawing a ray from that point to infinity in any direction, and then examining the places where a segment of the shape crosses the ray. Starting with a count of zero, add one each time a segment crosses the ray from left to right and subtract one each time a path segment crosses the ray from right to left, as long as left and right are seen from the perspective of the ray. After counting the crossings, if the result is zero, then the point is outside the path. Otherwise, it is inside the path. </p> </dd> <p>Specifies options that can be applied when a layer resource is applied to create a layer. </p><strong>Note</strong>??Starting in Windows?8, the <strong>{{D2D1_LAYER_OPTIONS_INITIALIZE_FOR_CLEARTYPE}}</strong> option is no longer supported. See <strong>{{D2D1_LAYER_OPTIONS1}}</strong> for Windows?8 layer options.? <p>ClearType antialiasing must use the current contents of the render target to blend properly. When a pushed layer requests initializing for ClearType, Direct2D copies the current contents of the render target into the layer so that ClearType antialiasing can be performed. Rendering ClearType text into a transparent layer does not produce the desired results.</p><p>A small performance hit from re-copying content occurs when <strong>{{ID2D1RenderTarget::Clear}}</strong> is called.</p> <p>Describes whether a window is occluded. </p> <p>If the window was occluded the last time <strong>EndDraw</strong> was called, the next time the render target calls <strong>CheckWindowState</strong>, it returns <strong>{{D2D1_WINDOW_STATE_OCCLUDED}}</strong> regardless of the current window state. If you want to use <strong>CheckWindowState</strong> to check the current window state, call <strong>CheckWindowState</strong> after every <strong>EndDraw</strong> call and ignore its return value. This will ensure that your next call to <strong>CheckWindowState</strong> state returns the actual window state.</p> <dd> <p>The window is not occluded.</p> </dd> <dd> <p>The window is occluded.</p> </dd> <p>Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.</p> <p>Not every render target supports hardware rendering. For more information, see the Render Targets Overview. </p> <dd> <p>The render target uses hardware rendering, if available; otherwise, it uses software rendering.</p> </dd> <dd> <p>The render target uses software rendering only.</p> </dd> <dd> <p>The render target uses hardware rendering only. </p> </dd> <p>Describes the minimum DirectX support required for hardware rendering by a render target.</p> <dd> <p>Direct2D determines whether the video card provides adequate hardware rendering support.</p> </dd> <dd> <p>The video card must support DirectX 9.</p> </dd> <dd> <p>The video card must support DirectX 10. </p> </dd> <p> Describes how a render target is remoted and whether it should be {{GDI}}-compatible. This enumeration allows a bitwise combination of its member values.</p> <dd> <p>The render target attempts to use Direct3D command-stream remoting and uses bitmap remoting if stream remoting fails. The render target is not {{GDI}}-compatible.</p> </dd> <dd> <p>The render target renders content locally and sends it to the terminal services client as a bitmap. </p> </dd> <dd> <p>The render target can be used efficiently with {{GDI}}.</p> </dd> <p>Describes how a render target behaves when it presents its content. This enumeration allows a bitwise combination of its member values.</p> <dd> <p>The render target waits until the display refreshes to present and discards the frame upon presenting.</p> </dd> <dd> <p>The render target does not discard the frame upon presenting.</p> </dd> <dd> <p>The render target does not wait until the display refreshes to present.</p> </dd> <p>Specifies additional features supportable by a compatible render target when it is created. This enumeration allows a bitwise combination of its member values.</p> <p>Use this enumeration when creating a compatible render target with the <strong>CreateCompatibleRenderTarget</strong> method. For more information about compatible render targets, see the Render Targets Overview. </p><p>The <strong>{{D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE}}</strong> option may only be requested if the parent render target was created with <strong>{{D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE}}</strong> (for most render targets) or <strong>{{D2D1_COMPATIBLE_RENDER_TARGET_OPTIONS_GDI_COMPATIBLE}}</strong> (for render targets created by the <strong>CreateCompatibleRenderTarget</strong> method).</p> <dd> <p>The render target supports no additional features.</p> </dd> <dd> <p>The render target supports interoperability with the Windows Graphics Device Interface ({{GDI}}). </p> </dd> <p> Specifies how a device context is initialized for {{GDI}} rendering when it is retrieved from the render target.</p> <p>Use this enumeration with the <strong>{{ID2D1GdiInteropRenderTarget::GetDC}}</strong> method to specify how the device context is initialized for {{GDI}} rendering.</p> <dd> <p>The current contents of the render target are copied to the device context when it is initialized. </p> </dd> <dd> <p>The device context is cleared to transparent black when it is initialized.</p> </dd> <p>Indicates the type of information provided by the Direct2D Debug Layer. </p> <p>To receive debugging messages, you must install the Direct2D Debug Layer.</p> <p>Specifies whether Direct2D provides synchronization for an <strong>{{ID2D1Factory}}</strong> and the resources it creates, so that they may be safely accessed from multiple threads. </p> <p>When you create a factory, you can specify whether it is multithreaded or singlethreaded. A singlethreaded factory provides no serialization against any other single threaded instance within Direct2D, so this mechanism provides a very large degree of scaling on the {{CPU}}.</p><p>You can also create a multithreaded factory instance. In this case, the factory and all derived objects can be used from any thread, and each render target can be rendered to independently. Direct2D serializes calls to these objects, so a single multithreaded Direct2D instance won't scale as well on the {{CPU}} as many single threaded instances. However, the resources can be shared within the multithreaded instance.</p><p>Note the qualifier "On the {{CPU}}": {{GPUs}} generally take advantage of fine-grained parallelism more so than {{CPUs}}. For example, multithreaded calls from the {{CPU}} might still end up being serialized when being sent to the {{GPU}}; however, a whole bank of pixel and vertex shaders will run in parallel to perform the rendering.</p> <p>Describes the pixel format and dpi of a bitmap.</p> <dd> <p>The bitmap's pixel format and alpha mode.</p> </dd> <dd> <p>The horizontal dpi of the bitmap.</p> </dd> <dd> <p>The vertical dpi of the bitmap.</p> </dd> <p> Contains the position and color of a gradient stop. </p> <p>Gradient stops can be specified in any order if they are at different positions. Two stops may share a position. In this case, the first stop specified is treated as the "low" stop (nearer 0.0f) and subsequent stops are treated as "higher" (nearer 1.0f). This behavior is useful if a caller wants an instant transition in the middle of a stop.</p><p>Typically, there are at least two points in a collection, although creation with only one stop is permitted. For example, one point is at position 0.0f, another point is at position 1.0f, and additional points are distributed in the [0, 1] range. Where the gradient progression is beyond the range of [0, 1], the stops are stored, but may affect the gradient. </p><p>When drawn, the [0, 1] range of positions is mapped to the brush, in a brush-dependent way. For details, see <strong>{{ID2D1LinearGradientBrush}}</strong> and <strong>{{ID2D1RadialGradientBrush}}</strong>. </p><p>Gradient stops with a position outside the [0, 1] range cannot be seen explicitly, but they can still affect the colors produced in the [0, 1] range. For example, a two-stop gradient {{0.0f, Black}, {2.0f, White}} is indistinguishable visually from {{0.0f, Black}, {1.0f, Mid-level gray}}. Also, the colors are clamped before interpolation.</p> <dd> <p>A value that indicates the relative position of the gradient stop in the brush. This value must be in the [0.0f, 1.0f] range if the gradient stop is to be seen explicitly. </p> </dd> <dd> <p>The color of the gradient stop.</p> </dd> <p> Describes the opacity and transformation of a brush.</p> <p>This structure is used when creating a brush. For convenience, Direct2D provides the <strong>{{D2D1::BrushProperties}}</strong> function for creating <strong>{{D2D1_BRUSH_PROPERTIES}}</strong> structures.</p><p>After creating a brush, you can change its opacity or transform by calling the <strong>SetOpacity</strong> or <strong>SetTransform</strong> methods.</p> <dd> <p>A value between 0.0f and 1.0f, inclusive, that specifies the degree of opacity of the brush.</p> </dd> <dd> <p>The transformation that is applied to the brush.</p> </dd> <p> Describes the extend modes and the interpolation mode of an <strong>{{ID2D1BitmapBrush}}</strong>.</p> <p> Contains the starting point and endpoint of the gradient axis for an <strong>{{ID2D1LinearGradientBrush}}</strong>. </p> <p>Use this method when creating new <strong>{{ID2D1LinearGradientBrush}}</strong> objects with the <strong>CreateLinearGradientBrush</strong> method. For convenience, Direct2D provides the <strong>{{D2D1::LinearGradientBrushProperties}}</strong> helper function for creating new <strong>{{D2D1_LINEAR_GRADIENT_BRUSH_PROPERTIES}}</strong> structures.</p><p>The following illustration shows how a linear gradient changes as you change its start and end points. For the first gradient, the start point is set to (0,0) and the end point to (150, 50); this creates a diagonal gradient that starts at the upper-left corner and extends to the lower-right corner of the area being painted. When you set the start point to (0, 25) and the end point to (150, 25), a horizontal gradient is created. Similarly, setting the start point to (75, 0) and the end point to (75, 50) creates a vertical gradient. Setting the start point to (0, 50) and the end point to (150, 0) creates a diagonal gradient that starts at the lower-left corner and extends to the upper-right corner of the area being painted.</p><p></p> <p> Contains the gradient origin offset and the size and position of the gradient ellipse for an <strong>{{ID2D1RadialGradientBrush}}</strong>. </p> <p>Different values for <em>center</em>, <em>gradientOriginOffset</em>, <em>radiusX</em> and/or <em>radiusY</em> produce different gradients. The following illustration shows several radial gradients that have different gradient origin offsets, creating the appearance of the light illuminating the circles from different angles.</p><p></p><p>For convenience, Direct2D provides the <strong>{{D2D1::RadialGradientBrushProperties}}</strong> function for creating new <strong>{{D2D1_RADIAL_GRADIENT_BRUSH}}</strong> structures.</p> <p>Represents a cubic bezier segment drawn between two points.</p> <p> A cubic Bezier curve is defined by four points: a start point, an end point (<em>point3</em>), and two control points (<em>point1</em> and <em>point2</em>). A Bezier segment does not contain a property for the starting point of the curve; it defines only the end point. The beginning point of the curve is the current point of the path to which the Bezier curve is added.</p><p> The two control points of a cubic Bezier curve behave like magnets, attracting portions of what would otherwise be a straight line toward themselves and producing a curve. The first control point, <em>point1</em>, affects the beginning portion of the curve; the second control point, <em>point2</em>, affects the ending portion of the curve. </p><strong>Note</strong>??The curve doesn't necessarily pass through either of the control points; each control point moves its portion of the line toward itself, but not through itself.? <dd> <p>The first control point for the Bezier segment.</p> </dd> <dd> <p>The second control point for the Bezier segment.</p> </dd> <dd> <p>The end point for the Bezier segment.</p> </dd> <p>Contains the three vertices that describe a triangle.</p> <dd> <p>The first vertex of a triangle.</p> </dd> <dd> <p>The second vertex of a triangle.</p> </dd> <dd> <p>The third vertex of a triangle.</p> </dd> <p>Describes an elliptical arc between two points.</p> <dd> <p>The end point of the arc.</p> </dd> <dd> <p>The x-radius and y-radius of the arc.</p> </dd> <dd> <p>A value that specifies how many degrees in the clockwise direction the ellipse is rotated relative to the current coordinate system.</p> </dd> <dd> <p>A value that specifies whether the arc sweep is clockwise or counterclockwise.</p> </dd> <dd> <p>A value that specifies whether the given arc is larger than 180 degrees.</p> </dd> <p> Contains the control point and end point for a quadratic Bezier segment.</p> <dd> <p>The control point of the quadratic Bezier segment.</p> </dd> <dd> <p>The end point of the quadratic Bezier segment.</p> </dd> <p> Contains the center point, x-radius, and y-radius of an ellipse.</p> <dd> <p>The center point of the ellipse.</p> </dd> <dd> <p>The X-radius of the ellipse.</p> </dd> <dd> <p>The Y-radius of the ellipse.</p> </dd> <p> Contains the dimensions and corner radii of a rounded rectangle.</p> <p>Each corner of the rectangle specified by the <em>rect</em> is replaced with a quarter ellipse, with a radius in each direction specified by <em>radiusX</em> and <em>radiusY</em>.</p><p> If the <em>radiusX</em> is greater than or equal to half the width of the rectangle, and the <em>radiusY</em> is greater than or equal to one-half the height, the rounded rectangle is an ellipse with the same width and height of the <em>rect</em>. </p><p>Even when both <em>radiuX</em> and <em>radiusY</em> are zero, the rounded rectangle is different from a rectangle., When stroked, the corners of the rounded rectangle are roundly joined, not mitered (square). </p> <dd> <p>The coordinates of the rectangle.</p> </dd> <dd> <p>The x-radius for the quarter ellipse that is drawn to replace every corner of the rectangle.</p> </dd> <dd> <p>The y-radius for the quarter ellipse that is drawn to replace every corner of the rectangle.</p> </dd> <p> Describes the stroke that outlines a shape. </p> <p>The following illustration shows different <em>dashOffset</em> values for the same custom dash style.</p><p></p> <dd> <p>The cap applied to the start of all the open figures in a stroked geometry.</p> </dd> <dd> <p>The cap applied to the end of all the open figures in a stroked geometry.</p> </dd> <dd> <p>The shape at either end of each dash segment.</p> </dd> <dd> <p>A value that describes how segments are joined. This value is ignored for a vertex if the segment flags specify that the segment should have a smooth join. </p> </dd> <dd> <p>The limit of the thickness of the join on a mitered corner. This value is always treated as though it is greater than or equal to 1.0f. </p> </dd> <dd> <p>A value that specifies whether the stroke has a dash pattern and, if so, the dash style. </p> </dd> <dd> <p>A value that specifies an offset in the dash sequence. A positive dash offset value shifts the dash pattern, in units of stroke width, toward the start of the stroked geometry. A negative dash offset value shifts the dash pattern, in units of stroke width, toward the end of the stroked geometry.</p> </dd> <p> Contains the content bounds, mask information, opacity settings, and other options for a layer resource. </p> <dd> <p>The content bounds of the layer. Content outside these bounds is not guaranteed to render.</p> </dd> <dd> <p>The geometric mask specifies the area of the layer that is composited into the render target. </p> </dd> <dd> <p>A value that specifies the antialiasing mode for the geometricMask. </p> </dd> <dd> <p> A value that specifies the transform that is applied to the geometric mask when composing the layer.</p> </dd> <dd> <p>An opacity value that is applied uniformly to all resources in the layer when compositing to the target.</p> </dd> <dd> <p>A brush that is used to modify the opacity of the layer. The brush is mapped to the layer, and the alpha channel of each mapped brush pixel is multiplied against the corresponding layer pixel. </p> </dd> <dd> <p> A value that specifies whether the layer intends to render text with ClearType antialiasing.</p> </dd> <p> Contains rendering options (hardware or software), pixel format, {{DPI}} information, remoting options, and Direct3D support requirements for a render target. </p> <p>Use this structure when creating a render target, or use it with the <strong>{{ID2D1RenderTarget::IsSupported}}</strong> method to check the properties supported by an existing render target.</p><p>As a convenience, Direct2D provides the <strong>{{D2D1::RenderTargetProperties}}</strong> helper function for creating <strong>{{D2D1_RENDER_TARGET_PROPERTIES}}</strong> structures. An easy way to create a <strong>{{D2D1_RENDER_TARGET_PROPERTIES}}</strong> structure that works for most render targets is to call the function without specifying any parameters. Doing so creates a <strong>{{D2D1_RENDER_TARGET_PROPERTIES}}</strong> structure that has its fields set to default values. For more information, see <strong>{{D2D1::RenderTargetProperties}}</strong>.</p><p>Not all render targets support hardware rendering. For a list, see the Render Targets Overview.</p> <dd> <p>A value that specifies whether the render target should force hardware or software rendering. A value of <strong>{{D2D1_RENDER_TARGET_TYPE_DEFAULT}}</strong> specifies that the render target should use hardware rendering if it is available; otherwise, it uses software rendering. Note that {{WIC}} bitmap render targets do not support hardware rendering.</p> </dd> <dd> <p>The pixel format and alpha mode of the render target. You can use the <strong>{{D2D1::PixelFormat}}</strong> function to create a pixel format that specifies that Direct2D should select the pixel format and alpha mode for you. For a list of pixel formats and alpha modes supported by each render target, see Supported Pixel Formats and Alpha Modes.</p> </dd> <dd> <p>The horizontal {{DPI}} of the render target. To use the default {{DPI}}, set <em>dpiX</em> and <em>dpiY</em> to 0. For more information, see the Remarks section. </p> </dd> <dd> <p>The vertical {{DPI}} of the render target. To use the default {{DPI}}, set <em>dpiX</em> and <em>dpiY</em> to 0. For more information, see the Remarks section. </p> </dd> <dd> <p>A value that specifies how the render target is remoted and whether it should be {{GDI}}-compatible. Set to <strong>{{D2D1_RENDER_TARGET_USAGE_NONE}}</strong> to create a render target that is not compatible with {{GDI}} and uses Direct3D command-stream remoting if it is available. </p> </dd> <dd> <p>A value that specifies the minimum Direct3D feature level required for hardware rendering. If the specified minimum level is not available, the render target uses software rendering if the <strong>type </strong> member is set to <strong>{{D2D1_RENDER_TARGET_TYPE_DEFAULT}}</strong>; if <strong>type </strong> is set to to <strong>{{D2D1_RENDER_TARGET_TYPE_HARDWARE}}</strong>, render target creation fails. A value of <strong>{{D2D1_FEATURE_LEVEL_DEFAULT}}</strong> indicates that Direct2D should determine whether the Direct3D feature level of the device is adequate. This field is used only when creating <strong>{{ID2D1HwndRenderTarget}}</strong> and <strong>{{ID2D1DCRenderTarget}}</strong> objects.</p> </dd> <p> Contains the {{HWND}}, pixel size, and presentation options for an <strong>{{ID2D1HwndRenderTarget}}</strong>.</p> <p>Use this structure when you call the <strong>CreateHwndRenderTarget</strong> method to create a new <strong>{{ID2D1HwndRenderTarget}}</strong>.</p><p>For convenience, Direct2D provides the <strong>{{D2D1::HwndRenderTargetProperties}}</strong> function for creating new <strong>{{D2D1_HWND_RENDER_TARGET_PROPERTIES}}</strong> structures.</p> <p>Describes the drawing state of a render target. </p> <dd> <p>The antialiasing mode for subsequent nontext drawing operations. </p> </dd> <dd> <p>The antialiasing mode for subsequent text and glyph drawing operations.</p> </dd> <dd> <p>A label for subsequent drawing operations.</p> </dd> <dd> <p>A label for subsequent drawing operations.</p> </dd> <dd> <p>The transformation to apply to subsequent drawing operations.</p> </dd> <p>Contains the debugging level of an <strong>{{ID2D1Factory}}</strong> object. </p> <p>To enable debugging, you must install the Direct2D Debug Layer.</p> <p> Describes a geometric path that does not contain quadratic bezier curves or arcs. </p> <p>A geometry sink consists of one or more figures. Each figure is made up of one or more line or Bezier curve segments. To create a figure, call the <strong>BeginFigure</strong> method and specify the figure's start point, then use <strong>AddLines</strong> and <strong>AddBeziers</strong> to add line and Bezier segments. When you are finished adding segments, call the <strong>EndFigure</strong> method. You can repeat this sequence to create additional figures. When you are finished creating figures, call the <strong>Close</strong> method.</p><p>To create geometry paths that can contain arcs and quadratic Bezier curves, use an <strong>{{ID2D1GeometrySink}}</strong>.</p> <p>Specifies the method used to determine which points are inside the geometry described by this geometry sink and which points are outside. </p> <p>The fill mode defaults to {{D2D1_FILL_MODE_ALTERNATE}}. To set the fill mode, call <strong>SetFillMode</strong> before the first call to <strong>BeginFigure</strong>. Not doing will put the geometry sink in an error state. </p> <p>This method does not return a value.</p> <dd> <p>The method used to determine whether a given point is part of the geometry.</p> </dd> <p>Specifies stroke and join options to be applied to new segments added to the geometry sink. </p> <p>After this method is called, the specified segment flags are applied to each segment subsequently added to the sink. The segment flags are applied to every additional segment until this method is called again and a different set of segment flags is specified. </p> <p>This method does not return a value.</p> <dd> <p>Stroke and join options to be applied to new segments added to the geometry sink.</p> </dd> <p>Starts a new figure at the specified point. </p> <p>If this method is called while a figure is currently in progress, the interface is invalidated and all future methods will fail.</p> <p>This method does not return a value.</p> <dd> <p>The point at which to begin the new figure.</p> </dd> <dd> <p>Whether the new figure should be hollow or filled.</p> </dd> <p> Creates a sequence of lines using the specified points and adds them to the geometry sink.</p> <p>This method does not return a value.</p> <dd> <p>A reference to an array of one or more points that describe the lines to draw. A line is drawn from the geometry sink's current point (the end point of the last segment drawn or the location specified by <strong>BeginFigure</strong>) to the first point in the array. if the array contains additional points, a line is drawn from the first point to the second point in the array, from the second point to the third point, and so on. </p> </dd> <dd> <p>The number of points in the <em>points</em> array.</p> </dd> <p>Creates a sequence of cubic Bezier curves and adds them to the geometry sink. </p> <p>This method does not return a value.</p> <dd> <p>A reference to an array of Bezier segments that describes the Bezier curves to create. A curve is drawn from the geometry sink's current point (the end point of the last segment drawn or the location specified by <strong>BeginFigure</strong>) to the end point of the first Bezier segment in the array. if the array contains additional Bezier segments, each subsequent Bezier segment uses the end point of the preceding Bezier segment as its start point.</p> </dd> <dd> <p>The number of Bezier segments in the <em>beziers</em> array.</p> </dd> <p> Ends the current figure; optionally, closes it.</p> <p>Calling this method without a matching call to <strong>BeginFigure</strong> places the geometry sink in an error state; subsequent calls are ignored, and the overall failure will be returned when the <strong>Close</strong> method is called.</p> <p>This method does not return a value.</p> <dd> <p>A value that indicates whether the current figure is closed. If the figure is closed, a line is drawn between the current point and the start point specified by <strong>BeginFigure</strong>.</p> </dd> <p>Closes the geometry sink, indicates whether it is in an error state, and resets the sink's error state. </p> <p>Do not close the geometry sink while a figure is still in progress; doing so puts the geometry sink in an error state. For the close operation to be successful, there must be one <strong>EndFigure</strong> call for each call to <strong>BeginFigure</strong>.</p><p>After calling this method, the geometry sink might not be usable. Direct2D implementations of this interface do not allow the geometry sink to be modified after it is closed, but other implementations might not impose this restriction.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates Direct2D resources.</p> <p>The <strong>{{ID2D1Factory}}</strong> interface is the starting point for using Direct2D; it's what you use to create other Direct2D resources that you can use to draw or describe shapes. </p><p>A factory defines a set of Create<em>Resource</em> methods that can produce the following drawing resources:</p><p> </p><ul> <li>Render targets: objects that render drawing commands.</li> <li>Drawing state blocks: objects that store drawing state information, such as the current transformation and antialiasing mode.</li> <li>Geometries: objects that represent simple and potentially complex shapes.</li> </ul><p>To create an <strong>{{ID2D1Factory}}</strong>, you use one of the <strong>CreateFactory</strong> methods. You should retain the <strong>{{ID2D1Factory}}</strong> instance for as long as you use Direct2D resources; in general, you shouldn't need to recreate it when the application is running. For more information about Direct2D resources, see the Resources Overview.</p> <p>Forces the factory to refresh any system defaults that it might have changed since factory creation.</p> <p>You should call this method before calling the <strong>GetDesktopDpi</strong> method, to ensure that the system {{DPI}} is current.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Retrieves the current desktop dots per inch ({{DPI}}). To refresh this value, call <strong>ReloadSystemMetrics</strong>.</p> <p>Use this method to obtain the system {{DPI}} when setting physical pixel values, such as when you specify the size of a window.</p> <p>This method does not return a value.</p> <p> Creates an <strong>{{ID2D1RectangleGeometry}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Creates an <strong>{{ID2D1RoundedRectangleGeometry}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an <strong>{{ID2D1EllipseGeometry}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an <strong>{{ID2D1GeometryGroup}}</strong>, which is an object that holds other geometries.</p> <p>Geometry groups are a convenient way to group several geometries simultaneously so all figures of several distinct geometries are concatenated into one. To create a <strong>{{ID2D1GeometryGroup}}</strong> object, call the <strong>CreateGeometryGroup</strong> method on the <strong>{{ID2D1Factory}}</strong> object, passing in the <em>fillMode</em> with possible values of <strong>{{D2D1_FILL_MODE_ALTERNATE}}</strong> (alternate) and <strong>{{D2D1_FILL_MODE_WINDING}}</strong>, an array of geometry objects to add to the geometry group, and the number of elements in this array. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Transforms the specified geometry and stores the result as an <strong>{{ID2D1TransformedGeometry}}</strong> object. </p> <p>Like other resources, a transformed geometry inherits the resource space and threading policy of the factory that created it. This object is immutable.</p><p>When stroking a transformed geometry with the <strong>DrawGeometry</strong> method, the stroke width is not affected by the transform applied to the geometry. The stroke width is only affected by the world transform.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an empty <strong>{{ID2D1PathGeometry}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Creates an <strong>{{ID2D1StrokeStyle}}</strong> that describes start cap, dash pattern, and other features of a stroke.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an <strong>{{ID2D1DrawingStateBlock}}</strong> that can be used with the <strong>SaveDrawingState</strong> and <strong>RestoreDrawingState</strong> methods of a render target.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a render target that renders to a Microsoft Windows Imaging Component ({{WIC}}) bitmap.</p> <p>You must use <strong>{{D2D1_FEATURE_LEVEL_DEFAULT}}</strong> for the <strong>minLevel</strong> member of the <em>renderTargetProperties</em> parameter with this method.</p><p>Your application should create render targets once and hold onto them for the life of the application or until the <strong>{{D2DERR_RECREATE_TARGET}}</strong> error is received. When you receive this error, you need to recreate the render target (and any resources it created).</p><ul> <li></li> </ul> <p><strong>Note</strong>?? This method isn't supported on Windows Phone and will fail when called on a device with error code 0x8899000b (?There is no hardware rendering device available for this operation?). Because the Windows Phone Emulator supports {{WARP}} rendering, this method will fail when called on the emulator with a different error code, 0x88982f80 (wincodec_err_unsupportedpixelformat).</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The bitmap that receives the rendering output of the render target.</p> </dd> <dd> <p>The rendering mode, pixel format, remoting options, {{DPI}} information, and the minimum DirectX support required for hardware rendering. For information about supported pixel formats, see Supported Pixel Formats and Alpha Modes.</p> </dd> <dd> <p>When this method returns, contains the address of the reference to the <strong>{{ID2D1RenderTarget}}</strong> object created by this method. </p> </dd> <p>Creates an <strong>{{ID2D1HwndRenderTarget}}</strong>, a render target that renders to a window.</p> <p>When you create a render target and hardware acceleration is available, you allocate resources on the computer's {{GPU}}. By creating a render target once and retaining it as long as possible, you gain performance benefits. Your application should create render targets once and hold onto them for the life of the application or until the <strong>{{D2DERR_RECREATE_TARGET}}</strong> error is received. When you receive this error, you need to recreate the render target (and any resources it created).</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a render target that draws to a DirectX Graphics Infrastructure ({{DXGI}}) surface. </p> <p>To write to a Direct3D surface, you obtain an {{IDXGISurface}} and pass it to the <strong>CreateDxgiSurfaceRenderTarget</strong> method to create a {{DXGI}} surface render target; you can then use the {{DXGI}} surface render target to draw 2-D content to the {{DXGI}} surface. </p><p>A {{DXGI}} surface render target is a type of <strong>{{ID2D1RenderTarget}}</strong>. Like other Direct2D render targets, you can use it to create resources and issue drawing commands. </p><p>The {{DXGI}} surface render target and the {{DXGI}} surface must use the same {{DXGI}} format. If you specify the {{DXGI_FORMAT_UNKOWN}} format when you create the render target, it will automatically use the surface's format.</p><p>The {{DXGI}} surface render target does not perform {{DXGI}} surface synchronization. </p><p>For more information about creating and using {{DXGI}} surface render targets, see the Direct2D and Direct3D Interoperability Overview.</p><p>To work with Direct2D, the Direct3D device that provides the {{IDXGISurface}} must be created with the <strong>{{D3D10_CREATE_DEVICE_BGRA_SUPPORT}}</strong> flag.</p><p>When you create a render target and hardware acceleration is available, you allocate resources on the computer's {{GPU}}. By creating a render target once and retaining it as long as possible, you gain performance benefits. Your application should create render targets once and hold onto them for the life of the application or until the render target's <strong>EndDraw</strong> method returns the <strong>{{D2DERR_RECREATE_TARGET}}</strong> error. When you receive this error, you need to recreate the render target (and any resources it created). </p><p></p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{IDXGISurface}} to which the render target will draw.</p> </dd> <dd> <p>The rendering mode, pixel format, remoting options, {{DPI}} information, and the minimum DirectX support required for hardware rendering. For information about supported pixel formats, see Supported Pixel Formats and Alpha Modes.</p> </dd> <dd> <p>When this method returns, contains the address of the reference to the <strong>{{ID2D1RenderTarget}}</strong> object created by this method.</p> </dd> <p>Creates a render target that draws to a Windows Graphics Device Interface ({{GDI}}) device context.</p> <p>Before you can render with a {{DC}} render target, you must use the render target's <strong>BindDC</strong> method to associate it with a {{GDI}} {{DC}}. Do this for each different {{DC}} and whenever there is a change in the size of the area you want to draw to.</p><p>To enable the {{DC}} render target to work with {{GDI}}, set the render target's {{DXGI}} format to {{DXGI_FORMAT_B8G8R8A8_UNORM}} and alpha mode to <strong>{{D2D1_ALPHA_MODE_PREMULTIPLIED}}</strong> or <strong>{{D2D1_ALPHA_MODE_IGNORE}}</strong>.</p><p>Your application should create render targets once and hold on to them for the life of the application or until the render target's <strong>EndDraw</strong> method returns the <strong>{{D2DERR_RECREATE_TARGET}}</strong> error. When you receive this error, recreate the render target (and any resources it created).</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The rendering mode, pixel format, remoting options, {{DPI}} information, and the minimum DirectX support required for hardware rendering. To enable the device context ({{DC}}) render target to work with {{GDI}}, set the {{DXGI}} format to {{DXGI_FORMAT_B8G8R8A8_UNORM}} and the alpha mode to <strong>{{D2D1_ALPHA_MODE_PREMULTIPLIED}}</strong> or <strong>{{D2D1_ALPHA_MODE_IGNORE}}</strong>. For more information about pixel formats, see Supported Pixel Formats and Alpha Modes.</p> </dd> <dd> <p>When this method returns, <em>dcRenderTarget</em> contains the address of the reference to the <strong>{{ID2D1DCRenderTarget}}</strong> created by the method.</p> </dd> <p>Represents an object that can receive drawing commands. Interfaces that inherit from <strong>{{ID2D1RenderTarget}}</strong> render the drawing commands they receive in different ways. </p> <p>Your application should create render targets once and hold onto them for the life of the application or until the render target's <strong>EndDraw</strong> method returns the <strong>{{D2DERR_RECREATE_TARGET}}</strong> error. When you receive this error, you need to recreate the render target (and any resources it created). </p> <p>Creates a Direct2D bitmap from a reference to in-memory source data.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The dimension of the bitmap to create in pixels.</p> </dd> <dd> <p>A reference to the memory location of the image data, or <strong>{{NULL}}</strong> to create an uninitialized bitmap.</p> </dd> <dd> <p>The byte count of each scanline, which is equal to (the image width in pixels ? the number of bytes per pixel) + memory padding. If <em>srcData</em> is <strong>{{NULL}}</strong>, this value is ignored. (Note that pitch is also sometimes called <em>stride</em>.)</p> </dd> <dd> <p>The pixel format and dots per inch ({{DPI}}) of the bitmap to create.</p> </dd> <dd> <p>When this method returns, contains a reference to a reference to the new bitmap. This parameter is passed uninitialized.</p> </dd> <p>Creates an <strong>{{ID2D1Bitmap}}</strong> by copying the specified Microsoft Windows Imaging Component ({{WIC}}) bitmap.</p> <p>Before Direct2D can load a {{WIC}} bitmap, that bitmap must be converted to a supported pixel format and alpha mode. For a list of supported pixel formats and alpha modes, see Supported Pixel Formats and Alpha Modes. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an <strong>{{ID2D1Bitmap}}</strong> whose data is shared with another resource.</p> <p>The <strong>CreateSharedBitmap</strong> method is useful for efficiently reusing bitmap data and can also be used to provide interoperability with Direct3D. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an <strong>{{ID2D1BitmapBrush}}</strong> from the specified bitmap.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a new <strong>{{ID2D1SolidColorBrush}}</strong> that has the specified color and a base opacity of 1.0f. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Creates an <strong>{{ID2D1GradientStopCollection}}</strong> from the specified gradient stops that uses the <strong>{{D2D1_GAMMA_2_2}}</strong> color interpolation gamma and the clamp extend mode.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an <strong>{{ID2D1LinearGradientBrush}}</strong> that contains the specified gradient stops, has no transform, and has a base opacity of 1.0. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an <strong>{{ID2D1RadialGradientBrush}}</strong> that contains the specified gradient stops, has no transform, and has a base opacity of 1.0. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Creates a new bitmap render target for use during intermediate offscreen drawing that is compatible with the current render target and has the same size, {{DPI}}, and pixel format (but not alpha mode) as the current render target. </p> <p>The bitmap render target created by this method is not compatible with {{GDI}} and has an alpha mode of <strong>{{D2D1_ALPHA_MODE_PREMULTIPLIED}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains a reference to a reference to a new bitmap render target. This parameter is passed uninitialized.</p> </dd> <p>Creates a layer resource that can be used with this render target and its compatible render targets. The new layer has the specified initial size. </p> <p>Regardless of whether a size is initially specified, the layer automatically resizes as needed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>If (0, 0) is specified, no backing store is created behind the layer resource. The layer resource is allocated to the minimum size when <strong>PushLayer</strong> is called.</p> </dd> <dd> <p>When the method returns, contains a reference to a reference to the new layer. This parameter is passed uninitialized.</p> </dd> <p>Create a mesh that uses triangles to describe a shape.</p> <p>To populate a mesh, use its <strong>Open</strong> method to obtain an <strong>{{ID2D1TessellationSink}}</strong>. To draw the mesh, use the render target's <strong>FillMesh</strong> method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains a reference to a reference to the new mesh.</p> </dd> <p>Draws a line between the specified points using the specified stroke style. </p> <p>This method doesn't return an error code if it fails. To determine whether a drawing operation (such as <strong>DrawLine</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> methods. </p> <p>This method does not return a value.</p> <dd> <p>The start point of the line, in device-independent pixels.</p> </dd> <dd> <p>The end point of the line, in device-independent pixels.</p> </dd> <dd> <p>The brush used to paint the line's stroke.</p> </dd> <dd> <p>The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.</p> </dd> <dd> <p>The style of stroke to paint, or <strong>{{NULL}}</strong> to paint a solid line.</p> </dd> <p>Draws the outline of a rectangle that has the specified dimensions and stroke style. </p> <p>When this method fails, it does not return an error code. To determine whether a drawing method (such as <strong>DrawRectangle</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> method. </p> <p>This method does not return a value.</p> <dd> <p>The dimensions of the rectangle to draw, in device-independent pixels.</p> </dd> <dd> <p>The brush used to paint the rectangle's stroke.</p> </dd> <dd> <p>The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.</p> </dd> <dd> <p>The style of stroke to paint, or <strong>{{NULL}}</strong> to paint a solid stroke.</p> </dd> <p>Paints the interior of the specified rectangle. </p> <p>This method doesn't return an error code if it fails. To determine whether a drawing operation (such as <strong>FillRectangle</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> methods. </p> <p>This method does not return a value.</p> <dd> <p>The dimension of the rectangle to paint, in device-independent pixels.</p> </dd> <dd> <p>The brush used to paint the rectangle's interior.</p> </dd> <p> Draws the outline of the specified rounded rectangle using the specified stroke style.</p> <p>This method doesn't return an error code if it fails. To determine whether a drawing operation (such as <strong>DrawRoundedRectangle</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> methods. </p> <p>This method does not return a value.</p> <dd> <p>The dimensions of the rounded rectangle to draw, in device-independent pixels.</p> </dd> <dd> <p>The brush used to paint the rounded rectangle's outline. </p> </dd> <dd> <p>The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.</p> </dd> <dd> <p>The style of the rounded rectangle's stroke, or <strong>{{NULL}}</strong> to paint a solid stroke. The default value is <strong>{{NULL}}</strong>.</p> </dd> <p> Paints the interior of the specified rounded rectangle.</p> <p>This method doesn't return an error code if it fails. To determine whether a drawing operation (such as <strong>FillRoundedRectangle</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> methods. </p> <p>This method does not return a value.</p> <dd> <p>The dimensions of the rounded rectangle to paint, in device-independent pixels.</p> </dd> <dd> <p>The brush used to paint the interior of the rounded rectangle.</p> </dd> <p>Draws the outline of the specified ellipse using the specified stroke style. </p> <p>The <strong>DrawEllipse</strong> method doesn't return an error code if it fails. To determine whether a drawing operation (such as <strong>DrawEllipse</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> methods. </p> <p>This method does not return a value.</p> <dd> <p>The position and radius of the ellipse to draw, in device-independent pixels.</p> </dd> <dd> <p>The brush used to paint the ellipse's outline.</p> </dd> <dd> <p>The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.</p> </dd> <dd> <p>The style of stroke to apply to the ellipse's outline, or <strong>{{NULL}}</strong> to paint a solid stroke.</p> </dd> <p>Paints the interior of the specified ellipse. </p> <p>This method doesn't return an error code if it fails. To determine whether a drawing operation (such as <strong>FillEllipse</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> methods. </p> <p>This method does not return a value.</p> <dd> <p>The position and radius, in device-independent pixels, of the ellipse to paint.</p> </dd> <dd> <p>The brush used to paint the interior of the ellipse.</p> </dd> <p>Draws the outline of the specified geometry using the specified stroke style. </p> <p>This method doesn't return an error code if it fails. To determine whether a drawing operation (such as <strong>DrawGeometry</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> methods. </p> <p>This method does not return a value.</p> <dd> <p>The geometry to draw.</p> </dd> <dd> <p>The brush used to paint the geometry's stroke.</p> </dd> <dd> <p>The width of the stroke, in device-independent pixels. The value must be greater than or equal to 0.0f. If this parameter isn't specified, it defaults to 1.0f. The stroke is centered on the line.</p> </dd> <dd> <p>The style of stroke to apply to the geometry's outline, or <strong>{{NULL}}</strong> to paint a solid stroke.</p> </dd> <p>Paints the interior of the specified geometry. </p> <p>If the <em>opacityBrush</em> parameter is not <strong>{{NULL}}</strong>, the alpha value of each pixel of the mapped <em>opacityBrush</em> is used to determine the resulting opacity of each corresponding pixel of the geometry. Only the alpha value of each color in the brush is used for this processing; all other color information is ignored. The alpha value specified by the brush is multiplied by the alpha value of the geometry after the geometry has been painted by <em>brush</em>. </p><p>When this method fails, it does not return an error code. To determine whether a drawing operation (such as <strong>FillGeometry</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> method. </p> <p>This method does not return a value.</p> <dd> <p>The geometry to paint.</p> </dd> <dd> <p>The brush used to paint the geometry's interior.</p> </dd> <dd> <p>The opacity mask to apply to the geometry, or <strong>{{NULL}}</strong> for no opacity mask. If an opacity mask (the <em>opacityBrush</em> parameter) is specified, <em>brush</em> must be an <strong>{{ID2D1BitmapBrush}}</strong> that has its x- and y-extend modes set to <strong>{{D2D1_EXTEND_MODE_CLAMP}}</strong>. For more information, see the Remarks section. </p> </dd> <p> Paints the interior of the specified mesh.</p> <p>The current antialias mode of the render target must be <strong>{{D2D1_ANTIALIAS_MODE_ALIASED}}</strong> when <strong>FillMesh</strong> is called. To change the render target's antialias mode, use the <strong>SetAntialiasMode</strong> method.</p><p><strong>FillMesh</strong> does not expect a particular winding order for the triangles in the <strong>{{ID2D1Mesh}}</strong>; both clockwise and counter-clockwise will work. </p><p>This method doesn't return an error code if it fails. To determine whether a drawing operation (such as <strong>FillMesh</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> methods. </p> <p>This method does not return a value.</p> <dd> <p>The mesh to paint.</p> </dd> <dd> <p>The brush used to paint the mesh.</p> </dd> Applies the opacity mask described by the specified bitmap to a brush and uses that brush to paint a region of the render target. <p>For this method to work properly, the render target must be using the <strong>{{D2D1_ANTIALIAS_MODE_ALIASED}}</strong> antialiasing mode. You can set the antialiasing mode by calling the <strong>{{ID2D1RenderTarget::SetAntialiasMode}}</strong> method.</p><p>This method doesn't return an error code if it fails. To determine whether a drawing operation (such as <strong>FillOpacityMask</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> methods. </p> <p>Draws the specified bitmap after scaling it to the size of the specified rectangle. </p> <p>This method doesn't return an error code if it fails. To determine whether a drawing operation (such as <strong>DrawBitmap</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> methods. </p> <p>This method does not return a value.</p> <dd> <p>The bitmap to render.</p> </dd> <dd> <p>The size and position, in device-independent pixels in the render target's coordinate space, of the area to which the bitmap is drawn. If the rectangle is not well-ordered, nothing is drawn, but the render target does not enter an error state.</p> </dd> <dd> <p>A value between 0.0f and 1.0f, inclusive, that specifies the opacity value to be applied to the bitmap; this value is multiplied against the alpha values of the bitmap's contents. Default is 1.0f.</p> </dd> <dd> <p>The interpolation mode to use if the bitmap is scaled or rotated by the drawing operation. The default value is <strong>{{D2D1_BITMAP_INTERPOLATION_MODE_LINEAR}}</strong>. </p> </dd> <dd> <p>The size and position, in device-independent pixels in the bitmap's coordinate space, of the area within the bitmap to draw; <strong>{{NULL}}</strong> to draw the entire bitmap.</p> </dd> <p>Draws the specified text using the format information provided by an <strong>{{IDWriteTextFormat}}</strong> object.</p> <p>To create an <strong>{{IDWriteTextFormat}}</strong> object, create an <strong>{{IDWriteFactory}}</strong> and call its <strong>CreateTextFormat</strong> method.</p><p>This method doesn't return an error code if it fails. To determine whether a drawing operation (such as <strong>DrawText</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> methods. </p> <p>This method does not return a value.</p> <p>Draws the formatted text described by the specified <strong>{{IDWriteTextLayout}}</strong> object.</p> <p>When drawing the same text repeatedly, using the <strong>DrawTextLayout</strong> method is more efficient than using the <strong>DrawText</strong> method because the text doesn't need to be formatted and the layout processed with each call.</p><p>This method doesn't return an error code if it fails. To determine whether a drawing operation (such as <strong>DrawTextLayout</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> methods. </p> <p>This method does not return a value.</p> <p>Draws the specified glyphs. </p> <p>This method doesn't return an error code if it fails. To determine whether a drawing operation (such as <strong>DrawGlyphRun</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> methods. </p> <p>This method does not return a value.</p> <dd> <p>The origin, in device-independent pixels, of the glyphs' baseline.</p> </dd> <dd> <p>The glyphs to render.</p> </dd> <dd> <p>The brush used to paint the specified glyphs.</p> </dd> <dd> <p>A value that indicates how glyph metrics are used to measure text when it is formatted. The default value is <strong>{{DWRITE_MEASURING_MODE_NATURAL}}</strong>. </p> </dd> Applies the specified transform to the render target, replacing the existing transformation. All subsequent drawing operations occur in the transformed space. <p>Gets the current transform of the render target. </p> <p>This method does not return a value.</p> <dd> <p>When this returns, contains the current transform of the render target. This parameter is passed uninitialized.</p> </dd> <p>Sets the antialiasing mode of the render target. The antialiasing mode applies to all subsequent drawing operations, excluding text and glyph drawing operations. </p> <p>To specify the antialiasing mode for text and glyph operations, use the <strong>SetTextAntialiasMode</strong> method. </p> <p>This method does not return a value.</p> <dd> <p>The antialiasing mode for future drawing operations. </p> </dd> <p> Retrieves the current antialiasing mode for nontext drawing operations.</p> <p>The current antialiasing mode for nontext drawing operations. </p> <p>Specifies the antialiasing mode to use for subsequent text and glyph drawing operations. </p> <p>This method does not return a value.</p> <dd> <p>The antialiasing mode to use for subsequent text and glyph drawing operations.</p> </dd> <p>Gets the current antialiasing mode for text and glyph drawing operations. </p> <p>The current antialiasing mode for text and glyph drawing operations. </p> <p>Specifies text rendering options to be applied to all subsequent text and glyph drawing operations. </p> <p>If the settings specified by <em>textRenderingParams</em> are incompatible with the render target's text antialiasing mode (specified by <strong>SetTextAntialiasMode</strong>), subsequent text and glyph drawing operations will fail and put the render target into an error state.</p> <p>This method does not return a value.</p> <dd> <p>The text rendering options to be applied to all subsequent text and glyph drawing operations; <strong>{{NULL}}</strong> to clear current text rendering options. </p> </dd> <p>Retrieves the render target's current text rendering options. </p> <p>If the settings specified by <em>textRenderingParams</em> are incompatible with the render target's text antialiasing mode (specified by <strong>SetTextAntialiasMode</strong>), subsequent text and glyph drawing operations will fail and put the render target into an error state.</p> <p>This method does not return a value.</p> <dd> <p> When this method returns, <em>textRenderingParams</em>contains the address of a reference to the render target's current text rendering options. </p> </dd> <p>Specifies a label for subsequent drawing operations. </p> <p>The labels specified by this method are printed by debug error messages. If no tag is set, the default value for each tag is 0.</p> <p>This method does not return a value.</p> <dd> <p>A label to apply to subsequent drawing operations.</p> </dd> <dd> <p>A label to apply to subsequent drawing operations.</p> </dd> <p>Gets the label for subsequent drawing operations. </p> <p>If the same address is passed for both parameters, both parameters receive the value of the second tag. </p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains the first label for subsequent drawing operations. This parameter is passed uninitialized. If <strong>{{NULL}}</strong> is specified, no value is retrieved for this parameter. </p> </dd> <dd> <p>When this method returns, contains the second label for subsequent drawing operations. This parameter is passed uninitialized. If <strong>{{NULL}}</strong> is specified, no value is retrieved for this parameter.</p> </dd> <p>Adds the specified layer to the render target so that it receives all subsequent drawing operations until <strong>PopLayer</strong> is called. </p> <p>The <strong>PushLayer</strong> method allows a caller to begin redirecting rendering to a layer. All rendering operations are valid in a layer. The location of the layer is affected by the world transform set on the render target. </p><p>Each <strong>PushLayer</strong> must have a matching <strong>PopLayer</strong> call. If there are more <strong>PopLayer</strong> calls than <strong>PushLayer</strong> calls, the render target is placed into an error state. If <strong>Flush</strong> is called before all outstanding layers are popped, the render target is placed into an error state, and an error is returned. The error state can be cleared by a call to <strong>EndDraw</strong>.</p><p>A particular <strong>{{ID2D1Layer}}</strong> resource can be active only at one time. In other words, you cannot call a <strong>PushLayer</strong> method, and then immediately follow with another <strong>PushLayer</strong> method with the same layer resource. Instead, you must call the second <strong>PushLayer</strong> method with different layer resources. </p><p>This method doesn't return an error code if it fails. To determine whether a drawing operation (such as <strong>PushLayer</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> methods. </p> <p>This method does not return a value.</p> <p>Stops redirecting drawing operations to the layer that is specified by the last <strong>PushLayer</strong> call. </p> <p>A <strong>PopLayer</strong> must match a previous <strong>PushLayer</strong> call.</p><p>This method doesn't return an error code if it fails. To determine whether a drawing operation (such as <strong>PopLayer</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> methods. </p> <p>This method does not return a value.</p> <p>Executes all pending drawing commands. </p> <p>This command does not flush the Direct3D device context that is associated with the render target.</p><p>Calling this method resets the error state of the render target.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code and sets <em>tag1</em> and <em>tag2</em> to the tags that were active when the error occurred. If no error occurred, this method sets the error tag state to be (0,0).</p> <dd> <p>When this method returns, contains the tag for drawing operations that caused errors or 0 if there were no errors. This parameter is passed uninitialized.</p> </dd> <dd> <p>When this method returns, contains the tag for drawing operations that caused errors or 0 if there were no errors. This parameter is passed uninitialized.</p> </dd> <p>Saves the current drawing state to the specified <strong>{{ID2D1DrawingStateBlock}}</strong>.</p> <p>This method does not return a value.</p> <p>Sets the render target's drawing state to that of the specified <strong>{{ID2D1DrawingStateBlock}}</strong>.</p> <p>This method does not return a value.</p> <p>Specifies a rectangle to which all subsequent drawing operations are clipped. </p> <p>The <em>clipRect</em> is transformed by the current world transform set on the render target. After the transform is applied to the <em>clipRect</em> that is passed in, the axis-aligned bounding box for the <em>clipRect</em> is computed. For efficiency, the contents are clipped to this axis-aligned bounding box and not to the original <em>clipRect</em> that is passed in. </p><p>The following diagrams show how a rotation transform is applied to the render target, the resulting <em>clipRect</em>, and a calculated axis-aligned bounding box.</p><ol> <li> <p>Assume the rectangle in the following illustration is a render target that is aligned to the screen pixels.</p> <p></p> </li> <li> <p>Apply a rotation transform to the render target. In the following illustration, the black rectangle represents the original render target and the red dashed rectangle represents the transformed render target.</p> <p></p> </li> <li> <p>After calling <strong>PushAxisAlignedClip</strong>, the rotation transform is applied to the <em>clipRect</em>. In the following illustration, the blue rectangle represents the transformed <em>clipRect</em>.</p> <p></p> </li> <li> <p>The axis-aligned bounding box is calculated. The green dashed rectangle represents the bounding box in the following illustration. All contents are clipped to this axis-aligned bounding box.</p> <p></p> </li> </ol><strong>Note</strong>??If rendering operations fail or if <strong>PopAxisAlignedClip</strong> is not called, clip rects may cause some artifacts on the render target. <strong>PopAxisAlignedClip</strong> can be considered a drawing operation that is designed to fix the borders of a clipping region. Without this call, the borders of a clipped area may be not antialiased or otherwise corrected.?<p>The <strong>PushAxisAlignedClip</strong> and <strong>PopAxisAlignedClip</strong> must match. Otherwise, the error state is set. For the render target to continue receiving new commands, you can call <strong>Flush</strong> to clear the error. </p><p>A <strong>PushAxisAlignedClip</strong> and <strong>PopAxisAlignedClip</strong> pair can occur around or within a PushLayer and PopLayer, but cannot overlap. For example, the sequence of <strong>PushAxisAlignedClip</strong>, <strong>PushLayer</strong>, <strong>PopLayer</strong>, <strong>PopAxisAlignedClip</strong> is valid, but the sequence of <strong>PushAxisAlignedClip</strong>, <strong>PushLayer</strong>, <strong>PopAxisAlignedClip</strong>, <strong>PopLayer</strong> is invalid.</p><p>This method doesn't return an error code if it fails. To determine whether a drawing operation (such as <strong>PushAxisAlignedClip</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> methods. </p> <p>This method does not return a value.</p> <dd> <p>The size and position of the clipping area, in device-independent pixels.</p> </dd> <dd> <p>The antialiasing mode that is used to draw the edges of clip rects that have subpixel boundaries, and to blend the clip with the scene contents. The blending is performed once when the <strong>PopAxisAlignedClip</strong> method is called, and does not apply to each primitive within the layer. </p> </dd> <p>Removes the last axis-aligned clip from the render target. After this method is called, the clip is no longer applied to subsequent drawing operations. </p> <p>A <strong>PushAxisAlignedClip</strong>/<strong>PopAxisAlignedClip</strong> pair can occur around or within a <strong>PushLayer</strong>/<strong>PopLayer</strong> pair, but may not overlap. For example, a <strong>PushAxisAlignedClip</strong>, <strong>PushLayer</strong>, <strong>PopLayer</strong>, <strong>PopAxisAlignedClip</strong> sequence is valid, but a <strong>PushAxisAlignedClip</strong>, <strong>PushLayer</strong>, <strong>PopAxisAlignedClip</strong>, <strong>PopLayer</strong> sequence is not. </p><p><strong>PopAxisAlignedClip</strong> must be called once for every call to <strong>PushAxisAlignedClip</strong>.</p><p>For an example, see How to Clip with an Axis-Aligned Clip Rectangle.</p><p>This method doesn't return an error code if it fails. To determine whether a drawing operation (such as <strong>PopAxisAlignedClip</strong>) failed, check the result returned by the <strong>{{ID2D1RenderTarget::EndDraw}}</strong> or <strong>{{ID2D1RenderTarget::Flush}}</strong> methods. </p> <p>This method does not return a value.</p> <p>Clears the drawing area to the specified color. </p> <p>Direct2D interprets the <em>clearColor</em> as straight alpha (not premultiplied). If the render target's alpha mode is <strong>{{D2D1_ALPHA_MODE_IGNORE}}</strong>, the alpha channel of <em>clearColor</em> is ignored and replaced with 1.0f (fully opaque).</p><p>If the render target has an active clip (specified by <strong>PushAxisAlignedClip</strong>), the clear command is applied only to the area within the clip region.</p> <p>This method does not return a value.</p> <dd> <p>The color to which the drawing area is cleared, or <strong>{{NULL}}</strong> for transparent black.</p> </dd> <p>Initiates drawing on this render target. </p> <p>Drawing operations can only be issued between a <strong>BeginDraw</strong> and <strong>EndDraw</strong> call.</p><p>BeginDraw and EndDraw are used to indicate that a render target is in use by the Direct2D system. Different implementations of <strong>{{ID2D1RenderTarget}}</strong> might behave differently when <strong>BeginDraw</strong> is called. An <strong>{{ID2D1BitmapRenderTarget}}</strong> may be locked between <strong>BeginDraw</strong>/<strong>EndDraw</strong> calls, a {{DXGI}} surface render target might be acquired on <strong>BeginDraw</strong> and released on <strong>EndDraw</strong>, while an <strong>{{ID2D1HwndRenderTarget}}</strong> may begin batching at <strong>BeginDraw</strong> and may present on <strong>EndDraw</strong>, for example.</p><p> The BeginDraw method must be called before rendering operations can be called, though state-setting and state-retrieval operations can be performed even outside of <strong>BeginDraw</strong>/<strong>EndDraw</strong>. </p><p>After <strong>BeginDraw</strong> is called, a render target will normally build up a batch of rendering commands, but defer processing of these commands until either an internal buffer is full, the <strong>Flush</strong> method is called, or until <strong>EndDraw</strong> is called. The <strong>EndDraw</strong> method causes any batched drawing operations to complete, and then returns an {{HRESULT}} indicating the success of the operations and, optionally, the tag state of the render target at the time the error occurred. The <strong>EndDraw</strong> method always succeeds: it should not be called twice even if a previous <strong>EndDraw</strong> resulted in a failing {{HRESULT}}. </p><p>If <strong>EndDraw</strong> is called without a matched call to <strong>BeginDraw</strong>, it returns an error indicating that <strong>BeginDraw</strong> must be called before <strong>EndDraw</strong>. Calling <strong>BeginDraw</strong> twice on a render target puts the target into an error state where nothing further is drawn, and returns an appropriate {{HRESULT}} and error information when <strong>EndDraw</strong> is called. </p> <p>This method does not return a value.</p> <p>Ends drawing operations on the render target and indicates the current error state and associated tags. </p> <p>Drawing operations can only be issued between a <strong>BeginDraw</strong> and <strong>EndDraw</strong> call.</p><p> <strong>BeginDraw</strong> and <strong>EndDraw</strong> are use to indicate that a render target is in use by the Direct2D system. Different implementations of <strong>{{ID2D1RenderTarget}}</strong> might behave differently when <strong>BeginDraw</strong> is called. An <strong>{{ID2D1BitmapRenderTarget}}</strong> may be locked between <strong>BeginDraw</strong>/<strong>EndDraw</strong> calls, a {{DXGI}} surface render target might be acquired on <strong>BeginDraw</strong> and released on <strong>EndDraw</strong>, while an <strong>{{ID2D1HwndRenderTarget}}</strong> may begin batching at <strong>BeginDraw</strong> and may present on <strong>EndDraw</strong>, for example.</p><p> The <strong>BeginDraw</strong> method must be called before rendering operations can be called, though state-setting and state-retrieval operations can be performed even outside of <strong>BeginDraw</strong>/<strong>EndDraw</strong>. </p><p>After <strong>BeginDraw</strong> is called, a render target will normally build up a batch of rendering commands, but defer processing of these commands until either an internal buffer is full, the <strong>Flush</strong> method is called, or until <strong>EndDraw</strong> is called. The <strong>EndDraw</strong> method causes any batched drawing operations to complete, and then returns an <strong>{{HRESULT}}</strong> indicating the success of the operations and, optionally, the tag state of the render target at the time the error occurred. The <strong>EndDraw</strong> method always succeeds: it should not be called twice even if a previous <strong>EndDraw</strong> resulted in a failing <strong>{{HRESULT}}</strong>. </p><p>If <strong>EndDraw</strong> is called without a matched call to <strong>BeginDraw</strong>, it returns an error indicating that <strong>BeginDraw</strong> must be called before <strong>EndDraw</strong>. Calling <strong>BeginDraw</strong> twice on a render target puts the target into an error state where nothing further is drawn, and returns an appropriate <strong>{{HRESULT}}</strong> and error information when <strong>EndDraw</strong> is called. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code and sets <em>tag1</em> and <em>tag2</em> to the tags that were active when the error occurred. </p> <dd> <p>When this method returns, contains the tag for drawing operations that caused errors or 0 if there were no errors. This parameter is passed uninitialized.</p> </dd> <dd> <p>When this method returns, contains the tag for drawing operations that caused errors or 0 if there were no errors. This parameter is passed uninitialized.</p> </dd> <p>Retrieves the pixel format and alpha mode of the render target. </p> <p>The pixel format and alpha mode of the render target.</p> <p>Sets the dots per inch ({{DPI}}) of the render target. </p> <p>This method specifies the mapping from pixel space to device-independent space for the render target. If both <em>dpiX</em> and <em>dpiY</em> are 0, the factory-read system {{DPI}} is chosen. If one parameter is zero and the other unspecified, the {{DPI}} is not changed.</p><p>For <strong>{{ID2D1HwndRenderTarget}}</strong>, the {{DPI}} defaults to the most recently factory-read system {{DPI}}. The default value for all other render targets is 96 {{DPI}}. </p> <p>This method does not return a value.</p> <dd> <p>A value greater than or equal to zero that specifies the horizontal {{DPI}} of the render target.</p> </dd> <dd> <p>A value greater than or equal to zero that specifies the vertical {{DPI}} of the render target.</p> </dd> <p>Return the render target's dots per inch ({{DPI}}).</p> <p>This method indicates the mapping from pixel space to device-independent space for the render target. </p><p>For <strong>{{ID2D1HwndRenderTarget}}</strong>, the {{DPI}} defaults to the most recently factory-read system {{DPI}}. The default value for all other render targets is 96 {{DPI}}. </p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains the horizontal {{DPI}} of the render target. This parameter is passed uninitialized.</p> </dd> <dd> <p>When this method returns, contains the vertical {{DPI}} of the render target. This parameter is passed uninitialized.</p> </dd> <p>Returns the size of the render target in device-independent pixels.</p> <p>The current size of the render target in device-independent pixels.</p> <p>Returns the size of the render target in device pixels.</p> <p>The size of the render target in device pixels.</p> <p>Gets the maximum size, in device-dependent units (pixels), of any one bitmap dimension supported by the render target.</p> <p>This method returns the maximum texture size of the Direct3D device.</p><strong>Note</strong>??The software renderer and {{WARP}} devices return the value of 16 megapixels (16*1024*1024). You can create a Direct2D texture that is this size, but not a Direct3D texture that is this size.? <p> The maximum size, in pixels, of any one bitmap dimension supported by the render target.</p> <p>Indicates whether the render target supports the specified properties.</p> <p>This method does not evaluate the {{DPI}} settings specified by the <em>renderTargetProperties</em> parameter.</p> <p><strong>{{TRUE}}</strong> if the specified render target properties are supported by this render target; otherwise, <strong>{{FALSE}}</strong>.</p> <dd> <p>The render target properties to test.</p> </dd> <p>Renders to an intermediate texture created by the <strong>CreateCompatibleRenderTarget</strong> method. </p> <p>An <strong>{{ID2D1BitmapRenderTarget}}</strong> writes to an intermediate texture. It's useful for creating patterns for use with an <strong>{{ID2D1BitmapBrush}}</strong> or caching drawing data that will be used repeatedly. </p><p>To write directly to a {{WIC}} bitmap instead, use the <strong>{{ID2D1Factory::CreateWicBitmapRenderTarget}}</strong> method. This method returns an <strong>{{ID2D1RenderTarget}}</strong> that writes to the specified {{WIC}} bitmap. </p> <p>Retrieves the bitmap for this render target. The returned bitmap can be used for drawing operations. </p> <p>The {{DPI}} for the <strong>{{ID2D1Bitmap}}</strong> obtained from <strong>GetBitmap</strong> will be the {{DPI}} of the <strong>{{ID2D1BitmapRenderTarget}}</strong> when the render target was created. Changing the {{DPI}} of the <strong>{{ID2D1BitmapRenderTarget}}</strong> by calling <strong>SetDpi</strong> doesn't affect the {{DPI}} of the bitmap, even if <strong>SetDpi</strong> is called before <strong>GetBitmap</strong>. Using <strong>SetDpi</strong> to change the {{DPI}} of the <strong>{{ID2D1BitmapRenderTarget}}</strong> does affect how contents are rendered into the bitmap: it just doesn't affect the {{DPI}} of the bitmap retrieved by <strong>GetBitmap</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains the address of a reference to the bitmap for this render target. This bitmap can be used for drawing operations. </p> </dd> <p>Populates an <strong>{{ID2D1Mesh}}</strong> object with triangles. </p> <p>Copies the specified triangles to the sink. </p> <p>This method does not return a value.</p> <dd> <p>An array of <strong>{{D2D1_TRIANGLE}}</strong> structures that describe the triangles to add to the sink.</p> </dd> <dd> <p>The number of triangles to copy from the <em>triangles</em> array.</p> </dd> <p> Closes the sink and returns its error status.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Represents a geometry resource and defines a set of helper methods for manipulating and measuring geometric shapes. Interfaces that inherit from <strong>{{ID2D1Geometry}}</strong> define specific shapes.</p> <p>There are several types of Direct2D geometry objects: a simple geometry (<strong>{{ID2D1RectangleGeometry}}</strong>, <strong>{{ID2D1RoundedRectangleGeometry}}</strong>, or <strong>{{ID2D1EllipseGeometry}}</strong>), a path geometry (<strong>{{ID2D1PathGeometry}}</strong>), or a composite geometry (<strong>{{ID2D1GeometryGroup}}</strong> and <strong>{{ID2D1TransformedGeometry}}</strong>).</p><p> Direct2D geometries enable you to describe two-dimensional figures and also offer many uses, such as defining hit-test regions, clip regions, and even animation paths.</p><p>Direct2D geometries are immutable and device-independent resources created by <strong>{{ID2D1Factory}}</strong>. In general, you should create geometries once and retain them for the life of the application, or until they need to be modified. For more information about device-independent and device-dependent resources, see the Resources Overview.</p> Retrieves the bounds of the geometry. <p>Gets the bounds of the geometry after it has been widened by the specified stroke width and style and transformed by the specified matrix.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The amount by which to widen the geometry by stroking its outline.</p> </dd> <dd> <p>The style of the stroke that widens the geometry. </p> </dd> <dd> <p>A transform to apply to the geometry after the geometry is transformed and after the geometry has been stroked.</p> </dd> <dd> <p>When this method returns, contains the bounds of the widened geometry. You must allocate storage for this parameter.</p> </dd> <p>Determines whether the geometry's stroke contains the specified point given the specified stroke thickness, style, and transform. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The point to test for containment. </p> </dd> <dd> <p>The thickness of the stroke to apply. </p> </dd> <dd> <p>The style of stroke to apply.</p> </dd> <dd> <p>The transform to apply to the stroked geometry. </p> </dd> <dd> <p>The numeric accuracy with which the precise geometric path and path intersection is calculated. Points missing the stroke by less than the tolerance are still considered inside. Smaller values produce more accurate results but cause slower execution.</p> </dd> <dd> <p>When this method returns, contains a boolean value set to true if the geometry's stroke contains the specified point; otherwise, false. You must allocate storage for this parameter. </p> </dd> <p>Indicates whether the area filled by the geometry would contain the specified point given the specified flattening tolerance. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The point to test. </p> </dd> <dd> <p>The transform to apply to the geometry prior to testing for containment, or <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>The numeric accuracy with which the precise geometric path and path intersection is calculated. Points missing the fill by less than the tolerance are still considered inside. Smaller values produce more accurate results but cause slower execution. </p> </dd> <dd> <p>When this method returns, contains a <strong>{{BOOL}}</strong> value that is <strong>{{TRUE}}</strong> if the area filled by the geometry contains <em>point</em>; otherwise, <strong>{{FALSE}}</strong>. You must allocate storage for this parameter.</p> </dd> <p>Describes the intersection between this geometry and the specified geometry. The comparison is performed by using the specified flattening tolerance.</p> <p>When interpreting the returned <em>relation</em> value, it is important to remember that the member <strong>{{D2D1_GEOMETRY_RELATION_IS_CONTAINED}}</strong> of the <strong>{{D2D1_GEOMETRY_RELATION}}</strong> enumeration type means that this geometry is contained inside <em>inputGeometry</em>, not that this geometry contains <em>inputGeometry</em>. </p><p>For more information about how to interpret other possible return values, see <strong>{{D2D1_GEOMETRY_RELATION}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The geometry to test. </p> </dd> <dd> <p>The transform to apply to <em>inputGeometry</em>, or <strong>{{NULL}}</strong>. </p> </dd> <dd> <p>The maximum error allowed when constructing a polygonal approximation of the geometry. No point in the polygonal representation will diverge from the original geometry by more than the flattening tolerance. Smaller values produce more accurate results but cause slower execution. </p> </dd> <dd> <p>When this method returns, contains a reference to a value that describes how this geometry is related to <em>inputGeometry</em>. You must allocate storage for this parameter. </p> </dd> <p>Creates a simplified version of the geometry that contains only lines and (optionally) cubic Bezier curves and writes the result to an <strong>{{ID2D1SimplifiedGeometrySink}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a set of clockwise-wound triangles that cover the geometry after it has been transformed using the specified matrix and flattened using the default tolerance.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The transform to apply to this geometry.</p> </dd> <dd> <p>The <strong>{{ID2D1TessellationSink}}</strong> to which the tessellated is appended.</p> </dd> <p>Combines this geometry with the specified geometry and stores the result in an <strong>{{ID2D1SimplifiedGeometrySink}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Computes the outline of the geometry and writes the result to an <strong>{{ID2D1SimplifiedGeometrySink}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Computes the area of the geometry after it has been transformed by the specified matrix and flattened using the specified tolerance.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The transform to apply to this geometry before computing its area.</p> </dd> <dd> <p>The maximum error allowed when constructing a polygonal approximation of the geometry. No point in the polygonal representation will diverge from the original geometry by more than the flattening tolerance. Smaller values produce more accurate results but cause slower execution. </p> </dd> <dd> <p>When this method returns, contains a reference to the area of the transformed, flattened version of this geometry. You must allocate storage for this parameter.</p> </dd> Calculates the length of the geometry as though each segment were unrolled into a line. <p>Calculates the point and tangent vector at the specified distance along the geometry after it has been transformed by the specified matrix and flattened using the default tolerance.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The distance along the geometry of the point and tangent to find. If this distance is less then 0, this method calculates the first point in the geometry. If this distance is greater than the length of the geometry, this method calculates the last point in the geometry.</p> </dd> <dd> <p>The transform to apply to the geometry before calculating the specified point and tangent.</p> </dd> <dd> <p>The location at the specified distance along the geometry. If the geometry is empty, this point contains NaN as its x and y values.</p> </dd> <dd> <p>When this method returns, contains a reference to the tangent vector at the specified distance along the geometry. If the geometry is empty, this vector contains NaN as its x and y values. You must allocate storage for this parameter.</p> </dd> <p>Widens the geometry by the specified stroke and writes the result to an <strong>{{ID2D1SimplifiedGeometrySink}}</strong> after it has been transformed by the specified matrix and flattened using the specified tolerance.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Defines an object that paints an area. Interfaces that derive from <strong>{{ID2D1Brush}}</strong> describe how the area is painted. </p> <p>An <strong>{{ID2D1BitmapBrush}}</strong> is a device-dependent resource: your application should create bitmap brushes after it initializes the render target with which the bitmap brush will be used, and recreate the bitmap brush whenever the render target needs recreated. (For more information about resources, see Resources Overview.)</p><p>Brush space in Direct2D is specified differently than in {{XPS}} and Windows Presentation Foundation ({{WPF}}). In Direct2D, brush space is not relative to the object being drawn, but rather is the current coordinate system of the render target, transformed by the brush transform, if present. To paint an object as it would be painted by a {{WPF}} brush, you must translate the brush space origin to the upper-left corner of the object's bounding box, and then scale the brush space so that the base tile fills the bounding box of the object.</p><p>For more information about brushes, see the Brushes Overview. </p> <p>Sets the degree of opacity of this brush.</p> <p>This method does not return a value.</p> <dd> <p>A value between zero and 1 that indicates the opacity of the brush. This value is a constant multiplier that linearly scales the alpha value of all pixels filled by the brush. The opacity values are clamped in the range 0?1 before they are multipled together. </p> </dd> <p> Sets the transformation applied to the brush.</p> <p>When you paint with a brush, it paints in the coordinate space of the render target. Brushes do not automatically position themselves to align with the object being painted; by default, they begin painting at the origin (0, 0) of the render target. </p><p>You can "move" the gradient defined by an <strong>{{ID2D1LinearGradientBrush}}</strong> to a target area by setting its start point and end point. Likewise, you can move the gradient defined by an <strong>{{ID2D1RadialGradientBrush}}</strong> by changing its center and radii. </p><p>To align the content of an <strong>{{ID2D1BitmapBrush}}</strong> to the area being painted, you can use the <strong>SetTransform</strong> method to translate the bitmap to the desired location. This transform only affects the brush; it does not affect any other content drawn by the render target. </p><p>The following illustrations show the effect of using an <strong>{{ID2D1BitmapBrush}}</strong> to fill a rectangle located at (100, 100). The illustration on the left illustration shows the result of filling the rectangle without transforming the brush: the bitmap is drawn at the render target's origin. As a result, only a portion of the bitmap appears in the rectangle.</p><p>The illustration on the right shows the result of transforming the <strong>{{ID2D1BitmapBrush}}</strong> so that its content is shifted 50 pixels to the right and 50 pixels down. The bitmap now fills the rectangle.</p><p></p> <p>This method does not return a value.</p> <dd> <p>The transformation to apply to this brush.</p> </dd> <p>Gets the degree of opacity of this brush. </p> <p>A value between zero and 1 that indicates the opacity of the brush. This value is a constant multiplier that linearly scales the alpha value of all pixels filled by the brush. The opacity values are clamped in the range 0?1 before they are multipled together. </p> <p>Gets the transform applied to this brush. </p> <p>When the brush transform is the identity matrix, the brush appears in the same coordinate space as the render target in which it is drawn.</p> <p>This method does not return a value.</p> <dd> <p>The transform applied to this brush.</p> </dd> <p>Represents a Direct2D drawing resource.</p> <p>Retrieves the factory associated with this resource.</p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains a reference to a reference to the factory that created this resource. This parameter is passed uninitialized.</p> </dd> <p>Represents a producer of pixels that can fill an arbitrary 2D plane.</p> <p>An <strong>{{ID2D1Image}}</strong> is abstract. Concrete instances can be created through <strong>{{ID2D1DeviceContext::CreateEffect}}</strong> and <strong>{{ID2D1DeviceContext::CreateBitmap}}</strong>.</p><p> Images are evaluated lazily. If the type of image passed in is concrete, then the image can be directly sampled from. Other images can act only as a source of pixels and can produce content only as a result of calling <strong>{{ID2D1DeviceContext::DrawImage}}</strong>.</p> <p>Represents a bitmap that has been bound to an <strong>{{ID2D1RenderTarget}}</strong>.</p> <p>Returns the size, in device-independent pixels ({{DIPs}}), of the bitmap.</p> <p>A {{DIP}} is 1/96?of an inch. To retrieve the size in device pixels, use the <strong>{{ID2D1Bitmap::GetPixelSize}}</strong> method.</p> <p>The size, in {{DIPs}}, of the bitmap.</p> <p>Returns the size, in device-dependent units (pixels), of the bitmap.</p> <p>The size, in pixels, of the bitmap.</p> <p>Retrieves the pixel format and alpha mode of the bitmap.</p> <p>The pixel format and alpha mode of the bitmap.</p> <p>Return the dots per inch ({{DPI}}) of the bitmap.</p> <p>This method does not return a value.</p> <dd> <p>The horizontal {{DPI}} of the image. You must allocate storage for this parameter.</p> </dd> <dd> <p>The vertical {{DPI}} of the image. You must allocate storage for this parameter.</p> </dd> <p>Copies the specified region from the specified bitmap into the current bitmap. </p> <p>This method does not update the size of the current bitmap. If the contents of the source bitmap do not fit in the current bitmap, this method fails. Also, note that this method does not perform format conversion, and will fail if the bitmap formats do not match.</p><p>Calling this method may cause the current batch to flush if the bitmap is active in the batch. If the batch that was flushed does not complete successfully, this method fails. However, this method does not clear the error state of the render target on which the batch was flushed. The failing <strong>{{HRESULT}}</strong> and tag state will be returned at the next call to <strong>EndDraw</strong> or <strong>Flush</strong>.</p><p>Starting with Windows?8.1, this method supports block compressed bitmaps. If you are using a block compressed format, the end coordinates of the <em>srcRect</em> parameter must be multiples of 4 or the method returns <strong>{{E_INVALIDARG}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>In the current bitmap, the upper-left corner of the area to which the region specified by <em>srcRect</em> is copied.</p> </dd> <dd> <p>The bitmap to copy from.</p> </dd> <dd> <p>The area of <em>bitmap</em> to copy.</p> </dd> <p>Copies the specified region from the specified render target into the current bitmap. </p> <p>This method does not update the size of the current bitmap. If the contents of the source bitmap do not fit in the current bitmap, this method fails. Also, note that this method does not perform format conversion, and will fail if the bitmap formats do not match.</p><p>Calling this method may cause the current batch to flush if the bitmap is active in the batch. If the batch that was flushed does not complete successfully, this method fails. However, this method does not clear the error state of the render target on which the batch was flushed. The failing <strong>{{HRESULT}}</strong> and tag state will be returned at the next call to <strong>EndDraw</strong> or <strong>Flush</strong>. </p><p>All clips and layers must be popped off of the render target before calling this method. The method returns <strong>{{D2DERR_RENDER_TARGET_HAS_LAYER_OR_CLIPRECT}}</strong> if any clips or layers are currently applied to the render target.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>In the current bitmap, the upper-left corner of the area to which the region specified by <em>srcRect</em> is copied.</p> </dd> <dd> <p>The render target that contains the region to copy.</p> </dd> <dd> <p>The area of <em>renderTarget</em> to copy.</p> </dd> <p>Copies the specified region from memory into the current bitmap. </p> <p>This method does not update the size of the current bitmap. If the contents of the source bitmap do not fit in the current bitmap, this method fails. Also, note that this method does not perform format conversion; the two bitmap formats should match. </p><p>If this method is passed invalid input (such as an invalid destination rectangle), can produce unpredictable results, such as a distorted image or device failure.</p><p>Calling this method may cause the current batch to flush if the bitmap is active in the batch. If the batch that was flushed does not complete successfully, this method fails. However, this method does not clear the error state of the render target on which the batch was flushed. The failing <strong>{{HRESULT}}</strong> and tag state will be returned at the next call to <strong>EndDraw</strong> or <strong>Flush</strong>. </p><p>Starting with Windows?8.1, this method supports block compressed bitmaps. If you are using a block compressed format, the end coordinates of the <em>srcRect</em> parameter must be multiples of 4 or the method returns <strong>{{E_INVALIDARG}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>In the current bitmap, the upper-left corner of the area to which the region specified by <em>srcRect</em> is copied.</p> </dd> <dd> <p>The data to copy.</p> </dd> <dd> <p>The stride, or pitch, of the source bitmap stored in <em>srcData</em>. The stride is the byte count of a scanline (one row of pixels in memory). The stride can be computed from the following formula: pixel width * bytes per pixel + memory padding.</p> </dd> <p>Represents an collection of <strong>{{D2D1_GRADIENT_STOP}}</strong> objects for linear and radial gradient brushes.</p> <p>Retrieves the number of gradient stops in the collection.</p> <p>The number of gradient stops in the collection.</p> <p>Copies the gradient stops from the collection into an array of <strong>{{D2D1_GRADIENT_STOP}}</strong> structures.</p> <p>Gradient stops are copied in order of position, starting with the gradient stop with the smallest position value and progressing to the gradient stop with the largest position value.</p> <p>This method does not return a value.</p> <p>Indicates the gamma space in which the gradient stops are interpolated. </p> <p>The gamma space in which the gradient stops are interpolated. </p> <p>Indicates the behavior of the gradient outside the normalized gradient range. </p> <p>The behavior of the gradient outside the [0,1] normalized gradient range.</p> <p>Paints an area with a bitmap.</p> <p> A bitmap brush is used to fill a geometry with a bitmap. Like all brushes, it defines an infinite plane of content. Because bitmaps are finite, the brush relies on an "extend mode" to determine how the plane is filled horizontally and vertically.</p> <p>Specifies how the brush horizontally tiles those areas that extend past its bitmap. </p> <p>Sometimes, the bitmap for a bitmap brush doesn't completely fill the area being painted. When this happens, Direct2D uses the brush's horizontal (<strong>SetExtendModeX</strong>) and vertical (<strong>SetExtendModeY</strong>) extend mode settings to determine how to fill the remaining area.</p><p>The following illustration shows the results from every possible combination of the extend modes for an <strong>{{ID2D1BitmapBrush}}</strong>: <strong>{{D2D1_EXTEND_MODE_CLAMP}}</strong> ({{CLAMP}}), <strong>{{D2D1_EXTEND_MODE_WRAP}}</strong> ({{WRAP}}), and <strong>{{D2D1_EXTEND_MIRROR}}</strong> ({{MIRROR}}).</p><p></p> <p>This method does not return a value.</p> <dd> <p>A value that specifies how the brush horizontally tiles those areas that extend past its bitmap. </p> </dd> <p>Specifies how the brush vertically tiles those areas that extend past its bitmap.</p> <p>Sometimes, the bitmap for a bitmap brush doesn't completely fill the area being painted. When this happens, Direct2D uses the brush's horizontal (<strong>SetExtendModeX</strong>) and vertical (<strong>SetExtendModeY</strong>) extend mode settings to determine how to fill the remaining area.</p><p>The following illustration shows the results from every possible combination of the extend modes for an <strong>{{ID2D1BitmapBrush}}</strong>: <strong>{{D2D1_EXTEND_MODE_CLAMP}}</strong> ({{CLAMP}}), <strong>{{D2D1_EXTEND_MODE_WRAP}}</strong> ({{WRAP}}), and <strong>{{D2D1_EXTEND_MIRROR}}</strong> ({{MIRROR}}).</p><p></p> <p>This method does not return a value.</p> <dd> <p>A value that specifies how the brush vertically tiles those areas that extend past its bitmap.</p> </dd> <p>Specifies the interpolation mode used when the brush bitmap is scaled or rotated.</p> <p>This method sets the interpolation mode for a bitmap, which is an enum value that is specified in the <strong>{{D2D1_BITMAP_INTERPOLATION_MODE}}</strong> enumeration type. {{D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR}} represents nearest neighbor filtering. It looks up the nearest bitmap pixel to the current rendering pixel and chooses its exact color. {{D2D1_BITMAP_INTERPOLATION_MODE_LINEAR}} represents linear filtering, and interpolates a color from the four nearest bitmap pixels.</p><p>The interpolation mode of a bitmap also affects subpixel translations. In a subpixel translation, bilinear interpolation positions the bitmap more precisely to the application requests, but blurs the bitmap in the process. </p> <p>This method does not return a value.</p> <dd> <p>The interpolation mode used when the brush bitmap is scaled or rotated.</p> </dd> <p>Specifies the bitmap source that this brush uses to paint. </p> <p>This method specifies the bitmap source that this brush uses to paint. The bitmap is not resized or rescaled automatically to fit the geometry that it fills. The bitmap stays at its native size. To resize or translate the bitmap, use the <strong>SetTransform</strong> method to apply a transform to the brush. </p><p>The native size of a bitmap is the width and height in bitmap pixels, divided by the bitmap {{DPI}}. This native size forms the base tile of the brush. To tile a subregion of the bitmap, you must generate a new bitmap containing this subregion and use <strong>SetBitmap</strong> to apply it to the brush. </p> <p>This method does not return a value.</p> <dd> <p>The bitmap source used by the brush.</p> </dd> <p> Gets the method by which the brush horizontally tiles those areas that extend past its bitmap. </p> <p>Like all brushes, <strong>{{ID2D1BitmapBrush}}</strong> defines an infinite plane of content. Because bitmaps are finite, it relies on an extend mode to determine how the plane is filled horizontally and vertically.</p> <p>A value that specifies how the brush horizontally tiles those areas that extend past its bitmap.</p> <p> Gets the method by which the brush vertically tiles those areas that extend past its bitmap. </p> <p>Like all brushes, <strong>{{ID2D1BitmapBrush}}</strong> defines an infinite plane of content. Because bitmaps are finite, it relies on an extend mode to determine how the plane is filled horizontally and vertically.</p> <p>A value that specifies how the brush vertically tiles those areas that extend past its bitmap.</p> <p>Gets the interpolation method used when the brush bitmap is scaled or rotated. </p> <p>This method gets the interpolation mode of a bitmap, which is specified by the <strong>{{D2D1_BITMAP_INTERPOLATION_MODE}}</strong> enumeration type. <strong>{{D2D1_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR}}</strong> represents nearest neighbor filtering. It looks up the bitmap pixel nearest to the current rendering pixel and chooses its exact color. <strong>{{D2D1_BITMAP_INTERPOLATION_MODE_LINEAR}}</strong> represents linear filtering, and interpolates a color from the four nearest bitmap pixels.</p><p>The interpolation mode of a bitmap also affects subpixel translations. In a subpixel translation, linear interpolation positions the bitmap more precisely to the application request, but blurs the bitmap in the process. </p> <p>The interpolation method used when the brush bitmap is scaled or rotated.</p> <p> Gets the bitmap source that this brush uses to paint.</p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains the address to a reference to the bitmap with which this brush paints.</p> </dd> <p>Paints an area with a solid color. </p> <p>Specifies the color of this solid color brush. </p> <p>To help create colors, Direct2D provides the <strong>ColorF</strong> class. It offers several helper methods for creating colors and provides a set or predefined colors. </p> <p>This method does not return a value.</p> <dd> <p>The color of this solid color brush.</p> </dd> <p> Retrieves the color of the solid color brush.</p> <p>The color of this solid color brush.</p> <p>Paints an area with a linear gradient. </p> <p>An <strong>{{ID2D1LinearGradientBrush}}</strong> paints an area with a linear gradient along a line between the brush start point and end point. The gradient, defined by the brush <strong>{{ID2D1GradientStopCollection}}</strong>, is extruded perpendicular to this line, and then transformed by a brush transform (if specified). </p><p>The start point and end point are described in the brush space and are mappped to the render target when the brush is used. Note the starting and ending coordinates are absolute, not relative to the render target size. A value of (0, 0) maps to the upper-left corner of the render target, while a value of (1, 1) maps one pixel diagonally away from (0, 0). If there is a nonidentity brush transform or render target transform, the brush start point and end point are also transformed. </p><p>It is possible to specify a gradient axis that does not completely fill the area that is being painted. When this occurs, the <strong>{{D2D1_EXTEND_MODE}}</strong>, specified by the <strong>{{ID2D1GradientStopCollection}}</strong>, determines how the remaining area is painted. </p> <p>Sets the starting coordinates of the linear gradient in the brush's coordinate space. </p> <p>The start point and end point are described in the brush's space and are mapped to the render target when the brush is used. If there is a non-identity brush transform or render target transform, the brush's start point and end point are also transformed.</p> <p>This method does not return a value.</p> <dd> <p>The starting two-dimensional coordinates of the linear gradient, in the brush's coordinate space.</p> </dd> <p>Sets the ending coordinates of the linear gradient in the brush's coordinate space.</p> <p>The start point and end point are described in the brush's space and are mapped to the render target when the brush is used. If there is a non-identity brush transform or render target transform, the brush's start point and end point are also transformed.</p> <p>This method does not return a value.</p> <dd> <p>The ending two-dimensional coordinates of the linear gradient, in the brush's coordinate space.</p> </dd> <p>Retrieves the starting coordinates of the linear gradient. </p> <p>The start point and end point are described in the brush's space and are mapped to the render target when the brush is used. If there is a non-identity brush transform or render target transform, the brush's start point and end point are also transformed.</p> <p>The starting two-dimensional coordinates of the linear gradient, in the brush's coordinate space.</p> <p>Retrieves the ending coordinates of the linear gradient. </p> <p>The start point and end point are described in the brush's space and are mapped to the render target when the brush is used. If there is a non-identity brush transform or render target transform, the brush's start point and end point are also transformed.</p> <p>The ending two-dimensional coordinates of the linear gradient, in the brush's coordinate space.</p> <p> Retrieves the <strong>{{ID2D1GradientStopCollection}}</strong> associated with this linear gradient brush.</p> <p> <strong>{{ID2D1GradientStopCollection}}</strong> contains an array of <strong>{{D2D1_GRADIENT_STOP}}</strong> structures and information, such as the extend mode and the color interpolation mode.</p> <p>This method does not return a value.</p> <p> Paints an area with a radial gradient.</p> <p>The <strong>{{ID2D1RadialGradientBrush}}</strong> is similar to the <strong>{{ID2D1LinearGradientBrush}}</strong> in that they both map a collection of gradient stops to a gradient. However, the linear gradient has a start and an end point to define the gradient vector, while the radial gradient uses an ellipse and a gradient origin to define its gradient behavior. To define the position and size of the ellipse, use the <strong>SetCenter</strong>, <strong>SetRadiusX</strong>, and <strong>SetRadiusY</strong> methods to specify the center, x-radius, and y-radius of the ellipse. The gradient origin is the center of the ellipse, unless a gradient offset is specified by using the <strong>SetGradientOriginOffset</strong> method.</p><p>The brush maps the gradient stop position 0.0f of the gradient origin, and the position 1.0f is mapped to the ellipse boundary. When the gradient origin is within the ellipse, the contents of the ellipse enclose the entire [0, 1] range of the brush gradient stops. If the gradient origin is outside the bounds of the ellipse, the brush still works, but its gradient is not well-defined.</p><p>The start point and end point are described in the brush space and are mappped to the render target when the brush is used. Note the starting and ending coordinates are absolute, not relative to the render target size. A value of (0, 0) maps to the upper-left corner of the render target, while a value of (1, 1) maps just one pixel diagonally away from (0, 0). If there is a nonidentity brush transform or render target transform, the brush ellipse and gradient origin are also transformed.</p><p>It is possible to specify an ellipse that does not completely fill area being painted. When this occurs, the <strong>{{D2D1_EXTEND_MODE}}</strong> and setting (specified by the brush <strong>{{ID2D1GradientStopCollection}}</strong>) determines how the remaining area is painted. </p> <p>Specifies the center of the gradient ellipse in the brush's coordinate space. </p> <p>This method does not return a value.</p> <dd> <p>The center of the gradient ellipse, in the brush's coordinate space.</p> </dd> <p>Specifies the offset of the gradient origin relative to the gradient ellipse's center.</p> <p>This method does not return a value.</p> <dd> <p>The offset of the gradient origin from the center of the gradient ellipse.</p> </dd> <p> Specifies the x-radius of the gradient ellipse, in the brush's coordinate space.</p> <p>This method does not return a value.</p> <dd> <p>The x-radius of the gradient ellipse. This value is in the brush's coordinate space.</p> </dd> <p>Specifies the y-radius of the gradient ellipse, in the brush's coordinate space. </p> <p>This method does not return a value.</p> <dd> <p>The y-radius of the gradient ellipse. This value is in the brush's coordinate space.</p> </dd> <p>Retrieves the center of the gradient ellipse. </p> <p>The center of the gradient ellipse. This value is expressed in the brush's coordinate space.</p> <p>Retrieves the offset of the gradient origin relative to the gradient ellipse's center. </p> <p>The offset of the gradient origin from the center of the gradient ellipse. This value is expressed in the brush's coordinate space.</p> <p>Retrieves the x-radius of the gradient ellipse. </p> <p>The x-radius of the gradient ellipse. This value is expressed in the brush's coordinate space.</p> <p>Retrieves the y-radius of the gradient ellipse. </p> <p>The y-radius of the gradient ellipse. This value is expressed in the brush's coordinate space.</p> <p>Retrieves the <strong>{{ID2D1GradientStopCollection}}</strong> associated with this radial gradient brush object.</p> <p> <strong>{{ID2D1GradientStopCollection}}</strong> contains an array of <strong>{{D2D1_GRADIENT_STOP}}</strong> structures and additional information, such as the extend mode and the color interpolation mode.</p> <p>This method does not return a value.</p> <p>Describes the caps, miter limit, line join, and dash information for a stroke.</p> <p> Retrieves the type of shape used at the beginning of a stroke. </p> <p>The type of shape used at the beginning of a stroke.</p> <p>Retrieves the type of shape used at the end of a stroke. </p> <p>The type of shape used at the end of a stroke.</p> <p>Gets a value that specifies how the ends of each dash are drawn. </p> <p>A value that specifies how the ends of each dash are drawn.</p> <p>Retrieves the limit on the ratio of the miter length to half the stroke's thickness. </p> <p>A positive number greater than or equal to 1.0f that describes the limit on the ratio of the miter length to half the stroke's thickness.</p> <p>Retrieves the type of joint used at the vertices of a shape's outline. </p> <p>A value that specifies the type of joint used at the vertices of a shape's outline.</p> <p>Retrieves a value that specifies how far in the dash sequence the stroke will start. </p> <p>A value that specifies how far in the dash sequence the stroke will start. </p> <p>Gets a value that describes the stroke's dash pattern. </p> <p>If a custom dash style is specified, the dash pattern is described by the dashes array, which can be retrieved by calling the <strong>GetDashes</strong> method.</p> <p>A value that describes the predefined dash pattern used, or <strong>{{D2D1_DASH_STYLE_CUSTOM}}</strong> if a custom dash style is used.</p> <p>Retrieves the number of entries in the dashes array. </p> <p>The number of entries in the dashes array if the stroke is dashed; otherwise, 0.</p> <p>Copies the dash pattern to the specified array. </p> <p>The dashes are specified in units that are a multiple of the stroke width, with subsequent members of the array indicating the dashes and gaps between dashes: the first entry indicates a filled dash, the second a gap, and so on. </p> <p>This method does not return a value.</p> <dd> <p>A reference to an array that will receive the dash pattern. The array must be able to contain at least as many elements as specified by <em>dashesCount</em>. You must allocate storage for this array.</p> </dd> <dd> <p>The number of dashes to copy. If this value is less than the number of dashes in the stroke style's dashes array, the returned dashes are truncated to <em>dashesCount</em>. If this value is greater than the number of dashes in the stroke style's dashes array, the extra dashes are set to 0.0f. To obtain the actual number of dashes in the stroke style's dashes array, use the <strong>GetDashesCount</strong> method. </p> </dd> <p>Describes a two-dimensional rectangle. </p> <p> Retrieves the rectangle that describes the rectangle geometry's dimensions.</p> <p>This method does not return a value.</p> <dd> <p>Contains a reference to a rectangle that describes the rectangle geometry's dimensions when this method returns. You must allocate storage for this parameter. </p> </dd> <p>Describes a rounded rectangle. </p> <p>Retrieves a rounded rectangle that describes this rounded rectangle geometry. </p> <p>This method does not return a value.</p> <dd> <p>A reference that receives a rounded rectangle that describes this rounded rectangle geometry. You must allocate storage for this parameter. </p> </dd> <p>Represents an ellipse. </p> <p>Gets the <strong>{{D2D1_ELLIPSE}}</strong> structure that describes this ellipse geometry. </p> <p>This method does not return a value.</p> <p>Represents a composite geometry, composed of other <strong>{{ID2D1Geometry}}</strong> objects. </p> <p>Geometry groups are a convenient way to group several geometries simultaneously so all figures of several distinct geometries are concatenated into one. </p> <p>Indicates how the intersecting areas of the geometries contained in this geometry group are combined.</p> <p> A value that indicates how the intersecting areas of the geometries contained in this geometry group are combined. </p> <p>Indicates the number of geometry objects in the geometry group. </p> <p>The number of geometries in the <strong>{{ID2D1GeometryGroup}}</strong>.</p> <p>Retrieves the geometries in the geometry group. </p> <p>The returned geometries are referenced and counted, and the caller must release them.</p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains the address of a reference to an array of geometries to be filled by this method. The length of the array is specified by the <em>geometryCount</em> parameter. If the array is <strong>{{NULL}}</strong>, then this method performs no operation. You must allocate the memory for this array.</p> </dd> <dd> <p>A value indicating the number of geometries to return in the <em>geometries</em> array. If this value is less than the number of geometries in the geometry group, the remaining geometries are omitted. If this value is larger than the number of geometries in the geometry group, the extra geometries are set to <strong>{{NULL}}</strong>. To obtain the number of geometries currently in the geometry group, use the <strong>GetSourceGeometryCount</strong> method.</p> </dd> <p>Represents a geometry that has been transformed. </p> <p>Using an <strong>{{ID2D1TransformedGeometry}}</strong> rather than transforming a geometry by using a render target's transform enables you to transform a geometry without transforming its stroke.</p> <p>Retrieves the source geometry of this transformed geometry object. </p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains a reference to a reference to the source geometry for this transformed geometry object. This parameter is passed uninitialized.</p> </dd> <p>Retrieves the matrix used to transform the <strong>{{ID2D1TransformedGeometry}}</strong> object's source geometry. </p> <p>This method does not return a value.</p> <p>Describes a geometric path that can contain lines, arcs, cubic Bezier curves, and quadratic Bezier curves. </p> <p>The <strong>{{ID2D1GeometrySink}}</strong> interface extends the <strong>{{ID2D1SimplifiedGeometrySink}}</strong> interface to add support for arcs and quadratic beziers, as well as functions for adding single lines and cubic beziers.</p><p>A geometry sink consists of one or more figures. Each figure is made up of one or more line, curve, or arc segments. To create a figure, call the <strong>BeginFigure</strong> method, specify the figure's start point, and then use its Add methods (such as AddLine and AddBezier) to add segments. When you are finished adding segments, call the <strong>EndFigure</strong> method. You can repeat this sequence to create additional figures. When you are finished creating figures, call the <strong>Close</strong> method.</p> <p>Creates a line segment between the current point and the specified end point and adds it to the geometry sink. </p> <p>This method does not return a value.</p> <dd> <p>The end point of the line to draw.</p> </dd> Creates a cubic Bezier curve between the current point and the specified end point and adds it to the geometry sink. <p>Creates a quadratic Bezier curve between the current point and the specified end point.</p> <p>This method does not return a value.</p> <dd> <p>A structure that describes the control point and the end point of the quadratic Bezier curve to add.</p> </dd> <p>Adds a sequence of quadratic Bezier segments as an array in a single call.</p> <p>This method does not return a value.</p> <dd> <p>An array of a sequence of quadratic Bezier segments.</p> </dd> <dd> <p>A value indicating the number of quadratic Bezier segments in <em>beziers</em>. </p> </dd> <p>Describes a geometric path that can contain lines, arcs, cubic Bezier curves, and quadratic Bezier curves. </p> <p>The <strong>{{ID2D1GeometrySink}}</strong> interface extends the <strong>{{ID2D1SimplifiedGeometrySink}}</strong> interface to add support for arcs and quadratic beziers, as well as functions for adding single lines and cubic beziers.</p><p>A geometry sink consists of one or more figures. Each figure is made up of one or more line, curve, or arc segments. To create a figure, call the <strong>BeginFigure</strong> method, specify the figure's start point, and then use its Add methods (such as AddLine and AddBezier) to add segments. When you are finished adding segments, call the <strong>EndFigure</strong> method. You can repeat this sequence to create additional figures. When you are finished creating figures, call the <strong>Close</strong> method.</p> <p>Represents a complex shape that may be composed of arcs, curves, and lines. </p> <p>An <strong>{{ID2D1PathGeometry}}</strong> object enables you to describe a geometric path. To describe an <strong>{{ID2D1PathGeometry}}</strong> object's path, use the object's <strong>Open</strong> method to retrieve an <strong>{{ID2D1GeometrySink}}</strong>. Use the sink to populate the path geometry with figures and segments. </p> <p>Retrieves the geometry sink that is used to populate the path geometry with figures and segments. </p> <p>Because path geometries are immutable and can only be populated once, it is an error to call <strong>Open</strong> on a path geometry more than once.</p><p>Note that the fill mode defaults to <strong>{{D2D1_FILL_MODE_ALTERNATE}}</strong>. To set the fill mode, call <strong>SetFillMode</strong> before the first call to <strong>BeginFigure</strong>. Failure to do so will put the geometry sink in an error state. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, <em>geometrySink</em> contains the address of a reference to the geometry sink that is used to populate the path geometry with figures and segments. This parameter is passed uninitialized.</p> </dd> <p>Copies the contents of the path geometry to the specified <strong>{{ID2D1GeometrySink}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Retrieves the number of segments in the path geometry. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the number of segments in the path geometry when this method returns. You must allocate storage for this parameter. </p> </dd> <p>Retrieves the number of figures in the path geometry. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the number of figures in the path geometry when this method returns. You must allocate storage for this parameter.</p> </dd> <p>Represents a set of vertices that form a list of triangles. </p> <p>Opens the mesh for population.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains a reference to a reference to an <strong>{{ID2D1TessellationSink}}</strong> that is used to populate the mesh. This parameter is passed uninitialized.</p> </dd> <p>Represents the backing store required to render a layer. </p> <p>To create a layer, call the <strong>CreateLayer</strong> method of the render target where the layer will be used. To draw to a layer, push the layer to the render target stack by calling the <strong>PushLayer</strong> method. After you have finished drawing to the layer, call the <strong>PopLayer</strong> method.</p><p>Between <strong>PushLayer</strong> and <strong>PopLayer</strong> calls, the layer is in use and cannot be used by another render target. </p><p>If the size of the layer is not specified, the corresponding <strong>PushLayer</strong> call determines the minimum layer size, based on the layer content bounds and the geometric mask. The layer resource can be larger than the size required by <strong>PushLayer</strong> without any rendering artifacts.</p><p>If the size of a layer is specified, or if the layer has been used and the required backing store size as calculated during <strong>PushLayer</strong> is larger than the layer, then the layer resource is expanded on each axis monotonically to ensure that it is large enough. The layer resource never shrinks in size.</p> <p>Gets the size of the layer in device-independent pixels. </p> <p>The size of the layer in device-independent pixels.</p> <p>Represents the drawing state of a render target: the antialiasing mode, transform, tags, and text-rendering options. </p> <p>Retrieves the antialiasing mode, transform, and tags portion of the drawing state.</p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains the antialiasing mode, transform, and tags portion of the drawing state. You must allocate storage for this parameter.</p> </dd> <p>Specifies the antialiasing mode, transform, and tags portion of the drawing state.</p> <p>This method does not return a value.</p> <dd> <p>The antialiasing mode, transform, and tags portion of the drawing state.</p> </dd> <p>Specifies the text-rendering configuration of the drawing state.</p> <p>This method does not return a value.</p> <dd> <p>The text-rendering configuration of the drawing state, or {{NULL}} to use default settings.</p> </dd> <p>Retrieves the text-rendering configuration of the drawing state.</p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains the address of a reference to an <strong>{{IDWriteRenderingParams}}</strong> object that describes the text-rendering configuration of the drawing state.</p> </dd> <p>Renders drawing instructions to a window.</p> <p>As is the case with other render targets, you must call <strong>BeginDraw</strong> before issuing drawing commands. After you've finished drawing, call <strong>EndDraw</strong> to indicate that drawing is finished and to release access to the buffer backing the render target. For <strong>{{ID2D1HwndRenderTarget}}</strong>, the only side effect of <strong>BeginDraw</strong> is changing the state of the render target to allow drawing commands to be issued. <strong>EndDraw</strong> flushes any batched drawing commands. If no errors have occurred, then it also presents the buffer, causing it to appear on the associated window. Finally, <strong>EndDraw</strong> returns the {{HRESULT}} of the first error that occurred in drawing or presenting, as well as the tag state at the time the error occurred.</p><p><strong>{{ID2D1HwndRenderTarget}}</strong> objects are double buffered, so drawing commands issued do not appear immediately, but rather are performed on an offscreen surface. When <strong>EndDraw</strong> is called, if there have been no rendering errors, the offscreen buffer is presented. If there have been rendering errors in the batch flushed by <strong>EndDraw</strong>, then the buffer is not presented, and the application must call <strong>BeginDraw</strong> and re-draw the frame. <strong>Flush</strong> can be used to check for errors before calling <strong>EndDraw</strong> if an application wants the frame to be presented regardless of errors. </p><p>A hardware render target's back-buffer is the size specified by <strong>GetPixelSize</strong>. If <strong>EndDraw</strong> presents the buffer, this bitmap is stretched to cover the surface where it is presented: the entire client area of the window. This stretch is performed using bilinear filtering if the render target is rendering in hardware and using nearest-neighbor filtering if the rendering target is using software. (Typically, an application will call <strong>Resize</strong> to ensure the pixel size of the render target and the pixel size of the destination match, and no scaling is necessary, though this is not a requirement.) </p><p>In the case where a window straddles adapters, Direct2D ensures that the portion of the off-screen render target is copied from the adapter where rendering is occurring to the adapter that needs to display the contents. If the adapter a render target is on has been removed or the driver upgraded while the application is running, this is returned as an error in the <strong>EndDraw</strong> call. In this case, the application should create a new render target and resources as necessary. </p> <p>Indicates whether the {{HWND}} associated with this render target is occluded. </p> <strong>Note</strong>??If the window was occluded the last time that <strong>EndDraw</strong> was called, the next time that the render target calls <strong>CheckWindowState</strong>, it will return <strong>{{D2D1_WINDOW_STATE_OCCLUDED}}</strong> regardless of the current window state. If you want to use <strong>CheckWindowState</strong> to determine the current window state, you should call <strong>CheckWindowState</strong> after every <strong>EndDraw</strong> call and ignore its return value. This call will ensure that your next call to <strong>CheckWindowState</strong> state will return the actual window state.? <p>A value that indicates whether the {{HWND}} associated with this render target is occluded.</p> Changes the size of the render target to the specified pixel size. <p>After this method is called, the contents of the render target's back-buffer are not defined, even if the <strong>{{D2D1_PRESENT_OPTIONS_RETAIN_CONTENTS}}</strong> option was specified when the render target was created.</p> <p> Returns the {{HWND}} associated with this render target.</p> <p>The {{HWND}} associated with this render target.</p> <p>Provides access to an device context that can accept {{GDI}} drawing commands. </p> <p>You don't create an <strong>{{ID2D1GdiInteropRenderTarget}}</strong> object directly; instead, you use the <strong>QueryInterface</strong> method of an existing render target instance to provide an <strong>{{ID2D1GdiInteropRenderTarget}}</strong> version of that render target. </p><p>Not all render targets support the <strong>{{ID2D1GdiInteropRenderTarget}}</strong> interface. The render target must be {{GDI}}-compatible (the <strong>{{D2D1_RENDER_TARGET_USAGE_GDI_COMPATIBLE}}</strong> flag was specified when creating the render target), use the {{DXGI_FORMAT_B8G8R8A8_UNORM}} pixel format, and use the <strong>{{D2D1_ALPHA_MODE_PREMULTIPLIED}}</strong> or <strong>{{D2D1_ALPHA_MODE_IGNORE}}</strong> alpha mode.</p><p>Note that the <strong>QueryInterface</strong> method always succeeds; if the render target doesn't support the <strong>{{ID2D1GdiInteropRenderTarget}}</strong> interface, calling <strong>GetDC</strong> will fail. (For render targets created through the <strong>CreateCompatibleRenderTarget</strong> method, the render target that created it must have these settings.) </p><p>To test whether a given render target supports the <strong>{{ID2D1GdiInteropRenderTarget}}</strong> interface, create a <strong>{{D2D1_RENDER_TARGET_PROPERTIES}} </strong>that specifies {{GDI}} compatibility and the appropriate pixel format, then call the render target's <strong>IsSupported</strong> method to see whether the render target is {{GDI}}-compatible. </p> <p>Retrieves the device context associated with this render target. </p> <p>Calling this method flushes the render target.</p><p>This command can be called only after <strong>BeginDraw</strong> and before <strong>EndDraw</strong>. </p><strong>Note</strong>??In Windows?7 and earlier, you should not call <strong>GetDC</strong> between <strong>PushAxisAlignedClip</strong>/<strong>PopAxisAlignedClip</strong> commands or between <strong>PushLayer</strong>/<strong>PopLayer</strong>. However, this restriction does not apply to Windows?8 and later.?<p> <strong>ReleaseDC</strong> must be called once for each call to <strong>GetDC</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A value that specifies whether the device context should be cleared.</p> </dd> <dd> <p>When this method returns, contains the device context associated with this render target. You must allocate storage for this parameter. </p> </dd> <p>Indicates that drawing with the device context retrieved using the <strong>GetDC</strong> method is finished. </p> <p><strong>ReleaseDC</strong> must be called once for each call to <strong>GetDC</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Issues drawing commands to a {{GDI}} device context. </p> <p> Binds the render target to the device context to which it issues drawing commands.</p> <p>Before you can render with the {{DC}} render target, you must use its <strong>BindDC</strong> method to associate it with a {{GDI}} {{DC}}. You do this each time you use a different {{DC}}, or the size of the area you want to draw to changes.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The device context to which the render target issues drawing commands.</p> </dd> <dd> <p>The dimensions of the handle to a device context ({{HDC}}) to which the render target is bound. </p> </dd> <p>Creates a factory object that can be used to create Direct2D resources.</p> <p>The <strong>{{ID2D1Factory}}</strong> interface provides the starting point for Direct2D. In general, objects created from a single instance of a factory object can be used with other resources created from that instance, but not with resources created by other factory instances. </p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The threading model of the factory and the resources it creates.</p> </dd> <dd> <p>A reference to the {{IID}} of <strong>{{ID2D1Factory}}</strong> that is obtained by using __uuidof({{ID2D1Factory}}).</p> </dd> <dd> <p>The level of detail provided to the debugging layer.</p> </dd> <dd> <p>When this method returns, contains the address to a reference to the new factory.</p> </dd> <p>Creates a rotation transformation that rotates by the specified angle about the specified point.</p> <p>Rotation occurs in the plane of the 2-D surface.</p> <p>This function does not return a value.</p> <dd> <p>The clockwise rotation angle, in degrees. </p> </dd> <dd> <p>The point about which to rotate.</p> </dd> <dd> <p>When this method returns, contains the new rotation transformation. You must allocate storage for this parameter. </p> </dd> <p>Creates a skew transformation that has the specified x-axis angle, y-axis angle, and center point. </p> <p>This function does not return a value.</p> <dd> <p>The x-axis skew angle, which is measured in degrees counterclockwise from the y-axis.</p> </dd> <dd> <p>The y-axis skew angle, which is measured in degrees counterclockwise from the x-axis.</p> </dd> <dd> <p>The center point of the skew operation.</p> </dd> <dd> <p>When this method returns, contains the rotation transformation. You must allocate storate for this parameter.</p> </dd> <p>Indicates whether the specified matrix is invertible.</p> <p><strong>true</strong> if the matrix was inverted; otherwise, <strong>false</strong>.</p> <dd> <p>The matrix to test.</p> </dd> <p>Tries to invert the specified matrix.</p> <p><strong>true</strong> if the matrix was inverted; otherwise, <strong>false</strong>.</p> <dd> <p>The matrix to invert.</p> </dd> <p>Specifies the color context types.</p> <dd> <p>An uninitialized color context.</p> </dd> <dd> <p>A color context that is a full {{ICC}} color profile.</p> </dd> <dd> <p>A color context that is one of a number of set color spaces (sRGB, AdobeRGB) that are defined in the {{EXIF}} specification.</p> </dd> <p>Specifies the desired cache usage.</p> <p>The <strong>CreateBitmap</strong> of the <strong>{{IWICImagingFactory}}</strong> interface does not support {{WICBitmapNoCache}} when the <em>pixelFormat</em> is a native pixel format provided by Windows Imaging Component ({{WIC}}).</p> <dd> <p>Do not cache the bitmap.</p> </dd> <dd> <p>Cache the bitmap when needed.</p> </dd> <dd> <p>Cache the bitmap at initialization.</p> </dd> <p>Specifies decode options.</p> <dd> <p>Cache metadata when needed.</p> </dd> <dd> <p>Cache metadata when decoder is loaded.</p> </dd> <p>Specifies the cache options available for an encoder.</p> <dd> <p>The encoder is cached in memory. This option is not supported.</p> </dd> <dd> <p>The encoder is cached to a temporary file. This option is not supported.</p> </dd> <dd> <p>The encoder is not cached.</p> </dd> <p>Specifies the type of Windows Imaging Component ({{WIC}}) component.</p> <dd> <p>A {{WIC}} decoder.</p> </dd> <dd> <p>A {{WIC}} encoder.</p> </dd> <dd> <p>A {{WIC}} pixel converter.</p> </dd> <dd> <p>A {{WIC}} metadata reader.</p> </dd> <dd> <p>A {{WIC}} metadata writer.</p> </dd> <dd> <p>A {{WIC}} pixel format.</p> </dd> <dd> <p>All {{WIC}} components.</p> </dd> <p>Specifies component enumeration options.</p> <dd> <p>Enumerate any components that are not disabled. Because this value is 0x0, it is always included with the other options.</p> </dd> <dd> <p>Force a read of the registry before enumerating components.</p> </dd> <dd> <p>Include disabled components in the enumeration. The set of disabled components is disjoint with the set of default enumerated components</p> </dd> <dd> <p>Include unsigned components in the enumeration. This option has no effect.</p> </dd> <dd> <p>At the end of component enumeration, filter out any components that are not Windows provided.</p> </dd> <p>Specifies the sampling or filtering mode to use when scaling an image.</p> <dd> <p>A nearest neighbor interpolation algorithm. Also known as nearest pixel or point interpolation. </p> <p>The output pixel is assigned the value of the pixel that the point falls within. No other pixels are considered.</p> </dd> <dd> <p>A bilinear interpolation algorithm. </p> <p>The output pixel values are computed as a weighted average of the nearest four pixels in a 2x2 grid.</p> </dd> <dd> <p>A bicubic interpolation algorithm. </p> <p>Destination pixel values are computed as a weighted average of the nearest sixteen pixels in a 4x4 grid. </p> </dd> <dd> <p>A Fant resampling algorithm. </p> <p>Destination pixel values are computed as a weighted average of the all the pixels that map to the new pixel.</p> </dd> <dd> <p>A high quality bicubic interpolation algorithm. Destination pixel values are computed using a much denser sampling kernel than regular cubic. The kernel is resized in response to the scale factor, making it suitable for downscaling by factors greater than 2.</p> <strong>Note</strong>??This value is supported beginning with Windows?10. ? </dd> <p>Specifies the type of palette used for an indexed image format.</p> <dd> <p>An arbitrary custom palette provided by caller.</p> </dd> <dd> <p>An optimal palette generated using a median-cut algorithm. Derived from the colors in an image.</p> </dd> <dd> <p>A black and white palette.</p> </dd> <dd> <p>A palette that has its 8-color on-off primaries and the 16 system colors added. With duplicates removed, 16 colors are available.</p> </dd> <dd> <p>A palette that has 3 intensity levels of each primary: 27-color on-off primaries and the 16 system colors added. With duplicates removed, 35 colors are available.</p> </dd> <dd> <p>A palette that has 4 intensity levels of each primary: 64-color on-off primaries and the 16 system colors added. With duplicates removed, 72 colors are available.</p> </dd> <dd> <p>A palette that has 5 intensity levels of each primary: 125-color on-off primaries and the 16 system colors added. With duplicates removed, 133 colors are available.</p> </dd> <dd> <p>A palette that has 6 intensity levels of each primary: 216-color on-off primaries and the 16 system colors added. With duplicates removed, 224 colors are available. This is the same as <strong>{{WICBitmapPaletteFixedHalftoneWeb}}</strong>.</p> </dd> <dd> <p>A palette that has 6 intensity levels of each primary: 216-color on-off primaries and the 16 system colors added. With duplicates removed, 224 colors are available. This is the same as <strong>{{WICBitmapPaletteTypeFixedHalftone216}}</strong>.</p> </dd> <dd> <p>A palette that has its 252-color on-off primaries and the 16 system colors added. With duplicates removed, 256 colors are available.</p> </dd> <dd> <p>A palette that has its 256-color on-off primaries and the 16 system colors added. With duplicates removed, 256 colors are available.</p> </dd> <dd> <p>A palette that has 4 shades of gray.</p> </dd> <dd> <p>A palette that has 16 shades of gray.</p> </dd> <dd> <p>A palette that has 256 shades of gray.</p> </dd> <p>Specifies the type of {{dither}} algorithm to apply when converting between image formats.</p> <dd> <p>A solid color algorithm without dither.</p> </dd> <dd> <p>A solid color algorithm without dither.</p> </dd> <dd> <p>A 4x4 ordered dither algorithm. </p> </dd> <dd> <p>An 8x8 ordered dither algorithm.</p> </dd> <dd> <p>A 16x16 ordered dither algorithm.</p> </dd> <dd> <p>A 4x4 spiral dither algorithm.</p> </dd> <dd> <p>An 8x8 spiral dither algorithm.</p> </dd> <dd> <p>A 4x4 dual spiral dither algorithm.</p> </dd> <dd> <p>An 8x8 dual spiral dither algorithm.</p> </dd> <dd> <p>An error diffusion algorithm.</p> </dd> <p>Specifies the desired alpha channel usage.</p> <dd> <p>Use alpha channel.</p> </dd> <dd> <p>Use a pre-multiplied alpha channel.</p> </dd> <dd> <p>Ignore alpha channel.</p> </dd> <dd> <p>Sentinel value.</p> </dd> <p>Specifies the flip and rotation transforms.</p> <dd> <p>A rotation of 0 degrees.</p> </dd> <dd> <p>A clockwise rotation of 90 degrees.</p> </dd> <dd> <p>A clockwise rotation of 180 degrees.</p> </dd> <dd> <p>A clockwise rotation of 270 degrees.</p> </dd> <dd> <p>A horizontal flip. Pixels are flipped around the vertical y-axis.</p> </dd> <dd> <p>A vertical flip. Pixels are flipped around the horizontal x-axis.</p> </dd> <p>Specifies access to an <strong>{{IWICBitmap}}</strong>.</p> <p>Specifies the capabilities of the decoder.</p> <dd> <p>Decoder recognizes the image was encoded with an encoder produced by the same vendor. </p> <p></p> </dd> <dd> <p>Decoder can decode all the images within an image container.</p> </dd> <dd> <p>Decoder can decode some of the images within an image container.</p> </dd> <dd> <p>Decoder can enumerate the metadata blocks within a container format.</p> </dd> <dd> <p>Decoder can find and decode a thumbnail.</p> </dd> <p>Specifies the progress operations to receive notifications for.</p> <dd> <p>Receive copy pixel operation.</p> </dd> <dd> <p>Receive write pixel operation.</p> </dd> <dd> <p>Receive all progress operations available.</p> </dd> <p>Specifies when the progress notification callback should be called.</p> <dd> <p>The callback should be called when codec operations begin.</p> </dd> <dd> <p>The callback should be called when codec operations end.</p> </dd> <dd> <p>The callback should be called frequently to report status.</p> </dd> <dd> <p>The callback should be called on all available progress notifications.</p> </dd> <p>Specifies the component signing status.</p> <dd> <p>A signed component.</p> </dd> <dd> <p>An unsigned component</p> </dd> <dd> <p>A component is safe. </p> <p>Components that do not have a binary component to sign, such as a pixel format, should return this value.</p> </dd> <dd> <p>A component has been disabled.</p> </dd> <p>Specifies the logical screen descriptor properties for Graphics Interchange Format ({{GIF}}) metadata.</p> <dd> <p> [{{VT_UI1}} | {{VT_VECTOR}}] Indicates the signature property.</p> </dd> <dd> <p>[{{VT_UI2}}] Indicates the width in pixels. </p> </dd> <dd> <p>[{{VT_UI2}}] Indicates the height in pixels. </p> </dd> <dd> <p>[{{VT_BOOL}}] Indicates the global color table flag. <strong>{{TRUE}}</strong> if a global color table is present; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <dd> <p>[{{VT_UI1}}] Indicates the color resolution in bits per pixel.</p> </dd> <dd> <p>[{{VT_BOOL}}] Indicates the sorted color table flag. <strong>{{TRUE}}</strong> if the table is sorted; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <dd> <p>[{{VT_UI1}}] Indicates the value used to calculate the number of bytes contained in the global color table. </p> <p>To calculate the actual size of the color table, raise 2 to the value of the field + 1.</p> </dd> <dd> <p>[{{VT_UI1}}] Indicates the index within the color table to use for the background (pixels not defined in the image).</p> </dd> <dd> <p>[{{VT_UI1}}] Indicates the factor used to compute an approximation of the aspect ratio.</p> </dd> <p>Specifies the image descriptor metadata properties for Graphics Interchange Format ({{GIF}}) frames.</p> <dd> <p>[{{VT_UI2}}] Indicates the X offset at which to locate this frame within the logical screen.</p> </dd> <dd> <p>[{{VT_UI2}}] Indicates the Y offset at which to locate this frame within the logical screen.</p> </dd> <dd> <p>[{{VT_UI2}}] Indicates width of this frame, in pixels.</p> </dd> <dd> <p>[{{VT_UI2}}] Indicates height of this frame, in pixels.</p> </dd> <dd> <p>[{{VT_BOOL}}] Indicates the local color table flag. <strong>{{TRUE}}</strong> if global color table is present; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <dd> <p>[{{VT_BOOL}}] Indicates the interlace flag. <strong>{{TRUE}}</strong> if image is interlaced; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <dd> <p>[{{VT_BOOL}}] Indicates the sorted color table flag. <strong>{{TRUE}}</strong> if the color table is sorted from most frequently to least frequently used color; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <dd> <p>[{{VT_UI1}}] Indicates the value used to calculate the number of bytes contained in the global color table. </p> <p>To calculate the actual size of the color table, raise 2 to the value of the field + 1.</p> </dd> <p>Specifies the graphic control extension metadata properties that define the transitions between each frame animation for Graphics Interchange Format ({{GIF}}) images.</p> <dd> <p>[{{VT_UI1}}] Indicates the disposal requirements. 0 - no disposal, 1 - do not dispose, 2 - restore to background color, 3 - restore to previous.</p> </dd> <dd> <p>[{{VT_BOOL}}] Indicates the user input flag. <strong>{{TRUE}}</strong> if user input should advance to the next frame; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <dd> <p>[{{VT_BOOL}}] Indicates the transparency flag. <strong>{{TRUE}}</strong> if a transparent color in is in the color table for this frame; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <dd> <p>[{{VT_UI2}}] Indicates how long to display the next frame before advancing to the next frame, in units of 1/100th of a second.</p> </dd> <dd> <p>[{{VT_UI1}}] Indicates which color in the palette should be treated as transparent.</p> </dd> <p>Specifies the application extension metadata properties for a Graphics Interchange Format ({{GIF}}) image.</p> <dd> <p>[{{VT_UI1}} | {{VT_VECTOR}}] Indicates a string that identifies the application.</p> </dd> <dd> <p>[{{VT_UI1}} | {{VT_VECTOR}}] Indicates data that is exposed by the application.</p> </dd> <p>Specifies the comment extension metadata properties for a Graphics Interchange Format ({{GIF}}) image.</p> <dd> <p>[{{VT_LPSTR}}] Indicates the comment text.</p> </dd> <p>Specifies the {{JPEG}} comment properties.</p> <dd> <p>Indicates the metadata property is comment text.</p> </dd> <p>Specifies the {{JPEG}} luminance table property.</p> <dd> <p>[{{VT_UI2}}|{{VT_VECTOR}}] Indicates the metadata property is a luminance table.</p> </dd> <p>Specifies the {{JPEG}} chrominance table property.</p> <dd> <p>[{{VT_UI2}}|{{VT_VECTOR}}] Indicates the metadata property is a chrominance table.</p> </dd> <p>Specifies the identifiers of the metadata items in an 8BIM {{IPTC}} block.</p> <dd> <p>[{{VT_LPSTR}}] A name that identifies the 8BIM block.</p> </dd> <dd> <p>[{{VT_UNKNOWN}}] The {{IPTC}} block embedded in this 8BIM {{IPTC}} block.</p> </dd> <p>Specifies the identifiers of the metadata items in an 8BIMResolutionInfo block.</p> <dd> <p>[{{VT_LPSTR}}] A name that identifies the 8BIM block.</p> </dd> <dd> <p>[{{VT_UI4}}] The horizontal resolution of the image.</p> </dd> <dd> <p>[{{VT_UI2}}] The units that the horizontal resolution is specified in; a 1 indicates pixels per inch and a 2 indicates pixels per centimeter.</p> </dd> <dd> <p>[{{VT_UI2}}] The units that the image width is specified in; a 1 indicates inches, a 2 indicates centimeters, a 3 indicates points, a 4 specifies picas, and a 5 specifies columns.</p> </dd> <dd> <p>[{{VT_UI4}}] The vertical resolution of the image.</p> </dd> <dd> <p>[{{VT_UI2}}] The units that the vertical resolution is specified in; a 1 indicates pixels per inch and a 2 indicates pixels per centimeter.</p> </dd> <dd> <p>[{{VT_UI2}}] The units that the image height is specified in; a 1 indicates inches, a 2 indicates centimeters, a 3 indicates points, a 4 specifies picas, and a 5 specifies columns.</p> </dd> <p>Specifies the identifiers of the metadata items in an 8BIM {{IPTC}} digest metadata block.</p> <dd> <p>[{{VT_LPSTR}}] A name that identifies the 8BIM block.</p> </dd> <dd> <p>[{{VT_BLOB}}] The embedded {{IPTC}} digest value.</p> </dd> <p>Specifies the Portable Network Graphics ({{PNG}}) gAMA chunk metadata properties.</p> <dd> <p>[{{VT_UI4}}] Indicates the gamma value.</p> </dd> <p>Specifies the Portable Network Graphics ({{PNG}}) background (bKGD) chunk metadata properties.</p> <dd> <p>Indicates the background color. There are three possible types, depending on the image's pixel format.</p> <p></p> <dl> <dt>{{VT_UI1}}</dt> <dd> <p>Specifies the index of the background color in an image with an indexed pixel format.</p> </dd> <dt>{{VT_UI2}}</dt> <dd> <p>Specifies the background color in a grayscale image.</p> </dd> <dt>{{VT_VECTOR}}|{{VT_UI2}}</dt> <dd> <p>Specifies the background color in an {{RGB}} image as three {{USHORT}} values: {0x<em>{{RRRR}}</em>, 0x<em>{{GGGG}}</em>, 0x<em>{{BBBB}}</em>}.</p> </dd> </dl> </dd> <p>Specifies the Portable Network Graphics ({{PNG}}) iTXT chunk metadata properties.</p> <dd> <p>[{{VT_LPSTR}}] Indicates the keywords in the iTXT metadata chunk.</p> </dd> <dd> <p>[{{VT_UI1}}] Indicates whether the text in the iTXT chunk is compressed. 1 if the text is compressed; otherwise, 0.</p> </dd> <dd> <p>[{{VT_LPSTR}}] Indicates the human language used by the translated keyword and the text.</p> </dd> <dd> <p>[{{VT_LPWSTR}}] Indicates a translation of the keyword into the language indicated by the language tag.</p> </dd> <dd> <p>[{{VT_LPWSTR}}] Indicates additional text in the iTXT metadata chunk.</p> </dd> <p>Specifies the Portable Network Graphics ({{PNG}}) cHRM chunk metadata properties for {{CIE}} {{XYZ}} chromaticity.</p> <dd> <p>[{{VT_UI4}}] Indicates the whitepoint x value ratio.</p> </dd> <dd> <p>[{{VT_UI4}}] Indicates the whitepoint y value ratio.</p> </dd> <dd> <p>[{{VT_UI4}}] Indicates the red x value ratio.</p> </dd> <dd> <p>[{{VT_UI4}}] Indicates the red y value ratio.</p> </dd> <dd> <p>[{{VT_UI4}}] Indicates the green x value ratio.</p> </dd> <dd> <p>[{{VT_UI4}}] Indicates the green y value ratio.</p> </dd> <dd> <p>[{{VT_UI4}}] Indicates the blue x value ratio.</p> </dd> <dd> <p>[{{VT_UI4}}] Indicates the blue y value ratio.</p> </dd> <p>Specifies the Portable Network Graphics ({{PNG}}) hIST chunk metadata properties.</p> <dd> <p>[{{VT_VECTOR}} | {{VT_UI2}}] Indicates the approximate usage frequency of each color in the color palette. </p> </dd> <p>Specifies the Portable Network Graphics ({{PNG}}) iCCP chunk metadata properties.</p> <dd> <p>[{{VT_LPSTR}}] Indicates the International Color Consortium ({{ICC}}) profile name.</p> </dd> <dd> <p>[{{VT_VECTOR}} | {{VT_UI1}}] Indicates the embedded {{ICC}} profile.</p> </dd> <p>Specifies the Portable Network Graphics ({{PNG}}) sRGB chunk metadata properties.</p> <dd> <p>[{{VT_UI1}}] Indicates the rendering intent for an sRGB color space image. The rendering intents have the following meaning.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td>0</td><td>Perceptual</td></tr> <tr><td>1</td><td>Relative colorimetric</td></tr> <tr><td>2</td><td>Saturation</td></tr> <tr><td>3</td><td>Absolute colorimetric</td></tr> </table> <p>?</p> </dd> <p>Specifies the Portable Network Graphics ({{PNG}}) tIME chunk metadata properties.</p> <dd> <p>[{{VT_UI2}}] Indicates the year of the last modification.</p> </dd> <dd> <p>[{{VT_UI1}}] Indicates the month of the last modification.</p> </dd> <dd> <p>[{{VT_UI1}}] Indicates day of the last modification.</p> </dd> <dd> <p>[{{VT_UI1}}] Indicates the hour of the last modification.</p> </dd> <dd> <p>[{{VT_UI1}}] Indicates the minute of the last modification.</p> </dd> <dd> <p>[{{VT_UI1}}] Indicates the second of the last modification.</p> </dd> <p>Specifies the access level of a Windows Graphics Device Interface ({{GDI}}) section.</p> <dd> <p>Indicates a read only access level.</p> </dd> <dd> <p>Indicates a read/write access level.</p> </dd> <dd></dd> <dd></dd> <dd></dd> <dd></dd> <dd></dd> <dd></dd> <p>Specifies additional options to an <strong>{{IWICPlanarBitmapSourceTransform}}</strong> implementation. </p> <p>Specifies the options for indexing a {{JPEG}} image. </p> <dd> <p>Index generation is deferred until <strong>{{IWICBitmapSource::CopyPixels}}</strong> is called on the image.</p> </dd> <dd> <p>Index generation is performed when the when the image is initially loaded.</p> </dd> <dd> <p>Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used. </p> </dd> <p>Specifies conversion matrix from Y'Cb'Cr' to R'G'B'. </p> <dd> <p>Specifies the identity transfer matrix.</p> </dd> <dd> <p>Specifies the {{BT601}} transfer matrix.</p> </dd> <dd> <p>Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used. </p> </dd> <p>Specifies the memory layout of pixel data in a {{JPEG}} image scan. </p> <dd> <p>The pixel data is stored in an interleaved memory layout.</p> </dd> <dd> <p>The pixel data is stored in a planar memory layout.</p> </dd> <dd> <p>The pixel data is stored in a progressive layout.</p> </dd> <dd> <p>Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used. </p> </dd> <p>Specifies the Tagged Image File Format ({{TIFF}}) compression options.</p> <dd> <p>Indicates a suitable compression algorithm based on the image and pixel format.</p> </dd> <dd> <p>Indicates no compression.</p> </dd> <dd> <p>Indicates a {{CCITT3}} compression algorithm. This algorithm is only valid for 1bpp pixel formats.</p> </dd> <dd> <p>Indicates a {{CCITT4}} compression algorithm. This algorithm is only valid for 1bpp pixel formats.</p> </dd> <dd> <p>Indicates a {{LZW}} compression algorithm.</p> </dd> <dd> <p>Indicates a {{RLE}} compression algorithm. This algorithm is only valid for 1bpp pixel formats.</p> </dd> <dd> <p>Indicates a {{ZIP}} compression algorithm.</p> </dd> <dd> <p>Indicates an {{LZWH}} differencing algorithm.</p> </dd> <p>Specifies the {{JPEG}} {{YCrCB}} subsampling options. </p> <p>The native {{JPEG}} encoder uses <strong>{{WICJpegYCrCbSubsampling420}}</strong>.</p> <dd> <p>The default subsampling option. </p> </dd> <dd> <p>Subsampling option that uses both horizontal and vertical decimation.</p> </dd> <dd> <p>Subsampling option that uses horizontal decimation .</p> </dd> <dd> <p>Subsampling option that uses no decimation.</p> </dd> <dd> <p>Subsampling option that uses 2x vertical downsampling only. This option is only available in Windows?8.1 and later.</p> </dd> <p>Specifies the Portable Network Graphics ({{PNG}}) filters available for compression optimization.</p> <dd> <p>Indicates an unspecified {{PNG}} filter. This enables {{WIC}} to algorithmically choose the best filtering option for the image.</p> </dd> <dd> <p>Indicates no {{PNG}} filter.</p> </dd> <dd> <p>Indicates a {{PNG}} sub filter.</p> </dd> <dd> <p>Indicates a {{PNG}} up filter.</p> </dd> <dd> <p>Indicates a {{PNG}} average filter.</p> </dd> <dd> <p>Indicates a {{PNG}} paeth filter.</p> </dd> <dd> <p>Indicates a {{PNG}} adaptive filter. This enables {{WIC}} to choose the best filtering mode on a per-scanline basis.</p> </dd> <p>Specifies named white balances for raw images.</p> <dd> <p>The default white balance.</p> </dd> <dd> <p>A daylight white balance.</p> </dd> <dd> <p>A cloudy white balance.</p> </dd> <dd> <p>A shade white balance.</p> </dd> <dd> <p>A tungsten white balance.</p> </dd> <dd> <p>A fluorescent white balance.</p> </dd> <dd> <p>Daylight white balance.</p> </dd> <dd> <p>A flash white balance.</p> </dd> <dd> <p>A custom white balance. This is typically used when using a picture (grey-card) as white balance.</p> </dd> <dd> <p>An automatic balance.</p> </dd> <dd> <p>An "as shot" white balance.</p> </dd> <p>Specifies the capability support of a raw image.</p> <dd> <p>The capability is not supported.</p> </dd> <dd> <p>The capability supports only get operations.</p> </dd> <dd> <p>The capability supports get and set operations.</p> </dd> <p>Specifies the rotation capabilities of the codec.</p> <dd> <p>Rotation is not supported.</p> </dd> <dd> <p>Set operations for rotation is not supported.</p> </dd> <dd> <p>90 degree rotations are supported.</p> </dd> <dd> <p>All rotation angles are supported.</p> </dd> <p>Specifies the parameter set used by a raw codec.</p> <dd> <p>An as shot parameter set.</p> </dd> <dd> <p>A user adjusted parameter set.</p> </dd> <dd> <p>A codec adjusted parameter set.</p> </dd> <p>Specifies the render intent of the next <strong>CopyPixels</strong> call. </p> <p>Specifies the dimension type of the data contained in {{DDS}} image.</p> <p>Both <strong>{{WICDdsTexture2d}}</strong> and <strong>{{WICDdsTextureCube}}</strong> correspond to <strong>{{D3D11_RESOURCE_DIMENSION_TEXTURE2D}}</strong>. When using <strong>{{ID3D11Device::CreateTexture2D}}</strong>, they are distinguished by the flag <strong>{{D3D11_RESOURCE_MISC_TEXTURECUBE}}</strong> in the structure <strong>{{D3D11_TEXTURE2D_DESC}}</strong>.</p> <dd> <p>{{DDS}} image contains a 1-dimensional texture . </p> </dd> <dd> <p>{{DDS}} image contains a 2-dimensional texture . </p> </dd> <dd> <p>{{DDS}} image contains a 3-dimensional texture . </p> </dd> <dd> <p>The {{DDS}} image contains a cube texture represented as an array of 6 faces. </p> </dd> <p>Specifies the the meaning of pixel color component values contained in the {{DDS}} image.</p> <dd> <p>Alpha behavior is unspecified and must be determined by the reader.</p> </dd> <dd> <p>The alpha data is straight.</p> </dd> <dd> <p>The alpha data is premultiplied.</p> </dd> <dd> <p>The alpha data is opaque ({{UNORM}} value of 1). This can be used by a compliant reader as a performance optimization. For example, blending operations can be converted to copies.</p> </dd> <dd> <p>The alpha channel contains custom data that is not alpha.</p> </dd> <p>Represents a rectangle for Windows Imaging Component ({{WIC}})?{{API}}.</p> <dd> <p>The horizontal coordinate of the rectangle.</p> </dd> <dd> <p>The vertical coordinate of the rectangle.</p> </dd> <dd> <p>The width of the rectangle.</p> </dd> <dd> <p>The height of the rectangle.</p> </dd> <p>Contains members that identify a pattern within an image file which can be used to identify a particular format.</p> <dd> <p>The offset the pattern is located in the file.</p> </dd> <dd> <p>The pattern length.</p> </dd> <dd> <p>The actual pattern.</p> </dd> <dd> <p>The pattern mask.</p> </dd> <dd> <p>The end of the stream.</p> </dd> <p>This defines parameters that you can use to override the default parameters normally used when encoding an image. </p> <p>If this parameter is not passed to the encoding {{API}}, the encoder uses these settings.</p><ul> <li>A pixel format of (<strong>{{DXGI_FORMAT_B8G8R8A8_UNORM}}</strong>, <strong>{{D2D1_ALPHA_MODE_PREMULTIPLIED}}</strong>).</li> <li>An x and y {{DPI}} of 96.</li> <li>The entire image bounds will be used for encoding.</li> </ul><strong>Note</strong>??The parameters as specified can't result in a scale. The encoder can use a larger portion of the input image based on the passed in {{DPI}} and the pixel width and height.? <dd> <p>The pixel format to which the image is processed before it is written to the encoder.</p> </dd> <dd> <p>The {{DPI}} in the x dimension.</p> </dd> <dd> <p>The {{DPI}} in the y dimension.</p> </dd> <dd> <p>The top corner in pixels of the image space to be encoded to the destination.</p> </dd> <dd> <p>The left corner in pixels of the image space to be encoded to the destination.</p> </dd> <dd> <p>The width in pixels of the part of the image to write.</p> </dd> <dd> <p>The height in pixels of the part of the image to write.</p> </dd> <p>Specifies the pixel format and size of a component plane.</p> <dd> <p>Describes the pixel format of the plane. </p> </dd> <dd> <p>Component width of the plane.</p> </dd> <dd> <p>Component height of the plane.</p> </dd> <p>Specifies the pixel format, buffer, stride and size of a component plane for a planar pixel format.</p> <dd> <p>Describes the pixel format of the plane. </p> </dd> <dd> <p>Pointer to the buffer that holds the plane?s pixel components.</p> </dd> <dd> <p>The stride of the buffer ponted to by <em>pbData</em>. Stride indicates the total number of bytes to go from the beginning of one scanline to the beginning of the next scanline.</p> </dd> <dd> <p>The total size of the buffer pointed to by <em>pbBuffer</em>.</p> </dd> <p>Represents a {{JPEG}} frame header.</p> <p>Get the frame header for an image by calling <strong>{{IWICJpegFrameDecode::GetFrameHeader}}</strong>.</p> <dd> <p>The width of the {{JPEG}} frame.</p> </dd> <dd> <p>The height of the {{JPEG}} frame.</p> </dd> <dd> <p>The transfer matrix of the {{JPEG}} frame.</p> </dd> <dd> <p>The scan type of the {{JPEG}} frame.</p> </dd> <dd> <p>The number of components in the frame.</p> </dd> <dd> <p>The component identifiers.</p> </dd> <dd> <p>The sample factors. Use one of the following constants, described in <strong>{{IWICJpegFrameDecode}} Constants</strong>.</p> <ul> <li>{{WIC_JPEG_SAMPLE_FACTORS_ONE}}</li> <li>{{WIC_JPEG_SAMPLE_FACTORS_THREE_420}}</li> <li>{{WIC_JPEG_SAMPLE_FACTORS_THREE_422}}</li> <li>{{WIC_JPEG_SAMPLE_FACTORS_THREE_440}}</li> <li>{{WIC_JPEG_SAMPLE_FACTORS_THREE_444}}</li> </ul> </dd> <dd> <p>The format of the quantization table indices. Use one of the following constants, described in <strong>{{IWICJpegFrameDecode}} Constants</strong>.</p> <ul> <li>{{WIC_JPEG_QUANTIZATION_BASELINE_ONE}}</li> <li>{{WIC_JPEG_QUANTIZATION_BASELINE_THREE}} </li> </ul> </dd> <p>Represents a {{JPEG}} frame header.</p> <p>Get the scan header for an image by calling <strong>{{IWICJpegFrameDecode::GetScanHeader}}</strong>.</p> <dd> <p>The number of components in the scan.</p> </dd> <dd> <p>The interval of reset markers within the scan.</p> </dd> <dd> <p>The component identifiers.</p> </dd> <dd> <p>The format of the quantization table indices. Use one of the following constants, described in <strong>{{IWICJpegFrameDecode}} Constants</strong>.</p> <ul> <li>{{WIC_JPEG_HUFFMAN_BASELINE_ONE}}</li> <li>{{WIC_JPEG_HUFFMAN_BASELINE_THREE}} </li> </ul> </dd> <dd> <p>The start of the spectral selection.</p> </dd> <dd> <p>The end of the spectral selection.</p> </dd> <dd> <p>The successive approximation high.</p> </dd> <dd> <p>The successive approximation low.</p> </dd> <p>Defines raw codec capabilites.</p> <dd> <p>Size of the <strong>{{WICRawCapabilitiesInfo}}</strong> structure.</p> </dd> <dd> <p>The codec's major version.</p> </dd> <dd> <p>The codec's minor version.</p> </dd> <dd> <p>The <strong>{{WICRawCapabilities}}</strong> of exposure compensation support.</p> </dd> <dd> <p>The <strong>{{WICRawCapabilities}}</strong> of contrast support.</p> </dd> <dd> <p>The <strong>{{WICRawCapabilities}}</strong> of {{RGB}} white point support.</p> </dd> <dd> <p>The <strong>{{WICRawCapabilities}}</strong> of <strong>{{WICNamedWhitePoint}}</strong> support.</p> </dd> <dd> <p>The <strong>{{WICNamedWhitePoint}}</strong> mask.</p> </dd> <dd> <p>The <strong>{{WICRawCapabilities}}</strong> of kelvin white point support.</p> </dd> <dd> <p>The <strong>{{WICRawCapabilities}}</strong> of gamma support.</p> </dd> <dd> <p>The <strong>{{WICRawCapabilities}}</strong> of tint support.</p> </dd> <dd> <p>The <strong>{{WICRawCapabilities}}</strong> of saturation support.</p> </dd> <dd> <p>The <strong>{{WICRawCapabilities}}</strong> of sharpness support.</p> </dd> <dd> <p>The <strong>{{WICRawCapabilities}}</strong> of noise reduction support.</p> </dd> <dd> <p>The <strong>{{WICRawCapabilities}}</strong> of destination color profile support.</p> </dd> <dd> <p>The <strong>{{WICRawCapabilities}}</strong> of tone curve support.</p> </dd> <dd> <p>The <strong>{{WICRawRotationCapabilities}}</strong> of rotation support.</p> </dd> <dd> <p>The <strong>{{WICRawCapabilities}}</strong> of <strong>{{WICRawRenderMode}}</strong> support.</p> </dd> <p>Represents a raw image tone curve point.</p> <dd> <p>The tone curve input.</p> </dd> <dd> <p>The tone curve output.</p> </dd> <p>Represents a raw image tone curve.</p> <dd> <p>The number of tone curve points.</p> </dd> <dd> <p>The array of tone curve points.</p> </dd> <p>Specifies the {{DDS}} image dimension, <strong>{{DXGI_FORMAT}}</strong> and alpha mode of contained data.</p> <p>Specifies the <strong>{{DXGI_FORMAT}}</strong> and block information of a {{DDS}} format.</p> <p>Defines methods that add the concept of writeability and static in-memory representations of bitmaps to <strong>{{IWICBitmapSource}}</strong>. </p> <p><strong>{{IWICBitmap}}</strong> inherits from <strong>{{IWICBitmapSource}}</strong> and therefore also inherits the <strong>CopyPixels</strong> method. When pixels need to be moved to a new memory location, <strong>CopyPixels</strong> is often the most efficient. </p><p> Because of to the internal memory representation implied by the <strong>{{IWICBitmap}}</strong>, in-place modification and processing using the <strong>Lock</strong> is more efficient than <strong>CopyPixels</strong>, usually reducing to a simple reference access directly into the memory owned by the bitmap rather than a as a copy. This is contrasted to procedural bitmaps which implement only <strong>CopyPixels</strong> because there is no internal memory representation and one would need to be created on demand to satisfy a call to <strong>Lock</strong>. </p> <p>Provides access to a rectangular area of the bitmap.</p> <p>Locks are exclusive for writing but can be shared for reading. You cannot call <strong>CopyPixels</strong> while the <strong>{{IWICBitmap}}</strong> is locked for writing. Doing so will return an error, since locks are exclusive.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The rectangle to be accessed.</p> </dd> <dd> <p>The access mode you wish to obtain for the lock. This is a bitwise combination of <strong>{{WICBitmapLockFlags}}</strong> for read, write, or read and write access.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{WICBitmapLockRead}}</strong></dt> </dl> </td><td> <p>The read access lock.</p> </td></tr> <tr><td><dl> <dt><strong>{{WICBitmapLockWrite}}</strong></dt> </dl> </td><td> <p>The write access lock.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A reference that receives the locked memory location.</p> </dd> <p>Provides access for palette modifications.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The palette to use for conversion.</p> </dd> <p>Changes the physical resolution of the image.</p> <p> This method has no effect on the actual pixels or samples stored in the bitmap. Instead the interpretation of the sampling rate is modified. This means that a 96 {{DPI}} image which is 96 pixels wide is one inch. If the physical resolution is modified to 48 {{DPI}}, then the bitmap is considered to be 2 inches wide but has the same number of pixels. If the resolution is less than <strong>{{REAL_EPSILON}}</strong> (1.192092896e-07F) the error code <strong>{{WINCODEC_ERR_INVALIDPARAMETER}}</strong> is returned.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The horizontal resolution.</p> </dd> <dd> <p>The vertical resolution.</p> </dd> <p>Exposes methods that refers to a source from which pixels are retrieved, but cannot be written back to.</p> <p>This interface provides a common way of accessing and linking together bitmaps, decoders, format converters, and scalers. Components that implement this interface can be connected together in a graph to pull imaging data through.</p><p>This interface defines only the notion of readability or being able to produce pixels. Modifying or writing to a bitmap is considered to be a specialization specific to bitmaps which have storage and is defined in the descendant interface <strong>{{IWICBitmap}}</strong>.</p> <p>Retrieves the pixel width and height of the bitmap.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the pixel width of the bitmap.</p> </dd> <dd> <p>A reference that receives the pixel height of the bitmap</p> </dd> <p>Retrieves the pixel format of the bitmap source.. </p> <p> The pixel format returned by this method is not necessarily the pixel format the image is stored as. The codec may perform a format conversion from the storage pixel format to an output pixel format. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the pixel format {{GUID}} the bitmap is stored in. For a list of available pixel formats, see the Native Pixel Formats topic.</p> </dd> <p>Specifies the viewport/stencil and render target associated with a view instance.</p> <p>The values specified in a view instance location structure can be added to ViewportArrayIndex and RenderTargetArrayIndex values output by the shader prior to rasterization to compute the final effective index of the viewport and render target to send primitives to. If a computed index is out of range (that is, when the index is larger than the number of viewport or render target elements in their respective arrays) then the effective index becomes 0.</p><p>For shaders that dynamically select the viewport or render target indices, an application can set all the view instance locations declared in a {{PSO}} to the same value to act as a uniform base value for all views.</p> <dd> <p> The index of the viewport in the viewports array to be used by the view instance associated with this location. </p> </dd> <dd> <p> The index of the render target in the render targets array to be used by the view instance associated with this location. </p> </dd> <p>Retrieves the sampling rate between pixels and physical world measurements.</p> <p> Some formats, such as {{GIF}} and {{ICO}}, do not have full {{DPI}} support. For {{GIF}}, this method calculates the {{DPI}} values from the aspect ratio, using a base {{DPI}} of (96.0, 96.0). The {{ICO}} format does not support {{DPI}} at all, and the method always returns (96.0,96.0) for {{ICO}} images. </p><p> Additionally, {{WIC}} itself does not transform images based on the {{DPI}} values in an image. It is up to the caller to transform an image based on the resolution returned. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the x-axis dpi resolution.</p> </dd> <dd> <p>A reference that receives the y-axis dpi resolution.</p> </dd> <p>Retrieves the color table for indexed pixel formats.</p> <p> If the <strong>{{IWICBitmapSource}}</strong> is an <strong>{{IWICBitmapFrameDecode}}</strong>, the function may return the image's global palette if a frame-level palette is not available. The global palette may also be retrieved using the <strong>CopyPalette</strong> method. </p> <p>Returns one of the following values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{WINCODEC_ERR_PALETTEUNAVAILABLE}}</strong></dt> </dl> </td><td> <p>The palette was unavailable.</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The palette was successfully copied.</p> </td></tr> </table><p>?</p> <dd> <p>An <strong>{{IWICPalette}}</strong>. A palette can be created using the <strong>CreatePalette</strong> method.</p> </dd> <p>Instructs the object to produce pixels.</p> <p><strong>CopyPixels</strong> is one of the two main image processing routines (the other being <strong>Lock</strong>) triggering the actual processing. It instructs the object to produce pixels according to its algorithm - this may involve decoding a portion of a {{JPEG}} stored on disk, copying a block of memory, or even analytically computing a complex gradient. The algorithm is completely dependent on the object implementing the interface. </p><p> The caller can restrict the operation to a rectangle of interest ({{ROI}}) using the prc parameter. The {{ROI}} sub-rectangle must be fully contained in the bounds of the bitmap. Specifying a <strong>{{NULL}}</strong> {{ROI}} implies that the whole bitmap should be returned. </p><p> The caller controls the memory management and must provide an output buffer (<em>pbBuffer</em>) for the results of the copy along with the buffer's bounds (<em>cbBufferSize</em>). The cbStride parameter defines the count of bytes between two vertically adjacent pixels in the output buffer. The caller must ensure that there is sufficient buffer to complete the call based on the width, height and pixel format of the bitmap and the sub-rectangle provided to the copy method. </p><p> If the caller needs to perform numerous copies of an expensive <strong>{{IWICBitmapSource}}</strong> such as a {{JPEG}}, it is recommended to create an in-memory <strong>{{IWICBitmap}}</strong> first. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The rectangle to copy. A <strong>{{NULL}}</strong> value specifies the entire bitmap.</p> </dd> <dd> <p>The stride of the bitmap</p> </dd> <dd> <p>The size of the buffer.</p> </dd> <dd> <p>A reference to the buffer.</p> </dd> <p>Exposes methods for accessing and building a color table, primarily for indexed pixel formats.</p> <p>If the <strong>{{WICBitmapPaletteType}}</strong> is not <strong>{{WICBitmapPaletteCustom}}</strong>, then the colors are automatically generated based on the table above. If the user subsequently changes a color palette entry the {{WICBitmapPalette}} is set to Custom by that action.</p><p> <strong>InitializeFromBitmap</strong>'s <em>fAddTransparentColor</em> parameter will add a transparent color to the end of the color collection if its size if less than 256, otherwise index 255 will be replaced with the transparent color. If a pre-defined palette type is used, it will change to BitmapPaletteTypeCustom since it no longer matches the predefined palette.</p><p>The palette interface is an auxiliary imaging interface in that it does not directly concern bitmaps and pixels; rather it provides indexed color translation for indexed bitmaps. For an indexed pixel format with M bits per pixels: (The number of colors in the palette) greater than 2^M.</p><p>Traditionally the basic operation of the palette is to provide a translation from a byte (or smaller) index into a 32bpp color value. This is often accomplished by a 256 entry table of color values.</p> <p>Initializes the palette to one of the pre-defined palettes specified by <strong>{{WICBitmapPaletteType}}</strong> and optionally adds a transparent color.</p> <p>If a transparent color is added to a palette, the palette is no longer predefined and is returned as <strong>{{WICBitmapPaletteTypeCustom}}</strong>. For palettes with less than 256 entries, the transparent entry is added to the end of the palette (that is, a 16-color palette becomes a 17-color palette). For palettes with 256 colors, the transparent palette entry will replace the last entry in the pre-defined palette. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Proxy function for the <strong>InitializeCustom</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Initializes a palette using a computed optimized values based on the reference bitmap.</p> <p> The resulting palette contains the specified number of colors which best represent the colors present in the bitmap. The algorithm operates on the opaque {{RGB}} color value of each pixel in the reference bitmap and hence ignores any alpha values. If a transparent color is required, set the fAddTransparentColor parameter to <strong>{{TRUE}}</strong> and one fewer optimized color will be computed, reducing the <em>colorCount</em>, and a fully transparent color entry will be added. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to the source bitmap.</p> </dd> <dd> <p>The number of colors to initialize the palette with.</p> </dd> <dd> <p>A value to indicate whether to add a transparent color.</p> </dd> <p>Initialize the palette based on a given palette.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to the source palette.</p> </dd> <p>Retrieves the <strong>{{WICBitmapPaletteType}}</strong> that describes the palette. </p> <p><strong>{{WICBitmapPaletteCustom}}</strong> is used for palettes initialized from both <strong>InitializeCustom</strong> and <strong>InitializeFromBitmap</strong>. There is no distinction is made between optimized and custom palettes.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Proxy function for the <strong>GetColorCount</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Fills out the supplied color array with the colors from the internal color table. The color array should be sized according to the return results from <strong>GetColorCount</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Retrieves a value that describes whether the palette is black and white.</p> <p>A palette is considered to be black and white only if it contains exactly two entries, one full black (0xFF000000) and one full white (0xFFFFFFF). </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a boolean value that indicates whether the palette is black and white. <strong>{{TRUE}}</strong> indicates that the palette is black and white; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p>Retrieves a value that describes whether a palette is grayscale.</p> <p>A palette is considered grayscale only if, for every entry, the alpha value is 0xFF and the red, green and blue values match. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a boolean value that indicates whether the palette is grayscale. <strong>{{TRUE}}</strong> indicates that the palette is grayscale; otherwise <strong>{{FALSE}}</strong>.</p> </dd> <p>Proxy function for the <strong>HasAlpha</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Initializes the format converter.</p> <p> If you do not have a predefined palette, you must first create one. Use <strong>InitializeFromBitmap</strong> to create the palette object, then pass it in along with your other parameters. </p><p><em>dither</em>, <em>pIPalette</em>, <em>alphaThresholdPercent</em>, and <em>paletteTranslate</em> are used to mitigate color loss when converting to a reduced bit-depth format. For conversions that do not need these settings, the following parameters values should be used: <em>dither</em> set to <strong>{{WICBitmapDitherTypeNone}}</strong>, <em>pIPalette</em> set to <strong>{{NULL}}</strong>, <em>alphaThresholdPercent</em> set to <strong>0.0f</strong>, and <em>paletteTranslate</em> set to <strong>{{WICBitmapPaletteTypeCustom}}</strong>. </p><p> The basic algorithm involved when using an ordered dither requires a fixed palette, found in the <strong>{{WICBitmapPaletteType}}</strong> enumeration, in a specific order. Often, the actual palette provided for the output may have a different ordering or some slight variation in the actual colors. This is the case when using the Microsoft?Windows palette which has slight differences among versions of Windows. To provide for this, a palette and a palette translation are given to the format converter. The <em>pIPalette</em> is the actual destination palette to be used and the <em>paletteTranslate</em> is a fixed palette. Once the conversion is complete, the colors are mapped from the fixed palette to the actual colors in <em>pIPalette</em> using a nearest color matching algorithm. </p><p> If colors in <em>pIPalette</em> do not closely match those in <em>paletteTranslate</em>, the mapping may produce undesireable results. </p><p><strong>{{WICBitmapDitherTypeOrdered4x4}}</strong> can be useful in format conversions from 8-bit formats to 5- or 6-bit formats as there is no way to accurately convert color data. </p><p><strong>{{WICBitmapDitherTypeErrorDiffusion}}</strong> selects the error diffusion algorithm and may be used with any palette. If an arbitrary palette is provided, <strong>{{WICBitmapPaletteCustom}}</strong> should be passed in as the <em>paletteTranslate</em>. Error diffusion often provides superior results compared to the ordered dithering algorithms especially when combined with the optimized palette generation functionality on the <strong>{{IWICPalette}}</strong>. </p><p> When converting a bitmap which has an alpha channel, such as a Portable Network Graphics ({{PNG}}), to 8bpp, the alpha channel is normally ignored. Any pixels which were transparent in the original bitmap show up as black in the final output because both transparent and black have pixel values of zero in the respective formats. </p><p> Some 8bpp content can contains an alpha color; for instance, the Graphics Interchange Format ({{GIF}}) format allows for a single palette entry to be used as a transparent color. For this type of content, <em>alphaThresholdPercent</em> specifies what percentage of transparency should map to the transparent color. Because the alpha value is directly proportional to the opacity (not transparency) of a pixel, the <em>alphaThresholdPercent</em> indicates what level of opacity is mapped to the fully transparent color. For instance, 9.8% implies that any pixel with an alpha value of less than 25 will be mapped to the transparent color. A value of 100% maps all pixels which are not fully opaque to the transparent color. Note that the palette should provide a transparent color. If it does not, the 'transparent' color will be the one closest to zero - often black. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The input bitmap to convert</p> </dd> <dd> <p>The destination pixel format {{GUID}}.</p> </dd> <dd> <p>The <strong>{{WICBitmapDitherType}}</strong> used for conversion.</p> </dd> <dd> <p>The palette to use for conversion.</p> </dd> <dd> <p>The alpha threshold to use for conversion.</p> </dd> <dd> <p>The palette translation type to use for conversion.</p> </dd> <p>Initializes the format converter.</p> <p> If you do not have a predefined palette, you must first create one. Use <strong>InitializeFromBitmap</strong> to create the palette object, then pass it in along with your other parameters. </p><p><em>dither</em>, <em>pIPalette</em>, <em>alphaThresholdPercent</em>, and <em>paletteTranslate</em> are used to mitigate color loss when converting to a reduced bit-depth format. For conversions that do not need these settings, the following parameters values should be used: <em>dither</em> set to <strong>{{WICBitmapDitherTypeNone}}</strong>, <em>pIPalette</em> set to <strong>{{NULL}}</strong>, <em>alphaThresholdPercent</em> set to <strong>0.0f</strong>, and <em>paletteTranslate</em> set to <strong>{{WICBitmapPaletteTypeCustom}}</strong>. </p><p> The basic algorithm involved when using an ordered dither requires a fixed palette, found in the <strong>{{WICBitmapPaletteType}}</strong> enumeration, in a specific order. Often, the actual palette provided for the output may have a different ordering or some slight variation in the actual colors. This is the case when using the Microsoft?Windows palette which has slight differences among versions of Windows. To provide for this, a palette and a palette translation are given to the format converter. The <em>pIPalette</em> is the actual destination palette to be used and the <em>paletteTranslate</em> is a fixed palette. Once the conversion is complete, the colors are mapped from the fixed palette to the actual colors in <em>pIPalette</em> using a nearest color matching algorithm. </p><p> If colors in <em>pIPalette</em> do not closely match those in <em>paletteTranslate</em>, the mapping may produce undesireable results. </p><p><strong>{{WICBitmapDitherTypeOrdered4x4}}</strong> can be useful in format conversions from 8-bit formats to 5- or 6-bit formats as there is no way to accurately convert color data. </p><p><strong>{{WICBitmapDitherTypeErrorDiffusion}}</strong> selects the error diffusion algorithm and may be used with any palette. If an arbitrary palette is provided, <strong>{{WICBitmapPaletteCustom}}</strong> should be passed in as the <em>paletteTranslate</em>. Error diffusion often provides superior results compared to the ordered dithering algorithms especially when combined with the optimized palette generation functionality on the <strong>{{IWICPalette}}</strong>. </p><p> When converting a bitmap which has an alpha channel, such as a Portable Network Graphics ({{PNG}}), to 8bpp, the alpha channel is normally ignored. Any pixels which were transparent in the original bitmap show up as black in the final output because both transparent and black have pixel values of zero in the respective formats. </p><p> Some 8bpp content can contains an alpha color; for instance, the Graphics Interchange Format ({{GIF}}) format allows for a single palette entry to be used as a transparent color. For this type of content, <em>alphaThresholdPercent</em> specifies what percentage of transparency should map to the transparent color. Because the alpha value is directly proportional to the opacity (not transparency) of a pixel, the <em>alphaThresholdPercent</em> indicates what level of opacity is mapped to the fully transparent color. For instance, 9.8% implies that any pixel with an alpha value of less than 25 will be mapped to the transparent color. A value of 100% maps all pixels which are not fully opaque to the transparent color. Note that the palette should provide a transparent color. If it does not, the 'transparent' color will be the one closest to zero - often black. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The input bitmap to convert</p> </dd> <dd> <p>The destination pixel format {{GUID}}.</p> </dd> <dd> <p>The <strong>{{WICBitmapDitherType}}</strong> used for conversion.</p> </dd> <dd> <p>The palette to use for conversion.</p> </dd> <dd> <p>The alpha threshold to use for conversion.</p> </dd> <dd> <p>The palette translation type to use for conversion.</p> </dd> <p>Determines if the source pixel format can be converted to the destination pixel format.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The source pixel format.</p> </dd> <dd> <p>The destionation pixel format.</p> </dd> <dd> <p>A reference that receives a value indicating whether the source pixel format can be converted to the destination pixel format.</p> </dd> <p>Allows a format converter to be initialized with a planar source. You can use QueryInterface to obtain this interface from the Windows provided implementation of <strong>{{IWICFormatConverter}}</strong>.</p> <p>Initializes a format converter with a planar source, and specifies the interleaved output pixel format.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An array of <strong>{{IWICBitmapSource}}</strong> that represents image planes.</p> </dd> <dd> <p>The number of component planes specified by the planes parameter.</p> </dd> <dd> <p>The destination interleaved pixel format.</p> </dd> <dd> <p>The <strong>{{WICBitmapDitherType}}</strong> used for conversion.</p> </dd> <dd> <p>The palette to use for conversion.</p> </dd> <dd> <p>The alpha threshold to use for conversion.</p> </dd> <dd> <p>The palette translation type to use for conversion.</p> </dd> <p>Query if the format converter can convert from one format to another.</p> <p>To specify an interleaved input pixel format, provide a length 1 array to <em>pSrcPixelFormats</em>.</p> <p>If the conversion is not supported, this method returns {{S_OK}}, but *<em>pfCanConvert</em> is set to {{FALSE}}. </p><p>If this method fails, the out parameter <em>pfCanConvert</em> is invalid.</p> <dd> <p>An array of {{WIC}} pixel formats that represents source image planes.</p> </dd> <dd> <p>The number of source pixel formats specified by the <em>pSrcFormats</em> parameter.</p> </dd> <dd> <p>The destination interleaved pixel format.</p> </dd> <dd> <p>True if the conversion is supported.</p> </dd> <p>Represents a resized version of the input bitmap using a resampling or filtering algorithm.</p> <p>Images can be scaled to larger sizes; however, even with sophisticated scaling algorithms, there is only so much information in the image and artifacts tend to worsen the more you scale up.</p><p> The scaler will reapply the resampling algorithm every time <strong>CopyPixels</strong> is called. If the scaled image is to be animated, the scaled image should be created once and cached in a new bitmap, after which the <strong>{{IWICBitmapScaler}}</strong> may be released. In this way the scaling algorithm - which may be computationally expensive relative to drawing - is performed only once and the result displayed many times. </p><p> The scaler is optimized to use the minimum amount of memory required to scale the image correctly. The scaler may be used to produce parts of the image incrementally (banding) by calling <strong>CopyPixels</strong> with different rectangles representing the output bands of the image. Resampling typically requires overlapping rectangles from the source image and thus may need to request the same pixels from the source bitmap multiple times. Requesting scanlines out-of-order from some image decoders can have a significant performance penalty. Because of this reason, the scaler is optimized to handle consecutive horizontal bands of scanlines (rectangle width equal to the bitmap width). In this case the accumulator from the previous vertically adjacent rectangle is re-used to avoid duplicate scanline requests from the source. This implies that banded output from the scaler may have better performance if the bands are requested sequentially. Of course if the scaler is simply used to produce a single rectangle output, this concern is eliminated because the scaler will internally request scanlines in the correct order. </p> <p>Initializes the bitmap scaler with the provided parameters.</p> <p> <strong>{{IWICBitmapScaler}}</strong> can't be initialized multiple times. For example, when scaling every frame in a multi-frame image, a new <strong>{{IWICBitmapScaler}}</strong> must be created and initialized for each frame.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The input bitmap source.</p> </dd> <dd> <p>The destination width.</p> </dd> <dd> <p>The desination height.</p> </dd> <dd> <p>The <strong>{{WICBitmapInterpolationMode}}</strong> to use when scaling.</p> </dd> <p>Exposes methods that produce a clipped version of the input bitmap for a specified rectangular region of interest.</p> <p>Initializes the bitmap clipper with the provided parameters.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>he input bitmap source.</p> </dd> <dd> <p>The rectangle of the bitmap source to clip.</p> </dd> <p>Exposes methods that produce a flipped (horizontal or vertical) and/or rotated (by 90 degree increments) bitmap source. Rotations are done before the flip.</p> <p>{{IWICBitmapFipRotator}} requests data on a per-pixel basis, while {{WIC}} codecs provide data on a per-scanline basis. This causes the fliprotator object to exhibit n? behavior if there is no buffering. This occures because each pixel in the transformed image requires an entire scanline to be decoded in the file. It is recommended that you buffer the image using <strong>{{IWICBitmap}}</strong>, or flip/rotate the image using Direct2D.</p> <p>Initializes the bitmap flip rotator with the provided parameters.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The input bitmap source.</p> </dd> <dd> <p>The <strong>{{WICBitmapTransformOptions}}</strong> to flip or rotate the image.</p> </dd> <p>Exposes methods that support the <strong>Lock</strong> method.</p> <p>The bitmap lock is simply an abstraction for a rectangular memory window into the bitmap. For the simplest case, a system memory bitmap, this is simply a reference to the top left corner of the rectangle and a stride value.</p><p>To release the exclusive lock set by <strong>Lock</strong> method and the associated <strong>{{IWICBitmapLock}}</strong> object, call {{IUnknown::Release}} on the <strong>{{IWICBitmapLock}}</strong> object.</p> <p>Retrieves the width and height, in pixels, of the locked rectangle.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the width of the locked rectangle.</p> </dd> <dd> <p>A reference that receives the height of the locked rectangle.</p> </dd> <p>Provides access to the {{stride}} value for the memory.</p> <p> Note the {{stride}} value is specific to the <strong>{{IWICBitmapLock}}</strong>, not the bitmap. For example, two consecutive locks on the same rectangle of a bitmap may return different references and stride values, depending on internal implementation. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> </dd> <p>Gets the reference to the top left pixel in the locked rectangle.</p> <p>The reference provided by this method should not be used outside of the lifetime of the lock itself.</p><p><strong>GetDataPointer</strong> is not available in multi-threaded apartment applications.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the size of the buffer.</p> </dd> <dd> <p>A reference that receives a reference to the top left pixel in the locked rectangle.</p> </dd> <p>Gets the pixel format of for the locked area of pixels. This can be used to compute the number of bytes-per-pixel in the locked area.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the pixel format {{GUID}} of the locked area.</p> </dd> <p>Exposes methods for color management.</p> <p>A Color Context is an abstraction for a color profile. The profile can either be loaded from a file (like "sRGB Color Space Profile.icm"), read from a memory buffer, or can be defined by an {{EXIF}} color space. The system color profile directory can be obtained by calling <strong>GetColorDirectory</strong>.</p><p>Once a color context has been initialized, it cannot be re-initialized.</p> <p>Initializes the color context from the given file.</p> <p>Once a color context has been initialized, it can't be re-initialized. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The name of the file.</p> </dd> <p>Initializes the color context from a memory block.</p> <p>Once a color context has been initialized, it can't be re-initialized. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The buffer used to initialize the <strong>{{IWICColorContext}}</strong>.</p> </dd> <dd> <p>The size of the <em>pbBuffer</em> buffer.</p> </dd> <p>Initializes the color context using an Exchangeable Image File ({{EXIF}}) color space.</p> <p>Once a color context has been initialized, it can't be re-initialized. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The value of the {{EXIF}} color space.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong></strong></dt> <dt>1</dt> </dl> </td><td> <p>A sRGB color space.</p> </td></tr> <tr><td><dl> <dt><strong></strong></dt> <dt>2</dt> </dl> </td><td> <p>An Adobe {{RGB}} color space.</p> </td></tr> </table> <p>?</p> </dd> <p>Retrieves the color context type.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the <strong>{{WICColorContextType}}</strong> of the color context.</p> </dd> <p>Retrieves the color context profile.</p> <p>Only use this method if the context type is <strong>{{WICColorContextProfile}}</strong>. </p><p>Calling this method with <em>pbBuffer</em> set to <strong>{{NULL}}</strong> will cause it to return the required buffer size in <em>pcbActual</em>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The size of the <em>pbBuffer</em> buffer.</p> </dd> <dd> <p>A reference that receives the color context profile.</p> </dd> <dd> <p>A reference that receives the actual buffer size needed to retrieve the entire color context profile.</p> </dd> <p>Retrieves the Exchangeable Image File ({{EXIF}}) color space color context.</p> <p>This method should only be used when <strong>{{IWICColorContext::GetType}}</strong> indicates <strong>{{WICColorContextExifColorSpace}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the {{EXIF}} color space color context.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong></strong></dt> <dt>1</dt> </dl> </td><td> <p>A sRGB color space.</p> </td></tr> <tr><td><dl> <dt><strong></strong></dt> <dt>2</dt> </dl> </td><td> <p>An Adobe {{RGB}} color space.</p> </td></tr> <tr><td><dl> <dt><strong></strong></dt> <dt>3 through 65534</dt> </dl> </td><td> <p>Unused.</p> </td></tr> </table> <p>?</p> </dd> <p>Exposes methods that transforms an <strong>{{IWICBitmapSource}}</strong> from one color context to another.</p> <p>A <strong>{{IWICColorTransform}}</strong> is an imaging pipeline component that knows how to pull pixels obtained from a given <strong>{{IWICBitmapSource}}</strong> through a color transform. The color transform is defined by mapping colors from the source color context to the destination color context in a given output pixel format.</p><p>Once initialized, a color transform cannot be reinitialized. Because of this, a color transform cannot be used with multiple sources or varying parameters.</p> <p>Initializes an <strong>{{IWICColorTransform}}</strong> with a <strong>{{IWICBitmapSource}}</strong> and transforms it from one <strong>{{IWICColorContext}}</strong> to another. </p> <p>The currently supported formats for the <em>pIContextSource</em> and <em>pixelFmtDest</em> parameters are: </p><ul> <li>{{GUID_WICPixelFormat8bppGray}}</li> <li>{{GUID_WICPixelFormat16bppGray}}</li> <li>{{GUID_WICPixelFormat16bppBGR555}}</li> <li>{{GUID_WICPixelFormat16bppBGR565}}</li> <li>{{GUID_WICPixelFormat24bppBGR}}</li> <li>{{GUID_WICPixelFormat24bppRGB}}</li> <li>{{GUID_WICPixelFormat32bppBGR}}</li> <li>{{GUID_WICPixelFormat32bppBGRA}}</li> <li>{{GUID_WICPixelFormat32bppPBGRA}}</li> <li>{{GUID_WICPixelFormat32bppPRGBA}} (Windows?8 and later)</li> <li>{{GUID_WICPixelFormat32bppRGBA}}</li> <li>{{GUID_WICPixelFormat32bppBGR101010}}</li> <li>{{GUID_WICPixelFormat32bppCMYK}}</li> <li>{{GUID_WICPixelFormat48bppBGR}}</li> <li>{{GUID_WICPixelFormat64bppBGRA}} (Windows?8 and later)</li> <li> {{GUID_WICPixelFormat64bppPBGRA}} (Windows?8 and later)</li> <li> {{GUID_WICPixelFormat64bppPRGBA}} (Windows?8 and later)</li> <li> {{GUID_WICPixelFormat64bppRGBA}} (Windows?8 and later)</li> </ul><p>In order to get correct behavior from a color transform, the input and output pixel formats must be compatible with the source and destination color profiles. For example, an sRGB destination color profile will produce incorrect results when used with a {{CMYK}} destination pixel format.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Exposes methods used for in-place metadata editing. A fast metadata encoder enables you to add and remove metadata to an image without having to fully re-encode the image.</p> <p> A decoder must be created using the <strong>{{WICDecodeOptions}}</strong> value <strong>{{WICDecodeMetadataCacheOnDemand}}</strong> to perform in-place metadata updates. Using the <strong>{{WICDecodeMetadataCacheOnLoad}}</strong> option causes the decoder to release the file stream necessary to perform the metadata updates. </p><p> Not all metadata formats support fast metadata encoding. The native metadata handlers that support metadata are {{IFD}}, Exif, {{XMP}}, and {{GPS}}. </p><p> If a fast metadata encoder fails, the image will need to be fully re-encoded to add the metadata. </p> <p>Finalizes metadata changes to the image stream.</p> <p>If the commit fails and returns <strong>{{WINCODEC_ERR_STREAMNOTAVAILABLE}}</strong>, ensure that the image decoder was loaded using the <strong>{{WICDecodeMetadataCacheOnDemand}}</strong> option. A fast metadata encoder is not supported when the decoder is created using the <strong>{{WICDecodeMetadataCacheOnLoad}}</strong> option. </p><p>If the commit fails for any reason, you will need to re-encode the image to ensure the new metadata is added to the image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Proxy function for the <strong>GetMetadataQueryWriter</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Represents a Windows Imaging Component ({{WIC}}) stream for referencing imaging and metadata content.</p> <p>Decoders and metadata handlers are expected to create sub streams of whatever stream they hold when handing off control for embedded metadata to another metadata handler. If the stream is not restricted then use {{MAXLONGLONG}} as the max size and offset 0.</p><p> The <strong>{{IWICStream}}</strong> interface methods do not enable you to provide a file sharing option. To create a file stream for an image, use the {{SHCreateStreamOnFileEx}} function. This stream can then be used to create an <strong>{{IWICBitmapDecoder}}</strong> using the <strong>CreateDecoderFromStream</strong> method. </p> <p>Initializes a stream from another stream. Access rights are inherited from the underlying stream.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The initialize stream.</p> </dd> <p>Initializes a stream from a particular file.</p> <p> The <strong>{{IWICStream}}</strong> interface methods do not enable you to provide a file sharing option. To create a shared file stream for an image, use the {{SHCreateStreamOnFileEx}} function. This stream can then be used to create an <strong>{{IWICBitmapDecoder}}</strong> using the <strong>CreateDecoderFromStream</strong> method. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The file used to initialize the stream.</p> </dd> <dd> <p>The desired file access mode.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{GENERIC_READ}}</strong></dt> </dl> </td><td> <p>Read access.</p> </td></tr> <tr><td><dl> <dt><strong>{{GENERIC_WRITE}}</strong></dt> </dl> </td><td> <p>Write access.</p> </td></tr> </table> <p>?</p> </dd> <p>Initializes a stream to treat a block of memory as a stream. The stream cannot grow beyond the buffer size. </p> <p>This method should be avoided whenever possible. The caller is responsible for ensuring the memory block is valid for the lifetime of the stream when using <strong>InitializeFromMemory</strong>. A workaround for this behavior is to create an <strong>{{IStream}}</strong> and use <strong>InitializeFromIStream</strong> to create the <strong>{{IWICStream}}</strong>.</p><p>If you require a growable memory stream, use <strong>CreateStreamOnHGlobal</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to the buffer used to initialize the stream.</p> </dd> <dd> <p>The size of buffer.</p> </dd> <p>Initializes the stream as a substream of another stream.</p> <p>The stream functions with its own stream position, independent of the underlying stream but restricted to a region. All seek positions are relative to the sub region. It is allowed, though not recommended, to have multiple writable sub streams overlapping the same range.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to the input stream.</p> </dd> <dd> <p>The stream offset used to create the new stream.</p> </dd> <dd> <p>The maximum size of the stream.</p> </dd> <p>Exposes methods that provide enumeration services for individual metadata items.</p> <p>Advanced the current position in the enumeration.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The number of items to be retrieved.</p> </dd> <dd> <p>An array of enumerated items. This parameter is optional.</p> </dd> <dd> <p>An array of enumerated items.</p> </dd> <dd> <p>An array of enumerated items. This parameter is optional.</p> </dd> <dd> <p>The number of items that were retrieved. This value is always less than or equal to the number of items requested.</p> </dd> <p>Skips to given number of objects.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The number of objects to skip.</p> </dd> <p>Resets the current position to the beginning of the enumeration.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a copy of the current <strong>{{IWICEnumMetadataItem}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Exposes methods for retrieving metadata blocks and items from a decoder or its image frames using a metadata query expression.</p> <p>A metadata query reader uses metadata query expressions to access embedded metadata. For more information on the metadata query language, see the Metadata Query Language Overview.</p><p>The benefit of the query reader is the ability to access a metadata item in a single step. </p><p>The query reader also provides the way to traverse the whole set of metadata hierarchy with the help of the <strong>GetEnumerator</strong> method. However, it is not recommended to use this method since <strong>{{IWICMetadataBlockReader}}</strong> and <strong>{{IWICMetadataReader}}</strong> provide a more convenient and cheaper way. </p> <p>Gets the metadata query readers container format.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer that receives the cointainer format {{GUID}}.</p> </dd> <p>Retrieves the current path relative to the root metadata block.</p> <p>If you pass <strong>{{NULL}}</strong> to <em>wzNamespace</em>, <strong>GetLocation</strong> ignores <em>cchMaxLength</em> and returns the required buffer length to store the path in the variable that <em>pcchActualLength</em> points to. </p><p>If the query reader is relative to the top of the metadata hierarchy, it will return a single-char string.</p><p>If the query reader is relative to a nested metadata block, this method will return the path to the current query reader.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The length of the <em>wzNamespace</em> buffer.</p> </dd> <dd> <p>Pointer that receives the current namespace location.</p> </dd> <dd> <p>The actual buffer length that was needed to retrieve the current namespace location.</p> </dd> <p>Retrieves the metadata block or item identified by a metadata query expression. </p> <p><strong>GetMetadataByName</strong> uses metadata query expressions to access embedded metadata. For more information on the metadata query language, see the Metadata Query Language Overview.</p><p>If multiple blocks or items exist that are expressed by the same query expression, the first metadata block or item found will be returned.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The query expression to the requested metadata block or item.</p> </dd> <dd> <p>When this method returns, contains the metadata block or item requested.</p> </dd> <p>Gets an enumerator of all metadata items at the current relative location within the metadata hierarchy.</p> <p>The retrieved enumerator only contains query strings for the metadata blocks and items in the current level of the hierarchy. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a reference to the <strong>{{IEnumString}}</strong> interface for the enumerator that contains query strings that can be used in the current <strong>{{IWICMetadataQueryReader}}</strong>. </p> </dd> <p>Exposes methods for setting or removing metadata blocks and items to an encoder or its image frames using a metadata query expression.</p> <p>A metadata query writer uses metadata query expressions to set or remove metadata. For more information on the metadata query language, see the Metadata Query Language Overview.</p> <p>Sets a metadata item to a specific location.</p> <p><strong>SetMetadataByName</strong> uses metadata query expressions to remove metadata. For more information on the metadata query language, see the Metadata Query Language Overview.</p><p> If the value set is a nested metadata block then use variant type <code>{{VT_UNKNOWN}}</code> and <em>pvarValue</em> pointing to the <strong>{{IWICMetadataQueryWriter}}</strong> of the new metadata block. The ordering of metadata items is at the discretion of the query writer since relative locations are not specified. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The name of the metadata item.</p> </dd> <dd> <p>The metadata to set.</p> </dd> <p>Proxy function for the <strong>RemoveMetadataByName</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Defines methods for setting an encoder's properties such as thumbnails, frames, and palettes.</p> <p>There are a number of concrete implemenations of this interface representing each of the standard encoders provided by the platform including bitmap ({{BMP}}), Portable Network Graphics ({{PNG}}), Joint Photographic Experts Group ({{JPEG}}), Graphics Interchange Format ({{GIF}}), Tagged Image File Format ({{TIFF}}), and Microsoft?Windows Digital Photo ({{WDP}}). The following table includes the class identifier ({{CLSID}}) for each native encoder. </p><table> <tr><th>{{CLSID}} Name</th><th>{{CLSID}}</th></tr> <tr><td>{{CLSID_WICBmpEncoder}}</td><td>0x69be8bb4, 0xd66d, 0x47c8, 0x86, 0x5a, 0xed, 0x15, 0x89, 0x43, 0x37, 0x82</td></tr> <tr><td>{{CLSID_WICPngEncoder}}</td><td>0x27949969, 0x876a, 0x41d7, 0x94, 0x47, 0x56, 0x8f, 0x6a, 0x35, 0xa4, 0xdc</td></tr> <tr><td>{{CLSID_WICJpegEncoder}}</td><td>0x1a34f5c1, 0x4a5a, 0x46dc, 0xb6, 0x44, 0x1f, 0x45, 0x67, 0xe7, 0xa6, 0x76</td></tr> <tr><td>{{CLSID_WICGifEncoder}}</td><td>0x114f5598, 0xb22, 0x40a0, 0x86, 0xa1, 0xc8, 0x3e, 0xa4, 0x95, 0xad, 0xbd</td></tr> <tr><td>{{CLSID_WICTiffEncoder}}</td><td>0x0131be10, 0x2001, 0x4c5f, 0xa9, 0xb0, 0xcc, 0x88, 0xfa, 0xb6, 0x4c, 0xe8</td></tr> <tr><td>{{CLSID_WICWmpEncoder}}</td><td>0xac4ce3cb, 0xe1c1, 0x44cd, 0x82, 0x15, 0x5a, 0x16, 0x65, 0x50, 0x9e, 0xc2</td></tr> </table><p>?</p><p>Additionally this interface may be sub-classed to provide support for third party codecs as part of the extensibility model. See the {{AITCodec}} Sample {{CODEC}}.</p> <p>Initializes the encoder with an {{IStream}} which tells the encoder where to encode the bits.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Retrieves the encoder's container format.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the encoder's container format {{GUID}}.</p> </dd> <p>Retrieves an <strong>{{IWICBitmapEncoderInfo}}</strong> for the encoder.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Sets the <strong>{{IWICColorContext}}</strong> objects for the encoder.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Proxy function for the <strong>SetPalette</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Sets the global thumbnail for the image.</p> <p>Returns {{S_OK}} if successful, or an error value otherwise. </p><p>Returns {{WINCODEC_ERR_UNSUPPORTEDOPERATION}} if the feature is not supported by the encoder.</p> <dd> <p>The <strong>{{IWICBitmapSource}}</strong> to set as the global thumbnail.</p> </dd> <p>Sets the global preview for the image.</p> <p>Returns {{S_OK}} if successful, or an error value otherwise. </p><p>Returns {{WINCODEC_ERR_UNSUPPORTEDOPERATION}} if the feature is not supported by the encoder.</p> <dd> <p>The <strong>{{IWICBitmapSource}}</strong> to use as the global preview.</p> </dd> <p>Creates a new <strong>{{IWICBitmapFrameEncode}}</strong> instance.</p> <p>The parameter <em>ppIEncoderOptions</em> can be used to receive an {{IPropertyBag2}} that can then be used to specify encoder options. This is done by passing a reference to a <strong>{{NULL}}</strong> {{IPropertyBag2}} reference in <em>ppIEncoderOptions</em>. The returned {{IPropertyBag2}} is initialized with all encoder options that are available for the given format, at their default values. To specify non-default encoding behavior, set the needed encoder options on the {{IPropertyBag2}} and pass it to <strong>{{IWICBitmapFrameEncode::Initialize}}</strong>.</p><strong>Note</strong>??Do not pass in a reference to an initialized {{IPropertyBag2}}. The reference will be overwritten, and the original {{IPropertyBag2}} will not be freed.?<p>Otherwise, you can pass <strong>{{NULL}}</strong> in <em>ppIEncoderOptions</em> if you do not intend to specify encoder options.</p><p>See Encoding Overview for an example of how to set encoder options.</p><p>For formats that support encoding multiple frames (for example, {{TIFF}}, {{JPEG}}-{{XR}}), you can work on only one frame at a time. This means that you must call <strong>{{IWICBitmapFrameEncode::Commit}}</strong> before you call <strong>CreateNewFrame</strong> again. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Commits all changes for the image and closes the stream.</p> <p>To finalize an image, both the frame <strong>Commit</strong> and the encoder <strong>Commit</strong> must be called. However, only call the encoder <strong>Commit</strong> method after all frames have been committed.</p><p>After the encoder has been committed, it can't be re-initialized or reused with another stream. A new encoder interface must be created, for example, with <strong>{{IWICImagingFactory::CreateEncoder}}</strong>. </p><p>For the encoder <strong>Commit</strong> to succeed, you must at a minimum call <strong>{{IWICBitmapEncoder::Initialize}}</strong> and either <strong>{{IWICBitmapFrameEncode::WriteSource}}</strong> or <strong>{{IWICBitmapFrameEncode::WritePixels}}</strong>. </p><p> <strong>{{IWICBitmapFrameEncode::WriteSource}}</strong> specifies all parameters needed to encode the image data. <strong>{{IWICBitmapFrameEncode::WritePixels}}</strong> requires that you also call <strong>{{IWICBitmapFrameEncode::SetSize}}</strong>, <strong>{{IWICBitmapFrameEncode::SetPixelFormat}}</strong>, and <strong>{{IWICBitmapFrameEncode::SetPalette}}</strong> (if the pixel format is indexed). </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Proxy function for the <strong>GetMetadataQueryWriter</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Represents an encoder's individual image frames.</p> <p>Initializes the frame encoder using the given properties.</p> <p>If you don't want any encoding options, pass <strong>{{NULL}}</strong> for <em>pIEncoderOptions</em>. Otherwise, pass the {{IPropertyBag2}} that was provided by <strong>{{IWICBitmapEncoder::CreateNewFrame}}</strong> with updated values. </p><p>For a complete list of encoding options supported by the Windows-provided codecs, see Native {{WIC}} Codecs. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The set of properties to use for <strong>{{IWICBitmapFrameEncode}}</strong> initialization.</p> </dd> <p>Sets the output image dimensions for the frame.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The width of the output image.</p> </dd> <dd> <p>The height of the output image.</p> </dd> <p>Sets the physical resolution of the output image.</p> <p>Windows Imaging Component ({{WIC}}) doesn't perform any special processing as a result of {{DPI}} resolution values. For example, data returned from <strong>{{IWICBitmapSource::CopyPixels}}</strong> isn't scaled by the {{DPI}}. The app must handle {{DPI}} resolution. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The horizontal resolution value.</p> </dd> <dd> <p>The vertical resolution value.</p> </dd> <p>Requests that the encoder use the specified pixel format.</p> <p>The encoder might not support the requested pixel format. If not, <strong>SetPixelFormat</strong> returns the closest match in the memory block that <em>pPixelFormat</em> points to. If the returned pixel format doesn't match the requested format, you must use an <strong>{{IWICFormatConverter}}</strong> object to convert the pixel data.</p> <p>Possible return values include the following.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{WINCODEC_ERR_WRONGSTATE}}</strong></dt> </dl> </td><td> <p>The <strong>{{IWICBitmapFrameEncode::Initialize}}</strong> method was not called.</p> </td></tr> </table><p>?</p> <dd> <p>On input, the requested pixel format {{GUID}}. On output, the closest pixel format {{GUID}} supported by the encoder; this may be different than the requested format. For a list of pixel format {{GUIDs}}, see Native Pixel Formats.</p> </dd> <p>Proxy function for the <strong>SetColorContexts</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Sets the <strong>{{IWICPalette}}</strong> for indexed pixel formats.</p> <p>This method doesn't fail if called on a frame whose pixel format is set to a non-indexed pixel format. If the target pixel format is a non-indexed format, the palette will be ignored.</p><p>If you already called <strong>{{IWICBitmapEncoder::SetPalette}}</strong> to set a global palette, this method overrides that palette for the current frame.</p><p>The palette must be specified before your first call to <strong>WritePixels</strong>/<strong>WriteSource</strong>. Doing so will cause <strong>WriteSource</strong> to use the specified palette when converting the source image to the encoder pixel format. If no palette is specified, a palette will be generated on the first call to <strong>WriteSource</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Proxy function for the <strong>SetThumbnail</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Copies scan-line data from a caller-supplied buffer to the <strong>{{IWICBitmapFrameEncode}}</strong> object. </p> <p>Successive <strong>WritePixels</strong> calls are assumed to be sequential scan-line access in the output image.</p> <p>Possible return values include the following.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{WINCODEC_ERR_CODECTOOMANYSCANLINES}}</strong></dt> </dl> </td><td> <p>The value of <em>lineCount</em> is larger than the number of scan lines in the image.</p> </td></tr> </table><p>?</p> <p>Encodes a bitmap source.</p> <p>If <strong>SetSize</strong> is not called prior to calling <strong>WriteSource</strong>, the size given in <em>prc</em> is used if not <strong>{{NULL}}</strong>. Otherwise, the size of the <strong>{{IWICBitmapSource}}</strong> given in <em>pIBitmapSource</em> is used. </p><p>If <strong>SetPixelFormat</strong> is not called prior to calling <strong>WriteSource</strong>, the pixel format of the <strong>{{IWICBitmapSource}}</strong> given in <em>pIBitmapSource</em> is used.</p><p>If <strong>SetResolution</strong> is not called prior to calling <strong>WriteSource</strong>, the pixel format of <em>pIBitmapSource</em> is used.</p><p>If <strong>SetPalette</strong> is not called prior to calling <strong>WriteSource</strong>, the target pixel format is indexed, and the pixel format of <em>pIBitmapSource</em> matches the encoder frame's pixel format, then the <em>pIBitmapSource</em> pixel format is used.</p><p>When encoding a {{GIF}} image, if the global palette is set and the frame level palette is not set directly by the user or by a custom independent software vendor ({{ISV}}) {{GIF}} codec, <strong>WriteSource</strong> will use the global palette to encode the frame even when <em>pIBitmapSource</em> has a frame level palette.</p><p>Starting with Windows?Vista, repeated <strong>WriteSource</strong> calls can be made as long as the total accumulated source rect height is the same as set through <strong>SetSize</strong>.</p><p>Starting with Windows?8.1, the source rect must be at least the dimensions set through <strong>SetSize</strong>. If the source rect width exceeds the <strong>SetSize</strong> width, extra pixels on the right side are ignored. If the source rect height exceeds the remaining unfilled height, extra scan lines on the bottom are ignored. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The bitmap source to encode.</p> </dd> <dd> <p>The size rectangle of the bitmap source.</p> </dd> <p>Commits the frame to the image.</p> <p>After the frame <strong>Commit</strong> has been called, you can't use or reinitialize the <strong>{{IWICBitmapFrameEncode}}</strong> object and any objects created from it. </p><p>To finalize the image, both the frame <strong>Commit</strong> and the encoder <strong>Commit</strong> must be called. However, only call the encoder <strong>Commit</strong> method after all frames have been committed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets the metadata query writer for the encoder frame.</p> <p>If you are setting metadata on the frame, you must do this before you use <strong>{{IWICBitmapFrameEncode::WritePixels}}</strong> or <strong>{{IWICBitmapFrameEncode::WriteSource}}</strong> to write any image pixels to the frame</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains a reference to metadata query writer for the encoder frame.</p> </dd> <p>Allows planar component image pixels to be written to an encoder. When supported by the encoder, this allows an application to encode planar component image data without first converting to an interleaved pixel format.</p><p>You can use QueryInterface to obtain this interface from the Windows provided implementation of <strong>{{IWICBitmapFrameEncode}}</strong> for the {{JPEG}} encoder. </p> <p>Encoding {{YCbCr}} data using <strong>{{IWICPlanarBitmapFrameEncode}}</strong> is similar but not identical to encoding interleaved data using {{IWICBitmapFrameEncode}}. The planar interface only exposes the ability to write planar frame image data, and you should continue to use the frame encode interface to set metadata or a thumbnail and to commit at the end of the operation. </p> <p>Writes lines from the source planes to the encoded format.</p> <p>Successive <strong>WritePixels</strong> calls are assumed sequentially add scanlines to the output image. <strong>{{IWICBitmapFrameEncode::Initialize}}</strong>, <strong>{{IWICBitmapFrameEncode::SetSize}}</strong> and <strong>{{IWICBitmapFrameEncode::SetPixelFormat}}</strong> must be called before this method or it will fail.</p><p>The interleaved pixel format set via <strong>{{IWICBitmapFrameEncode::SetPixelFormat}}</strong> and the codec specific encode parameters determine the supported planar formats. </p><p>{{WIC}} {{JPEG}} Encoder: QueryInterface can be used to obtain this interface from the {{WIC}} {{JPEG}} <strong>{{IWICBitmapFrameEncode}}</strong> implementation. When using this method to encode Y?CbCr data with the {{WIC}} {{JPEG}} encoder, chroma subsampling can be configured with encoder options during frame creation. See the Encoding Overview and <strong>{{IWICBitmapEncoder::CreateNewFrame}}</strong> for more details. </p><p>Depending upon the configured chroma subsampling, the lineCount parameter has the following restrictions: </p><table> <tr><th>Chroma Subsampling</th><th>Line Count Restriction</th><th>Chroma Plane Width</th><th>Chroma Plane Height</th></tr> <tr><td>4:2:0</td><td>Multiple of 2, unless the call covers the last scanline of the image</td><td>lumaWidth / 2 Rounded up to the nearest integer.</td><td>lumaHeight / 2 Rounded up to the nearest integer.</td></tr> <tr><td>4:2:2</td><td>Any</td><td>lumaWidth / 2 Rounded up to the nearest integer.</td><td>Any</td></tr> <tr><td>4:4:4</td><td>Any</td><td>Any</td><td>Any</td></tr> <tr><td>4:4:0</td><td>Multiple of 2, unless the call covers the last scanline of the image</td><td>Any</td><td>llumaHeight / 2 Rounded up to the nearest integer.</td></tr> </table><p>?</p><p>The full scanline width must be encoded, and the width of the bitmap sources must match their planar configuration.</p><p>Additionally, if a pixel format is set via <strong>{{IWICBitmapFrameEncode::SetPixelFormat}}</strong>, it must be {{GUID_WICPixelFormat24bppBGR}}. </p><p>The supported pixel formats of the bitmap sources passed into this method are as follows: </p><table> <tr><th>Plane Count</th><th>Plane 1</th><th>Plane 2</th><th>Plane 3</th></tr> <tr><td>3</td><td>{{GUID_WICPixelFormat8bppY}}</td><td>{{GUID_WICPixelFormat8bppCb}}</td><td>{{GUID_WICPixelFormat8bppCr}}</td></tr> <tr><td>2</td><td>{{GUID_WICPixelFormat8bppY}}</td><td>{{GUID_WICPixelFormat16bppCbCr}}</td><td>N/A</td></tr> </table><p>?</p> <p>If the planes and source rectangle do not meet the requirements, this method fails with <strong>{{WINCODEC_ERR_IMAGESIZEOUTOFRANGE}}</strong>. If the <strong>{{IWICBitmapSource}}</strong> format does not meet the encoder requirements, this method fails with <strong>{{WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT}}</strong>. </p> <dd> <p>The number of lines to encode. See the Remarks section for {{WIC}} Jpeg specific line count restrictions.</p> </dd> <dd> <p>Specifies the source buffers for each component plane encoded. </p> </dd> <dd> <p>The number of component planes specified by the <em>pPlanes</em> parameter.</p> </dd> <p>Writes lines from the source planes to the encoded format.</p> <p>Successive <strong>WriteSource</strong> calls are assumed sequentially add scanlines to the output image. <strong>{{IWICBitmapFrameEncode::Initialize}}</strong>, <strong>{{IWICBitmapFrameEncode::SetSize}}</strong> and <strong>{{IWICBitmapFrameEncode::SetPixelFormat}}</strong> must be called before this method or it will fail.</p><p>The interleaved pixel format set via <strong>{{IWICBitmapFrameEncode::SetPixelFormat}}</strong> and the codec specific encode parameters determine the supported planar formats. </p><p>{{WIC}} {{JPEG}} Encoder: QueryInterface can be used to obtain this interface from the {{WIC}} {{JPEG}} <strong>{{IWICBitmapFrameEncode}}</strong> implementation. When using this method to encode Y?CbCr data with the {{WIC}} {{JPEG}} encoder, chroma subsampling can be configured with encoder options during frame creation. See the Encoding Overview and <strong>{{IWICBitmapEncoder::CreateNewFrame}}</strong> for more details. </p><p>Depending upon the configured chroma subsampling, the lineCount parameter has the following restrictions: </p><table> <tr><th>Chroma Subsampling</th><th>X Coordinate</th><th>Y Coordinate</th><th>Chroma Width</th><th>Chroma Height</th></tr> <tr><td>4:2:0</td><td>Multiple of 2</td><td>Multiple of 2</td><td>lumaWidth / 2 Rounded up to the nearest integer.</td><td>lumaHeight / 2 Rounded up to the nearest integer.</td></tr> <tr><td>4:2:2</td><td>Multiple of 2</td><td>Any</td><td>lumaWidth / 2 Rounded up to the nearest integer.</td><td>Any</td></tr> <tr><td>4:4:4</td><td>Any</td><td>Any</td><td>Any</td><td>Any</td></tr> <tr><td>4:4:0</td><td>Any</td><td>Multiple of 2</td><td>lumaWidth</td><td>llumaHeight / 2 Rounded up to the nearest integer.</td></tr> </table><p>?</p><p>The full scanline width must be encoded, and the width of the bitmap sources must match their planar configuration.</p><p>Additionally, if a pixel format is set via <strong>{{IWICBitmapFrameEncode::SetPixelFormat}}</strong>, it must be {{GUID_WICPixelFormat24bppBGR}}. </p><p>The supported pixel formats of the bitmap sources passed into this method are as follows: </p><table> <tr><th>Plane Count</th><th>Plane 1</th><th>Plane 2</th><th>Plane 3</th></tr> <tr><td>3</td><td>{{GUID_WICPixelFormat8bppY}}</td><td>{{GUID_WICPixelFormat8bppCb}}</td><td>{{GUID_WICPixelFormat8bppCr}}</td></tr> <tr><td>2</td><td>{{GUID_WICPixelFormat8bppY}}</td><td>{{GUID_WICPixelFormat16bppCbCr}}</td><td>N/A</td></tr> </table><p>?</p> <p>If the planes and source rectangle do not meet the requirements, this method fails with <strong>{{WINCODEC_ERR_IMAGESIZEOUTOFRANGE}}</strong>. </p><p>If the <strong>{{IWICBitmapSource}}</strong> format does not meet the encoder requirements, this method fails with <strong>{{WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT}}</strong>. </p> <dd> <p>Specifies an array of <strong>{{IWICBitmapSource}}</strong> that represent image planes.</p> </dd> <dd> <p>The number of component planes specified by the planes parameter.</p> </dd> <dd> <p>The source rectangle of pixels to encode from the <strong>{{IWICBitmapSource}}</strong> planes. Null indicates the entire source. The source rect width must match the width set through <strong>SetSize</strong>. Repeated <strong>WriteSource</strong> calls can be made as long as the total accumulated source rect height is the same as set through <strong>SetSize</strong>. </p> </dd> <p>Encodes <strong>{{ID2D1Image}}</strong> interfaces to an <strong>{{IWICBitmapEncoder}}</strong>. The input images can be larger than the maximum device texture size.</p> <p>Encodes the image to the frame given by the <strong>{{IWICBitmapFrameEncode}}</strong>.</p> <p>The image passed in must be created on the same device as in <strong>{{IWICImagingFactory2::CreateImageEncoder}}</strong>. If the <em>pImageParameters</em> are not specified, a set of useful defaults will be assumed, see <strong>{{WICImageParameters}}</strong> for more info. </p><p>You must correctly and independently have set up the {{IWICBitmapFrameEncode}} before calling this {{API}}. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Encodes the image as a thumbnail to the frame given by the <strong>{{IWICBitmapFrameEncode}}</strong>. </p> <p>The image passed in must be created on the same device as in <strong>{{IWICImagingFactory2::CreateImageEncoder}}</strong>. If the <em>pImageParameters</em> are not specified, a set of useful defaults will be assumed, see <strong>{{WICImageParameters}}</strong> for more info. </p><p>You must correctly and independently have set up the <strong>{{IWICBitmapFrameEncode}}</strong> before calling this {{API}}. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Encodes the given image as the thumbnail to the given {{WIC}} bitmap encoder.</p> <p>You must create the image that you pass in on the same device as in <strong>{{IWICImagingFactory2::CreateImageEncoder}}</strong>. If you don't specify additional parameters in the variable that <em>pImageParameters</em> points to, the encoder uses a set of useful defaults. For info about these defaults, see <strong>{{WICImageParameters}}</strong>. </p><p>Before you call <strong>WriteThumbnail</strong>, you must set up the <strong>{{IWICBitmapEncoder}}</strong> interface for the encoder on which you want to set the thumbnail. </p><p>If <strong>WriteThumbnail</strong> fails, it might return {{E_OUTOFMEMORY}}, {{D2DERR_WRONG_RESOURCE_DOMAIN}}, or other error codes from the encoder.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The Direct2D image that will be encoded.</p> </dd> <dd> <p>The encoder on which the thumbnail is set.</p> </dd> <dd> <p>Additional parameters to control encoding.</p> </dd> <p>Exposes methods that represent a decoder.</p><p>The interface provides access to the decoder's properties such as global thumbnails (if supported), frames, and palette. </p> <p>There are a number of concrete implemenations of this interface representing each of the standard decoders provided by the platform including bitmap ({{BMP}}), Portable Network Graphics ({{PNG}}), icon ({{ICO}}), Joint Photographic Experts Group ({{JPEG}}), Graphics Interchange Format ({{GIF}}), Tagged Image File Format ({{TIFF}}), and Microsoft?Windows Digital Photo ({{WDP}}). The following table includes the class identifier ({{CLSID}}) for each native decoder. </p><table> <tr><th>{{CLSID}} Name</th><th>{{CLSID}}</th></tr> <tr><td>{{CLSID_WICBmpDecoder}}</td><td>0x6b462062, 0x7cbf, 0x400d, 0x9f, 0xdb, 0x81, 0x3d, 0xd1, 0xf, 0x27, 0x78</td></tr> <tr><td>{{CLSID_WICPngDecoder}}</td><td>0x389ea17b, 0x5078, 0x4cde, 0xb6, 0xef, 0x25, 0xc1, 0x51, 0x75, 0xc7, 0x51</td></tr> <tr><td>{{CLSID_WICIcoDecoder}}</td><td>0xc61bfcdf, 0x2e0f, 0x4aad, 0xa8, 0xd7, 0xe0, 0x6b, 0xaf, 0xeb, 0xcd, 0xfe</td></tr> <tr><td>{{CLSID_WICJpegDecoder}}</td><td>0x9456a480, 0xe88b, 0x43ea, 0x9e, 0x73, 0xb, 0x2d, 0x9b, 0x71, 0xb1, 0xca</td></tr> <tr><td>{{CLSID_WICGifDecoder}}</td><td>0x381dda3c, 0x9ce9, 0x4834, 0xa2, 0x3e, 0x1f, 0x98, 0xf8, 0xfc, 0x52, 0xbe</td></tr> <tr><td>{{CLSID_WICTiffDecoder}}</td><td>0xb54e85d9, 0xfe23, 0x499f, 0x8b, 0x88, 0x6a, 0xce, 0xa7, 0x13, 0x75, 0x2b</td></tr> <tr><td>{{CLSID_WICWmpDecoder}}</td><td>0xa26cec36, 0x234c, 0x4950, 0xae, 0x16, 0xe3, 0x4a, 0xac, 0xe7, 0x1d, 0x0d</td></tr> </table><p>?</p><p>This interface may be sub-classed to provide support for third party codecs as part of the extensibility model. See the {{AITCodec}} Sample {{CODEC}}.</p><p>Codecs written as {{TIFF}} container formats that are not register will decode as a {{TIFF}} image. Client applications should check for a zero frame count to determine if the codec is valid.</p> <p>Retrieves the capabilities of the decoder based on the specified stream.</p> <p>Custom decoder implementations should save the current position of the specified {{IStream}}, read whatever information is necessary in order to determine which capabilities it can provide for the supplied stream, and restore the stream position.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The stream to retrieve the decoder capabilities from.</p> </dd> <dd> <p>The <strong>{{WICBitmapDecoderCapabilities}}</strong> of the decoder.</p> </dd> <p>Initializes the decoder with the provided stream.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The stream to use for initialization.</p> <p>The stream contains the encoded pixels which are decoded each time the <strong>CopyPixels</strong> method on the <strong>{{IWICBitmapFrameDecode}}</strong> interface (see <strong>GetFrame</strong>) is invoked.</p> </dd> <dd> <p>The <strong>{{WICDecodeOptions}}</strong> to use for initialization.</p> </dd> <p>Retrieves the image's container format.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the image's container format {{GUID}}.</p> </dd> <p>Retrieves an <strong>{{IWICBitmapDecoderInfo}}</strong> for the image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Proxy function for the <strong>CopyPalette</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Proxy function for the <strong>GetMetadataQueryReader</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Retrieves a preview image, if supported.</p> <p>Not all formats support previews. Only the native Microsoft?Windows Digital Photo ({{WDP}}) codec support previews.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the preview bitmap if supported.</p> </dd> <p>Proxy function for the <strong>GetColorContexts</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Proxy function for the <strong>GetThumbnail</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Retrieves the total number of frames in the image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the total number of frames in the image.</p> </dd> <p>Retrieves the specified frame of the image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The particular frame to retrieve.</p> </dd> <dd> <p>A reference that receives a reference to the <strong>{{IWICBitmapFrameDecode}}</strong>.</p> </dd> <p>Copies pixel data using the supplied input parameters.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The rectangle of pixels to copy.</p> </dd> <dd> <p>The width to scale the source bitmap. This parameter must equal the value obtainable through <strong>{{IWICBitmapSourceTransform::GetClosestSize}}</strong>.</p> </dd> <dd> <p>The height to scale the source bitmap. This parameter must equal the value obtainable through <strong>{{IWICBitmapSourceTransform::GetClosestSize}}</strong>.</p> </dd> <dd> <p> The {{GUID}} of desired pixel format in which the pixels should be returned. </p> <p>This {{GUID}} must be a format obtained through an <strong>GetClosestPixelFormat</strong> call.</p> </dd> <dd> <p> The desired rotation or flip to perform prior to the pixel copy. </p> <p>The transform must be an operation supported by an <strong>DoesSupportTransform</strong> call.</p> <p>If a <em>dstTransform</em> is specified, <em>nStride</em> is the <em>transformed stride</em> and is based on the <em>pguidDstFormat</em> pixel format, not the original source's pixel format.</p> </dd> <dd> <p>The {{stride}} of the destination buffer.</p> </dd> <dd> <p>The size of the destination buffer.</p> </dd> <dd> <p>The output buffer.</p> </dd> <p>Returns the closest dimensions the implementation can natively scale to given the desired dimensions.</p> <p>The Windows provided codecs provide the following support for native scaling: </p><ul> <li>{{BMP}}, {{ICO}}, {{GIF}}, {{TIFF:}} No implementation of {{IWICBitmapSourceTransform}}.</li> <li>{{PNG:}} No scaling support.</li> <li>{{JPEG:}} Native down-scaling by a factor of 8, 4, or 2.</li> <li>{{JPEG}}-{{XR:}} Native scaling of the original image by powers of 2. </li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The desired width. A reference that receives the closest supported width.</p> </dd> <dd> <p>The desired height. A reference that receives the closest supported height.</p> </dd> <p>Retrieves the closest pixel format to which the implementation of <strong>{{IWICBitmapSourceTransform}}</strong> can natively copy pixels, given a desired format.</p> <p>The Windows provided codecs provide the following support:</p><ul> <li>{{BMP}}, {{ICO}}, {{GIF}}, {{TIFF:}} No implementation of <strong>{{IWICBitmapSourceTransform}}</strong>.</li> <li>{{JPEG}}, {{PNG}}, {{JPEG}}-{{XR:}} Trivial support (always returns the same value as <strong>{{IWICBitmapFrameDecode::GetPixelFormat}}</strong>).</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Determines whether a specific transform option is supported natively by the implementation of the <strong>{{IWICBitmapSourceTransform}}</strong> interface.</p> <p>The Windows provided codecs provide the following level of support:</p><ul> <li>{{BMP}}, {{ICO}}, {{GIF}}, {{TIFF:}} No implementation of {{IWICBitmapSourceTransform}}.</li> <li>{{JPEG}}, {{PNG:}} Trivial support ({{WICBitmapTransformRotate0}} only).</li> <li>{{JPEG}}-{{XR:}} Support for all transformation/rotations. </li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Provides access to planar Y?CbCr pixel formats where pixel components are stored in separate component planes. This interface also allows access to other codec optimizations for flip/rotate, scale, and format conversion to other Y?CbCr planar formats; this is similar to the pre-existing <strong>{{IWICBitmapSourceTransform}}</strong> interface.</p><p>QueryInterface can be used to obtain this interface from the Windows provided implementations of <strong>{{IWICBitmapFrameDecode}}</strong> for the {{JPEG}} decoder, <strong>{{IWICBitmapScaler}}</strong>, <strong>{{IWICBitmapFlipRotator}}</strong>, and <strong>{{IWICColorTransform}}</strong>.</p> <p>Use this method to determine if a desired planar output is supported and allow the caller to choose an optimized code path if it is. Otherwise, callers should fall back to <strong>{{IWICBitmapSourceTransform}}</strong> or <strong>{{IWICBitmapSource}}</strong> and retrieve interleaved pixels.</p><p> The following transforms can be checked:</p><ul> <li> Determine if the flip/rotate option specified via <strong>{{WICBitmapTransformOptions}}</strong> is supported.</li> <li>Determine if the requested planar pixel format configuration is supported.</li> <li>Determine the closest dimensions the implementation can natively scale to given the desired dimensions. </li> </ul><p>When a transform is supported, this method returns the description of the resulting planes in the <em>pPlaneDescriptions</em> parameter. </p> <p>Check the value of <em>pfIsSupported</em> to determine if the transform is supported via <strong>{{IWICPlanarBitmapSourceTransform::CopyPixels}}</strong>. If this method fails, the output parameters for width, height, and plane descriptions are zero initialized. Other return values indicate failure. </p> <p>Copies pixels into the destination planes. Configured by the supplied input parameters. </p><p>If a <em>dstTransform</em>, scale, or format conversion is specified, <em>cbStride</em> is the transformed stride and is based on the destination pixel format of the <em>pDstPlanes</em> parameter, not the original source's pixel format.</p> <p>{{WIC}} {{JPEG}} Decoder: Depending on the configured chroma subsampling of the image, the source rectangle has the following restrictions: </p><table> <tr><th>Chroma Subsampling</th><th>X Coordinate</th><th>Y Coordinate</th><th>Chroma Width</th><th>Chroma Height</th></tr> <tr><td>4:2:0</td><td>Multiple of 2</td><td>Multiple of 2</td><td>lumaWidth / 2 Rounded up to the nearest integer.</td><td>lumaHeight / 2 Rounded up to the nearest integer.</td></tr> <tr><td>4:2:2</td><td>Multiple of 2</td><td>Any</td><td>lumaWidth / 2 Rounded up to the nearest integer.</td><td>lumaHeight</td></tr> <tr><td>4:4:4</td><td>Any</td><td>Any</td><td>llumaWidth</td><td>llumaHeight</td></tr> <tr><td>4:4:0</td><td>Any</td><td>Multiple of 2</td><td>lumaWidth</td><td>llumaHeight / 2 Rounded up to the nearest integer.</td></tr> </table><p>?</p><p>The <em>pDstPlanes</em> parameter supports the following pixel formats.</p><table> <tr><th>Plane Count</th><th>Plane 1</th><th>Plane 2</th><th>Plane 3</th></tr> <tr><td>3</td><td>{{GUID_WICPixelFormat8bppY}}</td><td>{{GUID_WICPixelFormat8bppCb}}</td><td>{{GUID_WICPixelFormat8bppCr}}</td></tr> <tr><td>2</td><td>{{GUID_WICPixelFormat8bppY}}</td><td>{{GUID_WICPixelFormat16bppCbCr}}</td><td>N/A</td></tr> </table><p>?</p> <p>If the specified scale, flip/rotate, and planar format configuration is not supported this method fails with <strong>{{WINCODEC_ERR_INVALIDPARAMETER}}</strong>. You can check if a transform is supported by calling <strong>{{IWICPlanarBitmapSourceTransform::DoesSupportTransform}}</strong>.</p> <dd> <p>The source rectangle of pixels to copy. </p> </dd> <dd> <p>The width to scale the source bitmap. This parameter must be equal to a value obtainable through <strong>{{IWICPlanarBitmapSourceTransform::}} DoesSupportTransform</strong>.</p> </dd> <dd> <p>The height to scale the source bitmap. This parameter must be equal to a value obtainable through <strong>{{IWICPlanarBitmapSourceTransform::}} DoesSupportTransform</strong>.</p> </dd> <dd> <p>The desired rotation or flip to perform prior to the pixel copy. A rotate can be combined with a flip horizontal or a flip vertical, see <strong>{{WICBitmapTransformOptions}}</strong>.</p> </dd> <dd> <p>Used to specify additional configuration options for the transform. See <strong>{{WICPlanarOptions}}</strong> for more detail.</p> <p>{{WIC}} {{JPEG}} Decoder: <strong>{{WICPlanarOptionsPreserveSubsampling}}</strong> can be specified to retain the subsampling ratios when downscaling. By default, the {{JPEG}} decoder attempts to preserve quality by downscaling only the Y plane in some cases, changing the image to 4:4:4 chroma subsampling. </p> </dd> <dd> <p>Specifies the pixel format and output buffer for each component plane. The number of planes and pixel format of each plane must match values obtainable through <strong>{{IWICPlanarBitmapSourceTransform::DoesSupportTransform}}</strong>.</p> </dd> <dd> <p>The number of component planes specified by the <em>pDstPlanes</em> parameter.</p> </dd> <p>Defines methods for decoding individual image frames of an encoded file.</p> <p>Retrieves a metadata query reader for the frame.</p> <p>For image formats with one frame ({{JPG}}, {{PNG}}, {{JPEG}}-{{XR}}), the frame-level query reader of the first frame is used to access all image metadata, and the decoder-level query reader isn?t used. For formats with more than one frame ({{GIF}}, {{TIFF}}), the frame-level query reader for a given frame is used to access metadata specific to that frame, and in the case of {{GIF}} a decoder-level metadata reader will be present. If the decoder doesn?t support metadata ({{BMP}}, {{ICO}}), this will return {{WINCODEC_ERR_UNSUPPORTEDOPERATION}}. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>When this method returns, contains a reference to the frame's metadata query reader.</p> </dd> <p>Retrieves the <strong>{{IWICColorContext}}</strong> associated with the image frame.</p> <p>If {{NULL}} is passed for <em>ppIColorContexts</em>, and 0 is passed for <em>cCount</em>, this method will return the total number of color contexts in the image in <em>pcActualCount</em>. </p><p>The <em>ppIColorContexts</em> array must be filled with valid data: each <strong>{{IWICColorContext}}*</strong> in the array must have been created using <strong>{{IWICImagingFactory::CreateColorContext}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Retrieves a small preview of the frame, if supported by the codec.</p> <p>Not all formats support thumbnails. Joint Photographic Experts Group ({{JPEG}}), Tagged Image File Format ({{TIFF}}), and Microsoft?Windows Digital Photo ({{WDP}}) support thumbnails.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives a reference to the <strong>{{IWICBitmapSource}}</strong> of the thumbnail.</p> </dd> <p>Exposes methods for obtaining information about and controlling progressive decoding.</p> <p>Images can only be progressively decoded if they were progressively encoded. Progressive images automatically start at the highest (best quality) progressive level. The caller must manually set the decoder to a lower progressive level.</p><p>{{E_NOTIMPL}} is returned if the codec does not support progressive level decoding.</p> <p>Gets the number of levels of progressive decoding supported by the {{CODEC}}.</p> <p>Users should not use this function to iterate through the progressive levels of a progressive {{JPEG}} image. {{JPEG}} progressive levels are determined by the image and do not have a fixed level count. Using this method will force the application to wait for all progressive levels to be downloaded before it can return. Instead, applications should use the following code to iterate through the progressive levels of a progressive {{JPEG}} image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Indicates the number of levels supported by the {{CODEC}}.</p> </dd> <p>Gets the decoder's current progressive level.</p> <p>The level always defaults to the highest progressive level. In order to decode a lower progressive level, <strong>SetCurrentLevel</strong> must first be called.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Indicates the current level specified.</p> </dd> <p>Specifies the level to retrieve on the next call to <strong>CopyPixels</strong>.</p> <p> A call does not have to request every level supported. If a caller requests level 1, without having previously requested level 0, the bits returned by the next call to <strong>CopyPixels</strong> will include both levels. </p><p> If the requested level is invalid, the error returned is {{WINCODEC_ERR_INVALIDPROGRESSIVELEVEL}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p><strong>{{IWICProgressCallback}}</strong> interface is documented only for compliance; its use is not recommended and may be altered or unavailable in the future. Instead, and use <strong>RegisterProgressNotification</strong>. </p> <p><strong>Notify</strong> method is documented only for compliance; its use is not recommended and may be altered or unavailable in the future. Instead, and use <strong>RegisterProgressNotification</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Registers a progress notification callback function.</p> <p>Applications can only register a single callback. Subsequent registration calls will replace the previously registered callback. To unregister a callback, pass in <strong>{{NULL}}</strong> or register a new callback function.</p><p> Progress is reported in an increasing order between 0.0 and 1.0. If <em>dwProgressFlags</em> includes <strong>{{WICProgressNotificationBegin}}</strong>, the callback is guaranteed to be called with progress 0.0. If <em>dwProgressFlags</em> includes <strong>{{WICProgressNotificationEnd}}</strong>, the callback is guaranteed to be called with progress 1.0. </p><p><strong>{{WICProgressNotificationFrequent}}</strong> increases the frequency in which the callback is called. If an operation is expected to take more than 30 seconds, <strong>{{WICProgressNotificationFrequent}}</strong> should be added to <em>dwProgressFlags</em>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A function reference to the application defined progress notification callback function. See <strong>ProgressNotificationCallback</strong> for the callback signature.</p> </dd> <dd> <p>A reference to component data for the callback method.</p> </dd> <dd> <p>The <strong>{{WICProgressOperation}}</strong> and <strong>{{WICProgressNotification}}</strong> flags to use for progress notification.</p> </dd> <p>Exposes methods that provide component information.</p> <p>Retrieves the component's <strong>{{WICComponentType}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Proxy function for the <strong>GetCLSID</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Retrieves the signing status of the component.</p> <p>Signing is unused by {{WIC}}. Therefore, all components {{WICComponentSigned}}.</p><p>This function can be used to determine whether a component has no binary component or has been added to the disabled components list in the registry.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the <strong>{{WICComponentSigning}}</strong> status of the component.</p> </dd> <p>Retrieves the name of component's author.</p> <p>If <em>cchAuthor</em> is 0 and <em>wzAuthor</em> is <strong>{{NULL}}</strong>, the required buffer size is returned in <em>pccchActual</em>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The size of the <em>wzAuthor</em> buffer.</p> </dd> <dd> <p>A reference that receives the name of the component's author. The locale of the string depends on the value that the codec wrote to the registry at install time. For built-in components, these strings are always in English.</p> </dd> <dd> <p>A reference that receives the actual length of the component's authors name. The author name is optional; if an author name is not specified by the component, the length returned is 0.</p> </dd> <p>Retrieves the vendor {{GUID}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the component's vendor {{GUID}}.</p> </dd> <p>Proxy function for the <strong>GetVersion</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Retrieves the component's specification version.</p> <p>All built-in components return "1.0.0.0", except for pixel formats, which do not have a spec version.</p><p>If <em>cchAuthor</em> is 0 and <em>wzAuthor</em> is <strong>{{NULL}}</strong>, the required buffer size is returned in <em>pccchActual</em>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The size of the <em>wzSpecVersion</em> buffer.</p> </dd> <dd> <p>When this method returns, contain a culture invarient string of the component's specification version. The version form is {{NN}}.{{NN}}.{{NN}}.{{NN}}.</p> </dd> <dd> <p>A reference that receives the actual length of the component's specification version. The specification version is optional; if a value is not specified by the component, the length returned is 0.</p> </dd> <p>Retrieves the component's friendly name, which is a human-readable display name for the component.</p> <p>If <em>cchFriendlyName</em> is 0 and <em>wzFriendlyName</em> is <strong>{{NULL}}</strong>, the required buffer size is returned in <em>pccchActual</em>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The size of the <em>wzFriendlyName</em> buffer.</p> </dd> <dd> <p>A reference that receives the friendly name of the component. The locale of the string depends on the value that the codec wrote to the registry at install time. For built-in components, these strings are always in English.</p> </dd> <dd> <p>A reference that receives the actual length of the component's friendly name.</p> </dd> <p>Exposes methods that provide information about a pixel format converter.</p> <p>Retrieves a list of {{GUIDs}} that signify which pixel formats the converter supports.</p> <p>The format converter does not necessarily guarantee symmetricality with respect to conversion; that is, a converter may be able to convert {{FROM}} a particular format without actually being able to convert {{TO}} a particular format. In order to test symmetricality, use <strong>CanConvert</strong>.</p><p>To determine the number of pixel formats a coverter can handle, set <em>cFormats</em> to <code>0</code> and <em>pPixelFormatGUIDs</em> to <code>{{NULL}}</code>. The converter will fill <em>pcActual</em> with the number of formats supported by that converter.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The size of the <em>pPixelFormatGUIDs</em> array.</p> </dd> <dd> <p>Pointer to a {{GUID}} array that receives the pixel formats the converter supports.</p> </dd> <dd> <p>The actual array size needed to retrieve all pixel formats supported by the converter.</p> </dd> <p>Creates a new <strong>{{IWICFormatConverter}}</strong> instance.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Exposes methods that provide information about a particular codec.</p> <p>Proxy function for the <strong>GetContainerFormat</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Retrieves the pixel formats the codec supports.</p> <p> The usage pattern for this method is a two call process. The first call retrieves the array size needed to retrieve all the supported pixel formats by calling it with <em>cFormats</em> set to <code>0</code> and <em>pguidPixelFormats</em> set to <code>{{NULL}}</code>. This call sets <em>pcActual</em> to the array size needed. Once the needed array size is determined, a second <strong>GetPixelFormats</strong> call with <em>pguidPixelFormats</em> set to an array of the appropriate size will retrieve the pixel formats. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The size of the <em>pguidPixelFormats</em> array. Use <code>0</code> on first call to determine the needed array size.</p> </dd> <dd> <p>Receives the supported pixel formats. Use <code>{{NULL}}</code> on first call to determine needed array size.</p> </dd> <dd> <p>The array size needed to retrieve all supported pixel formats.</p> </dd> <p>Retrieves the color manangement version number the codec supports.</p> <p> The usage pattern for this method is a two call process. The first call retrieves the buffer size needed to retrieve the full color management version number by calling it with <em>cchColorManagementVersion</em> set to <code>0</code> and <em>wzColorManagementVersion</em> set to <code>{{NULL}}</code>. This call sets <em>pcchActual</em> to the buffer size needed. Once the needed buffer size is determined, a second <strong>GetColorManagementVersion</strong> call with <em>cchColorManagementVersion</em> set to the buffer size and <em>wzColorManagementVersion</em> set to a buffer of the appropriate size will retrieve the pixel formats. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The size of the version buffer. Use <code>0</code> on first call to determine needed buffer size.</p> </dd> <dd> <p>Receives the color management version number. Use <code>{{NULL}}</code> on first call to determine needed buffer size.</p> </dd> <dd> <p>The actual buffer size needed to retrieve the full color management version number.</p> </dd> <p>Retrieves the name of the device manufacture associated with the codec.</p> <p> The usage pattern for this method is a two call process. The first call retrieves the buffer size needed to retrieve the full color management version number by calling it with <em>cchDeviceManufacturer</em> set to <code>0</code> and <em>wzDeviceManufacturer</em> set to <code>{{NULL}}</code>. This call sets <em>pcchActual</em> to the buffer size needed. Once the needed buffer size is determined, a second <strong>GetDeviceManufacturer</strong> call with <em>cchDeviceManufacturer</em> set to the buffer size and <em>wzDeviceManufacturer</em> set to a buffer of the appropriate size will retrieve the pixel formats. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The size of the device manufacture's name. Use <code>0</code> on first call to determine needed buffer size.</p> </dd> <dd> <p>Receives the device manufacture's name. Use <code>{{NULL}}</code> on first call to determine needed buffer size.</p> </dd> <dd> <p>The actual buffer size needed to retrieve the device manufacture's name.</p> </dd> <p>Retrieves a comma delimited list of device models associated with the codec.</p> <p> The usage pattern for this method is a two call process. The first call retrieves the buffer size needed to retrieve the full color management version number by calling it with <em>cchDeviceModels</em> set to <code>0</code> and <em>wzDeviceModels</em> set to <code>{{NULL}}</code>. This call sets <em>pcchActual</em> to the buffer size needed. Once the needed buffer size is determined, a second <strong>GetDeviceModels</strong> call with <em>cchDeviceModels</em> set to the buffer size and <em>wzDeviceModels</em> set to a buffer of the appropriate size will retrieve the pixel formats. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The size of the device models buffer. Use <code>0</code> on first call to determine needed buffer size.</p> </dd> <dd> <p>Receives a comma delimited list of device model names associated with the codec. Use <code>{{NULL}}</code> on first call to determine needed buffer size.</p> </dd> <dd> <p>The actual buffer size needed to retrieve all of the device model names.</p> </dd> <p>Proxy function for the <strong>GetMimeTypes</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Retrieves a comma delimited list of the file name extensions associated with the codec.</p> <p>The default extension for an image encoder is the first item in the list of returned extensions.</p><p> The usage pattern for this method is a two call process. The first call retrieves the buffer size needed to retrieve the full color management version number by calling it with <em>cchFileExtensions</em> set to <code>0</code> and <em>wzFileExtensions</em> set to <code>{{NULL}}</code>. This call sets <em>pcchActual</em> to the buffer size needed. Once the needed buffer size is determined, a second <strong>GetFileExtensions</strong> call with <em>cchFileExtensions</em> set to the buffer size and <em>wzFileExtensions</em> set to a buffer of the appropriate size will retrieve the pixel formats. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The size of the file name extension buffer. Use <code>0</code> on first call to determine needed buffer size.</p> </dd> <dd> <p>Receives a comma delimited list of file name extensions associated with the codec. Use <code>{{NULL}}</code> on first call to determine needed buffer size.</p> </dd> <dd> <p>The actual buffer size needed to retrieve all file name extensions associated with the codec. </p> </dd> <p>Proxy function for the <strong>DoesSupportAnimation</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Retrieves a value indicating whether the codec supports chromakeys.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives <strong>{{TRUE}}</strong> if the codec supports chromakeys; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p>Retrieves a value indicating whether the codec supports lossless formats.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives <strong>{{TRUE}}</strong> if the codec supports lossless formats; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p>Retrieves a value indicating whether the codec supports multi frame images.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives <strong>{{TRUE}}</strong> if the codec supports multi frame images; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p>Retrieves a value indicating whether the given mime type matches the mime type of the codec.</p> <strong>Note</strong>??The Windows provided codecs do not implement this method and return {{E_NOTIMPL}}.? <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The operation was successful.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p>The codec does not implement this method.</p> </td></tr> </table><p>?</p> <dd> <p>The mime type to compare.</p> </dd> <dd> <p>Receives <strong>{{TRUE}}</strong> if the mime types match; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p>Exposes methods that provide information about an encoder.</p> <p>Creates a new <strong>{{IWICBitmapEncoder}}</strong> instance.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Exposes methods that provide information about a decoder.</p> <p>Retrieves the file pattern signatures supported by the decoder.</p> <p> To retrieve all pattern signatures, this method should first be called with <em>pPatterns</em> set to <code>{{NULL}}</code> to retrieve the actual buffer size needed through <em>pcbPatternsActual</em>. Once the needed buffer size is known, allocate a buffer of the needed size and call <strong>GetPatterns</strong> again with the allocated buffer. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The array size of the <em>pPatterns</em> array.</p> </dd> <dd> <p>Receives a list of <strong>{{WICBitmapPattern}}</strong> objects supported by the decoder.</p> </dd> <dd> <p>Receives the number of patterns the decoder supports.</p> </dd> <dd> <p>Receives the actual buffer size needed to retrieve all pattern signatures supported by the decoder. </p> </dd> <p>Retrieves a value that indicates whether the codec recognizes the pattern within a specified stream.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The stream to pattern match within.</p> </dd> <dd> <p>A reference that receives <strong>{{TRUE}}</strong> if the patterns match; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p>Creates a new <strong>{{IWICBitmapDecoder}}</strong> instance.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Exposes methods that provide information about a pixel format.</p> <p>Gets the pixel format {{GUID}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer that receives the pixel format {{GUID}}.</p> </dd> <p>Gets the pixel format's <strong>{{IWICColorContext}}</strong>.</p> <p>The returned color context is the default color space for the pixel format. However, if an {{IWICBitmapSource}} specifies its own color context, the source's context should be preferred over the pixel format's default. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Proxy function for the <strong>GetBitsPerPixel</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Proxy function for the <strong>GetChannelCount</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets the pixel format's channel mask.</p> <p>If 0 and {{NULL}} are passed in for <em>cbMaskBuffer</em> and <em>pbMaskBuffer</em>, respectively, the required buffer size will be returned through <em>pcbActual</em>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The index to the channel mask to retrieve.</p> </dd> <dd> <p>The size of the <em>pbMaskBuffer</em> buffer.</p> </dd> <dd> <p>Pointer to the mask buffer.</p> </dd> <dd> <p>The actual buffer size needed to obtain the channel mask.</p> </dd> <p>Extends <strong>{{IWICPixelFormatInfo}}</strong> by providing additional information about a pixel format.</p> <p>Returns whether the format supports transparent pixels.</p> <p> An indexed pixel format will not return <strong>{{TRUE}}</strong> even though it may have some transparency support. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Returns <strong>{{TRUE}}</strong> if the pixel format supports transparency; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Returns the <strong>{{WICPixelFormatNumericRepresentation}}</strong> of the pixel format.</p> </dd> <p>Exposes methods used to create components for the Windows Imaging Component ({{WIC}}) such as decoders, encoders and pixel format converters.</p> <p>Creates a new instance of the <strong>{{IWICBitmapDecoder}}</strong> class based on the given file.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a new instance of the <strong>{{IWICBitmapDecoder}}</strong> class based on the given {{IStream}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a new instance of the <strong>{{IWICBitmapDecoder}}</strong> based on the given file handle.</p> <p>When a decoder is created using this method, the file handle must remain alive during the lifetime of the decoder.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Proxy function for the <strong>CreateComponentInfo</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a new instance of <strong>{{IWICBitmapDecoder}}</strong>.</p> <p> Other values may be available for both <em>guidContainerFormat</em> and <em>pguidVendor</em> depending on the installed {{WIC}}-enabled encoders. The values listed are those that are natively supported by the operating system. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a new instance of the <strong>{{IWICBitmapEncoder}}</strong> class.</p> <p> Other values may be available for both <em>guidContainerFormat</em> and <em>pguidVendor</em> depending on the installed {{WIC}}-enabled encoders. The values listed are those that are natively supported by the operating system. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a new instance of the <strong>{{IWICPalette}}</strong> class.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a new instance of the <strong>{{IWICFormatConverter}}</strong> class.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a new instance of an <strong>{{IWICBitmapScaler}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Proxy function for the <strong>CreateBitmapClipper</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Proxy function for the <strong>CreateBitmapFlipRotator</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a new instance of the <strong>{{IWICStream}}</strong> class.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a new instance of the <strong>{{IWICColorContext}}</strong> class.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a new instance of the <strong>{{IWICColorTransform}}</strong> class.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an <strong>{{IWICBitmap}}</strong> object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a <strong>{{IWICBitmap}}</strong> from a <strong>{{IWICBitmapSource}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an <strong>{{IWICBitmap}}</strong> from a specified rectangle of an <strong>{{IWICBitmapSource}}</strong>.</p> <p>Providing a rectangle that is larger than the source will produce undefined results.</p><p>This method always creates a separate copy of the source image, similar to the cache option <strong>{{WICBitmapCacheOnLoad}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an <strong>{{IWICBitmap}}</strong> from a memory block.</p> <p>The size of the {{IWICBitmap}} to be created must be smaller than or equal to the size of the image in <em>pbBuffer</em>.</p><p>The {{stride}} of the destination bitmap will equal the <em>stride</em> of the source data, regardless of the width and height specified.</p><p>The <em>pixelFormat</em> parameter defines the pixel format for both the input data and the output bitmap.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an <strong>{{IWICBitmap}}</strong> from a bitmap handle.</p> <p>For a non-palletized bitmap, set {{NULL}} for the <em>hPalette</em> parameter.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an <strong>{{IWICBitmap}}</strong> from an icon handle.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an {{IEnumUnknown}} object of the specified component types.</p> <p>Component types must be enumerated seperately. Combinations of component types and <strong>{{WICAllComponents}}</strong> are unsupported.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a new instance of the fast metadata encoder based on the given <strong>{{IWICBitmapDecoder}}</strong>.</p> <p>The Windows provided codecs do not support fast metadata encoding at the decoder level, and only support fast metadata encoding at the frame level. To create a fast metadata encoder from a frame, see <strong>CreateFastMetadataEncoderFromFrameDecode</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a new instance of the fast metadata encoder based on the given image frame.</p> <p>For a list of support metadata formats for fast metadata encoding, see {{WIC}} Metadata Overview.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The <strong>{{IWICBitmapFrameDecode}}</strong> to create the <strong>{{IWICFastMetadataEncoder}}</strong> from.</p> </dd> <dd> <p>When this method returns, contains a reference to a new fast metadata encoder.</p> </dd> <p>Proxy function for the <strong>CreateQueryWriter</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Proxy function for the <strong>CreateQueryWriterFromReader</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>An extension of the {{WIC}} factory interface that includes the ability to create an <strong>{{IWICImageEncoder}}</strong>. This interface uses a Direct2D device and an input image to encode to a destination <strong>{{IWICBitmapEncoder}}</strong>.</p> <p>Creates a new image encoder object.</p> <p>You must create images to pass to the image encoder on the same Direct2D device that you pass to this method. </p><p>You are responsible for setting up the bitmap encoder itself through the existing <strong>{{IWICBitmapEncoder}}</strong> {{APIs}}. The <strong>{{IWICBitmapEncoder}}</strong> or the {{IWICBitmapFrameEncode}} object is passed to each of the <strong>{{IWICImageEncoder}}</strong> methods: <strong>WriteThumbnail</strong>, <strong>WriteFrame</strong>, and <strong>WriteFrameThumbnail</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The <strong>{{ID2D1Device}}</strong> object on which the corresponding image encoder is created.</p> </dd> <dd> <p>A reference to a variable that receives a reference to the <strong>{{IWICImageEncoder}}</strong> interface for the encoder object that you can use to encode Direct2D images.</p> </dd> <p>An application-defined callback method used for raw image parameter change notifications.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A set of <strong>{{IWICDevelopRawNotificationCallback}} Constants</strong> parameter notification flags.</p> </dd> <p>An application-defined callback method used for raw image parameter change notifications.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A set of <strong>{{IWICDevelopRawNotificationCallback}} Constants</strong> parameter notification flags.</p> </dd> <p>Retrieves information about which capabilities are supported for a raw image.</p> <p>It is recommended that a codec report that a capability is supported even if the results at the outer range limits are not of perfect quality.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives <strong>{{WICRawCapabilitiesInfo}}</strong> that provides the capabilities supported by the raw image.</p> </dd> <p>Sets the desired <strong>{{WICRawParameterSet}}</strong> option.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets the current set of parameters.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives a reference to the current set of parameters.</p> </dd> <p>Sets the exposure compensation stop value.</p> <p>It is recommended that a codec report that this method is supported even if the results at the outer range limits are not of perfect quality.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The exposure compensation value. The value range for exposure compensation is -5.0 through +5.0, which equates to 10 full stops.</p> </dd> <p>Gets the exposure compensation stop value of the raw image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the exposure compensation stop value. The default is the "as-shot" setting.</p> </dd> <p>Sets the white point {{RGB}} values.</p> <p>Due to other white point setting methods (e.g. <strong>SetWhitePointKelvin</strong>), care must be taken by codec implementers to ensure proper interoperability. For instance, if the caller sets via a named white point then the codec implementer may whis to disable reading back the correspoinding Kelvin temperature. In specific cases where the codec implementer wishes to deny a given action because of previous calls, <strong>{{WINCODEC_ERR_WRONGSTATE}}</strong> should be returned.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The red white point value.</p> </dd> <dd> <p>The green white point value.</p> </dd> <dd> <p>The blue white point value.</p> </dd> <p>Gets the white point {{RGB}} values.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the red white point value.</p> </dd> <dd> <p>A reference that receives the green white point value.</p> </dd> <dd> <p>A reference that receives the blue white point value.</p> </dd> <p>Sets the named white point of the raw file.</p> <p>If the named white points are not supported by the raw image or the raw file contains named white points that are not supported by this {{API}}, the codec implementer should still mark this capability as supported.</p><p>If the named white points are not supported by the raw image, a best effort should be made to adjust the image to the named white point even when it isn't a pre-defined white point of the raw file.</p><p>If the raw file containes named white points not supported by this {{API}}, the codec implementer should support the named white points in the {{API}}.</p><p>Due to other white point setting methods (e.g. <strong>SetWhitePointKelvin</strong>), care must be taken by codec implementers to ensure proper interoperability. For instance, if the caller sets via a named white point then the codec implementer may whis to disable reading back the correspoinding Kelvin temperature. In specific cases where the codec implementer wishes to deny a given action because of previous calls, <strong>{{WINCODEC_ERR_WRONGSTATE}}</strong> should be returned.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A bitwise combination of the enumeration values.</p> </dd> <p>Gets the named white point of the raw image.</p> <p>If the named white points are not supported by the raw image or the raw file contains named white points that are not supported by this {{API}}, the codec implementer should still mark this capability as supported.</p><p>If the named white points are not supported by the raw image, a best effort should be made to adjust the image to the named white point even when it isn't a pre-defined white point of the raw file.</p><p>If the raw file containes named white points not supported by this {{API}}, the codec implementer should support the named white points in <strong>{{WICNamedWhitePoint}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the bitwise combination of the enumeration values.</p> </dd> <p>Sets the white point Kelvin value.</p> <p>Codec implementers should faithfully adjust the color temperature within the range supported natively by the raw image. For values outside the native support range, the codec implementer should provide a best effort representation of the image at that color temperature.</p><p>Codec implementers should return <strong>{{WINCODEC_ERR_VALUEOUTOFRANGE}}</strong> if the value is out of defined acceptable range.</p><p>Codec implementers must ensure proper interoperability with other white point setting methods such as <strong>SetWhitePointRGB</strong>. For example, if the caller sets the white point via <strong>SetNamedWhitePoint</strong> then the codec implementer may want to disable reading back the correspoinding Kelvin temperature. In specific cases where the codec implementer wants to deny a given action because of previous calls, <strong>{{WINCODEC_ERR_WRONGSTATE}}</strong> should be returned.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The white point Kelvin value. Acceptable Kelvin values are 1,500 through 30,000.</p> </dd> <p>Gets the white point Kelvin temperature of the raw image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the white point Kelvin temperature of the raw image. The default is the "as-shot" setting value.</p> </dd> <p>Gets the information about the current Kelvin range of the raw image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the minimum Kelvin temperature.</p> </dd> <dd> <p>A reference that receives the maximum Kelvin temperature. </p> </dd> <dd> <p>A reference that receives the Kelvin step value.</p> </dd> <p>Sets the contrast value of the raw image.</p> <p>The codec implementer must determine what the upper range value represents and must determine how to map the value to their image processing routines.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The contrast value of the raw image. The default value is the "as-shot" setting. The value range for contrast is 0.0 through 1.0. The 0.0 lower limit represents no contrast applied to the image, while the 1.0 upper limit represents the highest amount of contrast that can be applied.</p> </dd> <p>Gets the contrast value of the raw image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the contrast value of the raw image. The default value is the "as-shot" setting. The value range for contrast is 0.0 through 1.0. The 0.0 lower limit represents no contrast applied to the image, while the 1.0 upper limit represents the highest amount of contrast that can be applied.</p> </dd> <p>Sets the desired gamma value.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The desired gamma value.</p> </dd> <p>Gets the current gamma setting of the raw image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the current gamma setting.</p> </dd> <p>Sets the sharpness value of the raw image.</p> <p>The codec implementer must determine what the upper range value represents and must determine how to map the value to their image processing routines.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The sharpness value of the raw image. The default value is the "as-shot" setting. The value range for sharpness is 0.0 through 1.0. The 0.0 lower limit represents no sharpening applied to the image, while the 1.0 upper limit represents the highest amount of sharpness that can be applied.</p> </dd> <p>Gets the sharpness value of the raw image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the sharpness value of the raw image. The default value is the "as-shot" setting. The value range for sharpness is 0.0 through 1.0. The 0.0 lower limit represents no sharpening applied to the image, while the 1.0 upper limit represents the highest amount of sharpness that can be applied.</p> </dd> <p>Sets the saturation value of the raw image.</p> <p>The codec implementer must determine what the upper range value represents and must determine how to map the value to their image processing routines.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The saturation value of the raw image. The value range for saturation is 0.0 through 1.0. A value of 0.0 represents an image with a fully de-saturated image, while a value of 1.0 represents the highest amount of saturation that can be applied.</p> </dd> <p>Gets the saturation value of the raw image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the saturation value of the raw image. The default value is the "as-shot" setting. The value range for saturation is 0.0 through 1.0. A value of 0.0 represents an image with a fully de-saturated image, while a value of 1.0 represents the highest amount of saturation that can be applied.</p> </dd> <p>Sets the tint value of the raw image.</p> <p>The codec implementer must determine what the outer range values represent and must determine how to map the values to their image processing routines.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The tint value of the raw image. The default value is the "as-shot" setting if it exists or 0.0. The value range for sharpness is -1.0 through +1.0. The -1.0 lower limit represents a full green bias to the image, while the 1.0 upper limit represents a full magenta bias.</p> </dd> <p>Gets the tint value of the raw image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the tint value of the raw image. The default value is the "as-shot" setting if it exists or 0.0. The value range for sharpness is -1.0 through +1.0. The -1.0 lower limit represents a full green bias to the image, while the 1.0 upper limit represents a full magenta bias.</p> </dd> <p>Sets the noise reduction value of the raw image.</p> <p>The codec implementer must determine what the upper range value represents and must determine how to map the value to their image processing routines.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The noise reduction value of the raw image. The default value is the "as-shot" setting if it exists or 0.0. The value range for noise reduction is 0.0 through 1.0. The 0.0 lower limit represents no noise reduction applied to the image, while the 1.0 upper limit represents highest noise reduction amount that can be applied.</p> </dd> <p>Gets the noise reduction value of the raw image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the noise reduction value of the raw image. The default value is the "as-shot" setting if it exists or 0.0. The value range for noise reduction is 0.0 through 1.0. The 0.0 lower limit represents no noise reduction applied to the image, while the 1.0 upper limit represents full highest noise reduction amount that can be applied.</p> </dd> <p>Sets the destination color context.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The destination color context.</p> </dd> <p>Sets the tone curve for the raw image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The size of the <em>pToneCurve</em> structure.</p> </dd> <dd> <p>The desired tone curve.</p> </dd> <p>Gets the tone curve of the raw image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The size of the <em>pToneCurve</em> buffer.</p> </dd> <dd> <p>A reference that receives the <strong>{{WICRawToneCurve}}</strong> of the raw image.</p> </dd> <dd> <p>A reference that receives the size needed to obtain the tone curve structure.</p> </dd> <p>Sets the desired rotation angle.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The desired rotation angle.</p> </dd> <p>Gets the current rotation angle.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference that receives the current rotation angle.</p> </dd> <p>Sets the current <strong>{{WICRawRenderMode}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets the current <strong>{{WICRawRenderMode}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Sets the notification callback method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to the notification callback method.</p> </dd> <p>Provides information and functionality specific to the {{DDS}} image format.</p> <p>This interface is implemented by the {{WIC}} {{DDS}} codec. To obtain this interface, create an <strong>{{IWICBitmapDecoder}}</strong> using the {{DDS}} codec and QueryInterface for <strong>{{IWICDdsDecoder}}</strong>.</p> <p>Gets {{DDS}}-specific data.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the structure where the information is returned.</p> </dd> <p>Retrieves the specified frame of the {{DDS}} image.</p> <p>A {{DDS}} file can contain multiple images that are organized into a three level hierarchy. First, {{DDS}} file may contain multiple textures in a texture array. Second, each texture can have multiple mip levels. Finally, the texture may be a 3D (volume) texture and have multiple slices, each of which is a 2D texture. See the {{DDS}} documentation for more information.</p><p>{{WIC}} maps this three level hierarchy into a linear array of <strong>{{IWICBitmapFrameDecode}}</strong>, accessible via <strong>{{IWICBitmapDecoder::GetFrame}}</strong>. However, determining which frame corresponds to a triad of <em>arrayIndex</em>, <em>mipLevel</em>, and <em>sliceIndex</em> value is not trivial because each mip level of a 3D texture has a different depth (number of slices). This method provides additional convenience over <strong>{{IWICBitmapDecoder::GetFrame}}</strong> for {{DDS}} images by calculating the correct frame given the three indices. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The requested index within the texture array.</p> </dd> <dd> <p> The requested mip level.</p> </dd> <dd> <p>The requested slice within the 3D texture. </p> </dd> <dd> <p>A reference to a <strong>{{IWICBitmapFrameDecode}}</strong> object. </p> </dd> <p>Enables writing {{DDS}} format specific information to an encoder.</p> <p>This interface is implemented by the {{WIC}} {{DDS}} codec. To obtain this interface, create an <strong>{{IWICBitmapEncoder}}</strong> using the {{DDS}} codec and QueryInterface for <strong>{{IWICDdsEncoder}}</strong>.</p> <p>Sets {{DDS}}-specific data.</p> <p>You cannot call this method after you have started to write frame data, for example by calling <strong>{{IWICDdsEncoder::CreateNewFrame}}</strong>. </p><p>Setting {{DDS}} parameters using this method provides the {{DDS}} encoder with information about the expected number of frames and the dimensions and other parameters of each frame. The {{DDS}} encoder will fail if you do not set frame data that matches these expectations. For example, if you set <strong>{{WICDdsParameters::Width}}</strong> and <strong>Height</strong> to 32, and <strong>MipLevels</strong> to 6, the {{DDS}} encoder will expect 6 frames with the following dimensions:</p><ul> <li>32x32 pixels.</li> <li>16x16 pixels.</li> <li>8x8 pixels.</li> <li>4x4 pixels.</li> <li>2x2 pixels.</li> <li>1x1 pixels.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Points to the structure where the information is described.</p> </dd> <p>Gets {{DDS}}-specific data.</p> <p>An application can call <strong>GetParameters</strong> to obtain the default {{DDS}} parameters, modify some or all of them, and then call <strong>SetParameters</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Points to the structure where the information is returned.</p> </dd> <p>Creates a new frame to encode.</p> <p>This is equivalent to <strong>{{IWICBitmapEncoder::CreateNewFrame}}</strong>, but returns additional information about the array index, mip level and slice of the newly created frame. In contrast to <strong>{{IWICBitmapEncoder::CreateNewFrame}}</strong>, there is no <strong>{{IPropertyBag2}}</strong>* parameter because individual {{DDS}} frames do not have separate properties.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the newly created frame object.</p> </dd> <dd> <p>Points to the location where the array index is returned.</p> </dd> <dd> <p>Points to the location where the mip level index is returned.</p> </dd> <dd> <p>Points to the location where the slice index is returned.</p> </dd> <p>Provides access to a single frame of {{DDS}} image data in its native <strong>{{DXGI_FORMAT}}</strong> form, as well as information about the image data.</p> <p>This interface is implemented by the {{WIC}} {{DDS}} codec. To obtain this interface, create an <strong>{{IWICBitmapFrameDecode}}</strong> using the {{DDS}} codec and QueryInterface for {{IID_IWICDdsFrameDecode}}.</p> <p>Gets the width and height, in blocks, of the {{DDS}} image.</p> <p>For block compressed textures, the returned width and height values do not completely define the texture size because the image is padded to fit the closest whole block size. For example, three {{BC1}} textures with pixel dimensions of 1x1, 2x2 and 4x4 will all report <em>pWidthInBlocks</em> = 1 and <em>pHeightInBlocks</em> = 1. </p><p>If the texture does not use a block-compressed <strong>{{DXGI_FORMAT}}</strong>, this method returns the texture size in pixels; for these formats the block size returned by <strong>{{IWICDdsFrameDecoder::GetFormatInfo}}</strong> is 1x1. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The width of the {{DDS}} image in blocks.</p> </dd> <dd> <p>The height of the {{DDS}} image in blocks.</p> </dd> <p>Gets information about the format in which the {{DDS}} image is stored.</p> <p>This information can be used for allocating memory or constructing Direct3D or Direct2D resources, for example by using <strong>{{ID3D11Device::CreateTexture2D}}</strong> or <strong>{{ID2D1DeviceContext::CreateBitmap}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Information about the {{DDS}} format.</p> </dd> <p>Requests pixel data as it is natively stored within the {{DDS}} file.</p> <p>If the texture does not use a block-compressed <strong>{{DXGI_FORMAT}}</strong>, this method behaves similarly to <strong>{{IWICBitmapSource::CopyPixels}}</strong>. However, it does not perform any pixel format conversion, and instead produces the raw data from the {{DDS}} file.</p><p>If the texture uses a block-compressed <strong>{{DXGI_FORMAT}}</strong>, this method copies the block data directly into the provided buffer. In this case, the <em>prcBoundsInBlocks</em> parameter is defined in blocks, not pixels. To determine if this is the case, call <strong>GetFormatInfo</strong> and read the <strong>DxgiFormat</strong> member of the returned <strong>{{WICDdsFormatInfo}}</strong> structure. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The rectangle to copy from the source. A {{NULL}} value specifies the entire texture.</p> <p>If the texture uses a block-compressed <strong>{{DXGI_FORMAT}}</strong>, all values of the rectangle are expressed in number of blocks, not pixels.</p> </dd> <dd> <p>The stride, in bytes, of the destination buffer. This represents the number of bytes from the buffer reference to the next row of data. If the texture uses a block-compressed <strong>{{DXGI_FORMAT}}</strong>, a "row of data" is defined as a row of blocks which contains multiple pixel scanlines.</p> </dd> <dd> <p>The size, in bytes, of the destination buffer.</p> </dd> <dd> <p>A reference to the destination buffer.</p> </dd> <p>Exposes methods for decoding {{JPEG}} images. Provides access to the Start Of Frame ({{SOF}}) header, Start of Scan ({{SOS}}) header, the Huffman and Quantization tables, and the compressed {{JPEG}} {{JPEG}} data. Also enables indexing for efficient random access. </p> <p>Obtain this interface by calling <strong>{{IUnknown::QueryInterface}}</strong> on the Windows-provided <strong>{{IWICBitmapFrameDecoder}}</strong> interface for the {{JPEG}} decoder.</p> <p>Retrieves a value indicating whether this decoder supports indexing for efficient random access.</p> <p>Indexing is only supported for some {{JPEG}} types. Call this method</p> <p>Returns {{S_OK}} on successful completion.</p> <dd> <p>True if indexing is supported; otherwise, false.</p> </dd> <p>Enables indexing of the {{JPEG}} for efficient random access.</p> <p>This method enables efficient random-access to the image pixels at the expense of memory usage. The amount of memory required for indexing depends on the requested index granularity. Unless <strong>SetIndexing</strong> is called, it is much more efficient to access a {{JPEG}} by progressing through its pixels top-down during calls to <strong>{{IWICBitmapSource::CopyPixels}}</strong>. </p><p>This method will fail if indexing is unsupported on the file. <strong>{{IWICJpegFrameDecode::DoesSupportIndexing}}</strong> should be called to first determine whether indexing is supported. If this method is called multiple times, the final call changes the index granularity to the requested size. </p><p>The provided interval size controls horizontal spacing of index entries. This value is internally rounded up according to the {{JPEG}}?s {{MCU}} (minimum coded unit) size, which is typically either 8 or 16 unscaled pixels. The vertical size of the index interval is always equal to one {{MCU}} size.</p><p> Indexes can be generated immediately, or during future calls to <strong>{{IWICBitmapSource::CopyPixels}}</strong> to reduce redundant decompression work. </p> <p>Returns {{S_OK}} upon successful completion.</p> <dd> <p>A value specifying whether indexes should be generated immediately or deferred until a future call to <strong>{{IWICBitmapSource::CopyPixels}}</strong>.</p> </dd> <dd> <p>The granularity of the indexing, in pixels.</p> </dd> <p>Removes the indexing from a {{JPEG}} that has been indexed using <strong>{{IWICJpegFrameDecode::SetIndexing}}</strong>.</p> <p>Returns {{S_OK}} upons successful completion.</p> <p>Retrieves a copy of the {{AC}} Huffman table for the specified scan and table.</p> <p>This method can return one of these values.</p><table> <tr><th>Return value</th><th>Description</th></tr> <tr><td> <dl> <dt>{{S_OK}}</dt> </dl> </td><td> <p>The operation was successful.</p> </td></tr> <tr><td> <dl> <dt>{{WINCODEC_ERR_INVALIDJPEGSCANINDEX}} </dt> </dl> </td><td> <p>The specified scan index is invalid.</p> </td></tr> <tr><td> <dl> <dt>{{WINCODEC_ERR_INVALIDPARAMETER}}</dt> </dl> </td><td> <p>Can occur if <em>pAcHuffmanTable</em> is {{NULL}} or if <em>tableIndex</em> does not point to a valid table slot. Check the scan header for valid table indices.</p> </td></tr> </table><p>?</p> <dd> <p>The zero-based index of the scan for which data is retrieved.</p> </dd> <dd> <p>The index of the {{AC}} Huffman table to retrieve. Valid indices for a given scan can be determined by retrieving the scan header with <strong>{{IWICJpegFrameDecode::GetScanHeader}}</strong>.</p> </dd> <dd> <p>A reference that receives the table data. This parameter must not be {{NULL}}.</p> </dd> <p>Retrieves a copy of the {{DC}} Huffman table for the specified scan and table.</p> <p>This method can return one of these values.</p><table> <tr><th>Return value</th><th>Description</th></tr> <tr><td> <dl> <dt>{{S_OK}}</dt> </dl> </td><td> <p>The operation was successful.</p> </td></tr> <tr><td> <dl> <dt>{{WINCODEC_ERR_INVALIDJPEGSCANINDEX}} </dt> </dl> </td><td> <p>The specified scan index is invalid.</p> </td></tr> <tr><td> <dl> <dt>{{WINCODEC_ERR_INVALIDPARAMETER}}</dt> </dl> </td><td> <p>Can occur if <em>pTable</em> is {{NULL}} or if <em>tableIndex</em> does not point to a valid table slot. Check the scan header for valid table indices.</p> </td></tr> </table><p>?</p> <dd> <p>The zero-based index of the scan for which data is retrieved.</p> </dd> <dd> <p>The index of the {{DC}} Huffman table to retrieve. Valid indices for a given scan can be determined by retrieving the scan header with <strong>{{IWICJpegFrameDecode::GetScanHeader}}</strong>.</p> </dd> <dd> <p>A reference that receives the table data. This parameter must not be {{NULL}}.</p> </dd> <p>Retrieves a copy of the quantization table.</p> <p>This method can return one of these values.</p><table> <tr><th>Return value</th><th>Description</th></tr> <tr><td> <dl> <dt>{{S_OK}}</dt> </dl> </td><td> <p>The operation was successful.</p> </td></tr> <tr><td> <dl> <dt>{{WINCODEC_ERR_INVALIDJPEGSCANINDEX}} </dt> </dl> </td><td> <p>The specified scan index is invalid.</p> </td></tr> <tr><td> <dl> <dt>{{WINCODEC_ERR_INVALIDPARAMETER}}</dt> </dl> </td><td> <p>Can occur if <em>pTable</em> is {{NULL}} or if <em>tableIndex</em> does not point to a valid table slot. Check the scan header for valid table indices.</p> </td></tr> </table><p>?</p> <dd> <p>The zero-based index of the scan for which data is retrieved.</p> </dd> <dd> <p>The index of the quantization table to retrieve. Valid indices for a given scan can be determined by retrieving the scan header with <strong>{{IWICJpegFrameDecode::GetScanHeader}}</strong>.</p> </dd> <dd> <p>A reference that receives the table data. This parameter must not be {{NULL}}.</p> </dd> <p>Retrieves header data from the entire frame. The result includes parameters from the Start Of Frame ({{SOF}}) marker for the scan as well as parameters derived from other metadata such as the color model of the compressed data.</p> <p>Returns {{S_OK}} on successful completion.</p> <dd> <p>A reference that receives the frame header data.</p> </dd> <p>Retrieves parameters from the Start Of Scan ({{SOS}}) marker for the scan with the specified index.</p> <p>Returns {{S_OK}} on successful completion.</p> <dd> <p>The index of the scan for which header data is retrieved.</p> </dd> <dd> <p>A reference that receives the frame header data.</p> </dd> <p>Retrieves a copy of the compressed {{JPEG}} scan directly from the {{WIC}} decoder frame's output stream.</p> <p>This method can return one of these values.</p><table> <tr><th>Return value</th><th>Description</th></tr> <tr><td> <dl> <dt>{{S_OK}}</dt> </dl> </td><td> <p>The operation was successful.</p> </td></tr> <tr><td> <dl> <dt>{{WINCODEC_ERR_INVALIDJPEGSCANINDEX}} </dt> </dl> </td><td> <p>The specified scan index is invalid.</p> </td></tr> </table><p>?</p> <dd> <p>The zero-based index of the scan for which data is retrieved.</p> </dd> <dd> <p>The byte position in the scan data to begin copying. Use 0 on the first call. If the output buffer size is insufficient to store the entire scan, this offset allows you to resume copying from the end of the previous copy operation.</p> </dd> <dd> <p>The size, in bytes, of the <em>pbScanData</em> array.</p> </dd> <dd> <p>A reference that receives the table data. This parameter must not be {{NULL}}.</p> </dd> <dd> <p>A reference that receives the size of the scan data actually copied into <em>pbScanData</em>. The size returned may be smaller that the size of <em>cbScanData</em>. This parameter may be {{NULL}}.</p> </dd> <p>Exposes methods for writing compressed {{JPEG}} scan data directly to the {{WIC}} encoder's output stream. Also provides access to the Huffman and quantization tables.</p> <p>Obtain this interface by calling <strong>{{IUnknown::QueryInterface}}</strong> on the Windows-provided <strong>{{IWICBitmapFrameEncoder}}</strong> interface for the {{JPEG}} encoder.</p><p>The {{WIC}} {{JPEG}} encoder supports a smaller subset of {{JPEG}} features than the decoder does.</p><ul> <li>The encoder is limited to a single scan. It does not support encoding images that are multi-scan, either for progressive encoding or planar component data.</li> <li>The encoder supports two quantization tables, two {{AC}} Huffman tables, and two {{DC}} Huffman tables. The luma tables are used for the Y channel and, in the case of {{YCCK}}, the black channel. The chroma tables are used for the CbCr channels. </li> <li>The encoder supports encoding gray, {{YCbCr}} ({{RGB}}), and {{YCCK}} ({{CMYK}}).</li> <li>The encoder supports 4 fixed compontent subsampling, 4:2:0, 4:2:2, 4:4:0, and 4:4:4. This subsamples chroma only.</li> <li>The encoder does not support restart markers.</li> </ul> <p>Retrieves a copy of the {{AC}} Huffman table for the specified scan and table.</p> <p>This method can return one of these values.</p><table> <tr><th>Return value</th><th>Description</th></tr> <tr><td> <dl> <dt>{{S_OK}}</dt> </dl> </td><td> <p>The operation was successful.</p> </td></tr> <tr><td> <dl> <dt>{{WINCODEC_ERR_INVALIDJPEGSCANINDEX}} </dt> </dl> </td><td> <p>The specified scan index is invalid.</p> </td></tr> <tr><td> <dl> <dt>{{WINCODEC_ERR_INVALIDPARAMETER}}</dt> </dl> </td><td> <p>Can occur if <em>pAcHuffmanTable</em> is {{NULL}} or if <em>tableIndex</em> does not point to a valid table slot. Check the scan header for valid table indices.</p> </td></tr> </table><p>?</p> <dd> <p>The zero-based index of the scan for which data is retrieved.</p> </dd> <dd> <p>The index of the {{AC}} Huffman table to retrieve.</p> </dd> <dd> <p>A reference that receives the table data. This parameter must not be {{NULL}}.</p> </dd> <p>Retrieves a copy of the {{DC}} Huffman table for the specified scan and table.</p> <p>This method can return one of these values.</p><table> <tr><th>Return value</th><th>Description</th></tr> <tr><td> <dl> <dt>{{S_OK}}</dt> </dl> </td><td> <p>The operation was successful.</p> </td></tr> <tr><td> <dl> <dt>{{WINCODEC_ERR_INVALIDJPEGSCANINDEX}} </dt> </dl> </td><td> <p>The specified scan index is invalid.</p> </td></tr> <tr><td> <dl> <dt>{{WINCODEC_ERR_INVALIDPARAMETER}}</dt> </dl> </td><td> <p>Can occur if <em>pTable</em> is {{NULL}} or if <em>tableIndex</em> does not point to a valid table slot. Check the scan header for valid table indices.</p> </td></tr> </table><p>?</p> <dd> <p>The zero-based index of the scan for which data is retrieved.</p> </dd> <dd> <p>The index of the {{DC}} Huffman table to retrieve. </p> </dd> <dd> <p>A reference that receives the table data. This parameter must not be {{NULL}}.</p> </dd> <p>Retrieves a copy of the quantization table.</p> <p>This method can return one of these values.</p><table> <tr><th>Return value</th><th>Description</th></tr> <tr><td> <dl> <dt>{{S_OK}}</dt> </dl> </td><td> <p>The operation was successful.</p> </td></tr> <tr><td> <dl> <dt>{{WINCODEC_ERR_INVALIDJPEGSCANINDEX}} </dt> </dl> </td><td> <p>The specified scan index is invalid.</p> </td></tr> <tr><td> <dl> <dt>{{WINCODEC_ERR_INVALIDPARAMETER}}</dt> </dl> </td><td> <p>Can occur if <em>pTable</em> is {{NULL}} or if <em>tableIndex</em> does not point to a valid table slot. Check the scan header for valid table indices.</p> </td></tr> </table><p>?</p> <dd> <p>The zero-based index of the scan for which data is retrieved.</p> </dd> <dd> <p>The index of the quantization table to retrieve. </p> </dd> <dd> <p>A reference that receives the table data. This parameter must not be {{NULL}}.</p> </dd> <p>Writes scan data to a {{JPEG}} frame.</p> <p><strong>WriteScan</strong> may be called multiple times. Each call appends the scan data specified to any previous scan data. Complete the scan by calling <strong>{{IWICBitmapFrameEncode::Commit}}</strong>. </p><p>Any calls to set encoder parameters or image metadata that will appear before the scan data in the resulting {{JPEG}} file must be completed before the first call to this method. This includes calls to <strong>{{IWICBitmapFrameEncode::SetColorContexts}}</strong> , <strong>{{IWICBitmapFrameEncode::SetPalette}}</strong>, <strong>{{IWICBitmapFrameEncode::SetPixelFormat}}</strong>, <strong>{{IWICBitmapFrameEncode::SetResolution}}</strong>, and <strong>{{IWICBitmapFrameEncode::SetThumbnail}}</strong>. <strong>{{IWICBitmapFrameEncode::SetSize}}</strong> is required as it has no default value for encoded image size. </p> <p>Returns {{S_OK}} on successful completion.</p> <dd> <p>The size of the data in the <em>pbScanData</em> parameter.</p> </dd> <dd> <p>The scan data to write.</p> </dd> <p>Obtains a <strong>{{IWICBitmapSource}}</strong> in the desired pixel format from a given <strong>{{IWICBitmapSource}}</strong>.</p> <p>If the <em>pISrc</em> bitmap is already in the desired format, <em>pISrc</em> is copied to the destination bitmap reference and a reference is added. If it is not in the desired format however, <strong>{{WICConvertBitmapSource}}</strong> will instantiate a <em>dstFormat</em> format converter and initialize it with <em>pISrc</em>.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Returns a <strong>{{IWICBitmapSource}}</strong> that is backed by the pixels of a Windows Graphics Device Interface ({{GDI}}) section handle.</p> <p>The <strong>{{WICCreateBitmapFromSection}}</strong> function calls the <strong>{{WICCreateBitmapFromSectionEx}}</strong> function with the <em>desiredAccessLevel</em> parameter set to <strong>{{WICSectionAccessLevelRead}}</strong>.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Returns a <strong>{{IWICBitmapSource}}</strong> that is backed by the pixels of a Windows Graphics Device Interface ({{GDI}}) section handle.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Obtains the short name associated with a given {{GUID}}.</p> <p>Windows Imaging Component ({{WIC}}) short name mappings can be found within the following registry key: </p><pre><strong>{{HKEY_CLASSES_ROOT}}</strong> ???<strong>{{CLSID}}</strong> ??????<strong>{FAE3D380-{{FEA4}}-4623-8C75-{{C6B61110B681}}}</strong> ?????????<strong>Namespace</strong> ????????????<strong>...</strong></pre> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{GUID}} to retrieve the short name for.</p> </dd> <dd> <p>The size of the <em>wzName</em> buffer.</p> </dd> <dd> <p>A reference that receives the short name associated with the {{GUID}}.</p> </dd> <dd> <p>The actual size needed to retrieve the entire short name associated with the {{GUID}}.</p> </dd> <p>Obtains the {{GUID}} associated with the given short name.</p> <p>You can extend the short name mapping by adding to the following registry key:</p><p> </p><pre><strong>{{HKEY_CLASSES_ROOT}}</strong> ???<strong>{{CLSID}}</strong> ??????<strong>{FAE3D380-{{FEA4}}-4623-8C75-{{C6B61110B681}}}</strong> ?????????<strong>Namespace</strong> ????????????<strong>...</strong></pre><p>For more information, see How to Write a {{WIC}}-Enabled Codec.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the short name.</p> </dd> <dd> <p>A reference that receives the {{GUID}} associated with the given short name.</p> </dd> <p>Obtains the name associated with a given schema.</p> <p>You can extend the schema name mapping by adding to the following registry key:</p><p> </p><pre><strong>{{HKEY_CLASSES_ROOT}}</strong> ???<strong>{{CLSID}}</strong> ??????<strong>{FAE3D380-{{FEA4}}-4623-8C75-{{C6B61110B681}}}</strong> ?????????<strong>Schemas</strong> ????????????<strong>{{BB5ACC38}}-{{F216}}-4CEC-{{A6C5}}-5F6E739763A9</strong> ???????????????<strong>...</strong></pre><p>For more information, see How to Write a {{WIC}}-Enabled Codec.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The metadata format {{GUID}}.</p> </dd> <dd> <p>The {{URI}} string of the schema for which the name is to be retrieved.</p> </dd> <dd> <p>The size of the <em>wzName</em> buffer.</p> </dd> <dd> <p>A reference to a buffer that receives the schema's name.</p> <p>To obtain the required buffer size, call <strong>{{WICMapSchemaToName}}</strong> with <em>cchName</em> set to 0 and <em>wzName</em> set to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>The actual buffer size needed to retrieve the entire schema name.</p> </dd> <p> Specifies how the Crop effect handles the crop rectangle falling on fractional pixel coordinates. </p> <p>Specifies the color channel the Displacement map effect extracts the intensity from and uses it to spatially displace the image in the X or Y direction.</p> <p> Speficies whether a flip and/or rotation operation should be performed by the Bitmap source effect </p> <p> Identifiers for properties of the Gaussian blur effect. </p> <p> The optimization mode for the Gaussian blur effect. </p> <p> Identifiers for properties of the Directional blur effect. </p> <p>Specifies the optimization mode for the Directional blur effect.</p> <p> Identifiers for properties of the Shadow effect. </p> <p>The level of performance optimization for the Shadow effect.</p> <p> Identifiers for properties of the Blend effect. </p> <p>The blend mode used for the Blend effect.</p> <p>Identifiers for properties of the Saturation effect.</p> <p>Identifiers for properties of the Hue rotate effect.</p> <p>Identifiers for the properties of the Color matrix effect.</p> <p>The alpha mode of the output of the Color matrix effect.</p> <p> Identifiers for properties of the Bitmap source effect. </p> <p>The interpolation mode used to scale the image in the Bitmap source effect. If the mode disables the mipmap, then BitmapSouce will cache the image at the resolution determined by the Scale and EnableDPICorrection properties. </p> <p>Specifies the alpha mode of the output of the Bitmap source effect.</p> <p> Identifiers for properties of the Composite effect. </p> <p> Identifiers for properties of the 3D transform effect. </p> <p> The interpolation mode the 3D transform effect uses on the image. There are 5 scale modes that range in quality and speed. </p> <p> Identifiers for the properties of the 3D perspective transform effect. </p> <p> The interpolation mode the 3D perspective transform effect uses on the image. There are 5 scale modes that range in quality and speed. </p> <p>Identifiers for properties of the 2D affine transform effect.</p> <p>The interpolation mode to be used with the 2D affine transform effect to scale the image. There are 6 scale modes that range in quality and speed.</p> <dd> <p>Samples the nearest single point and uses that. This mode uses less processing time, but outputs the lowest quality image.</p> </dd> <dd> <p>Uses a four point sample and linear interpolation. This mode uses more processing time than the nearest neighbor mode, but outputs a higher quality image.</p> </dd> <dd> <p>Uses a 16 sample cubic kernel for interpolation. This mode uses the most processing time, but outputs a higher quality image. </p> </dd> <dd> <p>Uses 4 linear samples within a single pixel for good edge anti-aliasing. This mode is good for scaling down by small amounts on images with few pixels.</p> </dd> <dd> <p>Uses anisotropic filtering to sample a pattern according to the transformed shape of the bitmap.</p> </dd> <dd> <p>Uses a variable size high quality cubic kernel to perform a pre-downscale the image if downscaling is involved in the transform matrix. Then uses the cubic interpolation mode for the final output.</p> </dd> <p> Identifiers for properties of the {{DPI}} compensation effect. </p> <p> The interpolation mode the {{DPI}} compensation effect uses to scale the image. </p> <p> Identifiers for properties of the Scale effect. </p> <p>The interpolation mode the Scale effect uses to scale the image. There are 6 scale modes that range in quality and speed. </p> <p> Identifiers for properties of the Turbulence effect. </p> <p>The turbulence noise mode for the Turbulence effect. Indicates whether to generate a bitmap based on Fractal Noise or the Turbulence function. </p> <p> Identifiers for properties of the Displacement map effect. </p> <p> Identifiers for the properties of the Color management effect. </p> <p> Indicates how the Color management effect should interpret alpha data that is contained in the input image. </p> <p>The quality level of the transform for the Color management effect. </p> <p>Specifies which {{ICC}} rendering intent the Color management effect should use.</p> <p> Identifiers for properties of the Histogram effect. </p> <p> Identifiers for properties of the Point-specular lighting effect. </p> <p>The interpolation mode the Point-specular lighting effect uses to scale the image to the corresponding kernel unit length. There are six scale modes that range in quality and speed.</p> <p> Identifiers for properties of the Spot-specular lighting effect. </p> <p>The interpolation mode the Spot-specular lighting effect uses to scale the image to the corresponding kernel unit length. There are six scale modes that range in quality and speed.</p> <p> Identifiers for properties of the Distant-specular lighting effect. </p> <p>The interpolation mode the Distant-specular lighting effect uses to scale the image to the corresponding kernel unit length. There are six scale modes that range in quality and speed.</p> <p> Identifiers for properties of the Point-diffuse lighting effect. </p> <p>The interpolation mode the Point-diffuse lighting effect uses to scale the image to the corresponding kernel unit length. There are six scale modes that range in quality and speed</p> <p> Identifiers for properties of the Spot-diffuse lighting effect. </p> <p>The interpolation mode the Spot-diffuse lighting effect uses to scale the image to the corresponding kernel unit length. There are six scale modes that range in quality and speed.</p> <p>Identifiers for properties of the Distant-diffuse lighting effect.</p> <p>The interpolation mode the effect uses to scale the image to the corresponding kernel unit length. There are six scale modes that range in quality and speed.</p> <dd> <p>Samples the nearest single point and uses that. This mode uses less processing time, but outputs the lowest quality image.</p> </dd> <dd> <p>Uses a four point sample and linear interpolation. This mode outputs a higher quality image than nearest neighbor.</p> </dd> <dd> <p>Uses a 16 sample cubic kernel for interpolation. This mode uses the most processing time, but outputs a higher quality image. </p> </dd> <dd> <p>Uses 4 linear samples within a single pixel for good edge anti-aliasing. This mode is good for scaling down by small amounts on images with few pixels.</p> </dd> <dd> <p>Uses anisotropic filtering to sample a pattern according to the transformed shape of the bitmap.</p> </dd> <dd> <p>Uses a variable size high quality cubic kernel to perform a pre-downscale the image if downscaling is involved in the transform matrix. Then uses the cubic interpolation mode for the final output.</p> </dd> <p> Identifiers for properties of the Flood effect. </p> <p>Identifiers for properties of the Linear transfer effect.</p> <p> Identifiers for properties of the Gamma transfer effect. </p> <p> Identifiers for properties of the Table transfer effect. </p> <p>Identifiers for properties of the Discrete transfer effect.</p> <p>Identifiers for properties of the Convolve matrix effect.</p> <p>The interpolation mode the Convolve matrix effect uses to scale the image to the corresponding kernel unit length. There are six scale modes that range in quality and speed.</p> <p>Identifiers for the properties of the Brightness effect.</p> <p> Identifiers for the properties of the Arithmetic composite effect. </p> <p>Identifiers for properties of the Crop effect.</p> <p>Identifiers for properties of the Border effect.</p> <p>The edge mode for the Border effect. </p> <p> Identifiers for properties of the Morphology effect. </p> <p> The mode for the Morphology effect. </p> <p> Identifiers for properties of the Tile effect. </p> <p> Identifiers for properties of the Atlas effect. </p> <p> Identifiers for properties of the Opacity metadata effect. </p> <p>Specifies the types of properties supported by the Direct2D property interface. </p> <dd> <p>An unknown property.</p> </dd> <dd> <p>An arbitrary-length string.</p> </dd> <dd> <p>A 32-bit integer value constrained to be either 0 or 1.</p> </dd> <dd> <p>An unsigned 32-bit integer.</p> </dd> <dd> <p>A signed 32-bit integer.</p> </dd> <dd> <p>A 32-bit float.</p> </dd> <dd> <p>Two 32-bit float values.</p> </dd> <dd> <p> Three 32-bit float values.</p> </dd> <dd> <p>Four 32-bit float values.</p> </dd> <dd> <p>An arbitrary number of bytes.</p> </dd> <dd> <p>A returned {{COM}} or nano-{{COM}} interface. </p> </dd> <dd> <p>An enumeration. The value should be treated as a <strong>{{UINT32}}</strong> with a defined array of fields to specify the bindings to human-readable strings.</p> </dd> <dd> <p>An enumeration. The value is the count of sub-properties in the array. The set of array elements will be contained in the sub-property.</p> </dd> <dd> <p>A {{CLSID}}.</p> </dd> <dd> <p>A 3x2 matrix of float values.</p> </dd> <dd> <p>A 4x2 matrix of float values.</p> </dd> <dd> <p>A 4x4 matrix of float values.</p> </dd> <dd> <p>A 5x4 matrix of float values.</p> </dd> <dd> <p>A nano-{{COM}} color context interface reference.</p> </dd> <p>Specifies the indices of the system properties present on the <strong>{{ID2D1Properties}}</strong> interface for an <strong>{{ID2D1Effect}}</strong>.</p> <p>Under normal circumstances the minimum and maximum number of inputs to the effect are the same. If the effect supports a variable number of inputs, the <strong>{{ID2D1Effect::SetNumberOfInputs}}</strong> method can be used to choose the number that the application will enable.</p> <p>Specifies the indices of the system sub-properties that may be present in any property.</p> <dd> <p>The name for the parent property.</p> </dd> <dd> <p>A Boolean indicating whether the parent property is writeable.</p> </dd> <dd> <p>The minimum value that can be set to the parent property.</p> </dd> <dd> <p>The maximum value that can be set to the parent property.</p> </dd> <dd> <p>The default value of the parent property.</p> </dd> <dd> <p>An array of name/index pairs that indicate the possible values that can be set to the parent property.</p> </dd> <dd> <p>An index sub-property used by the elements of the <strong>{{D2D1_SUBPROPERTY_FIELDS}}</strong> array.</p> </dd> <p>Specifies how a bitmap can be used.</p> <p><strong>{{D2D1_BITMAP_OPTIONS_NONE}}</strong> implies that none of the flags are set. This means that the bitmap can be used for drawing from, cannot be set as a target and cannot be read from by the {{CPU}}.</p><p><strong>{{D2D1_BITMAP_OPTIONS_TARGET}}</strong> means that the bitmap can be specified as a target in <strong>{{ID2D1DeviceContext::SetTarget}}</strong>. If you also specify the <strong>{{D2D1_BITMAP_OPTIONS_CANNOT_DRAW}}</strong> flag the bitmap can be used a target but, it cannot be drawn from. Attempting to draw with a bitmap that has both flags set will result in the device context being put into an error state with <strong>{{D2DERR_BITMAP_CANNOT_DRAW}}</strong>. </p><p><strong>{{D2D1_BITMAP_OPTIONS_CPU_READ}}</strong> means that the bitmap can be mapped by using <strong>{{ID2D1Bitmap1::Map}}</strong>. This flag requires <strong>{{D2D1_BITMAP_OPTIONS_CANNOT_DRAW}}</strong> and cannot be combined with any other flags. The bitmap must be updated with the <strong>CopyFromBitmap</strong> or <strong>CopyFromRenderTarget</strong> methods. </p><strong>Note</strong>??You should only use <strong>{{D2D1_BITMAP_OPTIONS_CANNOT_DRAW}}</strong> is when the purpose of the bitmap is to be a target only or when the bitmap will be mapped .?<p><strong>{{D2D1_BITMAP_OPTIONS_GDI_COMPATIBLE}}</strong> means that it is possible to get a {{DC}} associated with this bitmap. This must be used in conjunction with <strong>{{D2D1_BITMAP_OPTIONS_TARGET}}</strong>. The <strong>{{DXGI_FORMAT}}</strong> must be either <strong>{{DXGI_FORMAT_B8G8R8A8_UNORM}}</strong> or <strong>{{DXGI_FORMAT_B8G8R8A8_UNORM_SRGB}}</strong>.</p> <dd> <p>The bitmap is created with default properties.</p> </dd> <dd> <p>The bitmap can be used as a device context target.</p> </dd> <dd> <p>The bitmap cannot be used as an input. </p> </dd> <dd> <p>The bitmap can be read from the {{CPU}}.</p> </dd> <dd> <p>The bitmap works with <strong>{{ID2D1GdiInteropRenderTarget::GetDC}}</strong>.</p> <strong>Note</strong>??This flag is not available in Windows Store apps. ? </dd> <p>Used to specify the blend mode for all of the Direct2D blending operations.</p> <p>The figure here shows an example of each of the modes with images that have an opacity of 1.0 or 0.5. </p><p></p><p>There can be slightly different interpretations of these enumeration values depending on where the value is used.</p><ul> <li> <p>With a composite effect: </p><strong>{{D2D1_COMPOSITE_MODE_DESTINATION_COPY}}</strong> is equivalent to <strong>{{D2D1_COMPOSITE_MODE_SOURCE_COPY}}</strong> with the inputs inverted.</li> <li> <p> As a parameter to <strong>{{ID2D1DeviceContext::DrawImage}}</strong>: </p><strong>{{D2D1_COMPOSITE_MODE_DESTINATION_COPY}}</strong> is a no-op since the destination is already in the selected target.</li> </ul> <dd> <p>The standard source-over-destination blend mode.</p> </dd> <dd> <p>The destination is rendered over the source.</p> </dd> <dd> <p>Performs a logical clip of the source pixels against the destination pixels.</p> </dd> <dd> <p>The inverse of the <strong>{{D2D1_COMPOSITE_MODE_SOURCE_IN}}</strong> operation.</p> </dd> <dd> <p>This is the logical inverse to <strong>{{D2D1_COMPOSITE_MODE_SOURCE_IN}}</strong>.</p> </dd> <dd> <p>The is the logical inverse to <strong>{{D2D1_COMPOSITE_MODE_DESTINATION_IN}}</strong>.</p> </dd> <dd> <p>Writes the source pixels over the destination where there are destination pixels.</p> </dd> <dd> <p>The logical inverse of <strong>{{D2D1_COMPOSITE_MODE_SOURCE_ATOP}}</strong>.</p> </dd> <dd> <p>The source is inverted with the destination.</p> </dd> <dd> <p>The channel components are summed.</p> </dd> <dd> <p>The source is copied to the destination; the destination pixels are ignored.</p> </dd> <dd> <p>Equivalent to <strong>{{D2D1_COMPOSITE_MODE_SOURCE_COPY}}</strong>, but pixels outside of the source bounds are unchanged. </p> </dd> <dd> <p>Destination colors are inverted according to a source mask. </p> </dd> <p>Represents the bit depth of the imaging pipeline in Direct2D.</p> <strong>Note</strong>?? Feature level 9 may or may not support precision types other than 8BPC.? <dd> <p>The buffer precision is not specified.</p> </dd> <dd> <p>Use 8-bit normalized integer per channel.</p> </dd> <dd> <p>Use 8-bit normalized integer standard {{RGB}} data per channel.</p> </dd> <dd> <p>Use 16-bit normalized integer per channel.</p> </dd> <dd> <p>Use 16-bit floats per channel.</p> </dd> <dd> <p>Use 32-bit floats per channel.</p> </dd> <dd> <p>Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits.</p> <p>Do not use this value.</p> </dd> <p>Specifies how the memory to be mapped from the corresponding <strong>{{ID2D1Bitmap1}}</strong> should be treated.</p> <p>The <strong>{{D2D1_MAP_OPTIONS_READ}}</strong> option can be used only if the bitmap was created with the <strong>{{D2D1_BITMAP_OPTIONS_CPU_READ}}</strong> flag.</p><p>These flags will be not be able to be used on bitmaps created by the <strong>{{ID2D1DeviceContext}}</strong>. However, the {{ID2D1SourceTransform}} will receive bitmaps for which these flags are valid.</p><p><strong>{{D2D1_MAP_OPTIONS_DISCARD}}</strong> can only be used with <strong>{{D2D1_MAP_OPTIONS_WRITE}}</strong>. Both of these options are only available through the effect author {{API}}, not through the Direct2D rendering {{API}}. </p> <p>This is used to specify the quality of image scaling with <strong>{{ID2D1DeviceContext::DrawImage}}</strong> and with the 2D affine transform effect. </p> <p>Specifies how units in Direct2D will be interpreted.</p> <p>Setting the unit mode to <strong>{{D2D1_UNIT_MODE_PIXELS}}</strong> is similar to setting the <strong>{{ID2D1DeviceContext}}</strong> dots per inch (dpi) to 96. However, Direct2D still checks the dpi to determine the threshold for enabling vertical antialiasing for text, and when the unit mode is restored, the dpi will be remembered.</p> <dd> <p>Units will be interpreted as device-independent pixels (1/96").</p> </dd> <dd> <p>Units will be interpreted as pixels.</p> </dd> <p>Defines options that should be applied to the color space.</p> <dd> <p>The color space is otherwise described, such as with a color profile.</p> </dd> <dd> <p>The color space is sRGB.</p> </dd> <dd> <p>The color space is scRGB.</p> </dd> <p>This specifies options that apply to the device context for its lifetime.</p> <dd> <p>The device context is created with default options.</p> </dd> <dd> <p>Distribute rendering work across multiple threads. Refer to Improving the performance of Direct2D apps for additional notes on the use of this flag.</p> </dd> <p>Defines how the world transform, dots per inch (dpi), and stroke width affect the shape of the pen used to stroke a primitive.</p> <p>If you specify <strong>{{D2D1_STROKE_TRANSFORM_TYPE_FIXED}}</strong> the stroke isn't affected by the world transform.</p><p>If you specify <strong>{{D2D1_STROKE_TRANSFORM_TYPE_FIXED}}</strong> the application has the same behavior in Windows 7 and later.</p><p>If you specify <strong>{{D2D1_STROKE_TRANSFORM_TYPE_HAIRLINE}}</strong> the stroke is always 1 pixel wide.</p><p>Apart from the stroke, any value derived from the stroke width is not affected when the transformType is either fixed or hairline. This includes miters, line caps and so on.</p><p> It is important to distinguish between the geometry being stroked and the shape of the stroke pen. When {{D2D1_STROKE_TRANSFORM_TYPE_FIXED}} or {{D2D1_STROKE_TRANSFORM_TYPE_HAIRLINE}} is specified, the geometry still respects the transform and dpi, but the pen that traces the geometry will not.</p><p>Here is an illustration of a stroke with dashing and a skew and stretch transform.</p><p>And here is an illustration of a fixed width stroke which does not get transformed.</p> <dd> <p>The stroke respects the currently set world transform, the dpi, and the stroke width.</p> </dd> <dd> <p>The stroke does not respect the world transform but it does respect the dpi and stroke width.</p> </dd> <dd> <p>The stroke is forced to 1 pixel wide (in device space) and does not respect the world transform, the dpi, or the stroke width.</p> </dd> <p>Used to specify the geometric blend mode for all Direct2D primitives. </p> <dd> <p>The standard source-over-destination blend mode.</p> </dd> <dd> <p>The source is copied to the destination; the destination pixels are ignored.</p> </dd> <dd> <p>The resulting pixel values use the minimum of the source and destination pixel values. Available in Windows?8 and later.</p> </dd> <dd> <p>The resulting pixel values are the sum of the source and destination pixel values. Available in Windows?8 and later.</p> </dd> <p>Specifies the threading mode used while simultaneously creating the device, factory, and device context. </p> <dd> <p>Resources may only be invoked serially. Device context state is not protected from multi-threaded access. </p> </dd> <dd> <p>Resources may be invoked from multiple threads. Resources use interlocked reference counting and their state is protected. </p> </dd> <p>Defines how to interpolate between colors.</p> <dd> <p>Colors are interpolated with straight alpha.</p> </dd> <dd> <p>Colors are interpolated with premultiplied alpha.</p> </dd> <p>Specifies how the layer contents should be prepared. </p> <dd> <p>Default layer behavior. A premultiplied layer target is pushed and its contents are cleared to transparent black. </p> </dd> <dd> <p> The layer is not cleared to transparent black.</p> </dd> <dd> <p> The layer is always created as ignore alpha. All content rendered into the layer will be treated as opaque.</p> </dd> <p>Defines when font resources should be subset during printing.</p> <dd> <p>Uses a heuristic strategy to decide when to subset fonts. </p> <strong>Note</strong>??If the print driver has requested archive-optimized content, then Direct2D will subset fonts once, for the entire document. ? </dd> <dd> <p>Subsets and embeds font resources in each page, then discards that font subset after the page is printed out. </p> </dd> <dd> <p>Sends out the original font resources without subsetting along with the page that first uses the font, and re-uses the font resources for later pages without resending them. </p> </dd> <p>This structure allows a <strong>{{ID2D1Bitmap1}}</strong> to be created with bitmap options and color context information available. </p> <p>If both <strong>dpiX</strong> and <strong>dpiY</strong> are 0, the dpi of the bitmap will be set to the desktop dpi if the device context is a windowed context, or 96 dpi for any other device context.</p> <p> Describes mapped memory from the <strong>{{ID2D1Bitmap1::Map}}</strong> {{API}}.</p> <p>The mapped rectangle is used to map a rectangle into the caller's address space.</p> <p>Describes limitations to be applied to an imaging effect renderer.</p> <p>The renderer can allocate tiles larger than the minimum tile allocation. The allocated tiles will be powers of two of the minimum size on each axis, except that the size on each axis will not exceed the guaranteed maximum texture size for the device feature level. </p><p>The <strong>minimumPixelRenderExtent</strong> is the size of the square tile below which the renderer will expand the tile allocation rather than attempting to subdivide the rendering tile any further. When this threshold is reached, the allocation tile size is expanded. This might occur repeatedly until rendering can either proceed or it is determined that the graph cannot be rendered.</p><p>The buffer precision is used for intermediate buffers if it is otherwise unspecified by the effects or the internal effect topology. The application can also use the <strong>Output.BufferPrecision</strong> method to specify the output precision for a particular effect. This takes precedence over the context precision. In addition, the effect might set a different precision internally if required. If the buffer type on the context is <strong>{{D2D1_BUFFER_PRECISION_UNKNOWN}}</strong> and otherwise not specified by the effect or transform, the precision of the output will be the maximum precision of the inputs to the transform. The buffer precision does not affect the number of channels used. </p> <dd> <p>The buffer precision used by default if the buffer precision is not otherwise specified by the effect or the transform.</p> </dd> <dd> <p>The tile allocation size to be used by the imaging effect renderer.</p> </dd> <p>Describes features of an effect.</p> <strong>Note</strong>??The caller should not rely heavily on the input rectangles returned by this structure. They can change due to subtle changes in effect implementations and due to optimization changes in the effect rendering system.? <dd> <p>The effect whose input connection is being specified.</p> </dd> <dd> <p>The input index of the effect that is being considered.</p> </dd> <dd> <p>The amount of data that would be available on the input. This can be used to query this information when the data is not yet available. </p> </dd> <p>Describes a point on a path geometry.</p> <dd> <p>The end point after walking the path.</p> </dd> <dd> <p>A unit vector indicating the tangent point.</p> </dd> <dd> <p>The index of the segment on which point resides. This index is global to the entire path, not just to a particular figure.</p> </dd> <dd> <p>The index of the figure on which point resides.</p> </dd> <dd> <p>The length of the section of the path stretching from the start of the path to the start of <strong>endSegment</strong>.</p> </dd> <p>Describes image brush features.</p> <dd> <p>The source rectangle in the image space from which the image will be tiled or interpolated.</p> </dd> <dd> <p>The extend mode in the image x-axis.</p> </dd> <dd> <p>The extend mode in the image y-axis.</p> </dd> <dd> <p>The interpolation mode to use when scaling the image brush.</p> </dd> <p> Describes the extend modes and the interpolation mode of an <strong>{{ID2D1BitmapBrush}}</strong>.</p> <p>Describes the stroke that outlines a shape.</p> <dd> <p>The cap to use at the start of each open figure.</p> </dd> <dd> <p>The cap to use at the end of each open figure.</p> </dd> <dd> <p>The cap to use at the start and end of each dash.</p> </dd> <dd> <p>The line join to use.</p> </dd> <dd> <p>The limit beyond which miters are either clamped or converted to bevels.</p> </dd> <dd> <p>The type of dash to use.</p> </dd> <dd> <p>The location of the first dash, relative to the start of the figure. </p> </dd> <dd> <p>The rule that determines what render target properties affect the nib of the stroke.</p> </dd> <p>Contains the content bounds, mask information, opacity settings, and other options for a layer resource.</p> <dd> <p>The content bounds of the layer. Content outside these bounds is not guaranteed to render.</p> </dd> <dd> <p>The geometric mask specifies the area of the layer that is composited into the render target. </p> </dd> <dd> <p>A value that specifies the antialiasing mode for the geometricMask. </p> </dd> <dd> <p> A value that specifies the transform that is applied to the geometric mask when composing the layer.</p> </dd> <dd> <p>An opacity value that is applied uniformly to all resources in the layer when compositing to the target.</p> </dd> <dd> <p>A brush that is used to modify the opacity of the layer. The brush is mapped to the layer, and the alpha channel of each mapped brush pixel is multiplied against the corresponding layer pixel. </p> </dd> <dd> <p>Additional options for the layer creation.</p> </dd> <p>Describes the drawing state of a device context.</p> <dd> <p>The antialiasing mode for subsequent nontext drawing operations. </p> </dd> <dd> <p>The antialiasing mode for subsequent text and glyph drawing operations.</p> </dd> <dd> <p>A label for subsequent drawing operations.</p> </dd> <dd> <p>A label for subsequent drawing operations.</p> </dd> <dd> <p>The transformation to apply to subsequent drawing operations.</p> </dd> <dd> <p>The blend mode for the device context to apply to subsequent drawing operations.</p> </dd> <dd> <p>{{D2D1_UNIT_MODE}}</p> </dd> <p>The creation properties for a <strong>{{ID2D1PrintControl}}</strong> object.</p> <p>Specifies the options with which the Direct2D device, factory, and device context are created. </p> <p>The root objects referred to here are the Direct2D device, Direct2D factory and the Direct2D device context. </p> <p>Represents a color context that can be used with an <strong>{{ID2D1Bitmap1}}</strong> object.</p> <p>Gets the color space of the color context.</p> <p>This method returns the color space of the contained {{ICC}} profile.</p> <p>Gets the size of the color profile associated with the bitmap. </p> <p>This can be used to allocate a buffer to receive the color profile bytes associated with the context.</p> <p>This method returns the size of the profile in bytes.</p> <p>Gets the color profile bytes for an <strong>{{ID2D1ColorContext}}</strong>. </p> <p>If <em>profileSize</em> is insufficient to store the entire profile, <em>profile</em> is zero-initialized before this method fails.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{D2DERR_INSUFFICIENT_BUFFER}}</td><td>The supplied buffer was too small to accomodate the data.</td></tr> </table><p>?</p> <p>Represents a resource domain whose objects and device contexts can be used together.</p> <p>Creates a new device context from a Direct2D device.</p> <p>The new device context will not have a selected target bitmap. The caller must create and select a bitmap as the target surface of the context.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The options to be applied to the created device context.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to the new device context.</p> </dd> <p>Creates an <strong>{{ID2D1PrintControl}}</strong> object that converts Direct2D primitives stored in <strong>{{ID2D1CommandList}}</strong> into a fixed page representation. The print sub-system then consumes the primitives.</p> <strong>Note</strong>??This is a blocking or synchronous function and might not return immediately. How quickly this function returns depends on run-time factors such as network status, print server configuration, and printer driver implementation?factors that are difficult to predict when writing an application. Calling this function from a thread that manages interaction with the user interface could make the application appear to be unresponsive.? <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_FAIL}}</td><td>Generic failure code.</td></tr> <tr><td>{{D2DERR_PRINT_FORMAT_NOT_SUPPORTED}}</td><td>The print format is not supported by the document target.</td></tr> </table><p>?</p> <p>Sets the maximum amount of texture memory Direct2D accumulates before it purges the image caches and cached texture allocations.</p> <strong>Note</strong>??Direct2D may exceed the maximum texture memory you set with this method for a single frame if necessary to render the frame.? <p>This method does not return a value.</p> <dd> <p>The new maximum texture memory in bytes.</p> </dd> <p>Sets the maximum amount of texture memory Direct2D accumulates before it purges the image caches and cached texture allocations.</p> <p>The maximum amount of texture memory in bytes.</p> <p>Clears all of the rendering resources used by Direct2D. </p> <p> If the function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Discards only resources that haven't been used for greater than the specified time in milliseconds. The default is 0 milliseconds.</p> </dd> <p>Represents a basic image-processing construct in Direct2D.</p> <p>An effect takes zero or more input images, and has an output image. The images that are input into and output from an effect are lazily evaluated. This definition is sufficient to allow an arbitrary graph of effects to be created from the application by feeding output images into the input image of the next effect in the chain.</p> <p>Sets the given input image by index. </p> <p>If the input index is out of range, the input image is ignored. </p> <p>This method does not return a value.</p> <dd> <p>The index of the image to set.</p> </dd> <dd> <p>The input image to set.</p> </dd> <dd> <p>Whether to invalidate the graph at the location of the effect input</p> </dd> <p>Allows the application to change the number of inputs to an effect.</p> <p>Most effects do not support a variable number of inputs. Use <strong>{{ID2D1Properties::GetValue}}</strong> with the <strong>{{D2D1_PROPERTY_MIN_INPUTS}}</strong> and <strong>{{D2D1_PROPERTY_MAX_INPUTS}}</strong> values to determine the number of inputs supported by an effect.</p><p>If the input count is less than the minimum or more than the maximum supported inputs, the call will fail.</p><p>If the input count is unchanged, the call will succeed with <strong>{{S_OK}}</strong>. </p><p>Any inputs currently selected on the effect will be unaltered by this call unless the number of inputs is made smaller. If the number of inputs is made smaller, inputs beyond the selected range will be released.</p><p>If the method fails, the existing input and input count will remain unchanged.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>One or more arguments are invalid.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Failed to allocate necessary memory.</td></tr> </table><p>?</p> <dd> <p>The number of inputs to the effect.</p> </dd> <p>Represents a basic image-processing construct in Direct2D.</p> <p>An effect takes zero or more input images, and has an output image. The images that are input into and output from an effect are lazily evaluated. This definition is sufficient to allow an arbitrary graph of effects to be created from the application by feeding output images into the input image of the next effect in the chain.</p> <p>Gets the number of inputs to the effect. </p> <p>This method returns the number of inputs to the effect. </p> <p>Gets the output image from the effect. </p> <p>The output image can be set as an input to another effect, or can be directly passed into the <strong>{{ID2D1DeviceContext}}</strong> in order to render the effect. </p><p>It is also possible to use <strong>QueryInterface</strong> to retrieve the same output image.</p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains the address of a reference to the output image for the effect.</p> </dd> <p>A developer implemented interface that allows a metafile to be replayed.</p> <p> This method is called once for each record stored in a metafile.</p> <p>Return true if the record is successfully.</p> <dd> <p>The type of the record.</p> </dd> <dd> <p>The data for the record.</p> </dd> <dd> <p>The byte size of the record data.</p> </dd> <p>A Direct2D resource that wraps a {{WMF}}, {{EMF}}, or {{EMF}}+ metafile.</p> <p>This method streams the contents of the command to the given metafile sink. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> </table><p>?</p> <dd> <p>The sink into which Direct2D will call back.</p> </dd> <p> Gets the bounds of the metafile, in device-independent pixels ({{DIPs}}), as reported in the metafile?s header.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> </table><p>?</p> <dd> <p>The bounds, in {{DIPs}}, of the metafile.</p> </dd> <p> </p><p>The command sink is implemented by you for an application when you want to receive a playback of the commands recorded in a command list. A typical usage will be for transforming the command list into another format such as {{XPS}} when some degree of conversion between the Direct2D primitives and the target format is required. </p><p>The command sink interface doesn't have any resource creation methods on it. The resources are still logically bound to the Direct2D device on which the command list was created and will be passed in to the command sink implementation.</p> <p>The <strong>{{ID2D1CommandSink}}</strong> can be implemented to receive a play-back of the commands recorded in a command list. This interface is typically used for transforming the command list into another format where some degree of conversion between the Direct2D primitives and the target format is required. </p><p>The <strong>{{ID2D1CommandSink}}</strong> interface does not have any resource creation methods. The resources are logically bound to the Direct2D device on which the <strong>{{ID2D1CommandList}}</strong> was created and will be passed in to the <strong>{{ID2D1CommandSink}}</strong> implementation. </p><p>Not all methods implemented by <strong>{{ID2D1DeviceContext}}</strong> are present.</p> <p>Notifies the implementation of the command sink that drawing is about to commence.</p> <p> This method always returns <strong>{{S_OK}}</strong>. </p> <p>Indicates when <strong>{{ID2D1CommandSink}}</strong> processing has completed.</p> <p>The <strong>{{HRESULT}}</strong> active at the end of the command list will be returned.</p><p> It allows the calling function or method to indicate a failure back to the stream implementation.</p> <p>If the method/function succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Sets the antialiasing mode that will be used to render any subsequent geometry.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The antialiasing mode selected for the command list.</p> </dd> <p>Sets the tags that correspond to the tags in the command sink.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The first tag to associate with the primitive.</p> </dd> <dd> <p>The second tag to associate with the primitive.</p> </dd> <p>Indicates the new default antialiasing mode for text.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The antialiasing mode for the text.</p> </dd> <p>Indicates more detailed text rendering parameters.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The parameters to use for text rendering.</p> </dd> <p>Sets a new transform.</p> <p>The transform will be applied to the corresponding device context.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The transform to be set.</p> </dd> <p>Sets a new primitive blend mode.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The primitive blend that will apply to subsequent primitives.</p> </dd> <p>The unit mode changes the meaning of subsequent units from device-independent pixels ({{DIPs}}) to pixels or the other way. The command sink does not record a {{DPI}}, this is implied by the playback context or other playback interface such as <strong>{{ID2D1PrintControl}}</strong>.</p> <p>The unit mode changes the interpretation of units from {{DIPs}} to pixels or vice versa.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <p>Clears the drawing area to the specified color. </p> <p>The clear color is restricted by the currently selected clip and layer bounds.</p><p>If no color is specified, the color should be interpreted by context. Examples include but are not limited to:</p><ul> <li>Transparent black for a premultiplied bitmap target.</li> <li>Opaque black for an ignore bitmap target.</li> <li>Containing no content (or white) for a printer page.</li> </ul> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The color to which the command sink should be cleared.</p> </dd> <p>Indicates the glyphs to be drawn.</p> <p> <strong>DrawText</strong> and <strong>DrawTextLayout</strong> are broken down into glyph runs and rectangles by the time the command sink is processed. So, these methods aren't available on the command sink. Since the application may require additional callback processing when calling <strong>DrawTextLayout</strong>, this semantic can't be easily preserved in the command list.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The upper left corner of the baseline.</p> </dd> <dd> <p>The glyphs to render.</p> </dd> <dd> <p>Additional non-rendering information about the glyphs.</p> </dd> <dd> <p>The brush used to fill the glyphs.</p> </dd> <dd> <p>The measuring mode to apply to the glyphs.</p> </dd> <p>Draws a line drawn between two points.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The start point of the line.</p> </dd> <dd> <p>The end point of the line.</p> </dd> <dd> <p>The brush used to fill the line.</p> </dd> <dd> <p>The width of the stroke to fill the line.</p> </dd> <dd> <p>The style of the stroke. If not specified, the stroke is solid.</p> </dd> <p>Indicates the geometry to be drawn to the command sink.</p> <p> <strong>Ellipses</strong> and <strong>rounded rectangles</strong> are converted to the corresponding ellipse and rounded rectangle geometries before calling into the <strong>DrawGeometry</strong> method. </p> <p>An {{HRESULT}}. </p> <dd> <p>The geometry to be stroked.</p> </dd> <dd> <p>The brush that will be used to fill the stroked geometry.</p> </dd> <dd> <p>The width of the stroke.</p> </dd> <dd> <p>The style of the stroke.</p> </dd> <p>Draws a rectangle.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The rectangle to be drawn to the command sink.</p> </dd> <dd> <p>The brush used to stroke the geometry.</p> </dd> <dd> <p>The width of the stroke.</p> </dd> <dd> <p>The style of the stroke.</p> </dd> <p>Draws a bitmap to the render target.</p> <p>The <em>destinationRectangle</em> parameter defines the rectangle in the target where the bitmap will appear (in device-independent pixels ({{DIPs}})). This is affected by the currently set transform and the perspective transform, if set. If you specify {{NULL}}, then the destination rectangle is (left=0, top=0, right = width(<em>sourceRectangle</em>), bottom = height(<em>sourceRectangle</em>). </p><p>The <em>sourceRectangle</em> defines the sub-rectangle of the source bitmap (in {{DIPs}}). <strong>DrawBitmap</strong> clips this rectangle to the size of the source bitmap, so it's impossible to sample outside of the bitmap. If you specify {{NULL}}, then the source rectangle is taken to be the size of the source bitmap. </p><p>The <em>perspectiveTransform</em> is specified in addition to the transform on device context. </p> <p>This method does not return a value.</p> <dd> <p>The bitmap to draw.</p> </dd> <dd> <p>The destination rectangle. The default is the size of the bitmap and the location is the upper left corner of the render target.</p> </dd> <dd> <p>The opacity of the bitmap.</p> </dd> <dd> <p>The interpolation mode to use.</p> </dd> <dd> <p>An optional source rectangle.</p> </dd> <dd> <p>An optional perspective transform.</p> </dd> <p>Draws the provided image to the command sink. </p> <p>Because the image can itself be a command list or contain an effect graph that in turn contains a command list, this method can result in recursive processing.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The image to be drawn to the command sink.</p> </dd> <dd> <p>This defines the offset in the destination space that the image will be rendered to. The entire logical extent of the image will be rendered to the corresponding destination. If not specified, the destination origin will be (0, 0). The top-left corner of the image will be mapped to the target offset. This will not necessarily be the origin.</p> </dd> <dd> <p>The corresponding rectangle in the image space will be mapped to the provided origins when processing the image.</p> </dd> <dd> <p>The interpolation mode to use to scale the image if necessary. </p> </dd> <dd> <p>If specified, the composite mode that will be applied to the limits of the currently selected clip.</p> </dd> <p>Draw a metafile to the device context.</p> <p>The <em>targetOffset</em> defines the offset in the destination space that the image will be rendered to. The entire logical extent of the image is rendered to the corresponding destination. If you don't specify the offset, the destination origin will be (0, 0). The top, left corner of the image will be mapped to the target offset. This will not necessarily be the origin. </p> <p>This method does not return a value.</p> <dd> <p>The metafile to draw.</p> </dd> <dd> <p>The offset from the upper left corner of the render target.</p> </dd> <p>Indicates a mesh to be filled by the command sink.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The mesh object to be filled.</p> </dd> <dd> <p>The brush with which to fill the mesh.</p> </dd> <p>Fills an opacity mask on the command sink.</p> <p>The opacity mask bitmap must be considered to be clamped on each axis.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The bitmap whose alpha channel will be sampled to define the opacity mask.</p> </dd> <dd> <p>The brush with which to fill the mask.</p> </dd> <dd> <p>The destination rectangle in which to fill the mask. If not specified, this is the origin.</p> </dd> <dd> <p>The source rectangle within the opacity mask. If not specified, this is the entire mask.</p> </dd> <p>Indicates to the command sink a geometry to be filled.</p> <p>If the opacity brush is specified, the primary brush will be a bitmap brush fixed on both the x-axis and the y-axis.</p><p>Ellipses and rounded rectangles are converted to the corresponding geometry before being passed to <strong>FillGeometry</strong>.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The geometry that should be filled.</p> </dd> <dd> <p>The primary brush used to fill the geometry.</p> </dd> <dd> <p>A brush whose alpha channel is used to modify the opacity of the primary fill brush. </p> </dd> <p>Indicates to the command sink a rectangle to be filled.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The rectangle to fill.</p> </dd> <dd> <p>The brush with which to fill the rectangle.</p> </dd> <p>Pushes a clipping rectangle onto the clip and layer stack.</p> <p>If the current world transform is not preserving the axis, <em>clipRectangle</em> is transformed and the bounds of the transformed rectangle are used instead.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The rectangle that defines the clip.</p> </dd> <dd> <p>The antialias mode for the clip.</p> </dd> <p>Pushes a layer onto the clip and layer stack.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The parameters that define the layer.</p> </dd> <dd> <p>The layer resource that receives subsequent drawing operations.</p> </dd> <p>Removes an axis-aligned clip from the layer and clip stack.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <p>Removes a layer from the layer and clip stack.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <p>Represents a sequence of commands that can be recorded and played back.</p> <p>The command list does not include static copies of resources with the recorded set of commands. All bitmaps, effects, and geometries are stored as references to the actual resource and all the brushes are stored by value. All the resource creation and destruction happens outside of the command list. The following table lists resources and how they are treated inside of a command list.</p><table> <tr><th>Resource</th><th>How it is treated by the command list</th></tr> <tr><td>Solid-color brush</td><td>Passed by value.</td></tr> <tr><td>Bitmap brush</td><td>The brush is passed by value but the bitmap that is used to create the brush is in fact referenced.</td></tr> <tr><td>Gradient brushes ? both linear and radial gradient</td><td>The brush is passed by value but the gradient stop collection itself is referenced. The gradient stop collection object is immutable. </td></tr> <tr><td>Bitmaps</td><td>Passed by reference.</td></tr> <tr><td>Drawing state block</td><td>The actual state on the device context is converted into set functions like set transform and is passed by value.</td></tr> <tr><td>Geometry</td><td>Immutable object passed by value.</td></tr> <tr><td>Stroke style</td><td>Immutable object passed by value.</td></tr> <tr><td>Mesh</td><td>Immutable object passed by value.</td></tr> </table><p>?</p> <p>Streams the contents of the command list to the specified command sink. </p> <p>The command sink can be implemented by any caller of the {{API}}.</p><p>If the caller makes any design-time failure calls while a command list is selected as a target, the command list is placed in an error state. The stream call fails without making any calls to the passed in sink.</p><p>Sample use:</p><pre>Class MyCommandSink : public {{ID2D1CommandSink}} { public: // All of the {{ID2D1CommandSink}} methods implemented here. }; {{HRESULT}} StreamToMyCommandSink( __in {{ID2D1CommandList}} *pCommandList ) { {{HRESULT}} hr = {{S_OK}}; MyCommandSink *pCommandSink = new MyCommandSink(); hr = pCommandSink ? {{S_OK}} : {{E_OUTOFMEMORY}}; if ({{SUCCEEDED}}(hr)) { // Receive the contents of the command sink streamed to the sink. hr = pCommandList-&gt;Stream(pCommandSink); } SafeRelease(&amp;pCommandSink); return hr; }</pre> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p><p>The return value indicates any failures the command sink implementation returns through its <strong>EndDraw</strong> method.</p> <dd> <p>The sink into which the command list will be streamed.</p> </dd> <p>Instructs the command list to stop accepting commands so that you can use it as an input to an effect or in a call to <strong>{{ID2D1DeviceContext::DrawImage}}</strong>. You should call the method after it has been attached to an <strong>{{ID2D1DeviceContext}}</strong> and written to but before the command list is used.</p> <p>This method returns {{D2DERR_WRONG_STATE}} if it has already been called on the command list. If an error occurred on the device context during population, the method returns that error. Otherwise, the method returns {{S_OK}}. </p><p>If the <strong>Close</strong> method returns an error, any future use of the command list results in the same error.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{D2DERR_WRONG_STATE}} </td><td>Close has already been called on the command list.</td></tr> </table><p>?</p><p> </p><strong>Note</strong>??If the device context associated with the command list has an error, the command list returns the same error.? <p>Converts Direct2D primitives stored in an <strong>{{ID2D1CommandList}}</strong> into a fixed page representation. The print sub-system then consumes the primitives.</p> <p>Converts Direct2D primitives in the passed-in command list into a fixed page representation for use by the print subsystem. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> <tr><td>{{D2DERR_PRINT_JOB_CLOSED}}</td><td>The print job is already finished.</td></tr> </table><p>?</p> <dd> <p>The command list that contains the rendering operations.</p> </dd> <dd> <p>The size of the page to add.</p> </dd> <dd> <p>The print ticket stream.</p> </dd> <dd> <p>Contains the first label for subsequent drawing operations. This parameter is passed uninitialized. If {{NULL}} is specified, no value is retrieved for this parameter.</p> </dd> <dd> <p>Contains the second label for subsequent drawing operations. This parameter is passed uninitialized. If {{NULL}} is specified, no value is retrieved for this parameter. </p> </dd> <p>Passes all remaining resources to the print sub-system, then clean up and close the current print job. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> <tr><td>{{D2DERR_PRINT_JOB_CLOSED}}</td><td>The print job is already finished.</td></tr> </table><p>?</p> <p>Represents a brush based on an <strong>{{ID2D1Image}}</strong>.</p> <p>Sets the image associated with the provided image brush.</p> <p>This method does not return a value.</p> <dd> <p>The image to be associated with the image brush.</p> </dd> <p>Sets how the content inside the source rectangle in the image brush will be extended on the x-axis.</p> <p>This method does not return a value.</p> <dd> <p>The extend mode on the x-axis of the image.</p> </dd> <p>Sets the extend mode on the y-axis.</p> <p>This method does not return a value.</p> <dd> <p>The extend mode on the y-axis of the image.</p> </dd> <p>Sets the interpolation mode for the image brush.</p> <p>This method does not return a value.</p> <dd> <p>How the contents of the image will be interpolated to handle the brush transform.</p> </dd> <p>Sets the source rectangle in the image brush.</p> <p>The top left corner of the <em>sourceRectangle</em> parameter maps to the brush space origin. That is, if the brush and world transforms are both identity, the portion of the image in the top left corner of the source rectangle will be rendered at (0,0) in the render target.</p><p>The source rectangle will be expanded differently depending on whether the input image is based on pixels (a bitmap or effect) or by a command list. </p><ul> <li>If the input image is a bitmap or an effect, the rectangle will be expanded to encapsulate a full input pixel before being additionally down-scaled to ensure that the projected rectangle will be correct in the final scene-space.</li> <li>If the input image is a command list, the command list will be slightly expanded to encapsulate a full input pixel. </li> </ul> <p>This method does not return a value.</p> <dd> <p>The source rectangle that defines the portion of the image to tile.</p> </dd> <p>Gets the image associated with the image brush.</p> <p>This method does not return a value.</p> <dd> <p> When this method returns, contains the address of a reference to the image associated with this brush. </p> </dd> <p>Gets the extend mode of the image brush on the x-axis.</p> <p>This method returns the x-extend mode.</p> <p>Gets the extend mode of the image brush on the y-axis of the image.</p> <p>This method returns the y-extend mode.</p> <p>Gets the interpolation mode of the image brush.</p> <p>This method returns the interpolation mode.</p> <p>Gets the rectangle that will be used as the bounds of the image when drawn as an image brush.</p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains the address of the output source rectangle.</p> </dd> <p>Paints an area with a bitmap. </p> <p>Sets the interpolation mode for the brush.</p> <strong>Note</strong>??If <em>interpolationMode</em> is not a valid member of {{D2D1_INTERPOLATION_MODE}}, then this method silently ignores the call.? <dd> <p>The mode to use.</p> </dd> <p>Returns the current interpolation mode of the brush.</p> <p>The current interpolation mode.</p> <p>Describes the caps, miter limit, line join, and dash information for a stroke.</p> <p>This interface adds functionality to <strong>{{ID2D1StrokeStyle}}</strong>.</p> <p>Gets the stroke transform type.</p> <p>This method returns the stroke transform type.</p> <p>The <strong>{{ID2D1PathGeometry1}}</strong> interface adds functionality to <strong>{{ID2D1PathGeometry}}</strong>. In particular, it provides the path geometry-specific <strong>ComputePointAndSegmentAtLength</strong> method.</p> <p>This interface adds functionality to <strong>{{ID2D1PathGeometry}}</strong>.</p> <p> Computes the point that exists at a given distance along the path geometry along with the index of the segment the point is on and the directional vector at that point. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>One of the inputs was in an invalid range.</td></tr> </table><p>?</p> <dd> <p>The distance to walk along the path.</p> </dd> <dd> <p>The index of the segment at which to begin walking. Note: This index is global to the entire path, not just a particular figure.</p> </dd> <dd> <p>The transform to apply to the path prior to walking.</p> </dd> <dd> <p>The flattening tolerance to use when walking along an arc or Bezier segment. The flattening tolerance is the maximum error allowed when constructing a polygonal approximation of the geometry. No point in the polygonal representation will diverge from the original geometry by more than the flattening tolerance. Smaller values produce more accurate results but cause slower execution.</p> </dd> <dd> <p>When this method returns, contains a description of the point that can be found at the given location.</p> </dd> <p>Represents a set of run-time bindable and discoverable properties that allow a data-driven application to modify the state of a Direct2D effect.</p> <p>This interface supports access through either indices or property names. In addition to top-level properties, each property in an <strong>{{ID2D1Properties}}</strong> object may contain an <strong>{{ID2D1Properties}}</strong> object, which stores metadata describing the parent property. </p> <p>Gets the number of top-level properties. </p> <p>This method returns the number of custom properties on the <strong>{{ID2D1Properties}}</strong> interface. System properties and sub-properties are part of a closed set, and are enumerable by iterating over this closed set.</p> <p>This method returns the number of custom (non-system) properties that can be accessed by the object.</p> Gets the property name that corresponds to the given index. <p>Gets the number of characters for the given property name. This is a template overload. See Remarks.</p> <p>The value returned by this method can be used to ensure that the buffer size for <strong>GetPropertyName</strong> is appropriate. </p><p> </p>template&lt;typename U&gt; {{UINT32}} GetPropertyNameLength( U index ) {{CONST}}; <p>This method returns the size in characters of the name corresponding to the given property index, or zero if the property index does not exist. </p> <dd> <p>The index of the property name to retrieve.</p> </dd> <p>Gets the <strong>{{D2D1_PROPERTY_TYPE}}</strong> of the selected property. </p> <p>If the property does not exist, the method returns <strong>{{D2D1_PROPERTY_TYPE_UNKNOWN}}</strong>.</p> <p>This method returns a <strong>{{D2D1_PROPERTY_TYPE}}</strong>-typed value for the type of the selected property.</p> <p>Gets the index corresponding to the given property name. </p> <p> If the property does not exist, this method returns <strong>{{D2D1_INVALID_PROPERTY_INDEX}}</strong>. This reserved value will never map to a valid index and will cause <strong>{{NULL}}</strong> or sentinel values to be returned from other parts of the property interface.</p> <p>The index of the corresponding property name.</p> <dd> <p>The name of the property to retrieve.</p> </dd> Sets the named property to the given value. <p>Sets the corresponding property by index. This is a template overload. See Remarks.</p> <p> </p>template&lt;typename T, typename U&gt; {{HRESULT}} SetValue( U index, _In_ const T &amp;value ); <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{D2DERR_INVALID_PROPERTY}}</td><td>The specified property does not exist.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Failed to allocate necessary memory.</td></tr> <tr><td>{{D3DERR_OUT_OF_VIDEO_MEMORY}}</td><td>Failed to allocate required video memory.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>One or more arguments are invalid.</td></tr> <tr><td>{{E_FAIL}}</td><td>Unspecified failure.</td></tr> </table><p>?</p> <dd> <p>The index of the property to set.</p> </dd> <dd> <p>The data to set.</p> </dd> <p>Gets the property value by name. This is a template overload. See Remarks.</p> <p>If <em>propertyName</em> does not exist, no information is retrieved.</p><p>Any error not in the standard set returned by a property implementation will be mapped into the standard error range.</p><p> </p>template&lt;typename T&gt; T GetValueByName( _In_ {{PCWSTR}} propertyName ) const; <p>Returns the value requested.</p> <dd> <p>The property name to get.</p> </dd> <p>Gets the value of the property by index. This is a template overload. See Remarks.</p> <p> </p>template&lt;typename T, typename U&gt; T GetValue( U index ) const; <p>Returns the value requested.</p> <dd> <p>The index of the property from which the value is to be obtained.</p> </dd> <p>Gets the size of the property value in bytes, using the property index. This is a template overload. See Remarks.</p> <p>This method returns zero if <em>index</em> does not exist. </p><p> </p>template&lt;typename U&gt; {{UINT32}} GetValueSize( U index ) {{CONST}}; <p>This method returns size of the value in bytes, using the property index </p> <dd> <p>The index of the property.</p> </dd> <p>Gets the sub-properties of the provided property by index. This is a template overload. See Remarks. </p> <p> If there are no sub-properties, <em>subProperties</em> will be <strong>{{NULL}}</strong>, and <strong>{{D2DERR_NO_SUBPROPERTIES}}</strong> will be returned. </p><p> </p>template&lt;typename U&gt; {{HRESULT}} GetSubProperties( U index, _Outptr_opt_ {{ID2D1Properties}} **subProperties ) {{CONST}}; <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{D2DERR_NO_SUBPROPERTIES}}</td><td>The specified property does not exist.</td></tr> </table><p>?</p> <dd> <p>The index of the sub-properties to be retrieved.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to the sub-properties.</p> </dd> <p> Represents a bitmap that can be used as a surface for an <strong>{{ID2D1DeviceContext}}</strong> or mapped into system memory, and can contain additional color context information.</p> <p>Gets the color context information associated with the bitmap. </p> <p>If the bitmap was created without specifying a color context, the returned context is <strong>{{NULL}}</strong>.</p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains the address of a reference to the color context interface associated with the bitmap.</p> </dd> <p>Gets the options used in creating the bitmap.</p> <p>This method returns the options used.</p> <p>Gets either the surface that was specified when the bitmap was created, or the default surface created when the bitmap was created. </p> <p>The bitmap used must have been created from a {{DXGI}} surface render target, a derived render target, or a device context created from an <strong>{{ID2D1Device}}</strong>.</p><p>The returned surface can be used with Microsoft Direct3D or any other {{API}} that interoperates with shared surfaces. The application must transitively ensure that the surface is usable on the Direct3D device that is used in this context. For example, if using the surface with Direct2D then the Direct2D render target must have been created through <strong>{{ID2D1Factory::CreateDxgiSurfaceRenderTarget}}</strong> or on a device context created on the same device.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{D2DERR_BITMAP_BOUND_AS_TARGET}}</td><td>Cannot draw with a bitmap that is currently bound as the target bitmap.</td></tr> </table><p>?</p> <dd> <p>The underlying {{DXGI}} surface for the bitmap.</p> </dd> <p>Maps the given bitmap into memory.</p> <strong>Note</strong>??You can't use bitmaps for some purposes while mapped. Particularly, the <strong>{{ID2D1Bitmap::CopyFromBitmap}}</strong> method doesn't work if either the source or destination bitmap is mapped.?<p>The bitmap must have been created with the <strong>{{D2D1_BITMAP_OPTIONS_CPU_READ}}</strong> flag specified.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>One or more arguments are not valid</td></tr> <tr><td>{{D3DERR_DEVICELOST}}</td><td>The device has been lost but cannot be reset at this time.</td></tr> </table><p>?</p> <dd> <p>The options used in mapping the bitmap into memory.</p> </dd> <dd> <p>When this method returns, contains a reference to the rectangle that is mapped into memory.</p> </dd> <p>Unmaps the bitmap from memory. </p> <p>Any memory returned from the <strong>Map</strong> call is now invalid and may be reclaimed by the operating system or used for other purposes. </p><p>The bitmap must have been previously mapped.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>One or more arguments are not valid.</td></tr> <tr><td>{{E_POINTER}}</td><td>Pointer is not valid.</td></tr> </table><p>?</p> <p>Represents a collection of <strong>{{D2D1_GRADIENT_STOP}}</strong> objects for linear and radial gradient brushes. It provides get methods for all the new parameters added to the gradient stop collection.</p> <p>Copies the gradient stops from the collection into memory.</p> <p>If the <strong>{{ID2D1GradientStopCollection1}}</strong> object was created using <strong>{{ID2D1DeviceContext::CreateGradientStopCollection}}</strong>, this method returns the same values specified in the creation method. If the <strong>{{ID2D1GradientStopCollection1}}</strong> object was created using <strong>{{ID2D1RenderTarget::CreateGradientStopCollection}}</strong>, the stops returned here will first be transformed into the gamma space specified by the <em>colorInterpolationGamma</em> parameter. See the <strong>{{ID2D1DeviceContext::CreateGradientStopCollection}}</strong> method for more info about color space and gamma space.</p><p>If <em>gradientStopsCount</em> is less than the number of gradient stops in the collection, the remaining gradient stops are omitted. If <em>gradientStopsCount</em> is larger than the number of gradient stops in the collection, the extra gradient stops are set to <strong>{{NULL}}</strong>. To obtain the number of gradient stops in the collection, use the <strong>GetGradientStopCount</strong> method.</p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains a reference to a one-dimensional array of <strong>{{D2D1_GRADIENT_STOP}}</strong> structures.</p> </dd> <dd> <p>The number of gradient stops to copy. </p> </dd> <p>Gets the color space of the input colors as well as the space in which gradient stops are interpolated.</p> <p>If this object was created using <strong>{{ID2D1RenderTarget::CreateGradientStopCollection}}</strong>, this method returns the color space related to the color interpolation gamma. </p> <p>This method returns the color space.</p> <p>Gets the color space after interpolation has occurred.</p> <p>If you create using <strong>{{ID2D1RenderTarget::CreateGradientStopCollection}}</strong>, this method returns <strong>{{D2D1_COLOR_SPACE_SRGB}}</strong>. </p> <p>This method returns the color space.</p> <p>Gets the precision of the gradient buffer.</p> <p>If this object was created using <strong>{{ID2D1RenderTarget::CreateGradientStopCollection}}</strong>, this method returns {{D2D1_BUFFER_PRECISION_8BPC_UNORM}}. </p> <p>The buffer precision of the gradient buffer.</p> <p>Retrieves the color interpolation mode that the gradient stop collection uses.</p> <p>The color interpolation mode.</p> <p>Implementation of a drawing state block that adds the functionality of primitive blend in addition to already existing antialias mode, transform, tags and text rendering mode.</p><strong>Note</strong>??You can get an <strong>{{ID2D1DrawingStateBlock1}}</strong> using the <strong>{{ID2D1Factory::CreateDrawingStateBlock}}</strong> method or you can use the QueryInterface method on an <strong>{{ID2D1DrawingStateBlock}}</strong> object.? <p>Gets the antialiasing mode, transform, tags, primitive blend, and unit mode portion of the drawing state.</p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains the antialiasing mode, transform, tags, primitive blend, and unit mode portion of the drawing state. You must allocate storage for this parameter.</p> </dd> <p>Sets the <strong>{{D2D1_DRAWING_STATE_DESCRIPTION1}}</strong> associated with this drawing state block.</p> <p>This method does not return a value.</p> <p>Represents a set of state and command buffers that are used to render to a target.</p><p>The device context can render to a target bitmap or a command list. </p> <p> Any resource created from a device context can be shared with any other resource created from a device context when both contexts are created on the same device. </p> <p>Creates a bitmap that can be used as a target surface, for reading back to the {{CPU}}, or as a source for the <strong>DrawBitmap</strong> and <strong>{{ID2D1BitmapBrush}}</strong> {{APIs}}. In addition, color context information can be passed to the bitmap.</p> <p>The new bitmap can be used as a target for <strong>SetTarget</strong> if it is created with <strong>{{D2D1_BITMAP_OPTIONS_TARGET}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> <tr><td>{{D3DERR_OUTOFVIDEOMEMORY}}</td><td>Direct3D does not have enough display memory to perform the operation.</td></tr> </table><p>?</p> <p>Creates a Direct2D bitmap by copying a {{WIC}} bitmap.</p> <p>Starting with Windows?8.1, the <em>bitmapProperties</em> parameter is optional. When it is not specified, the created bitmap inherits the pixel format and alpha mode from <em>wicBitmapSource</em>. For a list of supported pixel formats and alpha modes, see Supported Pixel Formats and Alpha Modes.</p><p>When the <em>bitmapProperties</em> parameter is specified, the value in <em>bitmapProperties-&gt;pixelFormat</em> must either be <strong>{{DXGI_FORMAT_UNKNOWN}}</strong> or must match the {{WIC}} pixel format in <em>wicBitmapSource</em>.</p><p>When <em>bitmapProperties-&gt;pixelFormat.alphaMode</em> is set to <strong>{{D2D1_ALPHA_MODE_UNKNOWN}}</strong>, the newly created bitmap inherits the alpha mode from <em>wicBitmapSource</em>. When <em>bitmapProperties-&gt;pixelFormat.alphaMode</em> is set to <strong>{{D2D1_ALPHA_MODE_PREMULTIPLIED}}</strong>, <strong>{{D2D1_ALPHA_MODE_STRAIGHT}}</strong>, or <strong>{{D2D1_ALPHA_MODE_IGNORE}}</strong>, this forces the newly created bitmap to use the specified alpha mode.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The {{WIC}} bitmap source to copy from.</p> </dd> <dd> <p>A bitmap properties structure that specifies bitmap creation options.</p> </dd> <dd> <p>The address of the newly created bitmap object.</p> </dd> <p>Creates a color context.</p> <p>The new color context can be used in <strong>{{D2D1_BITMAP_PROPERTIES1}}</strong> to initialize the color context of a created bitmap.</p><p>When <em>space</em> is <strong>{{D2D1_COLOR_SPACE_CUSTOM}}</strong>, <em>profile</em> and <em>profileSize</em> must be specified. Otherwise, these parameters should be set to <strong>{{NULL}}</strong> and zero respectively. When the space is {{D2D1_COLOR_SPACE_CUSTOM}}, the model field of the profile header is inspected to determine if this profile is sRGB or scRGB and the color space is updated respectively. Otherwise the space remains custom.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> </table><p>?</p> <dd> <p>The space of color context to create.</p> </dd> <dd> <p>A buffer containing the {{ICC}} profile bytes used to initialize the color context when <em>space</em> is <strong>{{D2D1_COLOR_SPACE_CUSTOM}}</strong>. For other types, the parameter is ignored and should be set to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>The size in bytes of <em>Profile</em>.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to a new color context object.</p> </dd> <p>Creates a color context by loading it from the specified filename. The profile bytes are the contents of the file specified by <em>Filename</em>.</p> <p>The new color context can be used in <strong>{{D2D1_BITMAP_PROPERTIES1}}</strong> to initialize the color context of a created bitmap. The model field of the profile header is inspected to determine whether this profile is sRGB or scRGB and the color space is updated respectively. Otherwise the space is custom.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> </table><p>?</p> <dd> <p>The path to the file containing the profile bytes to initialize the color context with.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to a new color context.</p> </dd> <p>Creates a color context from an <strong>{{IWICColorContext}}</strong>. The <strong>{{D2D1ColorContext}}</strong> space of the resulting context varies, see Remarks for more info.</p> <p>The new color context can be used in <strong>{{D2D1_BITMAP_PROPERTIES1}}</strong> to initialize the color context of a created bitmap. The model field of the profile header is inspected to determine whether this profile is sRGB or scRGB and the color space is updated respectively. Otherwise the space is custom.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> </table><p>?</p> <p> Creates a bitmap from a {{DXGI}} surface that can be set as a target surface or have additional color context information specified.</p> <p>If the bitmap properties are not specified, the following information is assumed: </p><ul> <li>The bitmap {{DPI}} is 96.</li> <li>The pixel format matches that of the surface.</li> <li>The returned bitmap will inherit the bind flags of the {{DXGI}} surface.<ul> <li>However, only the subset of flags meaningful to Direct2D will be inherited. For example, {{D3D10_USAGE_DYNAMIC}} is not compatible with any public Direct2D flags.</li> </ul> </li> <li>The color context is unknown.</li> <li>The alpha mode of the bitmap will be premultiplied (common case) or straight ({{A8}}). </li> </ul><p>If the bitmap properties are specified, the bitmap properties will be used as follows:</p><ul> <li>The bitmap {{DPI}} will be specified by the bitmap properties.</li> <li>If both dpiX and dpiY are 0, the bitmap {{DPI}} will be 96.</li> <li>The pixel format must be compatible with the shader resource view or render target view of the surface.</li> <li>The bitmap options must be compatible with the bind flags of the {{DXGI}} surface. However, they may be a subset. This will influence what resource views are created by the bitmap.</li> <li>The color context information will be used from the bitmap properties, if specified.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> <tr><td>{{D3DERR_OUTOFVIDEOMEMORY}}</td><td>Direct3D does not have enough display memory to perform the operation.</td></tr> </table><p>?</p> <dd> <p>The {{DXGI}} surface from which the bitmap can be created. </p> <strong>Note</strong>??The {{DXGI}} surface must have been created from the same Direct3D device that the Direct2D device context is associated with. ? </dd> <dd> <p>The bitmap properties specified in addition to the surface. </p> </dd> <dd> <p>When this method returns, contains the address of a reference to a new bitmap object.</p> </dd> <p>Creates an effect for the specified class {{ID}}. </p> <p> If the created effect is a custom effect that is implemented in a {{DLL}}, this doesn't increment the reference count for that {{DLL}}. If the application deletes an effect while that effect is loaded, the resulting behavior is unpredictable. </p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call. </td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> <tr><td>{{D3DERR_OUTOFVIDEOMEMORY}}</td><td>Direct3D does not have enough display memory to perform the operation. </td></tr> <tr><td>{{D2DERR_EFFECT_IS_NOT_REGISTERED}}</td><td>The specified effect is not registered by the system.</td></tr> <tr><td>{{D2DERR_INSUFFICIENT_DEVICE_CAPABILITIES}} </td><td>The effect requires capabilities not supported by the {{D2D}} device.</td></tr> </table><p>?</p> <dd> <p>The class {{ID}} of the effect to create. See Built-in Effects for a list of effect {{IDs}}.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to a new effect.</p> </dd> <p>Creates a gradient stop collection, enabling the gradient to contain color channels with values outside of [0,1] and also enabling rendering to a high-color render target with interpolation in sRGB space.</p> <p>This method linearly interpolates between the color stops. An optional color space conversion is applied post-interpolation. Whether and how this gamma conversion is applied is determined by the pre- and post-interpolation. This method will fail if the device context does not support the requested buffer precision.</p><p>In order to get the desired result, you need to ensure that the inputs are specified in the correct color space. </p><p>You must always specify colors in straight alpha, regardless of interpolation mode being premultiplied or straight. The interpolation mode only affects the interpolated values. Likewise, the stops returned by <strong>{{ID2D1GradientStopCollection::GetGradientStops}}</strong> will always have straight alpha. </p><p>If you specify <strong>{{D2D1_COLOR_INTERPOLATION_MODE_PREMULTIPLIED}}</strong>, then all stops are premultiplied before interpolation, and then un-premultiplied before color conversion. </p><p>Starting with Windows?8, the interpolation behavior of this method has changed. </p><p>The table here shows the behavior in Windows?7 and earlier.</p><table> <tr><th>Gamma</th><th>Before Interpolation Behavior</th><th>After Interpolation Behavior</th><th>GetColorInteroplationGamma (output color space) </th></tr> <tr><td>1.0</td><td>Clamps the inputs and then converts from sRGB to scRGB.</td><td>Converts from scRGB to sRGB post-interpolation.</td><td>1.0</td></tr> <tr><td>2.2</td><td>Clamps the inputs.</td><td>No Operation</td><td>2.2</td></tr> </table><p>?</p><p>The table here shows the behavior in Windows?8 and later.</p><table> <tr><th>Gamma</th><th>Before Interpolation Behavior</th><th>After Interpolation Behavior</th><th>GetColorInteroplationGamma (output color space) </th></tr> <tr><td>sRGB to scRGB</td><td>No Operation</td><td>Clamps the outputs and then converts from sRGB to scRGB.</td><td>1.0</td></tr> <tr><td>scRGB to sRGB</td><td>No Operation</td><td>Clamps the outputs and then converts from sRGB to scRGB.</td><td>2.2</td></tr> <tr><td>sRGB to sRGB</td><td>No Operation</td><td>No Operation</td><td>2.2</td></tr> <tr><td>scRGB to scRGB</td><td>No Operation</td><td>No Operation</td><td>1.0</td></tr> </table><p>?</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> </table><p>?</p> <dd> <p>An array of color values and offsets.</p> </dd> <dd> <p>The number of elements in the <em>gradientStops</em> array.</p> </dd> <dd> <p>Specifies both the input color space and the space in which the color interpolation occurs.</p> </dd> <dd> <p>The color space that colors will be converted to after interpolation occurs.</p> </dd> <dd> <p>The precision of the texture used to hold interpolated values.</p> <strong>Note</strong>??This method will fail if the underlying Direct3D device does not support the requested buffer precision. Use <strong>{{ID2D1DeviceContext::IsBufferPrecisionSupported}}</strong> to determine what is supported. ? </dd> <dd> <p>Defines how colors outside of the range defined by the stop collection are determined.</p> </dd> <dd> <p>Defines how colors are interpolated. {{D2D1_COLOR_INTERPOLATION_MODE_PREMULTIPLIED}} is the default, see Remarks for more info.</p> </dd> <dd> <p>The new gradient stop collection.</p> </dd> <p>Creates an image brush. The input image can be any type of image, including a bitmap, effect, or a command list. </p> <p>The image brush can be used to fill an arbitrary geometry, an opacity mask or text.</p><p>This sample illustrates drawing a rectangle with an image brush.</p><pre>{{HRESULT}} CreatePatternBrush( __in {{ID2D1DeviceContext}} *pDeviceContext, __deref_out {{ID2D1ImageBrush}} **ppImageBrush ) { {{HRESULT}} hr = {{S_OK}}; {{ID2D1Image}} *pOldTarget = {{NULL}}; pDeviceContext-&gt;GetTarget(&amp;pOldTarget); {{ID2D1CommandList}} *pCommandList = {{NULL}}; hr = pDeviceContext-&gt;CreateCommandList(&amp;pCommandList); if ({{SUCCEEDED}}(hr)) { pDeviceContext-&gt;SetTarget(pCommandList); hr = RenderPatternToCommandList(pDeviceContext); } pDeviceContext-&gt;SetTarget(pOldTarget); {{ID2D1ImageBrush}} *pImageBrush = {{NULL}}; if ({{SUCCEEDED}}(hr)) { hr = pDeviceContext-&gt;CreateImageBrush( pCommandList, {{D2D1::ImageBrushProperties}}( {{D2D1::RectF}}(198, 298, 370, 470), {{D2D1_EXTEND_MODE_WRAP}}, {{D2D1_EXTEND_MODE_WRAP}}, {{D2D1_INTERPOLATION_MODE_LINEAR}} ), &amp;pImageBrush ); } // Fill a rectangle with the image brush. if ({{SUCCEEDED}}(hr)) { pDeviceContext-&gt;FillRectangle( {{D2D1::RectF}}(0, 0, 100, 100), pImageBrush); } SafeRelease(&amp;pImageBrush); SafeRelease(&amp;pCommandList); SafeRelease(&amp;pOldTarget); return hr; }</pre> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> </table><p>?</p> <dd> <p>The image to be used as a source for the image brush.</p> </dd> <dd> <p>The properties specific to an image brush.</p> </dd> <dd> <p>Properties common to all brushes.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to the input rectangles.</p> </dd> <p>Creates a bitmap brush, the input image is a Direct2D bitmap object.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The bitmap to use as the brush.</p> </dd> <dd> <p>A bitmap brush properties structure.</p> </dd> <dd> <p>A brush properties structure.</p> </dd> <dd> <p>The address of the newly created bitmap brush object.</p> </dd> <p>Creates a <strong>{{ID2D1CommandList}}</strong> object.</p> <p>A <strong>{{ID2D1CommandList}}</strong> can store Direct2D commands to be displayed later through <strong>{{ID2D1DeviceContext::DrawImage}}</strong> or through an image brush.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> </table><p>?</p> <p> Indicates whether the format is supported by the device context. The formats supported are usually determined by the underlying hardware.</p> <p>You can use supported formats in the <strong>{{D2D1_PIXEL_FORMAT}}</strong> structure to create bitmaps and render targets. Direct2D doesn't support all {{DXGI}} formats, even though they may have some level of Direct3D support by the hardware. </p> <p>Returns {{TRUE}} if the format is supported. Returns {{FALSE}} if the format is not supported.</p> <dd> <p>The {{DXGI}} format to check.</p> </dd> <p>Indicates whether the buffer precision is supported by the underlying Direct3D <strong>device.</strong> </p> <p>Returns {{TRUE}} if the buffer precision is supported. Returns {{FALSE}} if the buffer precision is not supported.</p> <p>Gets the bounds of an image without the world transform of the context applied.</p> <p>The image bounds don't include multiplication by the world transform. They do reflect the current {{DPI}}, unit mode, and interpolation mode of the context. To get the bounds that include the world transform, use <strong>{{ID2D1DeviceContext::GetImageWorldBounds}}</strong>.</p><p>The returned bounds reflect which pixels would be impacted by calling <strong>DrawImage</strong> with a target offset of (0,0) and an identity world transform matrix. They do not reflect the current clip rectangle set on the device context or the extent of the context's current target image.</p> <p>This method does not return a value.</p> <dd> <p>The image whose bounds will be calculated.</p> </dd> <dd> <p>When this method returns, contains a reference to the bounds of the image in device independent pixels ({{DIPs}}) and in local space.</p> </dd> <p>Gets the bounds of an image with the world transform of the context applied.</p> <p>The image bounds reflect the current {{DPI}}, unit mode, and world transform of the context. To get bounds which don't include the world transform, use <strong>{{ID2D1DeviceContext::GetImageLocalBounds}}</strong>. </p><p>The returned bounds reflect which pixels would be impacted by calling <strong>DrawImage</strong> with the same image and a target offset of (0,0). They do not reflect the current clip rectangle set on the device context or the extent of the context?s current target image. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The image whose bounds will be calculated.</p> </dd> <dd> <p>When this method returns, contains a reference to the bounds of the image in device independent pixels ({{DIPs}}).</p> </dd> <p> Gets the world-space bounds in {{DIPs}} of the glyph run using the device context {{DPI}}. </p> <p>The image bounds reflect the current {{DPI}}, unit mode, and world transform of the context. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The origin of the baseline for the glyph run.</p> </dd> <dd> <p>The glyph run to render.</p> </dd> <dd> <p>The DirectWrite measuring mode that indicates how glyph metrics are used to measure text when it is formatted.</p> </dd> <dd> <p>The bounds of the glyph run in {{DIPs}} and in world space.</p> </dd> <p>Gets the device associated with a device context.</p> <p>The application can retrieve the device even if it is created from an earlier render target code-path. The application must use an <strong>{{ID2D1DeviceContext}}</strong> interface and then call <strong>GetDevice</strong>. Some functionality for controlling all of the resources for a set of device contexts is maintained only on an <strong>{{ID2D1Device}}</strong> object.</p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains the address of a reference to a Direct2D device associated with this device context.</p> </dd> <p>The bitmap or command list to which the Direct2D device context will now render.</p> <p>The target can be changed at any time, including while the context is drawing.</p><p>The target can be either a bitmap created with the <strong>{{D2D1_BITMAP_OPTIONS_TARGET}}</strong> flag, or it can be a command list. Other kinds of images cannot be set as a target. For example, you cannot set the output of an effect as target. If the target is not valid the context will enter the <strong>{{D2DERR_INVALID_TARGET}} </strong>error state.</p><p>You cannot use <strong>SetTarget</strong> to render to a bitmap/command list from multiple device contexts simultaneously. An image is considered ?being rendered to? if it has ever been set on a device context within a <strong>BeginDraw</strong>/<strong>EndDraw</strong> timespan. If an attempt is made to render to an image through multiple device contexts, all subsequent device contexts after the first will enter an error state. </p><p>Callers wishing to attach an image to a second device context should first call <strong>EndDraw</strong> on the first device context. </p><p>Here is an example of the correct calling order.</p><pre>pDC1-&gt;BeginDraw(); pDC1-&gt;SetTarget(pImage); // ? pDC1-&gt;EndDraw(); pDC2-&gt;BeginDraw(); pDC2-&gt;SetTarget(pImage); // ? pDC2-&gt;EndDraw(); </pre><p>Here is an example of the incorrect calling order.</p><pre>pDC1-&gt;BeginDraw(); pDC2-&gt;BeginDraw(); pDC1-&gt;SetTarget(pImage); // ... pDC1-&gt;SetTarget({{NULL}}); pDC2-&gt;SetTarget(pImage); // This call is invalid, even though pImage is no longer set on pDC1. // ... pDC1-&gt;EndDraw(); // This EndDraw {{SUCCEEDs}}. pDC2-&gt;EndDraw(); // This EndDraw {{FAILs}} </pre><strong>Note</strong>??Changing the target does not change the bitmap that an {{HWND}} render target presents from, nor does it change the bitmap that a {{DC}} render target blts to/from.?<p>This {{API}} makes it easy for an application to use a bitmap as a source (like in <strong>DrawBitmap</strong>) and as a destination at the same time. Attempting to use a bitmap as a source on the same device context to which it is bound as a target will put the device context into the {{D2DERR_BITMAP_BOUND_AS_TARGET}} error state.</p><p>It is acceptable to have a bitmap bound as a target bitmap on multiple render targets at once. Applications that do this must properly synchronize rendering with <strong>Flush</strong> or <strong>EndDraw</strong>.</p><p>You can change the target at any time, including while the context is drawing.</p><p>You can set the target to {{NULL}}, in which case drawing calls will put the device context into an error state with {{D2DERR_WRONG_STATE}}. Calling <strong>SetTarget</strong> with a {{NULL}} target does not restore the original target bitmap to the device context.</p><p>If the device context has an outstanding {{HDC}}, the context will enter the <strong>{{D2DERR_WRONG_STATE}}</strong> error state. The target will not be changed.</p><p>If the bitmap and the device context are not in the same resource domain, the context will enter <strong>\</strong> error state. The target will not be changed.</p><p> <strong>{{ID2D1RenderTarget::GetPixelSize}}</strong> returns the size of the current target bitmap (or 0, 0) if there is no bitmap bound). <strong>{{ID2D1RenderTarget::GetSize}}</strong> returns the pixel size of the current bitmap scaled by the {{DPI}} of the render target. <strong>SetTarget</strong> does not affect the {{DPI}} of the render target. </p><p> <strong>{{ID2D1RenderTarget::GetPixelFormat}}</strong> returns the pixel format of the current target bitmap (or <strong>{{DXGI_FORMAT_UNKNOWN}}</strong>, <strong>{{D2D1_ALPHA_MODE_UNKNOWN}}</strong> if there is none).</p><p> <strong>{{ID2D1Bitmap::CopyFromRenderTarget}}</strong> copies from the currently bound target bitmap.</p> <p>This method does not return a value.</p> <p>Gets the target currently associated with the device context.</p> <p>If a target is not associated with the device context, <em>target</em> will contain <strong>{{NULL}}</strong> when the methods returns.</p><p>If the currently selected target is a bitmap rather than a command list, the application can gain access to the initial bitmaps created by using one of the following methods:</p><ul> <li> <strong>CreateHwndRenderTarget</strong> </li> <li> <strong>CreateDxgiSurfaceRenderTarget</strong> </li> <li> <strong>CreateWicBitmapRenderTarget</strong> </li> <li> <strong>CreateDCRenderTarget</strong> </li> <li> <strong>CreateCompatibleRenderTarget</strong> </li> </ul><p>It is not possible for an application to destroy these bitmaps. All of these bitmaps are bindable as bitmap targets. However not all of these bitmaps can be used as bitmap sources for <strong>{{ID2D1RenderTarget}}</strong> methods.</p><p> <strong>CreateDxgiSurfaceRenderTarget</strong> will create a bitmap that is usable as a bitmap source if the {{DXGI}} surface is bindable as a shader resource view.</p><p> <strong>CreateCompatibleRenderTarget</strong> will always create bitmaps that are usable as a bitmap source.</p><p> <strong>{{ID2D1RenderTarget::BeginDraw}}</strong> will copy from the {{HDC}} to the original bitmap associated with it. <strong>{{ID2D1RenderTarget::EndDraw}}</strong> will copy from the original bitmap to the {{HDC}}. </p><p> <strong>{{IWICBitmap}}</strong> objects will be locked in the following circumstances:</p><ul> <li>BeginDraw has been called and the currently selected target bitmap is a {{WIC}} bitmap.</li> <li>A {{WIC}} bitmap is set as the target of a device context after BeginDraw has been called and before EndDraw has been called.</li> <li>Any of the {{ID2D1Bitmap::Copy}}* methods are called with a {{WIC}} bitmap as either the source or destination.</li> </ul><p>{{IWICBitmap}} objects will be unlocked in the following circumstances:</p><ul> <li>EndDraw is called and the currently selected target bitmap is a {{WIC}} bitmap.</li> <li>A {{WIC}} bitmap is removed as the target of a device context between the calls to BeginDraw and EndDraw.</li> <li>Any of the {{ID2D1Bitmap::Copy}}* methods are called with a {{WIC}} bitmap as either the source or destination.</li> </ul><p>Direct2D will only lock bitmaps that are not currently locked.</p><p>Calling <strong>QueryInterface</strong> for <strong>{{ID2D1GdiInteropRenderTarget}}</strong> will always succeed. <strong>{{ID2D1GdiInteropRenderTarget::GetDC}}</strong> will return a device context corresponding to the currently bound target bitmap. GetDC will fail if the target bitmap was not created with the {{GDI_COMPATIBLE}} flag set.</p><p> <strong>{{ID2D1HwndRenderTarget::Resize}}</strong> will return <strong>{{DXGI_ERROR_INVALID_CALL}}</strong> if there are any outstanding references to the original target bitmap associated with the render target.</p><p>Although the target can be a command list, it cannot be any other type of image. It cannot be the output image of an effect.</p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains the address of a reference to the target currently associated with the device context.</p> </dd> <p>Sets the rendering controls for the given device context. </p> <p> The rendering controls allow the application to tune the precision, performance, and resource usage of rendering operations.</p> <p>This method does not return a value.</p> <dd> <p>The rendering controls to be applied.</p> </dd> <p>Gets the rendering controls that have been applied to the context.</p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains a reference to the rendering controls for this context.</p> </dd> <p>Changes the primitive blend mode that is used for all rendering operations in the device context.</p> <p>The primitive blend will apply to all of the primitive drawn on the context, unless this is overridden with the <em>compositeMode</em> parameter on the <strong>DrawImage</strong> {{API}}.</p><p> The primitive blend applies to the interior of any primitives drawn on the context. In the case of <strong>DrawImage</strong>, this will be implied by the image rectangle, offset and world transform.</p><p>If the primitive blend is anything other than <strong>{{D2D1_PRIMITIVE_BLEND_SOURCE_OVER}}</strong> then ClearType rendering will be turned off. If the application explicitly forces ClearType rendering in these modes, the drawing context will be placed in an error state. {{D2DERR_WRONG_STATE}} will be returned from either <strong>EndDraw</strong> or <strong>Flush</strong>. </p> <p>This method does not return a value.</p> <dd> <p>The primitive blend to use.</p> </dd> <p>Returns the currently set primitive blend used by the device context. </p> <p>The current primitive blend. The default value is <strong>{{D2D1_PRIMITIVE_BLEND_SOURCE_OVER}}</strong>.</p> <p>Specifies parameters used during view instancing configuration.</p> <p>View instancing is declared in a {{PSO}} using this structure. The view instance count is set in the {{PSO}} to allow whole-pipeline optimization based on the number of views.</p><p>View instancing is disabled when it's not declared in the {{PSO}} or when ViewInstanceCount is set to 0. When disabled, rendering behaves as if view instancing is enabled and ViewInstanceCount is set to 1; shaders only see a value of 0 in {{SV_ViewID}} and just one view instance is produced. This allows shaders that are aware of view instancing to still be used in {{PSOs}} that disable it. Some adapters might support shader model 6.1 (which exposes {{SV_ViewID}}) but not view instancing; these adapters must still support shaders that input {{SV_ViewID}} in {{PSOs}} that declare ViewInstanceCount as 0 or 1.</p><p>The shader prior to rasterization can output {{SV_RenderTargetArrayIndex}} and {{SV_ViewportArrayIndex}} values which don't have to depend on {{SV_ViewID}}. To compute the final effective index of the viewport and render target where primitives will be sent, these values, when present, are added to the ViewportArrayIndex and RenderTargetArrayIndex values of the view instance locations declared in the {{PSO}}. If a computed index is out of range (that is, when the index is larger than the number of viewport or render target elements in their respective arrays) then the effective index becomes 0.</p><p>For shaders that dynamically select the viewport or render target indices, an application can set all the view instance locations declared in the {{PSO}} to a single value (such as 0) to act as a uniform base index to which the dynamically-selected {{SV_RenderTargetArrayIndex}} and {{SV_ViewportArrayIndex}} values are added.</p> <dd> <p> Specifies the number of views to be used, up to {{D3D12_MAX_VIEW_INSTANCE_COUNT}}. </p> </dd> <dd> <p> The address of a memory location that contains <strong>ViewInstanceCount</strong> view instance location structures that specify the location of viewport/scissor and render target details of each view instance. </p> </dd> <dd> <p> Configures view instancing with additional options. </p> </dd> <p>Sets what units will be used to interpret values passed into the device context.</p><p></p> <p> This method will affect all properties and parameters affected by <strong>SetDpi</strong> and <strong>GetDpi</strong>. This affects all coordinates, lengths, and other properties that are not explicitly defined as being in another unit. For example:</p><ul> <li><strong>SetUnitMode</strong> will affect a coordinate passed into <strong>{{ID2D1DeviceContext::DrawLine}}</strong>, and the scaling of a geometry passed into <strong>{{ID2D1DeviceContext::FillGeometry}}</strong>. </li> <li><strong>SetUnitMode</strong> will not affect the value returned by <strong>{{ID2D1Bitmap::GetPixelSize}}</strong>. </li> </ul> <p>This method does not return a value.</p> <dd> <p>An enumeration defining how passed-in units will be interpreted by the device context.</p> </dd> <p>Gets the mode that is being used to interpret values by the device context.</p> <p>The unit mode.</p> <p>Draws a series of glyphs to the device context.</p> <p>The <em>glyphRunDescription</em> is ignored when rendering, but can be useful for printing and serialization of rendering commands, such as to an {{XPS}} or {{SVG}} file. This extends <strong>{{ID2D1RenderTarget::DrawGlyphRun}}</strong>, which lacked the glyph run description.</p> <p>This method does not return a value.</p> <dd> <p>Origin of first glyph in the series.</p> </dd> <dd> <p>The glyphs to render.</p> </dd> <dd> <p>Supplementary glyph series information.</p> </dd> <dd> <p>The brush that defines the text color.</p> </dd> <dd> <p>The measuring mode of the glyph series, used to determine the advances and offsets. The default value is {{DWRITE_MEASURING_MODE_NATURAL}}.</p> </dd> <p></p><p>A command list cannot reference effects which are part of effect graphs that consume the command list.</p> <p>Draw a metafile to the device context.</p> <p>This method does not return a value.</p> <dd> <p>The metafile to draw.</p> </dd> <dd> <p>The offset from the upper left corner of the render target.</p> </dd> <p>Draws a bitmap to the render target.</p> <p>The destinationRectangle parameter defines the rectangle in the target where the bitmap will appear (in device-independent pixels ({{DIPs}})). This is affected by the currently set transform and the perspective transform, if set. If {{NULL}} is specified, then the destination rectangle is (left=0, top=0, right = width(sourceRectangle), bottom = height(sourceRectangle)). </p><p>The <em>sourceRectangle</em> parameter defines the sub-rectangle of the source bitmap (in {{DIPs}}). <strong>DrawBitmap</strong> will clip this rectangle to the size of the source bitmap, thus making it impossible to sample outside of the bitmap. If {{NULL}} is specified, then the source rectangle is taken to be the size of the source bitmap. </p><p>If you specify <em>perspectiveTransform</em> it is applied to the rect in addition to the transform set on the render target.</p> <p>This method does not return a value.</p> <dd> <p>The bitmap to draw.</p> </dd> <dd> <p>The destination rectangle. The default is the size of the bitmap and the location is the upper left corner of the render target.</p> </dd> <dd> <p>The opacity of the bitmap.</p> </dd> <dd> <p>The interpolation mode to use.</p> </dd> <dd> <p>An optional source rectangle.</p> </dd> <dd> <p>An optional perspective transform.</p> </dd> <p>Push a layer onto the clip and layer stack of the device context.</p> <p>This method does not return a value.</p> <dd> <p>The parameters that defines the layer.</p> </dd> <dd> <p>The layer resource to push on the device context that receives subsequent drawing operations. </p> <strong>Note</strong>??If a layer is not specified, Direct2D manages the layer resource automatically. ? </dd> <p>This indicates that a portion of an effect's input is invalid. This method can be called many times.</p><p>You can use this method to propagate invalid rectangles through an effect graph. You can query Direct2D using the <strong>GetEffectInvalidRectangles</strong> method.</p><strong>Note</strong>??Direct2D does not automatically use these invalid rectangles to reduce the region of an effect that is rendered.?<p>You can also use this method to invalidate caches that have accumulated while rendering effects that have the <strong>{{D2D1_PROPERTY_CACHED}}</strong> property set to true.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <p> Gets the number of invalid output rectangles that have accumulated on the effect. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The effect to count the invalid rectangles on.</p> </dd> <dd> <p>The returned rectangle count.</p> </dd> <p>Gets the invalid rectangles that have accumulated since the last time the effect was drawn and <strong>EndDraw</strong> was then called on the device context.</p> <p> </p><strong>Note</strong>??Direct2D does not automatically use these invalid rectangles to reduce the region of an effect that is rendered.?<p>You can use the <strong>InvalidateEffectInputRectangle</strong> method to specify invalidated rectangles for Direct2D to propagate through an effect graph.</p><p>If multiple invalid rectangles are requested, the rectangles that this method returns may overlap. When this is the case, the rectangle count might be lower than the count that <strong>GetEffectInvalidRectangleCount</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <p> Returns the input rectangles that are required to be supplied by the caller to produce the given output rectangle. </p> <p>The caller should be very careful not to place a reliance on the required input rectangles returned. Small changes for correctness to an effect's behavior can result in different rectangles being returned. In addition, different kinds of optimization applied inside the render can also influence the result. </p> <p> A failure code, this will typically only be because an effect in the chain returned some error. </p> <dd> <p>The image whose output is being rendered.</p> </dd> <dd> <p>The portion of the output image whose inputs are being inspected.</p> </dd> <dd> <p> A list of the inputs whos rectangles are being queried. </p> </dd> <dd> <p>The input rectangles returned to the caller.</p> </dd> <dd> <p>The number of inputs.</p> </dd> <p>Fill using the alpha channel of the supplied opacity mask bitmap. The brush opacity will be modulated by the mask. The render target antialiasing mode must be set to aliased.</p> <p>This method does not return a value.</p> <dd> <p>The bitmap that acts as the opacity mask</p> </dd> <dd> <p>The brush to use for filling the primitive.</p> </dd> <dd> <p>The destination rectangle to output to in the render target</p> </dd> <dd> <p>The source rectangle from the opacity mask bitmap.</p> </dd> <p> Creates Direct2D resources. </p> <p> The <strong>{{ID2D1Factory1}}</strong> interface is used to create devices, register and unregister effects, and enumerate effects properties. Effects are registered and unregistered globally. The registration {{APIs}} are placed on this interface for convenience. </p> <p>Creates a <strong>{{ID2D1Device}}</strong> object.</p> <p>The Direct2D device defines a resource domain in which a set of Direct2D objects and Direct2D device contexts can be used together. Each call to <strong>CreateDevice</strong> returns a unique <strong>{{ID2D1Device}}</strong> object, even if you pass the same <strong>{{IDXGIDevice}}</strong> multiple times.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><p> </p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> <tr><td>{{D3DERR_OUTOFVIDEOMEMORY}}</td><td>Direct3D does not have enough display memory to perform the operation.</td></tr> </table><p>?</p> <p>Creates a <strong>{{ID2D1StrokeStyle1}}</strong> object.</p> <p>It is valid to specify a dash array only if {{D2D1_DASH_STYLE_CUSTOM}} is also specified.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> </table><p>?</p> <p>Creates an <strong>{{ID2D1PathGeometry1}}</strong> object.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> </table><p>?</p> <p> Creates a new drawing state block, this can be used in subsequent SaveDrawingState and RestoreDrawingState operations on the render target. </p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call. </td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> </table><p>?</p> <dd> <p>The drawing state description structure.</p> </dd> <dd> <p>The address of the newly created drawing state block.</p> </dd> <p>Creates a new <strong>{{ID2D1GdiMetafile}}</strong> object that you can use to replay metafile content. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> </table><p>?</p> <p>Registers an effect within the factory instance with the property {{XML}} specified as a stream.</p> <p>Direct2D effects must define their properties at registration time via registration {{XML}}. An effect declares several required system properties, and can also declare custom properties. See Custom effects for more information about formatting the <em>propertyXml</em> parameter. </p><p> <strong>RegisterEffect</strong> is both atomic and reference counted. To unregister an effect, call <strong>UnregisterEffect</strong> with the <em>classId</em> of the effect. </p><strong>Important</strong>??<strong>RegisterEffect</strong> does not hold a reference to the {{DLL}} or executable file in which the effect is contained. The application must independently make sure that the lifetime of the {{DLL}} or executable file completely contains all instances of each registered and created effect.?<p>Aside from the built-in effects that are globally registered, this {{API}} registers effects only for this factory, derived device, and device context interfaces.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call. </td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The identifier of the effect to be registered.</p> </dd> <dd> <p>A list of the effect properties, types, and metadata.</p> </dd> <dd> <p>An array of properties and methods.</p> <p> This binds a property by name to a particular method implemented by the effect author to handle the property. The name must be found in the corresponding <em>propertyXml</em>. </p> </dd> <dd> <p>The number of bindings in the binding array.</p> </dd> <dd> <p>The static factory that is used to create the corresponding effect.</p> </dd> <p>Registers an effect within the factory instance with the property {{XML}} specified as a string.</p> <p>Direct2D effects must define their properties at registration time via registration {{XML}}. An effect declares several required system properties, and can also declare custom properties. See Custom effects for more information about formatting the <em>propertyXml</em> parameter. </p><p><strong>RegisterEffect</strong> is both atomic and reference counted. To unregister an effect, call <strong>UnregisterEffect</strong> with the <em>classId</em> of the effect. </p><strong>Important</strong>??<strong>RegisterEffect</strong> does not hold a reference to the {{DLL}} or executable file in which the effect is contained. The application must independently make sure that the lifetime of the {{DLL}} or executable file completely contains all instances of each registered and created effect.?<p>Aside from the built-in effects that are globally registered, this {{API}} registers effects only for this factory and derived device and device context interfaces.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call. </td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The identifier of the effect to be registered.</p> </dd> <dd> <p>A list of the effect properties, types, and metadata.</p> </dd> <dd> <p>An array of properties and methods.</p> <p> This binds a property by name to a particular method implemented by the effect author to handle the property. The name must be found in the corresponding <em>propertyXml</em>. </p> </dd> <dd> <p>The number of bindings in the binding array.</p> </dd> <dd> <p>The static factory that is used to create the corresponding effect.</p> </dd> <p>Unregisters an effect within the factory instance that corresponds to the <em>classId</em> provided. </p> <p>In order for the effect to be fully unloaded, you must call <strong>UnregisterEffect</strong> the same number of times that you have registered the effect.</p><p>The <strong>UnregisterEffect</strong> method unregisters only those effects that are registered on the same factory. It cannot be used to unregister a built-in effect.</p> <p>{{D2DERR_EFFECT_IS_NOT_REGISTERED}} if the effect is not registered, {{S_OK}} otherwise.</p> <dd> <p>The identifier of the effect to be unregistered.</p> </dd> <p>Returns the class {{IDs}} of the currently registered effects and global effects on this factory.</p> <p>The set of class {{IDs}} will be atomically returned by the {{API}}. The set will not be interrupted by other threads registering or unregistering effects.</p><p>If <em>effectsRegistered</em> is larger than <em>effectCount</em>, the supplied array will still be filled to capacity with the current set of registered effects. This method returns the {{CLSIDs}} for all global effects and all effects registered to this factory.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{HRESULT_FROM_WIN32}}({{ERROR_INSUFFICIENT_BUFFER}})</td><td><em>effectsRegistered</em> is larger than <em>effectCount</em>.</td></tr> </table><p>?</p> <dd> <p>When this method returns, contains an array of effects. <strong>{{NULL}}</strong> if no effects are retrieved.</p> </dd> <dd> <p>The capacity of the <em>effects</em> array.</p> </dd> <dd> <p>When this method returns, contains the number of effects copied into <em>effects</em>.</p> </dd> <dd> <p>When this method returns, contains the number of effects currently registered in the system.</p> </dd> <p>Retrieves the properties of an effect.</p> <p>The returned effect properties will have all the mutable properties for the effect set to a default of <strong>{{NULL}}</strong>, or an empty value. </p><ul> <li>Value types will be zero-filled.</li> <li>Blob and string types will be zero-length.</li> <li>Array types will have length 1 and the element of the array will conform to the previous rules.</li> </ul><p>This method cannot be used to return the properties for any effect not visible to <strong>{{ID2D1DeviceContext::CreateEffect}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{D2DERR_EFFECT_IS_NOT_REGISTERED}}</td><td>The requested effect could not be found.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> </table><p>?</p> <dd> <p>The {{ID}} of the effect to retrieve properties from.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to the property interface that can be used to query the metadata of the effect.</p> </dd> <p> A locking mechanism from a Direct2D factory that Direct2D uses to control exclusive resource access in an app that is uses multiple threads. </p> <p> You can get an <strong>{{ID2D1Multithread}}</strong> object by querying for it from an <strong>{{ID2D1Factory}}</strong> object. </p><p> You should use this lock while doing any operation on a Direct3D/{{DXGI}} surface. Direct2D will wait on any call until you leave the critical section. </p><strong>Note</strong>?? Normal rendering is guarded automatically by an internal Direct2D lock.? <p> Returns whether the Direct2D factory was created with the <strong>{{D2D1_FACTORY_TYPE_MULTI_THREADED}}</strong> flag. </p> <p>Returns true if the Direct2D factory was created as multi-threaded, or false if it was created as single-threaded.</p> <p>Enters the Direct2D {{API}} critical section, if it exists. </p> <p>This method does not return a value.</p> <p>Leaves the Direct2D {{API}} critical section, if it exists.</p> <p>This method does not return a value.</p> <p>Creates a new Direct2D device associated with the provided {{DXGI}} device. </p> <p>This function will also create a new <strong>{{ID2D1Factory1}}</strong> that can be retrieved through <strong>{{ID2D1Resource::GetFactory}}</strong>.</p><p>If the creation properties are not specified, then <em>d2dDevice</em> will inherit its threading mode from <em>dxgiDevice</em> and debug tracing will not be enabled.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> </table><p>?</p> <dd> <p>The {{DXGI}} device the Direct2D device is associated with.</p> </dd> <dd> <p>The properties to apply to the Direct2D device.</p> </dd> <dd> <p>When this function returns, contains the address of a reference to a Direct2D device.</p> </dd> <p>Creates a new Direct2D device context associated with a {{DXGI}} surface. </p> <p>This function will also create a new <strong>{{ID2D1Factory1}}</strong> that can be retrieved through <strong>{{ID2D1Resource::GetFactory}}</strong>.</p><p>This function will also create a new <strong>{{ID2D1Device}}</strong> that can be retrieved through <strong>{{ID2D1DeviceContext::GetDevice}}</strong>.</p><p>The {{DXGI}} device will be specified implicitly through <em>dxgiSurface</em>.</p><p>If <em>creationProperties</em> are not specified, the Direct2D device will inherit its threading mode from the {{DXGI}} device implied by <em>dxgiSurface</em> and debug tracing will not be enabled.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> </table><p>?</p> <dd> <p>The {{DXGI}} surface the Direct2D device context is associated with.</p> </dd> <dd> <p>The properties to apply to the Direct2D device context.</p> </dd> <dd> <p>When this function returns, contains the address of a reference to a Direct2D device context.</p> </dd> <p>Converts the given color from one colorspace to another.</p> <p>The converted color.</p> <dd> <p>The source color space.</p> </dd> <dd> <p>The destination color space.</p> </dd> <dd> <p>The source color.</p> </dd> <p>Returns the sine and cosine of an angle.</p> <p>This function does not return a value.</p> <dd> <p>The angle to calculate.</p> </dd> <dd> <p>The sine of the angle.</p> </dd> <dd> <p>The cosine of the angle.</p> </dd> <p>Returns the tangent of an angle.</p> <p>The tangent of the angle.</p> <dd> <p>The angle to calculate the tangent for.</p> </dd> <p>Returns the length of a 3 dimensional vector.</p> <p>The length of the vector.</p> <dd> <p>The x value of the vector.</p> </dd> <dd> <p>The y value of the vector.</p> </dd> <dd> <p>The z value of the vector.</p> </dd> <p>Describes flags that influence how the renderer interacts with a custom vertex shader.</p> <dd> <p>There were no changes.</p> </dd> <dd> <p>The properties of the effect changed.</p> </dd> <dd> <p>The context state changed.</p> </dd> <dd> <p>The effect?s transform graph has changed. This happens only when an effect supports a variable input count.</p> </dd> <p>Indicates how pixel shader sampling will be restricted. This indicates whether the vertex buffer is large and tends to change infrequently or smaller and changes frequently (typically frame over frame). </p> <p> If the shader specifies <strong>{{D2D1_PIXEL_OPTIONS_NONE}}</strong>, it must still correctly implement the region of interest calculations in <strong>{{ID2D1Transform::MapOutputRectToInputRects}}</strong> and <strong>{{ID2D1Transform::MapInputRectsToOutputRect}}</strong>.</p> <dd> <p>The pixel shader is not restricted in its sampling.</p> </dd> <dd> <p> The pixel shader samples inputs only at the same scene coordinate as the output pixel and returns transparent black whenever the input pixels are also transparent black.</p> </dd> <p>Describes flags that influence how the renderer interacts with a custom vertex shader.</p> <dd> <p>The logical equivalent of having no flags set.</p> </dd> <dd> <p>If this flag is set, the renderer assumes that the vertex shader will cover the entire region of interest with vertices and need not clear the destination render target. If this flag is not set, the renderer assumes that the vertices do not cover the entire region interest and must clear the render target to transparent black first.</p> </dd> <dd> <p>The renderer will use a depth buffer when rendering custom vertices. The depth buffer will be used for calculating occlusion information. This can result in the renderer output being draw-order dependent if it contains transparency.</p> </dd> <dd> <p>Indicates that custom vertices do not overlap each other.</p> </dd> <p>Indicates whether the vertex buffer changes infrequently or frequently.</p> <p>If a dynamic vertex buffer is created, Direct2D will not necessarily map the buffer directly to a Direct3D vertex buffer. Instead, a system memory copy can be copied to the rendering engine vertex buffer as the effects are rendered.</p> <dd> <p>The created vertex buffer is updated infrequently.</p> </dd> <dd> <p>The created vertex buffer is changed frequently.</p> </dd> <p>Specifies the blend operation on two color sources.</p> <p>This enumeration has the same numeric values as <strong>{{D3D10_BLEND_OP}}</strong>.</p> <dd> <p>Add source 1 and source 2.</p> </dd> <dd> <p>Subtract source 1 from source 2.</p> </dd> <dd> <p>Subtract source 2 from source 1.</p> </dd> <dd> <p>Find the minimum of source 1 and source 2.</p> </dd> <dd> <p>Find the maximum of source 1 and source 2.</p> </dd> <p>Specifies how one of the color sources is to be derived and optionally specifies a preblend operation on the color source.</p> <p>This enumeration has the same numeric values as <strong>{{D3D10_BLEND}}</strong>.</p> <dd> <p>The data source is black (0, 0, 0, 0). There is no preblend operation.</p> </dd> <dd> <p>The data source is white (1, 1, 1, 1). There is no preblend operation.</p> </dd> <dd> <p>The data source is color data ({{RGB}}) from the second input of the blend transform. There is not a preblend operation.</p> </dd> <dd> <p>The data source is color data ({{RGB}}) from second input of the blend transform. The preblend operation inverts the data, generating 1 - {{RGB}}.</p> </dd> <dd> <p>The data source is alpha data (A) from second input of the blend transform. There is no preblend operation.</p> </dd> <dd> <p>The data source is alpha data (A) from the second input of the blend transform. The preblend operation inverts the data, generating 1 - A.</p> </dd> <dd> <p>The data source is alpha data (A) from the first input of the blend transform. There is no preblend operation.</p> </dd> <dd> <p>The data source is alpha data (A) from the first input of the blend transform. The preblend operation inverts the data, generating 1 - A.</p> </dd> <dd> <p>The data source is color data from the first input of the blend transform. There is no preblend operation.</p> </dd> <dd> <p>The data source is color data from the first input of the blend transform. The preblend operation inverts the data, generating 1 - {{RGB}}.</p> </dd> <dd> <p>The data source is alpha data from the second input of the blend transform. The preblend operation clamps the data to 1 or less.</p> </dd> <dd> <p>The data source is the blend factor. There is no preblend operation.</p> </dd> <dd> <p>The data source is the blend factor. The preblend operation inverts the blend factor, generating 1 - blend_factor.</p> </dd> <p>Allows a caller to control the channel depth of a stage in the rendering pipeline.</p> <dd> <p>The channel depth is the default. It is inherited from the inputs.</p> </dd> <dd> <p>The channel depth is 1.</p> </dd> <dd> <p>The channel depth is 4.</p> </dd> <p>Represents filtering modes that a transform may select to use on input textures.</p> <p>This enumeration has the same numeric values as <strong>{{D3D11_FILTER}}</strong>.</p> <dd> <p>Use point sampling for minification, magnification, and mip-level sampling.</p> </dd> <dd> <p>Use point sampling for minification and magnification; use linear interpolation for mip-level sampling.</p> </dd> <dd> <p>Use point sampling for minification; use linear interpolation for magnification; use point sampling for mip-level sampling.</p> </dd> <dd> <p>Use point sampling for minification; use linear interpolation for magnification and mip-level sampling.</p> </dd> <dd> <p>Use linear interpolation for minification; use point sampling for magnification and mip-level sampling.</p> </dd> <dd> <p>Use linear interpolation for minification; use point sampling for magnification; use linear interpolation for mip-level sampling.</p> </dd> <dd> <p>Use linear interpolation for minification and magnification; use point sampling for mip-level sampling.</p> </dd> <dd> <p>Use linear interpolation for minification, magnification, and mip-level sampling.</p> </dd> <dd> <p>Use anisotropic interpolation for minification, magnification, and mip-level sampling.</p> </dd> <p>Defines capabilities of the underlying Direct3D device which may be queried using <strong>{{ID2D1EffectContext::CheckFeatureSupport}}</strong>.</p> <p>Defines a property binding to a pair of functions which get and set the corresponding property. </p> <p>The <strong>propertyName</strong> is used to cross-correlate the property binding with the registration {{XML}}. The <strong>propertyName</strong> must be present in the {{XML}} call or the registration will fail. All properties must be bound.</p> <dd> <p> The name of the property.</p> </dd> <dd> <p> The function that will receive the data to set.</p> </dd> <dd> <p>The function that will be asked to write the output data.</p> </dd> <p>Defines a resource texture when the original resource texture is created.</p> <dd> <p>The extents of the resource table in each dimension.</p> </dd> <dd> <p>The number of dimensions in the resource texture. This must be a number from 1 to 3.</p> </dd> <dd> <p>The precision of the resource texture to create. </p> </dd> <dd> <p>The number of channels in the resource texture.</p> </dd> <dd> <p>The filtering mode to use on the texture.</p> </dd> <dd> <p>Specifies how pixel values beyond the extent of the texture will be sampled, in every dimension.</p> </dd> <p>A description of a single element to the vertex layout.</p> <p>This structure is a subset of <strong>{{D3D11_INPUT_ELEMENT_DESC}}</strong> that omits fields required to define a vertex layout.</p><p>If the <strong>{{D2D1_APPEND_ALIGNED_ELEMENT}}</strong> constant is used for <strong>alignedByteOffset</strong>, the elements will be packed contiguously for convenience. </p> <dd> <p>The {{HLSL}} semantic associated with this element in a shader input-signature.</p> </dd> <dd> <p>The semantic index for the element. A semantic index modifies a semantic, with an integer index number. A semantic index is only needed in a case where there is more than one element with the same semantic. For example, a 4x4 matrix would have four components each with the semantic name matrix; however, each of the four components would have different semantic indices (0, 1, 2, and 3).</p> </dd> <dd> <p>The data type of the element data.</p> </dd> <dd> <p>An integer value that identifies the input-assembler. Valid values are between 0 and 15.</p> </dd> <dd> <p>The offset in bytes between each element.</p> </dd> <p>Defines the properties of a vertex buffer that are standard for all vertex shader definitions.</p> <p>If <strong>usage</strong> is dynamic, the system might return a system memory buffer and copy these vertices into the rendering vertex buffer for each element.</p><p>If the initialization data is not specified, the buffer will be uninitialized.</p> <dd> <p>The number of inputs to the vertex shader.</p> </dd> <dd> <p>Indicates how frequently the vertex buffer is likely to be updated.</p> </dd> <dd> <p>The initial contents of the vertex buffer.</p> </dd> <dd> <p>The size of the vertex buffer, in bytes.</p> </dd> <p>Defines a vertex shader and the input element description to define the input layout. The combination is used to allow a custom vertex effect to create a custom vertex shader and pass it a custom layout.</p> <p>The vertex shader will be loaded by the <strong>CreateVertexBuffer</strong> call that accepts the vertex buffer properties.</p><p>This structure does not need to be specified if one of the standard vertex shaders is used.</p> <dd> <p>The unique {{ID}} of the vertex shader.</p> </dd> <dd> <p>An array of input assembler stage data types.</p> </dd> <dd> <p>The number of input elements in the vertex shader.</p> </dd> <dd> <p>The vertex stride.</p> </dd> <p>Defines a range of vertices that are used when rendering less than the full contents of a vertex buffer.</p> <dd> <p>The first vertex in the range to process.</p> </dd> <dd> <p>The number of vertices to use.</p> </dd> <p>Defines a blend description to be used in a particular blend transform.</p> <p>This description closely matches the <strong>{{D3D11_BLEND_DESC}}</strong> struct with some omissions and the addition of the blend factor in the description.</p> <dd> <p>Specifies the first {{RGB}} data source and includes an optional preblend operation.</p> </dd> <dd> <p>Specifies the second {{RGB}} data source and includes an optional preblend operation.</p> </dd> <dd> <p>Specifies how to combine the {{RGB}} data sources.</p> </dd> <dd> <p>Specifies the first alpha data source and includes an optional preblend operation. Blend options that end in _COLOR are not allowed.</p> </dd> <dd> <p>Specifies the second alpha data source and includes an optional preblend operation. Blend options that end in _COLOR are not allowed.</p> </dd> <dd> <p>Specifies how to combine the alpha data sources.</p> </dd> <dd> <p>Parameters to the blend operations. The blend must use <strong>{{D2D1_BLEND_BLEND_FACTOR}}</strong> for this to be used.</p> </dd> <p>Describes the options that transforms may set on input textures.</p> <dd> <p>The type of filter to apply to the input texture.</p> </dd> <dd> <p>The mip level to retrieve from the upstream transform, if specified.</p> </dd> <p>Describes the support for doubles in shaders.</p> <p>Fill this structure by passing a {{D2D1_FEATURE_DOUBLES}} structure to <strong>{{ID2D1EffectContext::CheckFeatureSupport}}</strong>.</p> <dd> <p>{{TRUE}} is doubles are supported within the shaders.</p> </dd> <p>Describes compute shader support, which is an option on {{D3D10}} feature level.</p> <p>You can fill this structure by passing a {{D2D1_}} {{FEATURE_DATA_D3D10_X_HARDWARE_OPTIONS}} structure to <strong>{{ID2D1EffectContext::CheckFeatureSupport}}</strong>.</p> <dd> <p>Shader model 4 compute shaders are supported.</p> </dd> <p>Provides factory methods and other state management for effect and transform authors.</p> <p>This interface is passed to an effect implementation through the <strong>{{ID2D1EffectImpl::Initialize}}</strong> method. In order to prevent applications casually gaining access to this interface, and to separate reference counts between the public and private interfaces, it is not possible to call <strong>QueryInterface</strong> between the <strong>{{ID2D1DeviceContext}}</strong> and the <strong>{{ID2D1EffectContext}}</strong>.</p><p>Each call to <strong>{{ID2D1Effect::Initialize}}</strong> will be provided a different <strong>{{ID2D1EffectContext}}</strong> interface. This interface tracks resource allocations for the effect. When the effect is released, the corresponding allocations will also be released.</p> <p>Gets the unit mapping that an effect will use for properties that could be in either dots per inch (dpi) or pixels.</p> <p> If the <strong>{{D2D1_UNIT_MODE}}</strong> is <strong>{{D2D1_UNIT_MODE_PIXELS}}</strong>, both <em>dpiX</em> and <em>dpiY</em> will be set to 96.</p> <p>This method does not return a value.</p> <dd> <p>The dpi on the x-axis.</p> </dd> <dd> <p>The dpi on the y-axis.</p> </dd> <p> Creates a Direct2D effect for the specified class {{ID}}. This is the same as <strong>{{ID2D1DeviceContext::CreateEffect}}</strong> so custom effects can create other effects and wrap them in a transform. </p> <p>The created effect does not reference count the {{DLL}} from which the effect was created. If the caller unregisters an effect while this effect is loaded, the resulting behavior is unpredictable.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call. </td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> <tr><td>{{D3DERR_OUTOFVIDEOMEMORY}}</td><td>Direct3D does not have enough display memory to perform the operation. </td></tr> <tr><td>{{D2DERR_EFFECT_IS_NOT_REGISTERED}}</td><td>The specified effect is not registered by the system.</td></tr> </table><p>?</p> <p>This indicates the maximum feature level from the provided list which is supported by the device. If none of the provided levels are supported, then this {{API}} fails with {{D2DERR_INSUFFICIENT_DEVICE_CAPABILITIES}}.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> <tr><td>{{D2DERR_INSUFFICIENT_DEVICE_CAPABILITIES}}</td><td>None of the provided levels are supported.</td></tr> </table><p>?</p> <dd> <p>The feature levels provided by the application.</p> </dd> <dd> <p>The count of feature levels provided by the application</p> </dd> <dd> <p>The maximum feature level from the <em>featureLevels</em> list which is supported by the {{D2D}} device. </p> </dd> <p>Wraps an effect graph into a single transform node and then inserted into a transform graph. This allows an effect to aggregate other effects. This will typically be done in order to allow the effect properties to be re-expressed with a different contract, or to allow different components to integrate each-other?s effects.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The effect to be wrapped in a transform node.</p> </dd> <dd> <p>The returned transform node that encapsulates the effect graph.</p> </dd> <p>This creates a blend transform that can be inserted into a transform graph. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The number of inputs to the blend transform.</p> </dd> <dd> <p>Describes the blend transform that is to be created.</p> </dd> <dd> <p>The returned blend transform.</p> </dd> <p>Creates a transform that extends its input infinitely in every direction based on the passed in extend mode.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The extend mode in the X-axis direction.</p> </dd> <dd> <p>The extend mode in the Y-axis direction.</p> </dd> <dd> <p>The returned transform.</p> </dd> <p>Creates and returns an offset transform.</p> <p>An offset transform is used to offset an input bitmap without having to insert a rendering pass. An offset transform is automatically inserted by an Affine transform if the transform evaluates to a pixel-aligned transform.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The offset amount.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to an offset transform object.</p> </dd> <p>Creates and returns a bounds adjustment transform.</p> <p>A support transform can be used for two different reasons.</p><ul> <li>To indicate that a region of its input image is already transparent black. This can increase efficiency for rendering bitmaps. <strong>Note</strong>??If the indicated region does {{NOT}} contain only transparent black pixels, then rendering results are undefined. ? </li> <li>To increase the size of the input image. The expanded area will be treated as transparent black </li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The initial output rectangle for the bounds adjustment transform.</p> </dd> <dd> <p>The returned bounds adjustment transform.</p> </dd> <p>Loads the given shader by its unique {{ID}}. Loading the shader multiple times is ignored. When the shader is loaded it is also handed to the driver to {{JIT}}, if it hasn?t been already.</p> <p>The shader you specify must be compiled, not in raw {{HLSL}} code.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The unique id that identifies the shader.</p> </dd> <dd> <p>The buffer that contains the shader to register.</p> </dd> <dd> <p>The size of the shader buffer in bytes.</p> </dd> <p>Loads the given shader by its unique {{ID}}. Loading the shader multiple times is ignored. When the shader is loaded it is also handed to the driver to {{JIT}}, if it hasn?t been already.</p> <p>The shader you specify must be compiled, not in raw {{HLSL}} code.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The unique id that identifies the shader.</p> </dd> <dd> <p>The buffer that contains the shader to register.</p> </dd> <dd> <p>The size of the shader buffer in bytes.</p> </dd> <p>Loads the given shader by its unique {{ID}}. Loading the shader multiple times is ignored. When the shader is loaded it is also handed to the driver to {{JIT}}, if it hasn?t been already.</p> <p>The shader you specify must be compiled, not in raw {{HLSL}} code.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The unique id that identifies the shader.</p> </dd> <dd> <p>The buffer that contains the shader to register.</p> </dd> <dd> <p>The size of the shader buffer in bytes.</p> </dd> <p>This tests to see if the given shader is loaded.</p> <p>Whether the shader is loaded.</p> <dd> <p>The unique id that identifies the shader.</p> </dd> <p>Creates or finds the given resource texture, depending on whether a resource id is specified. It also optionally initializes the texture with the specified data.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>An optional reference to the unique id that identifies the lookup table.</p> </dd> <dd> <p>The properties used to create the resource texture.</p> </dd> <dd> <p>The optional data to be loaded into the resource texture. </p> </dd> <dd> <p>An optional reference to the stride to advance through the resource texture, according to dimension.</p> </dd> <dd> <p>The size, in bytes, of the data.</p> </dd> <dd> <p>The returned texture that can be used as a resource in a Direct2D effect.</p> </dd> <p>Finds the given resource texture if it has already been created with <strong>{{ID2D1EffectContext::CreateResourceTexture}}</strong> with the same {{GUID}}.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><p> </p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_NOTFOUND}}</td><td>The requested resource texture was not found.</td></tr> </table><p>?</p> <p>Creates a vertex buffer or finds a standard vertex buffer and optionally initializes it with vertices. The returned buffer can be specified in the render info to specify both a vertex shader and or to pass custom vertices to the standard vertex shader used by Direct2D. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <p>This finds the given vertex buffer if it has already been created with <strong>{{ID2D1EffectContext::CreateVertexBuffer}}</strong> with the same {{GUID}}.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><p> </p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_NOTFOUND}}</td><td>The requested vertex buffer was not found.</td></tr> </table><p>?</p> <p>Creates a color context from a color space. </p><p>If the color space is Custom, the context is initialized from the <em>profile</em> and <em>profileSize</em> parameters.</p><p>If the color space is not Custom, the context is initialized with the profile bytes associated with the color space. The <em>profile</em> and <em>profileSize</em> parameters are ignored.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> </table><p>?</p> <dd> <p>The space of color context to create.</p> </dd> <dd> <p>A buffer containing the {{ICC}} profile bytes used to initialize the color context when <em>space</em> is <strong>{{D2D1_COLOR_SPACE_CUSTOM}}</strong>. For other types, the parameter is ignored and should be set to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>The size in bytes of <em>Profile</em>.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to a new color context object.</p> </dd> <p>Creates a color context by loading it from the specified filename. The profile bytes are the contents of the file specified by <em>filename</em>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> </table><p>?</p> <dd> <p>The path to the file containing the profile bytes to initialize the color context with.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to a new color context.</p> </dd> <p>Creates a color context from an <strong>{{IWICColorContext}}</strong>. The <strong>{{D2D1ColorContext}}</strong> space of the resulting context varies, see Remarks for more info.</p> <p>The new color context can be used in <strong>{{D2D1_BITMAP_PROPERTIES1}}</strong> to initialize the color context of a created bitmap. The model field of the profile header is inspected to determine whether this profile is sRGB or scRGB and the color space is updated respectively. Otherwise the space is custom.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> </table><p>?</p> <p>This indicates whether an optional capability is supported by the {{D3D}} device.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The feature to query support for.</p> </dd> <dd> <p>A structure indicating information about how or if the feature is supported.</p> </dd> <dd> <p>The size of the <em>featureSupportData</em> parameter.</p> </dd> <p> Indicates whether the buffer precision is supported by the underlying Direct2D <strong>device.</strong> </p> <p>Returns {{TRUE}} if the buffer precision is supported. Returns {{FALSE}} if the buffer precision is not supported.</p> <p>Describes a node in a transform topology.</p> <p>Transform nodes are type-less and only define the notion of an object that accepts a number of inputs and is an output. This interface limits a topology to single output nodes.</p> <p>Gets the number of inputs to the transform node.</p> <p>This method returns the number of inputs to this transform node.</p> <p>Defines a mappable single-dimensional vertex buffer.</p> <p>Maps the provided data into user memory.</p> <p> If <em>data</em> is larger than <em>bufferSize</em>, this method fails. </p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><p> </p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> <tr><td>{{D3DERR_DEVICELOST}}</td><td>The device has been lost but cannot be reset at this time.</td></tr> </table><p>?</p> <dd> <p>When this method returns, contains the address of a reference to the available buffer.</p> </dd> <dd> <p>The desired size of the buffer.</p> </dd> <p>Unmaps the vertex buffer.</p> <p>After this method returns, the mapped memory from the vertex buffer is no longer accessible by the effect.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><p> </p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{D2DERR_WRONG_STATE}}</td><td>The object was not in the correct state to process the method.</td></tr> </table><p>?</p> <p>Tracks a transform-created resource texture.</p> <p>Updates the specific resource texture inside the specific range or box using the supplied data.</p> <p>The number of dimensions in the update must match those of the created texture.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><p> </p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td> {{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The "left" extent of the updates if specified; if <strong>{{NULL}}</strong>, the entire texture is updated.</p> </dd> <dd> <p>The "right" extent of the updates if specified; if <strong>{{NULL}}</strong>, the entire texture is updated.</p> </dd> <dd> <p>The stride to advance through the input data, according to dimension.</p> </dd> <dd> <p>The number of dimensions in the resource texture. This must match the number used to load the texture.</p> </dd> <dd> <p>The data to be placed into the resource texture.</p> </dd> <dd> <p>The size of the data buffer to be used to update the resource texture.</p> </dd> <p>Describes the render information common to all of the various transform implementations.</p> <p>This interface is used by a transform implementation to first describe and then indicate changes to the rendering pass that corresponds to the transform.</p> <p>Sets how a specific input to the transform should be handled by the renderer in terms of sampling.</p> <p>The input description must be matched correctly by the effect shader code.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><p> </p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The index of the input that will have the input description applied.</p> </dd> <dd> <p>The description of the input to be applied to the transform.</p> </dd> <p>Allows a caller to control the output precision and channel-depth of the transform in which the render information is encapsulated.</p> <p> If the output precision of the transform is not specified, then it will default to the precision specified on the Direct2D device context. The maximum of 16bpc <strong>{{UNORM}}</strong> and 16bpc <strong>{{FLOAT}}</strong> is 32bpc <strong>{{FLOAT}}</strong>.</p><p>The output channel depth will match the maximum of the input channel depths if the channel depth is <strong>{{D2D1_CHANNEL_DEPTH_DEFAULT}}</strong>.</p><p>There is no global output channel depth, this is always left to the control of the transforms. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The type of buffer that should be used as an output from this transform.</p> </dd> <dd> <p>The number of channels that will be used on the output buffer. </p> </dd> <p>Specifies that the output of the transform in which the render information is encapsulated is or is not cached.</p> <p>This method does not return a value.</p> <dd> <p><strong>{{TRUE}}</strong> if the output of the transform is cached; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p>Provides an estimated hint of shader execution cost to {{D2D}}.</p> <p>The instruction count may be set according to the number of instructions in the shader. This information is used as a hint when rendering extremely large images. Calling this {{API}} is optional, but it may improve performance if you provide an accurate number. </p><strong>Note</strong>??Instructions that occur in a loop should be counted according to the number of loop iterations.? <p>This method does not return a value.</p> <dd> <p>An approximate instruction count of the associated shader.</p> </dd> <p>This interface is used to describe a {{GPU}} rendering pass on a vertex or pixel shader. It is passed to <strong>{{ID2D1DrawTransform}}</strong>.</p> <p>Sets the constant buffer for this transform's pixel shader.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The data applied to the constant buffer.</p> </dd> <dd> <p>The number of bytes of data in the constant buffer</p> </dd> <p>Sets the resource texture corresponding to the given shader texture index.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The index of the texture to be bound to the pixel shader.</p> </dd> <dd> <p>The created resource texture.</p> </dd> <p>Sets the constant buffer for this transform's vertex shader.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The data applied to the constant buffer</p> </dd> <dd> <p>The number of bytes of data in the constant buffer.</p> </dd> <p>Set the shader instructions for this transform.</p> <p> If this call fails, the corresponding <strong>{{ID2D1Effect}}</strong> instance is placed into an error state and will fail to Draw, it will place the context into an error state which can be retrieved through the <strong>{{ID2D1DeviceContext::EndDraw}}</strong> call. </p><p>Specifying <em>pixelOptions</em> other than {{D2D1_PIXEL_OPTIONS_NONE}} can enable the renderer to perform certain optimizations such as combining various parts of the effect graph together. If this information does not accurately describe the shader, indeterminate rendering artifacts can result. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The resource id for the shader.</p> </dd> <dd> <p>Additional information provided to the renderer to indicate the operations the pixel shader does.</p> </dd> <p>Sets a vertex buffer, a corresponding vertex shader, and options to control how the vertices are to be handled by the Direct2D context.</p> <p>The vertex shaders associated with the vertex buffer through the vertex shader {{GUID}} must have been loaded through the <strong>{{ID2D1EffectContext::LoadVertexShader}}</strong> method before this call is made.</p><p>If you pass the vertex option <strong>{{D2D1_VERTEX_OPTIONS_DO_NOT_CLEAR}}</strong>, then the method fails unless the blend description is exactly this: </p><pre>{{D2D1_BLEND_DESCRIPTION}} blendDesc = { {{D2D1_BLEND_ONE}}, {{D2D1_BLEND_ZERO}}, {{D2D1_BLEND_OPERATION_ADD}}, {{D2D1_BLEND_ONE}}, {{D2D1_BLEND_ZERO}}, {{D2D1_BLEND_OPERATION_ADD}}, { 1.0f, 1.0f, 1.0f, 1.0f } };</pre><p>If this call fails, the corresponding <strong>{{ID2D1Effect}}</strong> instance is placed into an error state and fails to draw.</p><p> If blendDescription is {{NULL}}, a foreground-over blend mode is used.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The vertex buffer, if this is cleared, the default vertex shader and mapping to the transform rectangles will be used.</p> </dd> <dd> <p>Options that influence how the renderer will interact with the vertex shader.</p> </dd> <dd> <p>How the vertices will be blended with the output texture.</p> </dd> <dd> <p>The set of vertices to use from the buffer. </p> </dd> <dd> <p>The {{GUID}} of the vertex shader.</p> </dd> <p>Enables specification of information for a compute-shader rendering pass.</p> <p>The transform changes the state on this render information to specify the compute shader and its dependent resources.</p> <p>Establishes or changes the constant buffer data for this transform.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The data applied to the constant buffer.</p> </dd> <dd> <p>The number of bytes of data in the constant buffer.</p> </dd> <p>Sets the compute shader to the given shader resource. The resource must be loaded before this call is made.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The {{GUID}} of the shader.</p> </dd> <p>Sets the resource texture corresponding to the given shader texture index to the given texture resource. The texture resource must already have been loaded with <strong>{{ID2D1EffectContext::CreateResourceTexture}}</strong> method. This call will fail if the specified index overlaps with any input. The input indices always precede the texture {{LUT}} indices. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <p>Represents a graph of transform nodes.</p> <p>This interface allows a graph of transform nodes to be specified. This interface is passed to <strong>{{ID2D1EffectImpl::Initialize}}</strong> to allow an effect implementation to specify a graph of transforms or a single transform.</p> <p>Returns the number of inputs to the transform graph.</p> <p>The number of inputs to this transform graph.</p> <p>Sets a single transform node as being equivalent to the whole graph.</p> <p>This equivalent to calling <strong>{{ID2D1TransformGraph::Clear}}</strong>, adding a single node, connecting all of the node inputs to the effect inputs in order, and setting the transform not as the graph output.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> </table><p>?</p> <dd> <p>The node to be set.</p> </dd> <p>Adds the provided node to the transform graph.</p> <p>This adds a transform node to the transform graph. A node must be added to the transform graph before it can be interconnected in any way. </p><p>A transform graph cannot be directly added to another transform graph. Only interfaces derived from <strong>{{ID2D1TransformNode}}</strong> can be added to the transform graph. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> </table><p>?</p> <dd> <p>The node that will be added to the transform graph.</p> </dd> <p>Removes the provided node from the transform graph.</p> <p>The node must already exist in the graph; otherwise, the call fails with <strong>{{D2DERR_NOT_FOUND}}</strong>.</p><p>Any connections to this node will be removed when the node is removed.</p><p>After the node is removed, it cannot be used by the interface until it has been added to the graph by <strong>AddNode</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred</td></tr> <tr><td>{{D2DERR_NOT_FOUND}} = ({{HRESULT_FROM_WIN32}}({{ERROR_NOT_FOUND}}))</td><td>Direct2D could not locate the specified node.</td></tr> </table><p>?</p> <dd> <p>The node that will be removed from the transform graph.</p> </dd> <p>Sets the output node for the transform graph.</p> <p>The node must already exist in the graph; otherwise, the call fails with <strong>{{D2DERR_NOT_FOUND}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred</td></tr> <tr><td>{{D2DERR_NOT_FOUND}} = ({{HRESULT_FROM_WIN32}}({{ERROR_NOT_FOUND}}))</td><td>Direct2D could not locate the specified node.</td></tr> </table><p>?</p> <dd> <p>The node that will be considered the output of the transform node.</p> </dd> <p>Connects two nodes inside the transform graph.</p> <p>Both nodes must already exist in the graph; otherwise, the call fails with <strong>{{D2DERR_NOT_FOUND}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred</td></tr> <tr><td>{{D2DERR_NOT_FOUND}} = ({{HRESULT_FROM_WIN32}}({{ERROR_NOT_FOUND}}))</td><td>Direct2D could not locate the specified node.</td></tr> </table><p>?</p> <dd> <p>The node from which the connection will be made.</p> </dd> <dd> <p>The node to which the connection will be made.</p> </dd> <dd> <p>The node input that will be connected.</p> </dd> <p>Connects a transform node inside the graph to the corresponding effect input of the encapsulating effect.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred</td></tr> <tr><td>{{D2DERR_NOT_FOUND}} = ({{HRESULT_FROM_WIN32}}({{ERROR_NOT_FOUND}}))</td><td>Direct2D could not locate the specified node.</td></tr> </table><p>?</p> <dd> <p>The effect input to which the transform node will be bound.</p> </dd> <dd> <p>The node to which the connection will be made.</p> </dd> <dd> <p>The node input that will be connected.</p> </dd> <p>Clears the transform nodes and all connections from the transform graph.</p> <p>Used when enough changes to transfoms would make editing of the transform graph inefficient.</p> <p>This method does not return a value.</p> <p>Uses the specified input as the effect output.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred</td></tr> <tr><td>{{D2DERR_NOT_FOUND}} = ({{HRESULT_FROM_WIN32}}({{ERROR_NOT_FOUND}}))</td><td>Direct2D could not locate the specified node.</td></tr> </table><p>?</p> <dd> <p>The index of the input to the effect.</p> </dd> <p>Represents the base interface for all of the transforms implemented by the transform author.</p> <p>Transforms are aggregated by effect authors. This interface provides a common interface for implementing the Shantzis rectangle calculations which is the basis for all the transform processing in Direct2D imaging extensions. These calculations are described in the paper A model for efficient and flexible image computing.</p> <p>Allows a transform to state how it would map a rectangle requested on its output to a set of sample rectangles on its input.</p> <p>The transform implementation must ensure that any pixel shader or software callback implementation it provides honors this calculation.</p><p>The transform implementation must regard this method as purely functional. It can base the mapped input and output rectangles on its current state as specified by the encapsulating effect properties. However, it must not change its own state in response to this method being invoked. The Direct2D renderer implementation reserves the right to call this method at any time and in any sequence.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The output rectangle from which the inputs must be mapped.</p> </dd> <dd> <p>The corresponding set of inputs. The inputs will directly correspond to the transform inputs.</p> </dd> <dd> <p>The number of inputs specified. Direct2D guarantees that this is equal to the number of inputs specified on the transform.</p> </dd> <p>Performs the inverse mapping to <strong>MapOutputRectToInputRects</strong>.</p> <p>The transform implementation must ensure that any pixel shader or software callback implementation it provides honors this calculation.</p><p>Unlike the <strong>MapOutputRectToInputRects</strong> and <strong>MapInvalidRect</strong> functions, this method is explicitly called by the renderer at a determined place in its rendering algorithm. The transform implementation may change its state based on the input rectangles and use this information to control its rendering information. This method is always called before the <strong>MapInvalidRect</strong> and <strong>MapOutputRectToInputRects</strong> methods of the transform.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Sets the input rectangles for this rendering pass into the transform.</p> <p>The transform implementation must regard <strong>MapInvalidRect</strong> as purely functional. The transform implementation can base the mapped input rectangle on the transform implementation's current state as specified by the encapsulating effect properties. But the transform implementation can't change its own state in response to a call to <strong>MapInvalidRect</strong>. Direct2D can call this method at any time and in any sequence following a call to the <strong>MapInputRectsToOutputRect</strong> method. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The index of the input rectangle.</p> </dd> <dd> <p>The invalid input rectangle.</p> </dd> <dd> <p>The output rectangle to which the input rectangle must be mapped.</p> </dd> <p>A specialized implementation of the Shantzis calculations to a transform implemented on the {{GPU}}. These calculations are described in the paper A model for efficient and flexible image computing.</p><p>The information required to specify a ?Pass? in the rendering algorithm on a Pixel Shader is passed to the implementation through the <strong>SetDrawInfo</strong> method. </p> <p> Provides the {{GPU}} render info interface to the transform implementation.</p> <p>The transform can maintain a reference to this interface for its lifetime. If any properties change on the transform, it can apply these changes to the corresponding <em>drawInfo</em> interface. </p><p>This is also used to determine that the corresponding nodes in the graph are dirty.</p> <p>Any {{HRESULT}} value can be returned when implementing this method. A failure will be returned from the corresponding <strong>{{ID2D1DeviceContext::EndDraw}}</strong> call.</p> <dd> <p>The interface supplied back to the calling method to allow it to specify the {{GPU}} based transform pass.</p> </dd> <p>This method allows a compute-shader?based transform to select the number of thread groups to execute based on the number of output pixels it needs to fill.</p> <p>If this call fails, the corresponding <strong>{{ID2D1Effect}}</strong> instance is placed into an error state and fails to draw.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The output rectangle that will be filled by the compute transform.</p> </dd> <dd> <p>The number of threads in the x dimension.</p> </dd> <dd> <p>The number of threads in the y dimension.</p> </dd> <dd> <p>The number of threads in the z dimension.</p> </dd> <p>Sets the render information used to specify the compute shader pass.</p> <p>If this method fails, <strong>{{ID2D1TransformGraph::AddNode}}</strong> fails.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The render information object to set.</p> </dd> <p>This method allows a compute-shader?based transform to select the number of thread groups to execute based on the number of output pixels it needs to fill.</p> <p>If this call fails, the corresponding <strong>{{ID2D1Effect}}</strong> instance is placed into an error state and fails to draw.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The output rectangle that will be filled by the compute transform.</p> </dd> <dd> <p>The number of threads in the x dimension.</p> </dd> <dd> <p>The number of threads in the y dimension.</p> </dd> <dd> <p>The number of threads in the z dimension.</p> </dd> <p>Supplies data to an analysis effect.</p> <p> This interface can be implemented by either an <strong>{{ID2D1DrawTransform}}</strong> or an <strong>{{ID2D1ComputeTransform}}</strong>.</p> <p>Supplies the analysis data to an analysis transform.</p> <p>The output of the transform will be copied to {{CPU}}-accessible memory by the imaging effects system before being passed to the implementation.</p><p> If this call fails, the corresponding <strong>{{ID2D1Effect}}</strong> instance is placed into an error state and fails to draw.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The data that the transform will analyze.</p> </dd> <dd> <p>The size of the analysis data.</p> </dd> <p>Represents a {{CPU}}-based rasterization stage in the transform pipeline graph.</p> <p><strong>{{ID2D1SourceTransform}}</strong> specializes an implementation of the Shantzis calculations to a transform implemented as the source of an effect graph with the data being provided from sytem memory.</p> <p>Sets the render information for the transform.</p> <p>Provides a render information interface to the source transform to allow it to specify state to the rendering system.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The interface supplied to the transform to allow specifying the {{CPU}} based transform pass.</p> </dd> <p>Draws the transform to the graphics processing unit ({{GPU}})?based Direct2D pipeline.</p> <p>The implementation of the rasterizer guarantees that adding the <em>renderRect</em> to the <em>targetOrigin</em> does not exceed the bounds of the bitmap.</p><p>When implementing this method you must update the bitmap in this way: </p><ol> <li>Call the <strong>{{ID2D1Bitmap::Map}}</strong> method with the {{D2D1_MAP_OPTIONS_DISCARD}} and {{D2D1_MAP_OPTIONS_WRITE}} flags.</li> <li>Update the buffer this method returns.</li> <li>Call the <strong>{{ID2D1Bitmap::Unmap}}</strong> method.</li> </ol><p>If you set the buffer precision manually on the associated <strong>{{ID2D1RenderInfo}}</strong> object, it must handle different pixel formats in this method by calling <strong>{{ID2D1Bitmap::GetPixelFormat}}</strong>. If you set the buffer precision manually, then you can rely on that format always being the one you provided.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The target to which the transform should be written.</p> </dd> <dd> <p>The area within the source from which the image should be drawn.</p> </dd> <dd> <p>The origin within the target bitmap to which the source data should be drawn.</p> </dd> <p>Represents the set of transforms implemented by the effect-rendering system, which provides fixed-functionality.</p> <p>Sets the properties of the output buffer of the specified transform node.</p> <p>You can use the <strong>{{ID2D1EffectContext::IsBufferPrecisionSupported}}</strong> method to see if buffer precision is supported.</p><p>The available channel depth and precision depend on the capabilities of the underlying Microsoft Direct3D device.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>One or more arguments are not valid</td></tr> </table><p>?</p> <dd> <p>The number of bits and the type of the output buffer.</p> </dd> <dd> <p>The number of channels in the output buffer (1 or 4).</p> </dd> <p>Sets whether the output of the specified transform is cached.</p> <p>This method does not return a value.</p> <dd> <p><strong>{{TRUE}}</strong> if the output should be cached; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p>Provides methods to allow a blend operation to be inserted into a transform graph.</p><p>The image output of the blend transform is the same as rendering an image effect graph with these steps:</p><ul> <li>Copy the first input to the destination image.</li> <li>Render the next input on top using the blend description.</li> <li>Continue for each additional input.</li> </ul> <p>Changes the blend description of the corresponding blend transform object.</p> <p>This method does not return a value.</p> <dd> <p>The new blend description specified for the blend transform.</p> </dd> <p>Gets the blend description of the corresponding blend transform object.</p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains the blend description specified for the blend transform.</p> </dd> <p>Extends the input rectangle to infinity using the specified extend modes.</p> <p>Sets the extend mode in the x direction.</p> <p>If the extend mode enumeration is invalid, this operation is ignored.</p> <p>This method does not return a value.</p> <dd> <p>The extend mode in the x direction.</p> </dd> <p>Sets the extend mode in the y direction.</p> <p>If the extend mode enumeration is invalid, this operation is ignored.</p> <p>This method does not return a value.</p> <dd> <p>The extend mode in the y direction.</p> </dd> <p>Gets the extend mode in the x direction.</p> <p>This method returns the extend mode in the x direction.</p> <p>Gets the extend mode in the y direction.</p> <p>This method returns the extend mode in the y direction.</p> <p>Instructs the effect-rendering system to offset an input bitmap without inserting a rendering pass.</p> <p>Because a rendering pass is not required, the interface derives from a transform node. This allows it to be inserted into a graph but does not allow an output buffer to be specified.</p> <p>Sets the offset in the current offset transform.</p> <p>This method does not return a value.</p> <dd> <p>The new offset to apply to the offset transform.</p> </dd> <p>Gets the offset currently in the offset transform.</p> <p>The current transform offset.</p> <p>A support transform for effects to modify the output rectangle of the previous effect or bitmap. </p> <p>The support transform can be used for two different reasons.</p><ul> <li> <p>To indicate that a region of its input image is already transparent black. The expanded area will be treated as transparent black.</p> <p>This can increase efficiency for rendering bitmaps.</p> </li> <li> <p>To increase the size of the input image.</p> </li> </ul><p>?</p><p>?</p> <p>This sets the output bounds for the support transform.</p> <p>This method does not return a value.</p> <dd> <p>The output bounds.</p> </dd> <p>Returns the output rectangle of the support transform.</p> <p>This method does not return a value.</p> <dd> <p>The output bounds.</p> </dd> <p>Allows a custom effect's interface and behavior to be specified by the effect author.</p> <p>This interface is created by the effect author from a static factory registered through the <strong>{{ID2D1Factory::RegisterEffect}}</strong> method.</p> <p>The effect can use this method to do one time initialization tasks. If this method is not needed, the method can just return <strong>{{S_OK}}</strong>.</p> <p>This moves resource creation cost to the <strong>CreateEffect</strong> call, rather than during rendering.</p><p>If the implementation fails this call, the corresponding <strong>{{ID2D1DeviceContext::CreateEffect}}</strong> call also fails.</p><p>The following example shows an effect implementing an initialize method.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An internal context interface that creates and returns effect author?centric types.</p> </dd> <dd> <p>The effect can populate the transform graph with a topology and can update it later.</p> </dd> <p>Prepares an effect for the rendering process.</p> <p>This method is called by the renderer when the effect is within an effect graph that is drawn.</p><p> The method will be called:</p><ul> <li>If the effect has been initialized but has not previously been drawn.</li> <li>If an effect property has been set since the last draw call.</li> <li>If the context state has changed since the effect was last drawn.</li> </ul><p>The method will not otherwise be called. The transforms created by the effect will be called to handle their input and output rectangles for every draw call.</p><p>Most effects defer creating any resources or specifying a topology until this call is made. They store their properties and map them to a concrete set of rendering techniques when first drawn.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Indicates the type of change the effect should expect.</p> </dd> <p>The renderer calls this method to provide the effect implementation with a way to specify its transform graph and transform graph changes. </p><p>The renderer calls this method when:</p><ul> <li>When the effect is first initialized.</li> <li>If the number of inputs to the effect changes.</li> </ul> <p>An error that prevents the effect from being initialized if called as part of the CreateEffect call. If the effect fails a subsequent SetGraph call:</p><ul> <li>The error will be returned from the property method that caused the number of inputs to the effect to change. </li> <li>The effect object will be placed into an error state, if subsequently used to render, the context will be placed into a temporary error state, that particular effect will fail to render and the failure will be returned on the next EndDraw or Flush call.</li> </ul> <dd> <p>The graph to which the effect describes its transform topology through the SetDescription call.</p> </dd> <p>The rendering priority affects the extent to which Direct2D will throttle its rendering workload.</p> <p>Represents a resource domain whose objects and device contexts can be used together. This interface performs all the same functions as the existing <strong>{{ID2D1Device}}</strong> interface. It also enables control of the device's rendering priority.</p> <p>Retrieves the current rendering priority of the device.</p> <p> The current rendering priority of the device.</p> <p>Sets the priority of Direct2D rendering operations performed on any device context associated with the device.</p> <p>Calling this method affects the rendering priority of all device contexts associated with the device. This method can be called at any time, but is not guaranteed to take effect until the beginning of the next frame. The recommended usage is to call this method outside of <strong>BeginDraw</strong> and <strong>EndDraw</strong> blocks. Cycling this property frequently within drawing blocks will effectively reduce the benefits of any throttling that is applied.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> </table><p>?</p> <dd> <p>The desired rendering priority for the device and associated contexts.</p> </dd> <p>Represents a resource domain whose objects and device contexts can be used together. This interface performs all the same functions as the existing <strong>{{ID2D1Device}}</strong> interface. It also enables control of the device's rendering priority.</p> <p>Encapsulates a device- and transform-dependent representation of a filled or stroked geometry. Callers should consider creating a geometry realization when they wish to accelerate repeated rendering of a given geometry. This interface exposes no methods.</p> <p>Enables creation and drawing of geometry realization objects. </p> <p>Creates a device-dependent representation of the fill of the geometry that can be subsequently rendered.</p> <p>This method is used in conjunction with <strong>{{ID2D1DeviceContext1::DrawGeometryRealization}}</strong>. The <strong>{{D2D1::ComputeFlatteningTolerance}}</strong> helper {{API}} may be used to determine the proper flattening tolerance.</p><p>If the provided stroke style specifies a stroke transform type other than <strong>{{D2D1_STROKE_TRANSFORM_TYPE_NORMAL}}</strong>, then the stroke will be realized assuming the identity transform and a {{DPI}} of 96.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> </table><p>?</p> <dd> <p>The geometry to realize.</p> </dd> <dd> <p>The flattening tolerance to use when converting Beziers to line segments. This parameter shares the same units as the coordinates of the geometry.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to a new geometry realization object.</p> </dd> <p>Creates a device-dependent representation of the stroke of a geometry that can be subsequently rendered.</p> <p>This method is used in conjunction with <strong>{{ID2D1DeviceContext1::DrawGeometryRealization}}</strong>. The <strong>{{D2D1::ComputeFlatteningTolerance}}</strong> helper {{API}} may be used to determine the proper flattening tolerance.</p><p>If the provided stroke style specifies a stroke transform type other than <strong>{{D2D1_STROKE_TRANSFORM_TYPE_NORMAL}}</strong>, then the stroke will be realized assuming the identity transform and a {{DPI}} of 96.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> </table><p>?</p> <dd> <p>The geometry to realize.</p> </dd> <dd> <p>The flattening tolerance to use when converting Beziers to line segments. This parameter shares the same units as the coordinates of the geometry.</p> </dd> <dd> <p>The width of the stroke. This parameter shares the same units as the coordinates of the geometry.</p> </dd> <dd> <p>The stroke style (optional).</p> </dd> <dd> <p>When this method returns, contains the address of a reference to a new geometry realization object.</p> </dd> <p>Renders a given geometry realization to the target with the specified brush.</p> <p> This method respects all currently set state (transform, {{DPI}}, unit mode, target image, clips, layers); however, artifacts such as faceting may appear when rendering the realizations with a large effective scale (either via the transform or the {{DPI}}). Callers should create their realizations with an appropriate flattening tolerance using either <strong>{{D2D1_DEFAULT_FLATTENING_TOLERANCE}}</strong> or <strong>ComputeFlatteningTolerance</strong> to compensate for this. </p><p>Additionally, callers should be aware of the safe render bounds when creating geometry realizations. If a geometry extends outside of [-524,287, 524,287] {{DIPs}} in either the X- or the Y- direction in its original (pre-transform) coordinate space, then it may be clipped to those bounds when it is realized. This clipping will be visible even if the realization is subsequently transformed to fit within the safe render bounds.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call. </td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid value was passed to the method.</td></tr> </table><p>?</p> <dd> <p>The geometry realization to be rendered.</p> </dd> <dd> <p>The brush to render the realization with.</p> </dd> <p> Creates Direct2D resources. </p><p> This interface also enables the creation of <strong>{{ID2D1Device1}}</strong> objects. </p> <p>Creates an <strong>{{ID2D1Device1}}</strong> object. </p> <p>The Direct2D device defines a resource domain in which a set of Direct2D objects and Direct2D device contexts can be used together. Each call to <strong>CreateDevice</strong> returns a unique <strong>{{ID2D1Device1}}</strong> object, even if you pass the same <strong>{{IDXGIDevice}}</strong> multiple times.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><p> </p><table> <tr><th>{{HRESULT}}</th><th>Description</th></tr> <tr><td>{{S_OK}}</td><td>No error occurred.</td></tr> <tr><td>{{E_OUTOFMEMORY}}</td><td>Direct2D could not allocate sufficient memory to complete the call.</td></tr> <tr><td>{{E_INVALIDARG}}</td><td>An invalid parameter was passed to the returning function.</td></tr> <tr><td>{{D3DERR_OUTOFVIDEOMEMORY}}</td><td>Direct3D does not have enough display memory to perform the operation.</td></tr> </table><p>?</p> <p>This interface performs all the same functions as the existing <strong>{{ID2D1CommandSink}}</strong> interface. It also enables access to the new primitive blend modes, {{MIN}} and {{ADD}}, through its <strong>SetPrimitiveBlend1</strong> method.</p> <p>Sets a new primitive blend mode. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The primitive blend that will apply to subsequent primitives.</p> </dd> <p>Computes the maximum factor by which a given transform can stretch any vector.</p> <p>Formally, if M is the input matrix, this method will return the maximum value of |V * M| / |V| for all vectors V, where |.| denotes length. </p><strong>Note</strong>??Since this describes how M affects vectors (rather than points), the translation components (_31 and _32) of M are ignored.? <p>The scale factor.</p> <dd> <p>The input transform matrix.</p> </dd> <p> Identifiers for properties of the {{YCbCr}} effect. </p> <p> Specifies the chroma subsampling of the input chroma image used by the {{YCbCr}} effect. </p> <p>Specifies the interpolation mode for the {{YCbCr}} effect.</p> <p>Provides factory methods and other state management for effect and transform authors.</p> <p>Creates a 3D lookup table for mapping a 3-channel input to a 3-channel output. The table data must be provided in 4-channel format.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Precision of the input lookup table data.</p> </dd> <dd> <p>Number of lookup table elements per dimension (X, Y, Z).</p> </dd> <dd> <p>Buffer holding the lookup table data.</p> </dd> <dd> <p>Size of the lookup table data buffer.</p> </dd> <dd> <p>An array containing two values. The first value is the size in bytes from one row (X dimension) of {{LUT}} data to the next. The second value is the size in bytes from one {{LUT}} data plane (X and Y dimensions) to the next.</p> </dd> <dd> <p>Receives the new lookup table instance.</p> </dd> <p> Specifies the appearance of the ink nib (pen tip) as part of an <strong>{{D2D1_INK_STYLE_PROPERTIES}}</strong> structure. </p> <p>Specifies the flip and rotation at which an image appears.</p> <dd> <p>The orientation is unchanged.</p> </dd> <dd> <p>The image is flipped horizontally.</p> </dd> <dd> <p>The image is rotated clockwise 180 degrees.</p> </dd> <dd> <p>The image is rotated clockwise 180 degrees, then flipped horizontally.</p> </dd> <dd> <p>The image is rotated clockwise 90 degrees, then flipped horizontally.</p> </dd> <dd> <p>The image is rotated clockwise 270 degrees.</p> </dd> <dd> <p>The image is rotated clockwise 270 degrees, then flipped horizontally.</p> </dd> <dd> <p>The image is rotated clockwise 90 degrees.</p> </dd> <p>Controls option flags for a new {{ID2D1ImageSource}} when it is created.</p> <p> ? </p><p>{{D2D1_IMAGE_SOURCE_CREATION_OPTIONS_RELEASE_SOURCE}} causes the image source to not retain a reference to the source object used to create it. It can decrease the quality and efficiency of printing.</p> <dd> <p>No options are used.</p> </dd> <dd> <p>Indicates the image source should release its reference to the {{WIC}} bitmap source after it has initialized. By default, the image source retains a reference to the {{WIC}} bitmap source for the lifetime of the object to enable quality and speed optimizations for printing. This option disables that optimization. </p> </dd> <dd> <p>Indicates the image source should only populate subregions of the image cache on-demand. You can control this behavior using the <strong>EnsureCached</strong> and <strong>TrimCache</strong> methods. This options provides the ability to improve memory usage by only keeping needed portions of the image in memory. This option requires that the image source has a reference to the {{WIC}} bitmap source, and is incompatible with {{D2D1_IMAGE_SOURCE_LOADING_OPTIONS_RELEASE_SOURCE}}.</p> </dd> <p>Option flags controlling primary conversion performed by <strong>CreateImageSourceFromDxgi</strong>, if any.</p> <p>Option flags for transformed image sources.</p> <dd> <p>No option flags.</p> </dd> <dd> <p>Prevents the image source from being automatically scaled (by a ratio of the context {{DPI}} divided by 96) while drawn.</p> </dd> <p>Specifies how to render gradient mesh edges.</p> <dd> <p>Render this patch edge aliased. Use this value for the internal edges of your gradient mesh.</p> </dd> <dd> <p>Render this patch edge antialiased. Use this value for the external (boundary) edges of your mesh.</p> </dd> <dd> <p>Render this patch edge aliased and also slightly inflated. Use this for the internal edges of your gradient mesh when there could be t-junctions among patches. Inflating the internal edges mitigates seams that can appear along those junctions.</p> </dd> <p>Specifies additional aspects of how a sprite batch is to be drawn, as part of a call to <strong>{{ID2D1DeviceContext3::DrawSpriteBatch}}</strong>.</p> <p>Specifies the pixel snapping policy when rendering color bitmap glyphs.</p> <dd> <p>Color bitmap glyph positions are snapped to the nearest pixel if the bitmap resolution matches that of the device context.</p> </dd> <dd> <p>Color bitmap glyph positions are not snapped.</p> </dd> <p>Specifies which gamma is used for interpolation.</p> <p>Interpolating in a linear gamma space (<strong>{{D2D1_GAMMA_1_0}}</strong>) can avoid changes in perceived brightness caused by the effect of gamma correction in spaces where the gamma is not 1.0, such as the default sRGB color space, where the gamma is 2.2. For an example of the differences between these two blending modes, consider the following illustration, which shows two gradients, each of which blends from red to blue to green:</p><p></p><p>The first gradient is interpolated linearly in the space of the render target (sRGB in this case), and one can see the dark bands between each color. The second gradient uses a gamma-correct linear interpolation, and thus does not exhibit the same variations in brightness.</p> <dd> <p>Interpolation is performed in the standard {{RGB}} (sRGB) gamma.</p> </dd> <dd> <p>Interpolation is performed in the linear-gamma color space.</p> </dd> <p>Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.</p> <p>Not every render target supports hardware rendering. For more information, see the Render Targets Overview. </p> <dd> <p>The render target uses hardware rendering, if available; otherwise, it uses software rendering.</p> </dd> <dd> <p>The render target uses software rendering only.</p> </dd> <dd> <p>The render target uses hardware rendering only. </p> </dd> <p>Properties of a transformed image source.</p> <dd> <p>The orientation at which the image source is drawn.</p> </dd> <dd> <p>The horizontal scale factor at which the image source is drawn.</p> </dd> <dd> <p>The vertical scale factor at which the image source is drawn.</p> </dd> <dd> <p>The interpolation mode used when the image source is drawn. This is ignored if the image source is drawn using the DrawImage method, or using an image brush.</p> </dd> <dd> <p>Image sourc option flags.</p> </dd> <p>Represents a point, radius pair that makes up part of a <strong>{{D2D1_INK_BEZIER_SEGMENT}}</strong>.</p> <p>Represents a Bezier segment to be used in the creation of an <strong>{{ID2D1Ink}}</strong> object. This structure differs from <strong>{{D2D1_BEZIER_SEGMENT}}</strong> in that it is composed of <strong>{{D2D1_INK_POINT}}</strong>s, which contain a radius in addition to x- and y-coordinates. </p> <p> Defines the general pen tip shape and the transform used in an <strong>{{ID2D1InkStyle}}</strong> object. </p> <p> Represents a tensor patch with 16 control points, 4 corner colors, and boundary flags. An {{ID2D1GradientMesh}} is made up of 1 or more gradient mesh patches. Use the <strong>GradientMeshPatch function</strong> or the <strong>GradientMeshPatchFromCoonsPatch function</strong> to create one. </p> <p>The following image shows the numbering of control points on a tensor grid.</p> <p>Creates a color context from a simple color profile. It is only valid to use this with the Color Management Effect in 'Best' mode.</p> <p>This method returns an {{HRESULT}} success or error code.</p> <dd> <p>The simple color profile to create the color context from.</p> </dd> <dd> <p>The created color context.</p> </dd> <p> Represents a collection of style properties to be used by methods like <strong>{{ID2D1DeviceContext2::DrawInk}}</strong> when rendering ink. The ink style defines the nib (pen tip) shape and transform. </p> <p>Sets the transform to apply to this style's nib shape.</p> <p>This method does not return a value.</p> <dd> <p>The transform to apply to this style?s nib shape. Note that the translation components of the transform matrix are ignored for the purposes of rendering.</p> </dd> <p>Retrieves the transform to be applied to this style's nib shape.</p> <p>This method does not return a value.</p> <dd> <p>When this method returns, contains a reference to the transform to be applied to this style's nib shape.</p> </dd> <p>Sets the pre-transform nib shape for this style.</p> <p>This method does not return a value.</p> <dd> <p>The pre-transform nib shape to use in this style.</p> </dd> <p>Retrieves the pre-transform nib shape for this style.</p> <p>Returns the pre-transform nib shape for this style.</p> <p>Represents a single continuous stroke of variable-width ink, as defined by a series of Bezier segments and widths.</p> <p>Sets the starting point for this ink object. This determines where this ink object will start rendering.</p> <p>This method does not return a value.</p> <dd> <p>The new starting point for this ink object.</p> </dd> <p>Retrieves the starting point for this ink object.</p> <p>The starting point for this ink object.</p> <p>Adds the given segments to the end of this ink object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to an array of segments to be added to this ink object.</p> </dd> <dd> <p>The number of segments to be added to this ink object.</p> </dd> <p>Removes the given number of segments from the end of this ink object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The number of segments to be removed from the end of this ink object. Note that segmentsCount must be less or equal to the number of segments in the ink object.</p> </dd> <p>Updates the specified segments in this ink object with new control points.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The index of the first segment in this ink object to update.</p> </dd> <dd> <p>A reference to the array of segment data to be used in the update.</p> </dd> <dd> <p>The number of segments in this ink object that will be updated with new data. Note that segmentsCount must be less than or equal to the number of segments in the ink object minus startSegment.</p> </dd> <p>Updates the last segment in this ink object with new control points.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the segment data with which to overwrite this ink object's last segment. Note that if there are currently no segments in the ink object, SetSegmentsAtEnd will return an error.</p> </dd> <p>Returns the number of segments in this ink object.</p> <p>Returns the number of segments in this ink object.</p> <p>Retrieves the specified subset of segments stored in this ink object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The index of the first segment in this ink object to retrieve.</p> </dd> <dd> <p>When this method returns, contains a reference to an array of retrieved segments.</p> </dd> <dd> <p>The number of segments to retrieve. Note that segmentsCount must be less than or equal to the number of segments in the ink object minus startSegment.</p> </dd> <p>Retrieves a geometric representation of this ink object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The ink style to be used in determining the geometric representation.</p> </dd> <dd> <p>The world transform to be used in determining the geometric representation.</p> </dd> <dd> <p>The flattening tolerance to be used in determining the geometric representation.</p> </dd> <dd> <p>The geometry sink to which the geometry representation will be streamed.</p> </dd> <p>Retrieve the bounds of the geometry, with an optional applied transform.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The ink style to be used in determining the bounds of this ink object.</p> </dd> <dd> <p>The world transform to be used in determining the bounds of this ink object.</p> </dd> <dd> <p>When this method returns, contains the bounds of this ink object.</p> </dd> <p>Represents a device-dependent representation of a gradient mesh composed of patches. Use the <strong>{{ID2D1DeviceContext2::CreateGradientMesh}} method</strong> to create an instance of {{ID2D1GradientMesh}}.</p> <p>Returns the number of patches that make up this gradient mesh.</p> <p>Returns the number of patches that make up this gradient mesh.</p> <p>Returns a subset of the patches that make up this gradient mesh.</p> <p>{{S_OK}} if successful, otherwise a failure {{HRESULT}}.</p> <dd> <p>Index of the first patch to return.</p> </dd> <dd> <p>A reference to the array to be filled with the patch data.</p> </dd> <dd> <p>The number of patches to be returned.</p> </dd> <p>Represents a producer of pixels that can fill an arbitrary 2D plane.</p> <p>Allows the operating system to free the video memory of resources by discarding their content.</p> <p><strong>OfferResources</strong> returns: </p><ul> <li><strong>{{S_OK}}</strong> if resources were successfully offered </li> <li><strong>{{E_INVALIDARG}}</strong> if a resource in the array or the priority is invalid </li> </ul> <p> Restores access to resources that were previously offered by calling <strong>OfferResources</strong>. </p> <p> After you call <strong>OfferResources</strong> to offer one or more resources, you must call <strong>TryReclaimResources</strong> before you can use those resources again. You must check the value in the <strong>resourcesDiscarded</strong> to determine whether the resource?s content was discarded. If a resource?s content was discarded while it was offered, its current content is undefined. Therefore, you must overwrite the resource?s content before you use the resource. </p> <p><strong>ReclaimResources</strong> returns: </p><ul> <li><strong>{{S_OK}}</strong> if resources were successfully reclaimed </li> <li><strong>{{E_INVALIDARG}}</strong> if the resources are invalid </li> </ul> <p>Produces 2D pixel data that has been sourced from {{WIC}}.</p> <p> Create an an instance of {{ID2D1ImageSourceFromWic}} using <strong>{{ID2D1DeviceContext2::CreateImageSourceFromWic}}</strong>. </p> <p> Ensures that a specified region of the image source cache is populated. This method can be used to minimize glitches by performing expensive work to populate caches outside of a rendering loop. This method can also be used to speculatively load image data before it is needed by drawing routines. </p> <p>This {{API}} loads image data into caches of image sources, if that data was not already cached. It does not trim pre-existing caches, if any. More areas within the cache can be populated than actually requested.</p><p> ? </p><p>The provided region must be constructed to include the scale with which the image source will subsequently be drawn. These coordinates must be provided in local coordinates. This means that they must be adjusted prior to calling the {{API}} according to the {{DPI}} and other relevant transforms, which can include the world transform and brush transforms.</p><p>This operation is only supported when the image source has been initialized using the {{D2D1_IMAGE_SOURCE_LOADING_OPTIONS_CACHE_ON_DEMAND}} option.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Specifies the region of the image, in pixels, that should be populated in the cache. By default, this is the entire extent of the image.</p> </dd> <p>This method trims the populated regions of the image source cache to just the specified rectangle.</p> <p>The provided region must be constructed to include the scale at which the image source will be drawn at. These coordinates must be provided in local coordinates. This means that they must be adjusted prior to calling the {{API}} according to the {{DPI}} and other relevant transforms, which can include the world transform and brush transforms.</p><p> ? </p><p>This method will fail if on-demand caching was not requested when the image source was created.</p><p> ? </p><p>As with <strong>{{ID2D1Device::ClearResources}}</strong>, the caller can need to subsequently issue a {{D3D}} flush before memory usage is reduced.</p><p>This operation is only supported when the image source has been initialized using the {{D2D1_IMAGE_SOURCE_LOADING_OPTIONS_CACHE_ON_DEMAND}} option.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Specifies the region of the image, in pixels, which should be preserved in the image source cache. Regions which are outside of the rectangle are evicted from the cache. By default, this is an empty rectangle, meaning that the entire image is evicted from the cache.</p> </dd> <p>Retrieves the underlying bitmap image source from the Windows Imaging Component ({{WIC}}).</p> <p>This method does not return a value.</p> <dd> <p>On return contains the bitmap image source.</p> </dd> <p>Represents an image source which shares resources with an original image source.</p> <p> Retrieves the source image used to create the transformed image source. This value corresponds to the value passed to <strong>CreateTransformedImageSource</strong>. </p> <p>This method does not return a value.</p> <p> Retrieves the properties specified when the transformed image source was created. This value corresponds to the value passed to <strong>CreateTransformedImageSource</strong>. </p> <p>This method does not return a value.</p> <p>A container for 3D lookup table data that can be passed to the LookupTable3D effect.</p><p>An {{ID2DLookupTable3D}} instance is created using <strong>{{ID2D1DeviceContext2::CreateLookupTable3D}}</strong> or {{ID2D1EffectContext1::CreateLookupTable3D}}.</p> <p>This interface performs all the same functions as the {{ID2D1DeviceContext1}} interface, plus it enables functionality such as ink rendering, gradient mesh rendering, and improved image loading.</p> <p>Creates a new <strong>{{ID2D1Ink}}</strong> object that starts at the given point.</p> <p>{{S_OK}} if successful, otherwise a failure {{HRESULT}}.</p> <p>Creates a new <strong>{{ID2D1InkStyle}}</strong> object, for use with ink rendering methods such as <strong>DrawInk</strong>.</p> <p>{{S_OK}} if successful, otherwise a failure {{HRESULT}}.</p> <p>Creates a new <strong>{{ID2D1GradientMesh}}</strong> instance using the given array of patches.</p> <p>{{S_OK}} if successful, otherwise a failure {{HRESULT}}.</p> <p>Creates an image source object from a {{WIC}} bitmap source, while populating all pixel memory within the image source. The image is loaded and stored while using a minimal amount of memory.</p> <p> This method creates an image source which can be used to draw the image. </p><p>This method supports images that exceed the maximum texture size. Large images are internally stored within a sparse tile cache. </p><p> This {{API}} supports the same set of pixel formats and alpha modes supported by <strong>CreateBitmapFromWicBitmap</strong>. If the {{GPU}} does not support a given pixel format, this method will return {{D2DERR_UNSUPPORTED_PIXEL_FORMAT}}. This method does not apply adjustments such as gamma or alpha premultiplication which affect the appearance of the image. </p><p>This method automatically selects an appropriate storage format to minimize {{GPU}} memory usage., such as using separate luminance and chrominance textures for {{JPEG}} images. </p><p>If the loadingOptions argument is {{NULL}}, {{D2D}} uses {{D2D1_IMAGE_SOURCE_LOADING_OPTIONS_NONE}}.</p> <p>{{S_OK}} if successful, otherwise a failure {{HRESULT}}.</p> <dd> <p>The {{WIC}} bitmap source to create the image source from.</p> </dd> <dd> <p>Options for creating the image source. Default options are used if {{NULL}}.</p> </dd> <dd> <p>Receives the new image source instance.</p> </dd> <p>Creates a 3D lookup table for mapping a 3-channel input to a 3-channel output. The table data must be provided in 4-channel format.</p> <p>{{S_OK}} if successful, otherwise a failure {{HRESULT}}.</p> <dd> <p>Precision of the input lookup table data.</p> </dd> <dd> <p>Number of lookup table elements per dimension (X, Y, Z).</p> </dd> <dd> <p>Buffer holding the lookup table data.</p> </dd> <dd> <p>Size of the lookup table data buffer.</p> </dd> <dd> <p>An array containing two values. The first value is the size in bytes from one row (X dimension) of {{LUT}} data to the next. The second value is the size in bytes from one {{LUT}} data plane (X and Y dimensions) to the next.</p> </dd> <dd> <p>Receives the new lookup table instance.</p> </dd> <p>Creates an image source from a set of {{DXGI}} surface(s). The {{YCbCr}} surface(s) are converted to {{RGBA}} automatically during subsequent drawing.</p> <p> This method creates an image source which can be used to draw the image. This method supports surfaces that use a limited set of {{DXGI}} formats and {{DXGI}} color space types. Only the below set of combinations of color space types, surface formats, and surface counts are supported: </p><table> <tr><th>Color Space Type</th><th>Surface Count(s)</th><th>Surface Format(s)</th></tr> <tr><td>{{DXGI_COLOR_SPACE_RGB_FULL_G22_NONE_P709}}</td><td>1</td><td> Standard {{D2D}}-supported pixel formats: <ul> <li>{{DXGI_FORMAT_A8_UNORM}}</li> <li>{{DXGI_FORMAT_R8_UNORM}}</li> <li>{{DXGI_FORMAT_R8G8_UNORM}}</li> <li>{{DXGI_FORMAT_R8G8B8A8_UNORM}}</li> <li>{{DXGI_FORMAT_B8G8R8A8_UNORM}}</li> <li>{{DXGI_FORMAT_B8G8R8X8_UNORM}}</li> <li>{{DXGI_FORMAT_R8G8B8A8_UNORM_SRGB}}</li> <li>{{DXGI_FORMAT_B8G8R8A8_UNORM_SRGB}}</li> <li>{{DXGI_FORMAT_R16G16B16A16_FLOAT}}</li> <li>{{DXGI_FORMAT_R16G16B16A16_UNORM}}</li> <li>{{DXGI_FORMAT_R32G32B32A32_FLOAT}}</li> <li>{{DXGI_FORMAT_BC1_UNORM}}</li> <li>{{DXGI_FORMAT_BC2_UNORM}}</li> <li>{{DXGI_FORMAT_BC3_UNORM}}</li> </ul> </td></tr> <tr><td>{{DXGI_COLOR_SPACE_YCBCR_FULL_G22_NONE_P709_X601}}</td><td>1, 2, 3</td><td> When Surface count is 1: <ul> <li>{{DXGI_FORMAT_AYUV}}</li> <li>{{DXGI_FORMAT_NV12}}</li> <li>{{DXGI_FORMAT_YUY2}}</li> <li>{{DXGI_FORMAT_P208}}</li> <li>{{DXGI_FORMAT_V208}}</li> <li>{{DXGI_FORMAT_V408}}</li> </ul> <p>When Surface Count is 2:</p> <ul> <li>{DXGI_FORMAT_R8_UNORM, {{DXGI_FORMAT_R8G8_UNORM}}}</li> </ul> <p>When Surface Count is 3:</p> <ul> <li>{DXGI_FORMAT_R8_UNORM, {{DXGI_FORMAT_R8_UNORM}}, {{DXGI_FORMAT_R8_UNORM}}}</li> </ul> </td></tr> <tr><td> {{DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P601}} <p>{{DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P601}}</p> <p>{{DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P709}}</p> <p>{{DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P709}}</p> <p>{{DXGI_COLOR_SPACE_YCBCR_STUDIO_G22_LEFT_P2020}}</p> <p>{{DXGI_COLOR_SPACE_YCBCR_FULL_G22_LEFT_P2020}}</p> </td><td>1,2,3</td><td> <p>When Surface count is 1: </p> <ul> <li>{{DXGI_FORMAT_NV12}}</li> <li>{{DXGI_FORMAT_YUY2}}</li> <li>{{DXGI_FORMAT_P208}}</li> <li>{{DXGI_FORMAT_V208}}</li> </ul> <p>When Surface Count is 2:</p> <ul> <li>{DXGI_FORMAT_R8_UNORM, {{DXGI_FORMAT_R8G8_UNORM}}}</li> </ul> <p>When Surface Count is 3:</p> <ul> <li>{DXGI_FORMAT_R8_UNORM, {{DXGI_FORMAT_R8_UNORM}}, {{DXGI_FORMAT_R8_UNORM}}}</li> </ul> </td></tr> </table><p>?</p><p>The {{GPU}} must also have sufficient support for a pixel format to be supported by {{D2D}}. To determine whether {{D2D}} supports a format, call IsDxgiFormatSupported.</p><p>This {{API}} converts {{YCbCr}} formats to sRGB using the provided color space type and options. {{RGBA}} data is assumed to be in the desired space, and {{D2D}} does not apply any conversion.</p><p> If multiple surfaces are provided, this method infers whether chroma planes are subsampled (by 2x) from the relative sizes of each corresponding source rectangle (or if the source rectangles parameter is {{NULL}}, the bounds of each surface). The second and third rectangle must each be equal in size to the first rectangle, or to the first rectangle with one or both dimensions scaled by 0.5 (while rounding up). </p><p> If provided, the source rectangles must be within the bounds of the corresponding surface. The source rectangles may have different origins. In this case, this method shifts the data from each plane to align with one another. </p> <p>{{S_OK}} if successful, otherwise a failure {{HRESULT}}.</p> <dd> <p>The {{DXGI}} surfaces to create the image source from.</p> </dd> <dd> <p>The regions of the surfaces to create the image source from.</p> </dd> <dd> <p>The number of surfaces provided; must be between one and three.</p> </dd> <dd> <p>The color space of the input.</p> </dd> <dd> <p>Options controlling color space conversions.</p> </dd> <dd> <p>Receives the new image source instance.</p> </dd> <p>Returns the world bounds of a given gradient mesh.</p> <p>The world bounds reflect the current {{DPI}}, unit mode, and world transform of the context. They indicate which pixels would be impacted by calling DrawGradientMesh with the given gradient mesh. They do not reflect the current clip rectangle set on the device context or the extent of the context?s current target.</p> <p>{{S_OK}} if successful, otherwise a failure {{HRESULT}}.</p> <dd> <p>The gradient mesh whose world bounds will be calculated.</p> </dd> <dd> <p>When this method returns, contains a reference to the bounds of the gradient mesh, in device independent pixels ({{DIPs}}).</p> </dd> <p>Renders the given ink object using the given brush and ink style.</p> <p>This method does not return a value.</p> <dd> <p>The ink object to be rendered.</p> </dd> <dd> <p>The brush with which to render the ink object.</p> </dd> <dd> <p>The ink style to use when rendering the ink object.</p> </dd> <p>Renders a given gradient mesh to the target.</p> <p>This method does not return a value.</p> <dd> <p>The gradient mesh to be rendered.</p> </dd> <p>Draws a metafile to the device context using the given source and destination rectangles.</p> <p>This method does not return a value.</p> <dd> <p>The metafile to draw.</p> </dd> <dd> <p>The rectangle in the target where the metafile will be drawn, relative to the upper left corner (defined in {{DIPs}}) of the render target. If {{NULL}} is specified, the destination rectangle is {0, 0, w, h}, where w and h are the width and height of the metafile as reported by <strong>{{ID2D1GdiMetafile::GetBounds}}</strong>. </p> </dd> <dd> <p>The rectangle of the source metafile that will be drawn, relative to the upper left corner (defined in {{DIPs}}) of the metafile. If {{NULL}} is specified, the source rectangle is the value returned by <strong>{{ID2D1GdiMetafile1::GetSourceBounds}}</strong>.</p> </dd> <p>Creates an image source which shares resources with an original.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The original image.</p> </dd> <dd> <p>Properties for the source image.</p> </dd> <dd> <p>Receives the new image source.</p> </dd> <p> Represents a resource domain whose objects and device contexts can be used together. This interface performs all the same functions as the existing <strong>{{ID2D1Device1}}</strong> interface. It also enables the creation of <strong>{{ID2D1DeviceContext2}}</strong> objects. </p> <p>Creates a new <strong>{{ID2D1DeviceContext2}}</strong> from a Direct2D device.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Flush all device contexts that reference a given bitmap.</p> <p>This method does not return a value.</p> <dd> <p>The bitmap, created on this device, for which all referencing device contexts will be flushed. </p> </dd> <p>Returns the {{DXGI}} device associated with this Direct2D device.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{DXGI}} device associated with this Direct2D device.</p> </dd> <p>Creates Direct2D resources. This interface also enables the creation of <strong>{{ID2D1Device2}}</strong> objects.</p> <p>Creates an <strong>{{ID2D1Device2}}</strong> object. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>This interface performs all the same functions as the existing <strong>{{ID2D1CommandSink1}}</strong> interface. It also enables access to ink rendering and gradient mesh rendering.</p> <p>Renders the given ink object using the given brush and ink style.</p> <p>This method does not return a value.</p> <dd> <p>The ink object to be rendered.</p> </dd> <dd> <p>The brush with which to render the ink object.</p> </dd> <dd> <p>The ink style to use when rendering the ink object.</p> </dd> <p>Renders a given gradient mesh to the target.</p> <p>This method does not return a value.</p> <dd> <p>The gradient mesh to be rendered.</p> </dd> <p>Draws a metafile to the command sink using the given source and destination rectangles.</p> <p>This method does not return a value.</p> <dd> <p>The metafile to draw.</p> </dd> <dd> <p>The rectangle in the target where the metafile will be drawn, relative to the upper left corner (defined in {{DIPs}}). If {{NULL}} is specified, the destination rectangle is the size of the target.</p> </dd> <dd> <p>The rectangle of the source metafile that will be drawn, relative to the upper left corner (defined in {{DIPs}}). If {{NULL}} is specified, the source rectangle is the value returned by <strong>{{ID2D1GdiMetafile1::GetSourceBounds}}</strong>.</p> </dd> <p>This interface performs all the same functions as the existing {{ID2D1GdiMetafile}} interface. It also enables accessing the metafile {{DPI}} and bounds.</p> <p>Gets the {{DPI}} reported by the metafile.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the horizontal {{DPI}} reported by the metafile.</p> </dd> <dd> <p>Receives the vertical {{DPI}} reported by the metafile.</p> </dd> <p>Gets the bounds of the metafile in source space in {{DIPs}}. This corresponds to the frame rect in an {{EMF}}/{{EMF}}+.</p> <p>{{S_OK}} if successful, otherwise a failure {{HRESULT}}.</p> <dd> <p>The bounds, in {{DIPs}}, of the metafile.</p> </dd> <p>This interface performs all the same functions as the existing {{ID2D1GdiMetafileSink}} interface. It also enables access to metafile records.</p> <p>Provides access to metafile records, including their type, data, and flags.</p> <p>For details on the {{EMF}} and {{EMF}}+ formats, please see Microsoft technical documents {{MS}}-{{EMF}} and {{MS}}-{{EMFPLUS}}.</p> <p>{{S_OK}} if successful, otherwise a failure {{HRESULT}}.</p> <dd> <p>The type of metafile record being processed. Please see {{MS}}-{{EMF}} and {{MS}}-{{EMFPLUS}} for a list of record types.</p> </dd> <dd> <p>The data contained in this record. Please see {{MS}}-{{EMF}} and {{MS}}-{{EMFPLUS}} for information on record data layouts.</p> </dd> <dd> <p>{{TThe}} size of the data pointed to by recordData. </p> </dd> <dd> <p>The set of flags set for this record. Please see {{MS}}-{{EMF}} and {{MS}}-{{EMFPLUS}} for information on record flags.</p> </dd> <p>Adds the given sprites to the end of this sprite batch.</p> <p>In Direct2D, a sprite is defined by four properties: a destination rectangle, a source rectangle, a color, and a transform. Destination rectangles are mandatory, but the remaining properties are optional.</p><strong>Note</strong>??Always omit or pass a null value for properties you do not wish to use. This allows Direct2D to avoid storing values for those properties and to skip their handling entirely, which improves drawing speed. For example, suppose you have a batch of 500 sprites, and you do not wish to transform any of their destination rectangles. Rather than passing an array of identity matrices, simply omit the transforms parameter. This allows Direct2D to avoid storing any transforms and will yield the fastest drawing performance. On the other hand, if any sprite in the batch has any value set for a property, then internally Direct2D must allocate space for that property array and assign every sprite a value for that property (even if it?s just the default value).? <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The number of sprites to be added. This determines how many strides into each given array Direct2D will read.</p> </dd> <dd> <p>A reference to an array containing the destination rectangles specifying where to draw the sprites on the destination device context.</p> </dd> <dd> <p>A reference to an array containing the source rectangles specifying the regions of the source bitmap to draw as sprites. Direct2D will use the entire source bitmap for sprites that are assigned a null value or the InfiniteRectU. If this parameter is omitted entirely or set to a null value, then Direct2D will use the entire source bitmap for all the added sprites.</p> </dd> <dd> <p>A reference to an array containing the colors to apply to each sprite. The output color is the result of component-wise multiplication of the source bitmap color and the provided color. The output color is not clamped. </p> <p>Direct2D will not change the color of sprites that are assigned a null value. If this parameter is omitted entirely or set to a null value, then Direct2D will not change the color of any of the added sprites.</p> </dd> <dd> <p>A reference to an array containing the transforms to apply to each sprite?s destination rectangle. </p> <p>Direct2D will not transform the destination rectangle of any sprites that are assigned a null value. If this parameter is omitted entirely or set to a null value, then Direct2D will not transform the destination rectangle of any of the added sprites.</p> </dd> <dd> <p>Specifies the distance, in bytes, between each rectangle in the destinationRectangles array. If you provide a stride of 0, then the same destination rectangle will be used for each added sprite.</p> </dd> <dd> <p>Specifies the distance, in bytes, between each rectangle in the sourceRectangles array (if that array is given). If you provide a stride of 0, then the same source rectangle will be used for each added sprite.</p> </dd> <dd> <p>Specifies the distance, in bytes, between each color in the colors array (if that array is given). If you provide a stride of 0, then the same color will be used for each added sprite.</p> </dd> <dd> <p>Specifies the distance, in bytes, between each transform in the transforms array (if that array is given). If you provide a stride of 0, then the same transform will be used for each added sprite.</p> </dd> <p>Adds the given sprites to the end of this sprite batch.</p> <p>In Direct2D, a sprite is defined by four properties: a destination rectangle, a source rectangle, a color, and a transform. Destination rectangles are mandatory, but the remaining properties are optional.</p><strong>Note</strong>??Always omit or pass a null value for properties you do not wish to use. This allows Direct2D to avoid storing values for those properties and to skip their handling entirely, which improves drawing speed. For example, suppose you have a batch of 500 sprites, and you do not wish to transform any of their destination rectangles. Rather than passing an array of identity matrices, simply omit the transforms parameter. This allows Direct2D to avoid storing any transforms and will yield the fastest drawing performance. On the other hand, if any sprite in the batch has any value set for a property, then internally Direct2D must allocate space for that property array and assign every sprite a value for that property (even if it?s just the default value).? <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The number of sprites to be added. This determines how many strides into each given array Direct2D will read.</p> </dd> <dd> <p>A reference to an array containing the destination rectangles specifying where to draw the sprites on the destination device context.</p> </dd> <dd> <p>A reference to an array containing the source rectangles specifying the regions of the source bitmap to draw as sprites. Direct2D will use the entire source bitmap for sprites that are assigned a null value or the InfiniteRectU. If this parameter is omitted entirely or set to a null value, then Direct2D will use the entire source bitmap for all the added sprites.</p> </dd> <dd> <p>A reference to an array containing the colors to apply to each sprite. The output color is the result of component-wise multiplication of the source bitmap color and the provided color. The output color is not clamped. </p> <p>Direct2D will not change the color of sprites that are assigned a null value. If this parameter is omitted entirely or set to a null value, then Direct2D will not change the color of any of the added sprites.</p> </dd> <dd> <p>A reference to an array containing the transforms to apply to each sprite?s destination rectangle. </p> <p>Direct2D will not transform the destination rectangle of any sprites that are assigned a null value. If this parameter is omitted entirely or set to a null value, then Direct2D will not transform the destination rectangle of any of the added sprites.</p> </dd> <dd> <p>Specifies the distance, in bytes, between each rectangle in the destinationRectangles array. If you provide a stride of 0, then the same destination rectangle will be used for each added sprite.</p> </dd> <dd> <p>Specifies the distance, in bytes, between each rectangle in the sourceRectangles array (if that array is given). If you provide a stride of 0, then the same source rectangle will be used for each added sprite.</p> </dd> <dd> <p>Specifies the distance, in bytes, between each color in the colors array (if that array is given). If you provide a stride of 0, then the same color will be used for each added sprite.</p> </dd> <dd> <p>Specifies the distance, in bytes, between each transform in the transforms array (if that array is given). If you provide a stride of 0, then the same transform will be used for each added sprite.</p> </dd> <p>Updates the properties of the specified sprites in this sprite batch. Providing a null value for any property will leave that property unmodified for that sprite. </p> <p>Returns {{S_OK}} on success. Returns {{E_INVALIDARG}} if an invalid value was passed to the method. In this case, no sprites are modified by this call to SetSprites.</p> <dd> <p>The index of the first sprite in this sprite batch to update.</p> </dd> <dd> <p>The number of sprites to update with new properties. This determines how many strides into each given array Direct2D will read.</p> </dd> <dd> <p>A reference to an array containing the destination rectangles specifying where to draw the sprites on the destination device context.</p> </dd> <dd> <p>A reference to an array containing the source rectangles specifying the regions of the source bitmap to draw as sprites. </p> <p>Direct2D will use the entire source bitmap for sprites that are assigned a null value or the InfiniteRectU. If this parameter is omitted entirely or set to a null value, then Direct2D will use the entire source bitmap for all the updated sprites.</p> </dd> <dd> <p>A reference to an array containing the colors to apply to each sprite. The output color is the result of component-wise multiplication of the source bitmap color and the provided color. The output color is not clamped. </p> <p>Direct2D will not change the color of sprites that are assigned a null value. If this parameter is omitted entirely or set to a null value, then Direct2D will not change the color of any of the updated sprites.</p> </dd> <dd> <p>A reference to an array containing the transforms to apply to each sprite?s destination rectangle. </p> <p>Direct2D will not transform the destination rectangle of any sprites that are assigned a null value. If this parameter is omitted entirely or set to a null value, then Direct2D will not transform the destination rectangle of any of the updated sprites.</p> </dd> <dd> <p>Specifies the distance, in bytes, between each rectangle in the destinationRectangles array. If you provide a stride of 0, then the same destination rectangle will be used for each updated sprite.</p> </dd> <dd> <p>Specifies the distance, in bytes, between each rectangle in the sourceRectangles array (if that array is given). If you provide a stride of 0, then the same source rectangle will be used for each updated sprite.</p> </dd> <dd> <p>Specifies the distance, in bytes, between each color in the colors array (if that array is given). If you provide a stride of 0, then the same color will be used for each updated sprite.</p> </dd> <dd> <p>Specifies the distance, in bytes, between each transform in the transforms array (if that array is given). If you provide a stride of 0, then the same transform will be used for each updated sprite.</p> </dd> <p>Retrieves the specified subset of sprites from this sprite batch. For the best performance, use nullptr for properties that you do not need to retrieve.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The index of the first sprite in this sprite batch to retrieve.</p> </dd> <dd> <p>The number of sprites to retrieve.</p> </dd> <dd> <p>When this method returns, contains a reference to an array containing the destination rectangles for the retrieved sprites.</p> </dd> <dd> <p>When this method returns, contains a reference to an array containing the source rectangles for the retrieved sprites. </p> <p>The InfiniteRectU is returned for any sprites that were not assigned a source rectangle.</p> </dd> <dd> <p>When this method returns, contains a reference to an array containing the colors to be applied to the retrieved sprites. </p> <p>The color {1.0f, 1.0f, 1.0f, 1.0f} is returned for any sprites that were not assigned a color.</p> </dd> <dd> <p>When this method returns, contains a reference to an array containing the transforms to be applied to the retrieved sprites. </p> <p>The identity matrix is returned for any sprites that were not assigned a transform.</p> </dd> <p>Retrieves the number of sprites in this sprite batch.</p> <p>Returns the number of sprites in this sprite batch</p> <p>Removes all sprites from this sprite batch.</p> <p>This method does not return a value.</p> <p>This interface performs all the same functions as the <strong>{{ID2D1DeviceContext2}}</strong> interface, plus it enables functionality for creating and drawing sprite batches.</p> <p>Creates a new, empty sprite batch. After creating a sprite batch, use <strong>{{ID2D1SpriteBatch::AddSprites}}</strong> to add sprites to it, then use <strong>{{ID2D1DeviceContext3::DrawSpriteBatch}}</strong> to draw it.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Renders all sprites in the given sprite batch to the device context using the specified drawing options.</p> <p>This method does not return a value.</p> <dd> <p>The sprite batch to draw.</p> </dd> <dd> <p>The bitmap from which the sprites are to be sourced. Each sprite?s source rectangle refers to a portion of this bitmap.</p> </dd> <dd> <p>The interpolation mode to use when drawing this sprite batch. This determines how Direct2D interpolates pixels within the drawn sprites if scaling is performed.</p> </dd> <dd> <p>The additional drawing options, if any, to be used for this sprite batch.</p> </dd> <p>Represents a resource domain whose objects and device contexts can be used together. This interface performs all the same functions as the <strong>{{ID2D1Device2}}</strong> interface. It also enables the creation of <strong>{{ID2D1DeviceContext3}}</strong> objects.</p> <p>Creates a new <strong>{{ID2D1DeviceContext3}}</strong> from this Direct2D device.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates Direct2D resources. This interface also enables the creation of <strong>{{ID2D1Device3}}</strong> objects.</p> <p>Creates an <strong>{{ID2D1Device3}}</strong> object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>This interface performs all the same functions as the existing <strong>{{ID2D1CommandSink2}}</strong> interface. It also enables access to sprite batch rendering.</p> <p>Renders part or all of the given sprite batch to the device context using the specified drawing options.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The sprite batch to draw.</p> </dd> <dd> <p>The index of the first sprite in the sprite batch to draw.</p> </dd> <dd> <p>The number of sprites to draw.</p> </dd> <dd> <p>The bitmap from which the sprites are to be sourced. Each sprite?s source rectangle refers to a portion of this bitmap.</p> </dd> <dd> <p>The interpolation mode to use when drawing this sprite batch. This determines how Direct2D interpolates pixels within the drawn sprites if scaling is performed.</p> </dd> <dd> <p>The additional drawing options, if any, to be used for this sprite batch.</p> </dd> <p>This object supplies the values for context-fill, context-stroke, and context-value that are used when rendering {{SVG}} glyphs.</p> <p>Provides values to an {{SVG}} glyph for fill.</p> <p>This method returns an {{HRESULT}} success or error code.</p> <dd> <p>Describes how the area is painted. A null brush will cause the context-fill value to come from the <strong>defaultFillBrush</strong>. If the defaultFillBrush is also null, the context-fill value will be 'none'. To set the ?context-fill? value, this method uses the provided brush with its opacity set to 1. To set the ?context-fill-opacity? value, this method uses the opacity of the provided brush. </p> </dd> <p>Returns the requested fill parameters.</p> <p>This method does not return a value.</p> <dd> <p>Describes how the area is painted.</p> </dd> <p>Provides values to an {{SVG}} glyph for stroke properties. The brush with opacity set to 1 is used as the 'context-stroke'. The opacity of the brush is used as the 'context-stroke-opacity' value.</p> <p>This method returns an {{HRESULT}} success or error code.</p> <dd> <p>Describes how the stroke is painted. A null brush will cause the context-stroke value to be none.</p> </dd> <dd> <p>Specifies the 'context-value' for the 'stroke-width' property.</p> </dd> <dd> <p>Specifies the 'context-value' for the 'stroke-dasharray' property. A null value will cause the stroke-dasharray to be set to 'none'.</p> </dd> <dd> <p>The the number of dashes in the dash array.</p> </dd> <dd> <p>Specifies the 'context-value' for the 'stroke-dashoffset' property.</p> </dd> <p>Returns the number of dashes in the dash array.</p> <p>Returns the number of dashes in the dash array.</p> <p>Returns the requested stroke parameters. Any parameters that are non-null will receive the value of the requested parameter. </p> <p>This method does not return a value.</p> <dd> <p>Describes how the stroke is painted.</p> </dd> <dd> <p>The 'context-value' for the 'stroke-width' property.</p> </dd> <dd> <p>The 'context-value' for the 'stroke-dasharray' property.</p> </dd> <dd> <p>The the number of dashes in the dash array.</p> </dd> <dd> <p>The 'context-value' for the 'stroke-dashoffset' property.</p> </dd> <p> This interface performs all the same functions as the <strong>{{ID2D1DeviceContext3}}</strong> interface, plus it enables functionality for handling new types of color font glyphs. </p> <p>Creates an {{SVG}} glyph style object.</p> <p>This method returns an {{HRESULT}} success or error code.</p> <dd> <p>On completion points to the created <strong>{{ID2D1SvgGlyphStyle}}</strong> object.</p> </dd> <p>Represents a set of state and command buffers that are used to render to a target.</p><p>The device context can render to a target bitmap or a command list. </p> <p> Any resource created from a device context can be shared with any other resource created from a device context when both contexts are created on the same device. </p> <p>Draws a text layout object. If the layout is not subsequently changed, this can be more efficient than DrawText when drawing the same layout repeatedly.</p> <p>This method does not return a value.</p> <dd> <p>The point, described in device-independent pixels, at which the upper-left corner of the text described by <em>textLayout</em> is drawn.</p> </dd> <dd> <p>The formatted text to draw. Any drawing effects that do not inherit from <strong>{{ID2D1Resource}}</strong> are ignored. If there are drawing effects that inherit from <strong>{{ID2D1Resource}}</strong> that are not brushes, this method fails and the render target is put in an error state. </p> </dd> <dd> <p>The brush used to paint the text.</p> </dd> <dd> <p>The values for context-fill, context-stroke, and context-value that are used when rendering {{SVG}} glyphs.</p> </dd> <dd> <p>The index used to select a color palette within a color font.</p> </dd> <dd> <p> A value that indicates whether the text should be snapped to pixel boundaries and whether the text should be clipped to the layout rectangle. The default value is <strong>{{D2D1_DRAW_TEXT_OPTIONS_NONE}}</strong>, which indicates that text should be snapped to pixel boundaries and it should not be clipped to the layout rectangle. </p> </dd> <p>Draws a color bitmap glyph run using one of the bitmap formats.</p> <p>This method does not return a value.</p> <dd> <p>Specifies the format of the glyph image. Supported formats are {{DWRITE_GLYPH_IMAGE_FORMATS_PNG}}, {{DWRITE_GLYPH_IMAGE_FORMATS_JPEG}}, {{DWRITE_GLYPH_IMAGE_FORMATS_TIFF}}, or {{DWRITE_GLYPH_IMAGE_FORMATS_PREMULTIPLIED_B8G8R8A8}}. This method will result in an error if the color glyph run does not contain the requested format. </p> <p>Only one format can be specified at a time, combinations of flags are not valid input.</p> </dd> <dd> <p>The origin of the baseline for the glyph run.</p> </dd> <dd> <p>The glyphs to render.</p> </dd> <dd> <p>Indicates the measuring method.</p> </dd> <dd> <p>Specifies the pixel snapping policy when rendering color bitmap glyphs.</p> </dd> <p>Draws a color glyph run that has the format of {{DWRITE_GLYPH_IMAGE_FORMATS_SVG}}.</p> <p>This method does not return a value.</p> <dd> <p>The origin of the baseline for the glyph run.</p> </dd> <dd> <p>The glyphs to render.</p> </dd> <dd> <p>The brush used to paint the specified glyphs.</p> </dd> <dd> <p>Values for context-fill, context-stroke, and context-value that are used when rendering {{SVG}} glyphs.</p> </dd> <dd> <p>The index used to select a color palette within a color font. Note that this not the same as the paletteIndex in the {{DWRITE_COLOR_GLYPH_RUN}} struct, which is not relevant for {{SVG}} glyphs.</p> </dd> <dd> <p>Indicates the measuring method used for text layout.</p> </dd> <p> Retrieves an image of the color bitmap glyph from the color glyph cache. If the cache does not already contain the requested resource, it will be created. This method may be used to extend the lifetime of a glyph image even after it is evicted from the color glyph cache. </p> <p>This method returns an {{HRESULT}} success or error code.</p> <dd> <p>The format for the glyph image. If there is no image data in the requested format for the requested glyph, this method will return an error. </p> </dd> <dd> <p>The origin for the glyph.</p> </dd> <dd> <p>Reference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines.</p> </dd> <dd> <p>The specified font size affects the choice of which bitmap to use from the font. It also affects the output glyphTransform, causing it to properly scale the glyph.</p> </dd> <dd> <p>Index of the glyph.</p> </dd> <dd> <p>If true, specifies that glyphs are rotated 90 degrees to the left and vertical metrics are used. Vertical writing is achieved by specifying isSideways as true and rotating the entire run 90 degrees to the right via a rotate transform.</p> </dd> <dd> <p>The transform to apply to the image. This input transform affects the choice of which bitmap to use from the font. It is also factored into the output glyphTransform.</p> </dd> <dd> <p>Dots per inch along the x-axis.</p> </dd> <dd> <p>Dots per inch along the y-axis.</p> </dd> <dd> <p>Output transform, which transforms from the glyph's space to the same output space as the worldTransform. This includes the input glyphOrigin, the glyph's offset from the glyphOrigin, and any other required transformations.</p> </dd> <dd> <p>On completion contains the retrieved glyph image.</p> </dd> <p> Retrieves an image of the {{SVG}} glyph from the color glyph cache. If the cache does not already contain the requested resource, it will be created. This method may be used to extend the lifetime of a glyph image even after it is evicted from the color glyph cache. </p> <p>This method returns an {{HRESULT}} success or error code.</p> <dd> <p>Origin of the glyph.</p> </dd> <dd> <p>Reference to a font face which contains font face type, appropriate file references, face identification data and various font data such as metrics, names and glyph outlines.</p> </dd> <dd> <p>The specified font size affects the output glyphTransform, causing it to properly scale the glyph.</p> </dd> <dd> <p>Index of the glyph to retrieve.</p> </dd> <dd> <p>If true, specifies that glyphs are rotated 90 degrees to the left and vertical metrics are used. Vertical writing is achieved by specifying isSideways as true and rotating the entire run 90 degrees to the right via a rotate transform.</p> </dd> <dd> <p>The transform to apply to the image.</p> </dd> <dd> <p>Describes how the area is painted.</p> </dd> <dd> <p>The values for context-fill, context-stroke, and context-value that are used when rendering {{SVG}} glyphs.</p> </dd> <dd> <p>The index used to select a color palette within a color font. Note that this not the same as the paletteIndex in the {{DWRITE_COLOR_GLYPH_RUN}} struct, which is not relevant for {{SVG}} glyphs.</p> </dd> <dd> <p>Output transform, which transforms from the glyph's space to the same output space as the worldTransform. This includes the input glyphOrigin, the glyph's offset from the glyphOrigin, and any other required transformations.</p> </dd> <dd> <p>On completion, contains the retrieved glyph image.</p> </dd> <p> Represents a resource domain whose objects and device contexts can be used together. This interface performs all the same functions as the <strong>{{ID2D1Device3}}</strong> interface. It also enables the creation of <strong>{{ID2D1DeviceContext4}}</strong> objects. </p> <p>Creates a new device context from a Direct2D device.</p> <p>The new device context will not have a selected target bitmap. The caller must create and select a bitmap as the target surface of the context.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If it fails, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The options to be applied to the created device context.</p> </dd> <dd> <p>When this method returns, contains the address of a reference to the new device context.</p> </dd> <p>Sets the maximum capacity of the color glyph cache. </p> <p>The color glyph cache is used to store color bitmap glyphs and {{SVG}} glyphs, enabling faster performance if the same glyphs are needed again. The capacity determines the amount of memory that {{D2D}} may use to store glyphs that the application does not already reference. If the application references a glyph using <strong>GetColorBitmapGlyphImage</strong> or <strong>GetSvgGlyphImage</strong>, after it has been evicted, this glyph does not count toward the cache capacity.</p> <p>This method does not return a value.</p> <dd> <p>The maximum capacity of the color glyph cache.</p> </dd> <p>Gets the maximum capacity of the color glyph cache.</p> <p>Returns the maximum capacity of the color glyph cache in bytes.</p> <p>Creates Direct2D resources. This interface also enables the creation of <strong>{{ID2D1Device4}}</strong> objects.</p> <p> Creates an <strong>{{ID2D1Device4}}</strong> object. </p> <p>This method returns an {{HRESULT}} success or error code.</p> <p>This interface performs all the same functions as the existing <strong>{{ID2D1CommandSink3}}</strong> interface. It also enables access to the new primitive blend mode, {{MAX}}, through the <strong>SetPrimitiveBlend2</strong> method.</p> <p>This interface performs all the same functions as the {{ID2D1DeviceContext1}} interface, plus it enables functionality such as ink rendering, gradient mesh rendering, and improved image loading.</p> <p>Represents a color context to be used with the Color Management Effect.</p> <p>Represents a set of state and command buffers that are used to render to a target.</p><p>The device context can render to a target bitmap or a command list. </p> <p> Any resource created from a device context can be shared with any other resource created from a device context when both contexts are created on the same device. </p> <p>Creates a color context from a {{DXGI}} color space type. It is only valid to use this with the Color Management Effect in 'Best' mode.</p> <p>This method returns an {{HRESULT}} success or error code.</p> <dd> <p>The color space to create the color context from.</p> </dd> <dd> <p>The created color context.</p> </dd> <p>Represents a resource domain whose objects and device contexts can be used together.</p> <p>Creates Direct2D resources.</p> <p>The <strong>{{ID2D1Factory}}</strong> interface is the starting point for using Direct2D; it's what you use to create other Direct2D resources that you can use to draw or describe shapes. </p><p>A factory defines a set of Create<em>Resource</em> methods that can produce the following drawing resources:</p><p> </p><ul> <li>Render targets: objects that render drawing commands.</li> <li>Drawing state blocks: objects that store drawing state information, such as the current transformation and antialiasing mode.</li> <li>Geometries: objects that represent simple and potentially complex shapes.</li> </ul><p>To create an <strong>{{ID2D1Factory}}</strong>, you use one of the <strong>CreateFactory</strong> methods. You should retain the <strong>{{ID2D1Factory}}</strong> instance for as long as you use Direct2D resources; in general, you shouldn't need to recreate it when the application is running. For more information about Direct2D resources, see the Resources Overview.</p> <p>Creates Direct2D resources.</p> <p>The <strong>{{ID2D1Factory}}</strong> interface is the starting point for using Direct2D; it's what you use to create other Direct2D resources that you can use to draw or describe shapes. </p><p>A factory defines a set of Create<em>Resource</em> methods that can produce the following drawing resources:</p><p> </p><ul> <li>Render targets: objects that render drawing commands.</li> <li>Drawing state blocks: objects that store drawing state information, such as the current transformation and antialiasing mode.</li> <li>Geometries: objects that represent simple and potentially complex shapes.</li> </ul><p>To create an <strong>{{ID2D1Factory}}</strong>, you use one of the <strong>CreateFactory</strong> methods. You should retain the <strong>{{ID2D1Factory}}</strong> instance for as long as you use Direct2D resources; in general, you shouldn't need to recreate it when the application is running. For more information about Direct2D resources, see the Resources Overview.</p> <p>Returns the interior points for a gradient mesh patch based on the points defining a Coons patch.</p><strong>Note</strong>??<p>This function is called by the <strong>GradientMeshPatchFromCoonsPatch</strong> function and is not intended to be used directly.</p>? <p>This function is called by the <strong>GradientMeshPatchFromCoonsPatch</strong> function and is not intended to be used directly.</p> <p>This function does not return a value.</p> <p>Identifiers for properties of the Contrast effect.</p> <p>Indentifiers for properties of the {{RGB}} to Hue effect.</p> <p>Values for the <strong>{{D2D1_RGBTOHUE_PROP_OUTPUT_COLOR_SPACE}}</strong> property of the {{RGB}} to Hue effect.</p> <p>Identifiers for properties of the Hue to {{RGB}} effect.</p> <p>Values for the <strong>{{D2D1_HUETORGB_PROP_INPUT_COLOR_SPACE}}</strong> property of the Hue to {{RGB}} effect.</p> <p>Identifiers for properties of the Chroma-key effect.</p> <p>Identifiers for properties of the Emboss effect.</p> <p>Identifiers for properties of the Exposure effect.</p> <p>Identifiers for properties of the Posterize effect.</p> <p>Identifiers for properties of the Sepia effect.</p> <p>Identifiers for properties of the Sharpen effect.</p> <p>Identifiers for properties of the Straighten effect.</p> <p>Values for the <strong>{{D2D1_STRAIGHTEN_PROP_SCALE_MODE}}</strong> property of the Straighten effect.</p> <p>Identifiers for properties of the Temperature and Tint effect.</p> <p>Identifiers for properties of the Vignette effect.</p> <p>Identifiers for properties of the Edge Detection effect.</p> <dd> <p>The {{D2D1_EDGEDETECTION_PROP_STRENGTH}} property is a float value modulating the response of the edge detection filter. A low strength value means that weaker edges will get filtered out, while a high value means stronger edges will get filtered out. The allowed range is 0.0 to 1.0. The default value is 0.5.</p> </dd> <dd> <p>The {{D2D1_EDGEDETECTION_PROP_BLUR_RADIUS}} property is a float value specifying the amount of blur to apply. Applying blur is used to remove high frequencies and reduce phantom edges. The allowed range is 0.0 to 10.0. The default value is 0.0 (no blur applied).</p> </dd> <dd> <p>The {{D2D1_EDGEDETECTION_PROP_MODE}} property is a <strong>{{D2D1_EDGEDETECTION_MODE}}</strong> enumeration value which mode to use for edge detection. The default value is {{D2D1_EDGEDETECTION_MODE_SOBEL}}.</p> </dd> <dd> <p>The {{D2D1_EDGEDETECTION_PROP_OVERLAY_EDGES}} property is a boolean value. Edge detection only applies to the {{RGB}} channels, the alpha channel is ignored for purposes of detecting edges. If {{D2D1_EDGEDETECTION_PROP_OVERLAY_EDGES}} is false, the output edges is fully opaque. If {{D2D1_EDGEDETECTION_PROP_OVERLAY_EDGES}} is true, the input opacity is preserved. The default value is false.</p> </dd> <dd> <p>The {{D2D1_EDGEDETECTION_PROP_ALPHA_MODE}} property is a <strong>{{D2D1_ALPHA_MODE}}</strong> enumeration value indicating the alpha mode of the input file. If the input is not opaque, this value is used to determine whether to unpremultiply the inputs. See the About Alpha Modes section of the Supported Pixel Formats and Alpha Modes topic for additional information. The default value is {{D2D1_ALPHA_MODE_PREMULTIPLIED}}.</p> </dd> <p>Values for the <strong>{{D2D1_EDGEDETECTION_PROP_MODE}}</strong> property of the Edge Detection effect.</p> <p>Identifiers for properties of the Highlights and Shadows effect.</p> <p>Values for the <strong>{{D2D1_HIGHLIGHTSANDSHADOWS_PROP_INPUT_GAMMA}}</strong> property of the Highlights and Shadows effect.</p> <p>Identifiers for the properties of the 3D Lookup Table effect.</p> <dd> <p>The {{D2D1_LOOKUPTABLE3D_PROP_LUT}} property is a reference to an <strong>{{ID2D1LookupTable3D}}</strong> object. The default value is null.</p> </dd> <dd> <p>The {{D2D1_LOOKUPTABLE3D_PROP_ALPHA_MODE}} property is a <strong>{{D2D1_ALPHA_MODE}}</strong> value indicating the alpha mode of the input file. See the About Alpha Modes section of the Supported Pixel Formats and Alpha Modes topic for additional information.</p> </dd> <p>This effect adjusts the opacity of an image by multiplying the alpha channel of the input by the specified opacity value. It has a single input.</p><p>The {{CLSID}} for this effect is {{CLSID_D2D1Opacity}}.</p> <p>This effect combines two images by adding weighted pixels from input images. It has two inputs, named Destination and Source.</p><p>The cross fade formula is <strong>output = weight * Destination + (1 - weight) * Source</strong>.</p><p>The {{CLSID}} for this effect is {{CLSID_D2D1CrossFade}}.</p> <p>This effect tints the source image by multiplying the source image by the specified color. It has a single input.</p><p>The {{CLSID}} for this effect is {{CLSID_D2D1Tint}}.</p> <p>Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.</p> <p>Not every render target supports hardware rendering. For more information, see the Render Targets Overview. </p> <dd> <p>The render target uses hardware rendering, if available; otherwise, it uses software rendering.</p> </dd> <dd> <p>The render target uses software rendering only.</p> </dd> <dd> <p>The render target uses hardware rendering only. </p> </dd> <p>Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.</p> <p>Not every render target supports hardware rendering. For more information, see the Render Targets Overview. </p> <dd> <p>The render target uses hardware rendering, if available; otherwise, it uses software rendering.</p> </dd> <dd> <p>The render target uses software rendering only.</p> </dd> <dd> <p>The render target uses hardware rendering only. </p> </dd> <p>Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.</p> <p>Not every render target supports hardware rendering. For more information, see the Render Targets Overview. </p> <dd> <p>The render target uses hardware rendering, if available; otherwise, it uses software rendering.</p> </dd> <dd> <p>The render target uses software rendering only.</p> </dd> <dd> <p>The render target uses hardware rendering only. </p> </dd> <p>Defines options that should be applied to the color space.</p> <dd> <p>The color space is otherwise described, such as with a color profile.</p> </dd> <dd> <p>The color space is sRGB.</p> </dd> <dd> <p>The color space is scRGB.</p> </dd> <p>Describes the shape at the end of a line or segment.</p> <p> The following illustration shows the available cap styles for lines or segments. The red portion of the line shows the extra area added by the line cap setting. </p> <dd> <p>A cap that does not extend past the last point of the line. Comparable to cap used for objects other than lines. </p> </dd> <dd> <p>Half of a square that has a length equal to the line thickness.</p> </dd> <dd> <p>A semicircle that has a diameter equal to the line thickness.</p> </dd> <dd> <p>An isosceles right triangle whose hypotenuse is equal in length to the thickness of the line.</p> </dd> <p>Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.</p> <p>Not every render target supports hardware rendering. For more information, see the Render Targets Overview. </p> <dd> <p>The render target uses hardware rendering, if available; otherwise, it uses software rendering.</p> </dd> <dd> <p>The render target uses software rendering only.</p> </dd> <dd> <p>The render target uses hardware rendering only. </p> </dd> <p>Indicates how pixel shader sampling will be restricted. This indicates whether the vertex buffer is large and tends to change infrequently or smaller and changes frequently (typically frame over frame). </p> <p> If the shader specifies <strong>{{D2D1_PIXEL_OPTIONS_NONE}}</strong>, it must still correctly implement the region of interest calculations in <strong>{{ID2D1Transform::MapOutputRectToInputRects}}</strong> and <strong>{{ID2D1Transform::MapInputRectsToOutputRect}}</strong>.</p> <dd> <p>The pixel shader is not restricted in its sampling.</p> </dd> <dd> <p> The pixel shader samples inputs only at the same scene coordinate as the output pixel and returns transparent black whenever the input pixels are also transparent black.</p> </dd> <p>Describes how a render target behaves when it presents its content. This enumeration allows a bitwise combination of its member values.</p> <dd> <p>The render target waits until the display refreshes to present and discards the frame upon presenting.</p> </dd> <dd> <p>The render target does not discard the frame upon presenting.</p> </dd> <dd> <p>The render target does not wait until the display refreshes to present.</p> </dd> <p>Indicates how pixel shader sampling will be restricted. This indicates whether the vertex buffer is large and tends to change infrequently or smaller and changes frequently (typically frame over frame). </p> <p> If the shader specifies <strong>{{D2D1_PIXEL_OPTIONS_NONE}}</strong>, it must still correctly implement the region of interest calculations in <strong>{{ID2D1Transform::MapOutputRectToInputRects}}</strong> and <strong>{{ID2D1Transform::MapInputRectsToOutputRect}}</strong>.</p> <dd> <p>The pixel shader is not restricted in its sampling.</p> </dd> <dd> <p> The pixel shader samples inputs only at the same scene coordinate as the output pixel and returns transparent black whenever the input pixels are also transparent black.</p> </dd> <p>Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.</p> <p>Not every render target supports hardware rendering. For more information, see the Render Targets Overview. </p> <dd> <p>The render target uses hardware rendering, if available; otherwise, it uses software rendering.</p> </dd> <dd> <p>The render target uses software rendering only.</p> </dd> <dd> <p>The render target uses hardware rendering only. </p> </dd> <p>Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.</p> <p>Not every render target supports hardware rendering. For more information, see the Render Targets Overview. </p> <dd> <p>The render target uses hardware rendering, if available; otherwise, it uses software rendering.</p> </dd> <dd> <p>The render target uses software rendering only.</p> </dd> <dd> <p>The render target uses hardware rendering only. </p> </dd> <p>Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.</p> <p>Not every render target supports hardware rendering. For more information, see the Render Targets Overview. </p> <dd> <p>The render target uses hardware rendering, if available; otherwise, it uses software rendering.</p> </dd> <dd> <p>The render target uses software rendering only.</p> </dd> <dd> <p>The render target uses hardware rendering only. </p> </dd> <p>Describes whether a render target uses hardware or software rendering, or if Direct2D should select the rendering mode.</p> <p>Not every render target supports hardware rendering. For more information, see the Render Targets Overview. </p> <dd> <p>The render target uses hardware rendering, if available; otherwise, it uses software rendering.</p> </dd> <dd> <p>The render target uses software rendering only.</p> </dd> <dd> <p>The render target uses hardware rendering only. </p> </dd> <p>A 3D vector that consists of three single-precision floating-point values (x, y, z).</p> <dd> <p>The x value of the vector.</p> </dd> <dd> <p>The y value of the vector.</p> </dd> <dd> <p>The z value of the vector.</p> </dd> <p>A description of a single element to the vertex layout.</p> <p>This structure is a subset of <strong>{{D3D11_INPUT_ELEMENT_DESC}}</strong> that omits fields required to define a vertex layout.</p><p>If the <strong>{{D2D1_APPEND_ALIGNED_ELEMENT}}</strong> constant is used for <strong>alignedByteOffset</strong>, the elements will be packed contiguously for convenience. </p> <dd> <p>The {{HLSL}} semantic associated with this element in a shader input-signature.</p> </dd> <dd> <p>The semantic index for the element. A semantic index modifies a semantic, with an integer index number. A semantic index is only needed in a case where there is more than one element with the same semantic. For example, a 4x4 matrix would have four components each with the semantic name matrix; however, each of the four components would have different semantic indices (0, 1, 2, and 3).</p> </dd> <dd> <p>The data type of the element data.</p> </dd> <dd> <p>An integer value that identifies the input-assembler. Valid values are between 0 and 15.</p> </dd> <dd> <p>The offset in bytes between each element.</p> </dd> <p>A 3D vector that consists of three single-precision floating-point values (x, y, z).</p> <dd> <p>The x value of the vector.</p> </dd> <dd> <p>The y value of the vector.</p> </dd> <dd> <p>The z value of the vector.</p> </dd> <p>This interface performs all the same functions as the {{ID2D1DeviceContext1}} interface, plus it enables functionality such as ink rendering, gradient mesh rendering, and improved image loading.</p> <p>Interface for all {{SVG}} elements.</p> <p>This interface performs all the same functions as the {{ID2D1DeviceContext1}} interface, plus it enables functionality such as ink rendering, gradient mesh rendering, and improved image loading.</p> <p>Represents a bitmap that has been bound to an <strong>{{ID2D1RenderTarget}}</strong>.</p> <p>This interface performs all the same functions as the {{ID2D1DeviceContext1}} interface, plus it enables functionality such as ink rendering, gradient mesh rendering, and improved image loading.</p> <p>Interface describing an {{SVG}} points value in a polyline or polygon element.</p> <p>This interface performs all the same functions as the {{ID2D1DeviceContext1}} interface, plus it enables functionality such as ink rendering, gradient mesh rendering, and improved image loading.</p> <p> Used with <strong>{{ID3D11On12Device::CreateWrappedResource}}</strong> to override flags that would be inferred by the resource properties or heap properties, including bind flags, misc flags, and {{CPU}} access flags. </p> <p> Use this structure with <strong>CreateWrappedResource</strong>. </p> <p>Handles the creation, wrapping and releasing of {{D3D11}} resources for Direct3D 11on12.</p> <p> This method creates {{D3D11}} resources for use with {{D3D}} 11on12. </p> <p> This method returns one of the Direct3D 12 Return Codes. </p> <dd> <p> A reference to an already-created {{D3D12}} resource or heap. </p> </dd> <dd> <p> A <strong>{{D3D11_RESOURCE_FLAGS}}</strong> structure that enables an application to override flags that would be inferred by the resource/heap properties. The {{D3D11_RESOURCE_FLAGS}} structure contains bind flags, misc flags, and {{CPU}} access flags. </p> </dd> <dd> <p> The use of the resource on input, as a bitwise-{{OR}}'d combination of <strong>{{D3D12_RESOURCE_STATES}}</strong> enumeration constants. </p> </dd> <dd> <p> The use of the resource on output, as a bitwise-{{OR}}'d combination of <strong>{{D3D12_RESOURCE_STATES}}</strong> enumeration constants. </p> </dd> <dd> <p> The globally unique identifier (<strong>{{GUID}}</strong>) for the wrapped resource interface. The <strong>{{REFIID}}</strong>, or <strong>{{GUID}}</strong>, of the interface to the wrapped resource can be obtained by using the __uuidof() macro. For example, __uuidof(<strong>{{ID3D12Resource}}</strong>) will get the <strong>{{GUID}}</strong> of the interface to a wrapped resource. </p> </dd> <dd> <p> After the method returns, points to the newly created wrapped {{D3D11}} resource or heap. </p> </dd> <p> Releases {{D3D11}} resources that were wrapped for {{D3D}} 11on12. </p> <p> Call this method prior to calling Flush, to insert resource barriers to the appropriate "out" state, and to mark that they should then be expected to be in the "in" state. If no resource list is provided, all wrapped resources are transitioned. These resources will be marked as ?not acquired? in hazard tracking until <strong>{{ID3D11On12Device::AcquireWrappedResources}}</strong> is called. </p><p> Keyed mutex resources cannot be provided to this method; use <strong>{{IDXGIKeyedMutex::ReleaseSync}}</strong> instead. </p> <p> This method does not return a value. </p> <dd> <p> Specifies a reference to a set of {{D3D11}} resources, defined by <strong>{{ID3D11Resource}}</strong>. </p> </dd> <dd> <p> Count of the number of resources. </p> </dd> <p> Acquires {{D3D11}} resources for use with {{D3D}} 11on12. Indicates that rendering to the wrapped resources can begin again. </p> <p> This method marks the resources as "acquired" in hazard tracking. </p><p> Keyed mutex resources cannot be provided to this method; use <strong>{{IDXGIKeyedMutex::AcquireSync}}</strong> instead. </p> <p> This method does not return a value. </p> <dd> <p> Specifies a reference to a set of {{D3D11}} resources, defined by <strong>{{ID3D11Resource}}</strong>. </p> </dd> <dd> <p> Count of the number of resources. </p> </dd> <p> Creates a device that uses Direct3D 11 functionality in Direct3D 12, specifying a pre-existing {{D3D12}} device to use for {{D3D11}} interop. </p> <p> The function signature {{PFN_D3D11ON12_CREATE_DEVICE}} is provided as a typedef, so that you can use dynamic linking techniques (GetProcAddress) instead of statically linking. </p> <p> This method returns one of the Direct3D 12 Return Codes that are documented for <strong>{{D3D11CreateDevice}}</strong>. See Direct3D 12 Return Codes. </p><p> This method returns <strong>{{DXGI_ERROR_SDK_COMPONENT_MISSING}}</strong> if you specify <strong>{{D3D11_CREATE_DEVICE_DEBUG}}</strong> in <em>Flags</em> and the incorrect version of the debug layer is installed on your computer. Install the latest Windows {{SDK}} to get the correct version. </p> <dd> <p> Specifies a pre-existing {{D3D12}} device to use for {{D3D11}} interop. May not be {{NULL}}. </p> </dd> <dd> <p> One or more bitwise {{OR}}'ed flags from <strong>{{D3D11_CREATE_DEVICE_FLAG}}</strong>. These are the same flags as those used by <strong>{{D3D11CreateDeviceAndSwapChain}}</strong>. Specifies which runtime layers to enable. <em>Flags</em> must be compatible with device flags, and its <em>NodeMask</em> must be a subset of the <em>NodeMask</em> provided to the present {{API}}. </p> </dd> <dd> <p> An array of any of the following: </p> <ul> <li>{{D3D_FEATURE_LEVEL_12_1}}</li> <li>{{D3D_FEATURE_LEVEL_12_0}}</li> <li>{{D3D_FEATURE_LEVEL_11_1}}</li> <li>{{D3D_FEATURE_LEVEL_11_0}}</li> <li>{{D3D_FEATURE_LEVEL_10_1}}</li> <li>{{D3D_FEATURE_LEVEL_10_0}}</li> <li>{{D3D_FEATURE_LEVEL_9_3}}</li> <li>{{D3D_FEATURE_LEVEL_9_2}}</li> <li>{{D3D_FEATURE_LEVEL_9_1}}</li> </ul> <p> The first feature level which is less than or equal to the {{D3D12}} device's feature level will be used to perform {{D3D11}} validation. Creation will fail if no acceptable feature levels are provided. Providing {{NULL}} will default to the {{D3D12}} device's feature level. </p> </dd> <dd> <p> The size of the feature levels array, in bytes. </p> </dd> <dd> <p> An array of unique queues for {{D3D11On12}} to use. Valid queue types: 3D command queue. </p> </dd> <dd> <p> The size of the command queue array, in bytes. </p> </dd> <dd> <p> Which node of the {{D3D12}} device to use. Only 1 bit may be set. </p> </dd> <dd> <p> Pointer to the returned <strong>{{ID3D11Device}}</strong>. May be {{NULL}}. </p> </dd> <dd> <p> A reference to the returned <strong>{{ID3D11DeviceContext}}</strong>. May be {{NULL}}. </p> </dd> <dd> <p> A reference to the returned feature level. May be {{NULL}}. </p> </dd> <p>Serves as a factory for all other Microsoft DirectComposition objects and provides methods to control transactional composition.</p> <p>Commits all DirectComposition commands that are pending on this device.</p> <p>Calls to DirectComposition methods are always batched and executed atomically as a single transaction. Calls take effect only when <strong>{{IDCompositionDevice::Commit}}</strong> is called, at which time all pending method calls for a device are executed at once. </p><p>An application that uses multiple devices must call <strong>Commit</strong> for each device separately. However, because the composition engine processes the calls individually, the batch of commands might not take effect at the same time. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <p>Waits for the composition engine to finish processing the previous call to the <strong>{{IDCompositionDevice::Commit}}</strong> method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <p>Retrieves information from the composition engine about composition times and the frame rate.</p> <p>This method retrieves timing information about the composition engine that an application can use to synchronize the rasterization of bitmaps with independent animations.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>A structure that receives composition times and frame rate information.</p> </dd> <p>Creates a composition target object that is bound to the window that is represented by the specified window handle (<strong>{{HWND}}</strong>).</p> <p>A Microsoft DirectComposition visual tree must be bound to a window before anything can be displayed on screen. The window can be a top-level window or a child window. In either case, the window can be a layered window, but in all cases the window must belong to the calling process. If the window belongs to a different process, this method returns <strong>{{DCOMPOSITION_ERROR_ACCESS_DENIED}}</strong>. </p><p>When DirectComposition content is composed to the window, the content is always composed on top of whatever is drawn directly to that window through the device context (<strong>{{HDC}}</strong>) returned by the <strong>GetDC</strong> function, or by calls to Microsoft DirectX <strong>Present</strong> methods. However, because window clipping rules apply to DirectComposition content, if the window has child windows, those child windows may clip the visual tree. The <em>topmost</em> parameter determines whether child windows clip the visual tree. </p><p> Conceptually, each window consists of four layers:</p><ol> <li>The contents drawn directly to the window handle (this is the bottommost layer).</li> <li>An optional DirectComposition visual tree.</li> <li>The contents of all child windows, if any.</li> <li>Another optional DirectComposition visual tree (this is the topmost layer).</li> </ol><p>All four layers are clipped to the window's visible region.</p><p>At most, only two composition targets can be created for each window in the system, one topmost and one not topmost. If a composition target is already bound to the specified window at the specified layer, this method fails. When a composition target object is destroyed, the layer it composed is available for use by a new composition target object.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <p>Creates a new visual object.</p> <p>A new visual object has a static value of zero for the OffsetX and OffsetY properties, and {{NULL}} for the Transform, Clip, and Content properties. Initially, the visual does not cause the contents of a window to change. The visual must be added as a child of another visual, or as the root of a composition target, before it can affect the appearance of a window.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new visual object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates an updateable surface object that can be associated with one or more visuals for composition.</p> <p>A Microsoft DirectComposition surface is a rectangular array of pixels that can be associated with a visual for composition. </p><p>A newly created surface object is in an uninitialized state. While it is uninitialized, the surface has no effect on the composition of the visual tree. It behaves exactly like a surface that has 100% transparent pixels. </p><p>To initialize the surface with pixel data, use the <strong>{{IDCompositionSurface::BeginDraw}}</strong> method. The first call to this method must cover the entire surface area to provide an initial value for every pixel. Subsequent calls may specify smaller sub-rectangles of the surface to update. </p><p>DirectComposition surfaces support the following pixel formats: </p><ul> <li><strong>{{DXGI_FORMAT_B8G8R8A8_UNORM}}</strong></li> <li><strong>{{DXGI_FORMAT_R8G8B8A8_UNORM}}</strong></li> <li><strong>{{DXGI_FORMAT_R16G16B16A16_FLOAT}}</strong></li> </ul> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The width of the surface, in pixels.</p> </dd> <dd> <p>The height of the surface, in pixels.</p> </dd> <dd> <p>The pixel format of the surface.</p> </dd> <dd> <p>The format of the alpha channel, if an alpha channel is included in the pixel format. It can be one of the following values:</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{DXGI_ALPHA_MODE_UNSPECIFIED}}</strong></dt> </dl> </td><td> <p>The alpha channel is not specified. This value has the same effect as <strong>{{DXGI_ALPHA_MODE_IGNORE}}</strong>.</p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_ALPHA_MODE_PREMULTIPLIED}}</strong></dt> </dl> </td><td> <p>The color channels contain values that are premultiplied with the alpha channel. </p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_ALPHA_MODE_IGNORE}}</strong></dt> </dl> </td><td> <p>The alpha channel should be ignored and the bitmap should be rendered opaquely.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>The newly created surface object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a sparsely populated surface that can be associated with one or more visuals for composition.</p> <p>A Microsoft DirectComposition sparse surface is a logical object that behaves like a rectangular array of pixels that can be associated with a visual for composition. The surface is not necessarily backed by any physical video or system memory for every one of its pixels. The application can realize or virtualize parts of the logical surface at different times. </p><p>A newly created surface object is in an uninitialized state. While it is uninitialized, the surface has no effect on the composition of the visual tree. It behaves exactly like a surface that is initialized with 100% transparent pixels. </p><p>To initialize the surface with pixel data, use the <strong>{{IDCompositionSurface::BeginDraw}}</strong> method. This method not only provides pixels for the surface, but it also allocates actual storage space for those pixels. The memory allocation persists until the application returns some of the memory to the system. The application can free part or all of the allocated memory by calling the <strong>{{IDComposition::VirtualSurfaceTrim}}</strong> method. </p><p>DirectComposition surfaces support the following pixel formats:</p><ul> <li><strong>{{DXGI_FORMAT_B8G8R8A8_UNORM}}</strong></li> <li><strong>{{DXGI_FORMAT_R8G8B8A8_UNORM}}</strong></li> <li><strong>{{DXGI_FORMAT_R16G16B16A16_FLOAT}}</strong></li> </ul><p>This method fails if <em>initialWidth</em> or <em>initialHeight</em> exceeds 16,777,216 pixels. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The width of the surface, in pixels. The maximum width is 16,777,216 pixels.</p> </dd> <dd> <p>The height of the surface, in pixels. The maximum height is 16,777,216 pixels.</p> </dd> <dd> <p>The pixel format of the surface.</p> </dd> <dd> <p>The meaning of the alpha channel, if the pixel format contains an alpha channel. It can be one of the following values:</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{DXGI_ALPHA_MODE_UNSPECIFIED}}</strong></dt> </dl> </td><td> <p>The alpha channel is not specified. This value has the same effect as <strong>{{DXGI_ALPHA_MODE_IGNORE}}</strong>.</p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_ALPHA_MODE_PREMULTIPLIED}}</strong></dt> </dl> </td><td> <p>The color channels contain values that are premultiplied with the alpha channel. </p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_ALPHA_MODE_IGNORE}}</strong></dt> </dl> </td><td> <p>The alpha channel should be ignored and the bitmap should be rendered opaquely.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>The newly created surface object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a new composition surface object that wraps an existing composition surface.</p> <p>This method enables an application to use a shared composition surface in a composition tree. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The handle of an existing composition surface that was created by a call to the <strong>{{DCompositionCreateSurfaceHandle}}</strong> function.</p> </dd> <dd> <p>The new composition surface object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a wrapper object that represents the rasterization of a layered window, and that can be associated with a visual for composition.</p> <p>You can use the <em>surface</em> reference in calls to the <strong>{{IDCompositionVisual::SetContent}}</strong> method to set the content of one or more visuals. After setting the content, the visuals compose the contents of the specified layered window as long as the window is layered. If the window is unlayered, the window content disappears from the output of the composition tree. If the window is later re-layered, the window content reappears as long as it is still associated with a visual. If the window is resized, the affected visuals are re-composed. </p><p>The contents of the window are not cached beyond the life of the window. That is, if the window is destroyed, the affected visuals stop composing the window. </p><p>If the window is moved off-screen or resized to zero, the system stops composing the content of visuals. You should use the <strong>DwmSetWindowAttribute</strong> function with the <strong>{{DWMWA_CLOAK}}</strong> flag to "cloak" the layered child window when you need to hide the original window while allowing the system to continue to compose the content of the visuals. For more information, see How to animate the bitmap of a layered child window and DirectComposition layered child window sample.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The handle of the layered window for which to create a wrapper. A layered window is created by specifying <strong>{{WS_EX_LAYERED}}</strong> when creating the window with the <strong>CreateWindowEx</strong> function or by setting <strong>{{WS_EX_LAYERED}}</strong> via <strong>SetWindowLong</strong> after the window has been created.</p> </dd> <dd> <p>The new composition surface object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 2D translation transform object.</p> <p>A new 2D translation transform object has a static value of zero for the OffsetX and OffsetY properties.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new 2D translation transform object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 2D scale transform object.</p> <p>A new 2D scale transform object has a static value of zero for the ScaleX, ScaleY, CenterX, and CenterY properties.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new 2D scale transform object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 2D rotation transform object.</p> <p>A new 2D rotation transform object has a static value of zero for the Angle, CenterX, and CenterY properties.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new rotation transform object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 2D skew transform object.</p> <p>A new 2D skew transform object has a static value of zero for the AngleX, AngleY, CenterX, and CenterY properties.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new 2D skew transform object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 2D 3-by-2 matrix transform object.</p> <p>A new matrix transform object has the identity matrix as its initial value. The identity matrix is the 3x2 matrix with ones on the main diagonal and zeros elsewhere, as shown in the following illustration. </p><p></p><p>When an identity transform is applied to an object, it does not change the position, shape, or size of the object. It is similar to the way that multiplying a number by one does not change the number. Any transform other than the identity transform will modify the position, shape, and/or size of objects.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new matrix transform object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 2D transform group object that holds an array of 2D transform objects.</p> <p>The array entries in a transform group cannot be changed. However, each transform in the array can be modified through its own property setting methods. If a transform in the array is modified, the change is reflected in the computed matrix of the transform group.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An array of 2D transform objects that make up this transform group.</p> </dd> <dd> <p>The number of elements in the <em>transforms</em> array.</p> </dd> <dd> <p>The new transform group object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 3D translation transform object.</p> <p>A newly created 3D translation transform has a static value of 0 for the OffsetX, OffsetY, and OffsetZ properties. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The new 3D translation transform object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 3D scale transform object.</p> <p>A new 3D scale transform object has a static value of 1.0 for the ScaleX, ScaleY, and ScaleZ properties.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new 3D scale transform object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 3D rotation transform object.</p> <p>A new 3D rotation transform object has a default static value of zero for the Angle, CenterX, CenterY, AxisX, and AxisY properties, and a default static value of 1.0 for the AxisZ property.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new 3D rotation transform object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 3D 4-by-4 matrix transform object.</p> <p>The new 3D matrix transform has the identity matrix as its value. The identity matrix is the 4-by-4 matrix with ones on the main diagonal and zeros elsewhere, as shown in the following illustration. </p><p></p><p>When an identity transform is applied to an object, it does not change the position, shape, or size of the object. It is similar to the way that multiplying a number by one does not change the number. Any transform other than the identity transform will modify the position, shape, and/or size of objects.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new 3D matrix transform object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 3D transform group object that holds an array of 3D transform objects.</p> <p>The array entries in a 3D transform group cannot be changed. However, each transform in the array can be modified through its own property setting methods. If a transform in the array is modified, the change is reflected in the computed matrix of the transform group.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An array of 3D transform objects that make up this transform group.</p> </dd> <dd> <p>The number of elements in the <em>transforms</em> array.</p> </dd> <dd> <p>The new 3D transform group object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates an object that represents multiple effects to be applied to a visual subtree.</p> <p>An effect group enables an application to apply multiple effects to a single visual subtree. </p><p>A new effect group has a default opacity value of 1.0 and no 3D transformations.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new effect group object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a clip object that can be used to restrict the rendering of a visual subtree to a rectangular area.</p> <p>A newly created clip object has a static value of ?{{FLT_MAX}} for the left and top properties, and a static value of ?{{FLT_MAX}} for the right and bottom properties, effectively making it a no-op clip object.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new clip object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates an animation object that is used to animate one or more scalar properties of one or more Microsoft DirectComposition objects. </p> <p>A number of DirectComposition object properties can have an animation object as the value of the property. When a property has an animation object as its value, DirectComposition redraws the visual at the refresh rate to reflect the changing value of the property that is being animated.</p><p>A newly created animation object does not have any animation segments associated with it. An application must use the methods of the <strong>{{IDCompositionAnimation}}</strong> interface to build an animation function before setting the animation object as the property of another DirectComposition object.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new animation object. This parameter must not be {{NULL}}.</p> </dd> <p>Determines whether the DirectComposition device object is still valid.</p> <p> If the Microsoft DirectX Graphics Infrastructure ({{DXGI}}) device is lost, the DirectComposition device associated with the {{DXGI}} device is also lost. When it detects a lost device, DirectComposition sends the <strong>{{WM_PAINT}}</strong> message to all windows that are composing DirectComposition content using the lost device. An application should call <strong>CheckDeviceState</strong> in response to each <strong>{{WM_PAINT}}</strong> message to ensure that the DirectComposition device object is still valid. The application must take steps to recover content if the device object becomes invalid. Steps include creating new {{DXGI}} and DirectComposition devices, and recreating all content. (It?s not possible to create just a new {{DXGI}} device and associate it with the existing DirectComposition device.) The system ensures that the device object remains valid between <strong>{{WM_PAINT}}</strong> messages. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>{{TRUE}} if the DirectComposition device object is still valid; otherwise {{FALSE}}.</p> </dd> <p>Represents a binding between a Microsoft DirectComposition visual tree and a destination on top of which the visual tree should be composed. </p> <p>Sets a visual object as the new root object of a visual tree.</p> <p>A visual can be either the root of a single visual tree, or a child of another visual, but it cannot be both at the same time. This method fails if the <em>visual</em> parameter is already the root of another visual tree, or is a child of another visual.</p><p>If <em>visual</em> is {{NULL}}, the visual tree is empty. If there was a previous non-{{NULL}} root visual, that visual becomes available for use as the root of another visual tree, or as a child of another visual.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The visual object that is the new root of this visual tree. This parameter can be {{NULL}}.</p> </dd> <p>Represents a Microsoft DirectComposition visual. </p> <p>Changes the value of the OffsetX property of this visual. The OffsetX property specifies the new offset of the visual along the x-axis, relative to the parent visual.</p> <p>This method fails if the <em>offsetX</em> parameter is NaN, positive infinity, or negative infinity. </p><p>Changing the OffsetX property of a visual transforms the coordinate system of the entire visual subtree that is rooted at that visual. If the Clip property of this visual is specified, the clip rectangle is also transformed. </p><p>A transformation that is specified by the Transform property is applied after the OffsetX property. In other words, the effect of setting the Transform property and the OffsetX property is the same as setting only the Transform property on a transform group object where the first member of the group is an <strong>{{IDCompositionTranslateTransform}}</strong> object that has the same OffsetX value as <em>offsetX</em>. However, you should use <strong>{{IDCompositionVisual::SetOffsetX}}</strong> whenever possible because it is slightly faster.</p><p>If the OffsetX and OffsetY properties are set to 0, and the Transform property is set to {{NULL}}, the coordinate system of the visual is the same as that of its parent.</p><p>If the OffsetX property was previously animated, this method removes the animation and sets the property to the specified static value. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new offset of the visual along the x-axis, in pixels.</p> </dd> <p>Changes the value of the OffsetY property of this visual. The OffsetY property specifies the new offset of the visual along the y-axis, relative to the parent visual.</p> <p>This method fails if the <em>offsetY</em> parameter is NaN, positive infinity, or negative infinity. </p><p>Changing the OffsetY property transforms the coordinate system of the entire visual subtree that is rooted at this visual. If the Clip property of this visual is specified, the clip rectangle is also transformed. </p><p>A transformation that is specified by the Transform property is applied after the OffsetY property. In other words, the effect of setting the Transform property and the OffsetY property is the same as setting only the Transform property on a transform group object where the first member of the group is an <strong>{{IDCompositionTranslateTransform}}</strong> object that has the same OffsetY value as <em>offsetY</em>. However, you should use <strong>{{IDCompositionVisual::SetOffsetY}}</strong> whenever possible because it is slightly faster.</p><p>If the OffsetX and OffsetY properties are set to 0, and the Transform property is set to {{NULL}}, the coordinate system of the visual is the same as that of its parent.</p><p>If the OffsetY property was previously animated, this method removes the animation and sets the property to the specified static value. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new offset of the visual along the y-axis, in pixels.</p> </dd> Sets the Transform property of this visual. The Transform property specifies a 2D transform used to modify the coordinate system of this visual. The property can specify either a 3-by-2 transform matrix or a transform object. <p>Sets the TransformParent property of this visual. The TransformParent property establishes the coordinate system relative to which this visual is composed.</p> <p>The coordinate system of a visual is modified by the OffsetX, OffsetY, and Transform properties. Normally, these properties define the coordinate system of a visual relative to its immediate parent. This method specifies the visual relative to which the coordinate system for this visual is based. The specified visual must be an ancestor of the current visual. If it is not an ancestor, the coordinate system is based on this visual's immediate parent, just as if the TransformParent property were set to {{NULL}}. Because visuals can be reparented, this property can take effect again if the specified visual becomes an ancestor of the target visual through a reparenting operation. </p><p>If the <em>visual</em> parameter is {{NULL}}, the coordinate system is always transformed relative to the visual's immediate parent. This is the default behavior if this method is not used. </p><p>This method fails if the <em>visual</em> parameter is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as this visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new visual that establishes the base coordinate system for this visual. This parameter can be {{NULL}}.</p> </dd> <p>Sets the Effect property of this visual. The Effect property modifies how the subtree that is rooted at this visual is blended with the background, and can apply a 3D perspective transform to the visual. </p> <p>This method creates an implicit off-screen surface to which the subtree that is rooted at this visual is composed. The surface is used as one of the inputs to the specified effect. The output of the effect is composed directly to the composition target. Some effects also use the composition target as another implicit input. This is typically the case for compositional or blend effects such as opacity, where the composition target is considered to be the "background." In that case, any visuals that are "behind" the current visual are included in the composition target when the current visual is rendered and are considered to be the "background" that this visual composes to. </p><p>If this visual is not the root of a visual tree and one of its ancestors also has an effect applied to it, the off-screen surface created by the closest ancestor is the composition target to which this visual's effect is composed. Otherwise, the composition target is the root composition target. As a consequence, the background for compositional and blend effects includes only the visuals up to the closest ancestor that itself has an effect. Conversely, any effects applied to visuals under the current visual use the newly created off-screen surface as the background, which may affect how those visuals ultimately compose on top of what the end user perceives as being "behind" those visuals. </p><p>If the <em>effect</em> parameter is {{NULL}}, no bitmap effect is applied to this visual. Any previous effects that were associated with this visual are removed. The off-screen surface is also removed and the visual subtree is composed directly to the parent composition target, which may also affect how compositional or blend effects under this visual are rendered. </p><p>This method fails if <em>effect</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface that created this visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>A reference to an effect object. This parameter can be {{NULL}}.</p> </dd> <p>Sets the BitmapInterpolationMode property, which specifies the mode for Microsoft DirectComposition to use when interpolating pixels from bitmaps that are not axis-aligned or drawn exactly at scale. </p> <p>The interpolation mode affects how a bitmap is composed when it is transformed such that there is no one-to-one correspondence between pixels in the bitmap and pixels on the screen. </p><p>By default, a visual inherits the interpolation mode of the parent visual, which may inherit the interpolation mode of its parent visual, and so on. A visual uses the default interpolation mode if this method is never called for the visual, or if this method is called with <strong>{{DCOMPOSITION_BITMAP_INTERPOLATION_MODE_INHERIT}}</strong>. If no visuals set the interpolation mode, the default for the entire visual tree is nearest neighbor interpolation, which offers the lowest visual quality but the highest performance. </p><p>If the <em>interpolationMode</em> parameter is anything other than <strong>{{DCOMPOSITION_BITMAP_INTERPOLATION_MODE_INHERIT}}</strong>, this visual's bitmap is composed with the specified interpolation mode, and this mode becomes the new default mode for the children of this visual. That is, if the interpolation mode of this visual's children is unchanged or explicitly set to <strong>{{DCOMPOSITION_BITMAP_INTERPOLATION_MODE_INHERIT}}</strong>, the bitmaps of the child visuals are composed using the interpolation mode of this visual. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The interpolation mode to use.</p> </dd> <p>Sets the BorderMode property, which specifies how to compose the edges of bitmaps and clips associated with this visual, or with visuals in the subtree rooted at this visual.</p> <p>The border mode affects how the edges of a bitmap are composed when the bitmap is transformed such that the edges are not exactly axis-aligned and at precise pixel boundaries. It also affects how content is clipped at the corners of a clip that has rounded corners, and at the edge of a clip that is transformed such that the edges are not exactly axis-aligned and at precise pixel boundaries. </p><p>By default, a visual inherits the border mode of its parent visual, which may inherit the border mode of its parent visual, and so on. A visual uses the default border mode if this method is never called for the visual, or if this method is called with <strong>{{DCOMPOSITION_BORDER_MODE_INHERIT}}</strong>. If no visuals set the border mode, the default for the entire visual tree is aliased rendering, which offers the lowest visual quality but the highest performance. </p><p>If the <em>borderMode</em> parameter is anything other than <strong>{{DCOMPOSITION_BORDER_MODE_INHERIT}}</strong>, this visual's bitmap and clip are composed with the specified border mode. In addition, this border mode becomes the new default for the children of the current visual. That is, if the border mode of this visual's children is unchanged or explicitly set to <strong>{{DCOMPOSITION_BORDER_MODE_INHERIT}}</strong>, the bitmaps and clips of the child visuals are composed using the border mode of this visual. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The border mode to use.</p> </dd> Sets the Clip property of this visual to the specified rectangular region or clip object. The Clip property restricts the rendering of the visual subtree that is rooted at this visual to a rectangular region. <p>Sets the Content property of this visual to the specified bitmap or window wrapper.</p> <p> The <em>content</em> parameter must point to one of the following:</p><ul> <li>An object that implements the <strong>{{IDCompositionSurface}}</strong> interface.</li> <li>An object that implements the <strong>{{IDXGISwapChain1}}</strong> interface.</li> <li>A wrapper object that is returned by the <strong>CreateSurfaceFromHandle</strong> or <strong>CreateSurfaceFromHwnd</strong> method. </li> </ul><p>The new content replaces any content that was previously associated with the visual. If the <em>content</em> parameter is {{NULL}}, the visual has no associated content.</p><p>A visual can be associated with a bitmap object or a window wrapper. A bitmap is either a Microsoft DirectX swap chain or a Microsoft DirectComposition surface.</p><p>A window wrapper is created with the <strong>CreateSurfaceFromHwnd</strong> method and is a stand-in for the rasterization of another window, which must be a top-level window or a layered child window. A window wrapper is conceptually equivalent to a bitmap that is the size of the target window on which the contents of the window are drawn. The contents include the target window's child windows (layered or otherwise), and any DirectComposition content that is drawn in the child windows. </p><p>A DirectComposition surface wrapper is created with the <strong>CreateSurfaceFromHandle</strong> method and is a reference to a swap chain. An application might use a surface wrapper in a cross-process scenario where one process creates the swap chain and another process associates the bitmap with a visual.</p><p>The bitmap is always drawn at position (0,0) relative to the visual's coordinate system, although the coordinate system is directly affected by the OffsetX, OffsetY, and Transform properties, as well as indirectly by the transformations on ancestor visuals. The bitmap of a visual is always drawn behind the children of that visual.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The object that is the new content of this visual. This parameter can be {{NULL}}.</p> </dd> <p>Adds a new child visual to the children list of this visual.</p> <p>Child visuals are arranged in an ordered list. The contents of a child visual are drawn in front of (or above) the contents of its parent visual, but behind (or below) the contents of its children.</p><p>The <em>referenceVisual</em> parameter must be an existing child of the parent visual, or it must be {{NULL}}. The <em>insertAbove</em> parameter indicates whether the new child should be rendered immediately above the reference visual in the Z order, or immediately below it.</p><p>If the <em>referenceVisual</em> parameter is {{NULL}}, the specified visual is rendered above or below all children of the parent visual, depending on the value of the <em>insertAbove</em> parameter. If <em>insertAbove</em> is {{TRUE}}, the new child visual is above no sibling, therefore it is rendered below all of its siblings. Conversely, if <em>insertAbove</em> is {{FALSE}}, the visual is below no sibling, therefore it is rendered above all of its siblings.</p><p>The visual specified by the <em>visual</em> parameter cannot be either a child of a single other visual, or the root of a visual tree that is associated with a composition target. If <em>visual</em> is already a child of another visual, <strong>AddVisual</strong> fails. The child visual must be removed from the children list of its previous parent before adding it to the children list of the new parent. If <em>visual</em> is the root of a visual tree, the visual must be dissociated from that visual tree before adding it to the children list of the new parent. To dissociate the visual from a visual tree, call the <strong>{{IDCompositionTarget::SetRoot}}</strong> method and specify either a different visual or {{NULL}} as the <em>visual</em> parameter.</p><p>A child visual need not have been created by the same <strong>{{IDCompositionDevice}}</strong> interface as its parent. When visuals from different devices are combined in the same visual tree, Microsoft DirectComposition composes the tree as it normally would, except that changes to a particular visual take effect only when <strong>{{IDCompositionDevice::Commit}}</strong> is called on the device object that created the visual. The ability to combine visuals from different devices enables multiple threads to create and manipulate a single visual tree while maintaining independent devices that can be used to commit changes asynchronously</p><p>This method fails if <em>visual</em> or <em>referenceVisual</em> is an invalid reference, or if the visual referenced by the <em>referenceVisual</em> parameter is not a child of the parent visual. These interfaces cannot be custom implementations; only interfaces created by DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The child visual to add. This parameter must not be {{NULL}}.</p> </dd> <dd> <p>{{TRUE}} to place the new child visual in front of the visual specified by the <em>referenceVisual</em> parameter, or {{FALSE}} to place it behind <em>referenceVisual</em>.</p> </dd> <dd> <p>The existing child visual next to which the new visual should be added.</p> </dd> <p>Removes a child visual from the children list of this visual.</p> <p>The child visual is removed from the list of children. The order of the remaining child visuals is not changed.</p><p>This method fails if <em>visual</em> is not a child of the parent visual.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The child visual to remove from the children list. This parameter must not be {{NULL}}.</p> </dd> <p>Removes all visuals from the children list of this visual.</p> <p>This method can be called even if this visual has no children. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <p>Sets the blending mode for this visual.</p> <p>The composite mode determines how visual's bitmap is blended with the screen. By default, the visual is blended with "source over" semantics; that is, the colors are blended with per-pixel transparency.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The blending mode to use when composing the visual to the screen.</p> </dd> <p>Represents a 2D transformation that can be used to modify the coordinate space of a visual subtree. </p> <p>The <strong>{{IDCompositionTransform}}</strong> interface is an abstract interface that represents a 2D affine transformation. Transformations affect the entire visual subtree that is rooted at the visual that the transform is associated with. A transform object can be associated with multiple visuals. When a transform object is modified, all affected visuals are recomposed to reflect the change.</p><p>Transforms operate by modifying the coordinate system for all rendering operations on a visual. For example, ordinarily a bitmap that is associated with a visual draws at position (0,0) and extends the full width and height of the bitmap. If a translation transform is applied, the bitmap draws at a position that is offset by that transform. If a scale transform is applied, the extent covered by the bitmap is affected by the scale transform. More than one transform can be simultaneously applied to a visual by using the <strong>{{IDCompositionDevice::CreateTransformGroup}}</strong> interface.</p> <p>Represents a 3D transformation effect that can be used to modify the rasterization of a visual subtree. </p> <p>The <strong>{{IDCompositionTransform3D}}</strong> interface is an abstract interface that represents a 3D perspective transformation effect. A 3D transform object can be associated with multiple visuals and multiple effect groups. When a 3D transform object is modified, all affected visuals are recomposed to reflect the change.</p> <p>Represents a 2D transformation that affects only the offset of a visual along the x-axis and y-axis.</p> <p>A translation transform represents the following 3-by-2 matrix:</p><p></p><p>The effect is simply to offset the coordinate system by <em>x</em> and <em>y</em>.</p> <p>Changes the value of the OffsetX property of a 2D translation transform. The OffsetX property specifies the distance to translate along the x-axis.</p> <p>This method perfoms an affine transformation, which moves every point by a fixed distance in the same direction. It is similar to shifting the origin of the coordinate space. </p><p>This method fails if the <em>offsetX</em> parameter is NaN, positive infinity, or negative infinity. </p><p>If the OffsetX property was previously animated, this method removes the animation and sets the OffsetX property to the specified static value. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p> The distance to translate along the x-axis, in pixels.</p> </dd> Changes or animates the value of the OffsetY property of a 2D translation transform. The OffsetY property specifies the translation along the y-axis. <p>Represents a 3D transformation that affects the offset of a visual along the x-axis, y-axis, and z-axis. </p> <p>A 3D translation transform represents the following 4-by-4 matrix: </p><p></p><p> The effect is to offset the blending position of the visual's subtree by <em>x</em>, <em>y</em>, and <em>z</em>.</p> <p>Animates the value of the OffsetX property of a 3D translation transform effect. The OffsetX property specifies the distance to translate along the x-axis.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the OffsetX property unless this method is called again. If the OffsetX property was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An animation object that determines how the value of the OffsetX property changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Animates the value of the OffsetY property of a 3D translation transform effect. The OffsetY property specifies the distance to translate along the y-axis.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the OffsetY property unless this method is called again. If the OffsetY property was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An animation object that determines how the value of the OffsetY property changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Animates the value of the OffsetZ property of a 3D translation transform effect. The OffsetZ property specifies the distance to translate along the z-axis.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the OffsetZ property unless this method is called again. If the OffsetZ property was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface that created the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An animation object that determines how the value of the OffsetZ property changes over time. This parameter must not be {{NULL}}.</p> </dd> Changes or animates the value of the CenterY property of a 2D scale transform. The CenterY property specifies the y-coordinate of the point about which scaling is performed. <p>Animates the value of the ScaleX property of a 2D scale transform. The ScaleX property specifies the scale factor along the x-axis.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the ScaleX property unless this method is called again. If the ScaleX property was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An animation object that determines how the value of the ScaleX property changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Changes the value of the ScaleY property of a 2D scale transform. The ScaleY property specifies the scale factor along the y-axis.</p> <p>This method fails if the <em>scaleY</em> parameter is NaN, positive infinity, or negative infinity. </p><p>If the ScaleY property was previously animated, this method removes the animation and sets the ScaleY property to the specified static value. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new y-axis scale factor.</p> </dd> <p>Animates the value of the CenterX property of a 2D scale transform. The CenterX property specifies the x-coordinate of the point about which scaling is performed.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the CenterX property unless this method is called again. If the CenterX property was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An animation object that determines how the value of the CenterX property changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Changes the value of the CenterY property of a 2D scale transform. The CenterY property specifies the y-coordinate of the point about which scaling is performed. </p> <p>This method fails if the <em>centerY</em> parameter is NaN, positive infinity, or negative infinity. </p><p>If the CenterY property was previously animated, this method removes the animation and sets the CenterY property to the specified static value. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new y-coordinate of the center point.</p> </dd> Changes or animates the value of the ScaleZ property of a scale transform. The ScaleZ property specifies the scale factor along the z-axis. <p>Animates the value of the ScaleX property of a scale transform. The ScaleX property specifies the scale factor along the x-axis.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the ScaleX property unless this method is called again. If the ScaleX property was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An animation object that determines how the value of the ScaleX property changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Changes the value of the ScaleY property of a 3D scale transform. The ScaleY property specifies the scale factor along the y-axis.</p> <p>This method fails if the <em>scaleY</em> parameter is NaN, positive infinity, or negative infinity. </p><p>If the ScaleY property was previously animated, this method removes the animation and sets the ScaleY property to the specified static value. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new y-axis scale factor.</p> </dd> <p>Changes the value of the ScaleZ property of a 3D scale transform. The ScaleZ property specifies the scale factor along the z-axis.</p> <p>This method fails if the <em>scaleZ</em> parameter is NaN, positive infinity, or negative infinity. </p><p>If the ScaleZ property was previously animated, this method removes the animation and sets the ScaleZ property to the specified static value. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new z-axis scale factor.</p> </dd> <p>Changes the value of the CenterX property of a 3D scale transform. The CenterX property specifies the x-coordinate of the point about which scaling is performed. </p> <p>This method fails if the <em>centerX</em> parameter is NaN, positive infinity, or negative infinity. </p><p>If the CenterX property was previously animated, this method removes the animation and sets the CenterX property to the specified static value. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new x-coordinate of the center point.</p> </dd> Changes or animates the value of the CenterY property of a 3D scale transform. The CenterY property specifies the y-coordinate of the point about which scaling is performed. <p>Changes the value of the CenterZ property of a 3D scale transform. The CenterZ property specifies the z-coordinate of the point about which scaling is performed. </p> <p>This method fails if the <em>centerZ</em> parameter is NaN, positive infinity, or negative infinity. </p><p>If the CenterZ property was previously animated, this method removes the animation and sets the CenterZ property to the specified static value. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new z-coordinate of the center point.</p> </dd> <p>Represents a 2D transformation that affects the rotation of a visual around the z-axis. The coordinate system is rotated around the specified center point. </p> <p>A rotate transform represents the following 3-by-3 matrix:</p><p></p><p>The effect is to rotate the coordinate system clockwise or counter-clockwise, and to apply the corresponding translation such that the center point does not move.</p> <p>Animates the value of the Angle property of a 2D rotation transform. The Angle property specifies the rotation angle.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the Angle property unless this method is called again. If the Angle property was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An animation object that determines how the value of the Angle property changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Animates the value of the CenterX property of a 2D rotation transform. The CenterX property specifies the x-coordinate of the point about which the rotation is performed.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the CenterX property unless this method is called again. If the CenterX property was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An animation object that determines how the value of the CenterX property changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Animates the value of the CenterY property of a 2D rotation transform. The CenterY property specifies the y-coordinate of the point about which the rotation is performed.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the CenterY property unless this method is called again. If the CenterY property was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An animation object that determines how the value of the CenterY property changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Represents a 3D transformation that affects the rotation of a visual along an arbitrary axis in 3D space. The coordinate system is rotated around the specified center point. </p> <p>A 3D rotate transform represents the following 4-by-4 matrix:</p><p></p><p>where the <em>offsetX</em>, <em>offsetY</em>, and <em>offsetZ</em> values of the matrix are the following: </p><p></p><p>The effect is to rotate the coordinate system clockwise or counter-clockwise around the specified axis, and to apply the corresponding translation such that the center point does not move.</p><p>A new 3D rotation transform object has a default static value of zero for the Angle, CenterX, CenterY, AxisX, and AxisY properties, and a default static value of 1.0 for the AxisZ property.</p><p>When setting the axis to a non-default value, you should always set all three axis properties (AxisX, AxisY, and AxisZ).</p> <p>Animates the value of the Angle property of a 3D rotation transform. The Angle property specifies the rotation angle. The default value is zero.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the Angle property unless this method is called again. If the Angle property was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as the affected 3D transform. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An animation object that determines how the value of the Angle property changes over time. This parameter must not be {{NULL}}.</p> </dd> Changes or animates the value of the AxisX property of a 3D rotation transform. The AxisX property specifies the x-coordinate for the axis vector of rotation. The default value is zero. <p>Changes the value of the AxisY property of a 3D rotation transform. The AxisY property specifies the y-coordinate for the axis vector of rotation. The default value is zero.</p> <p>When setting the axis to a non-default value, you should always set all three axis properties (AxisX, AxisY, and AxisZ).</p><p>This method fails if the <em>axisY</em> parameter is NaN, positive infinity, or negative infinity. </p><p>If the AxisY property was previously animated, this method removes the animation and sets the AxisY property to the specified static value. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new y-coordinate for the axis vector of rotation. </p> </dd> Changes or animates the value of the AxisZ property of a 3D rotation transform. The AxisZ property specifies the z-coordinate for the axis vector of rotation. The default value is 1.0. Changes or animates the value of the CenterX property of a 3D rotation transform. The CenterX property specifies the x-coordinate of the point about which the rotation is performed. The default value is zero. <p>Animates the value of the CenterY property of a 3D rotation transform. The CenterY property specifies the y-coordinate of the point about which the rotation is performed. The default value is zero.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the CenterY property unless this method is called again. If the CenterY property was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An animation object that determines how the value of the CenterY property changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Changes the value of the CenterZ property of a 3D rotation transform. The CenterZ property specifies the z-coordinate of the point about which the rotation is performed. The default value is zero.</p> <p>This method fails if the <em>centerZ</em> parameter is NaN, positive infinity, or negative infinity. </p><p>If the CenterZ property was previously animated, this method removes the animation and sets the CenterZ property to the specified static value. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new z-coordinate of the center point.</p> </dd> <p>Animates the value of the AngleX property of a 2D skew transform. The AngleX property specifies the skew angle along the x-axis.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the AngleX property unless this method is called again. If the AngleX property was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An animation object that represents how the value of the AngleX property changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Changes the value of the AngleX property of a 2D skew transform. The AngleX property specifies the skew angle along the x-axis.</p> <p>This method fails if the <em>angleX</em> parameter is NaN, positive infinity, or negative infinity. </p><p>If the AngleX property was previously animated, this method removes the animation and sets the AngleX property to the specified static value. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new skew angle of the x-axis, in degrees. A positive value creates a counterclockwise skew, and a negative value creates a clockwise skew. For values less than ?360 or greater than 360, the values wrap around and are treated as if the mathematical operation mod(360) was applied.</p> </dd> <p>Changes the value of the AngleY property of a 2D skew transform. The AngleY property specifies the skew angle along the y-axis.</p> <p>This method fails if the <em>angleY</em> parameter is NaN, positive infinity, or negative infinity. </p><p>If the AngleY property was previously animated, this method removes the animation and sets the AngleY property to the specified static value. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new skew angle of the y-axis, in degrees. A positive value creates a counterclockwise skew, and a negative value creates a clockwise skew. For values less than ?360 or greater than 360, the values wrap around and are treated as if the mathematical operation mod(360) was applied.</p> </dd> <p>Animates the value of the CenterX property of a 2D skew transform. The CenterX property specifies the x-coordinate of the point about which the skew is performed.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the CenterX property unless this method is called again. If the CenterX property was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An animation object that determines how the value of the CenterX property changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Changes the value of the CenterY property of a 2D skew transform. The CenterY property specifies the y-coordinate of the point about which the skew is performed.</p> <p>This method fails if the <em>centerY</em> parameter is NaN, positive infinity, or negative infinity. </p><p>If the CenterY property was previously animated, this method removes the animation and sets the CenterY property to the specified static value. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new y-coordinate of the center point.</p> </dd> <p>Represents an arbitrary affine 2D transformation defined by a 3-by-2 matrix.</p><p></p> <p>Changes all values of the matrix of this 2D transform.</p> <p>This method fails if any of the matrix values are NaN, positive infinity, or negative infinity.</p><p>If any of the matrix elements were previously animated, this method removes the animations and sets the elements to the specified static value.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new matrix for this 2D transform.</p> </dd> <p>Animates the value of one element of the matrix of this 2D transform.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the element unless this method is called again. If the element was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as the affected transform. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The row index of the element to change. This value must be between 0 and 2, inclusive.</p> </dd> <dd> <p>The column index of the element to change. This value must be between 0 and 1, inclusive.</p> </dd> <dd> <p>An animation that represents how the value of the specified element changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Represents an arbitrary 3D transformation defined by a 4-by-4 matrix.</p><p></p> <p>A 3D matrix transform represents the following 4-by-4 matrix:</p><p></p><p> The application can set any of the values in the first three columns. Note that the fourth column is padded to allow for matrix concatenation. </p> <p>Changes all values of the matrix of this 3D transformation effect.</p> <p>This method fails if any of the matrix values are NaN, positive infinity, or negative infinity.</p><p>If any of the matrix elements were previously animated, this method removes the animations and sets the elements to the specified static value.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new matrix for this 3D transformation effect.</p> </dd> <p>Changes the value of one element of the matrix of this 3D transform.</p> <p>This method fails if the <em>value</em> parameter is NaN, positive infinity, or negative infinity.</p><p>If the specified element was previously animated, this method removes the animation and sets the element to the specified static value.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The row index of the element to change. This value must be between 0 and 3, inclusive.</p> </dd> <dd> <p>The column index of the element to change. This value must be between 0 and 3, inclusive.</p> </dd> <dd> <p>The new value of the specified element.</p> </dd> <p>Represents a bitmap effect that modifies the rasterization of a visual's subtree. </p> <p><strong>{{IDCompositionEffect}}</strong> is an abstract interface that represents a bitmap effect. An effect applies to the entire visual subtree rooted at the visual that the effect is associated with. An effect object can be associated with multiple visuals. When an effect object is modified, all affected visuals are recomposed to reflect the change. </p><p>More than one effect can be simultaneously applied to a visual by using the <strong>{{IDCompositionEffectGroup}}</strong> interface.</p> <p>Represents a group of bitmap effects that are applied together to modify the rasterization of a visual's subtree. </p> <p>Changes the value of the Opacity property.</p> <p>The opacity is interpreted as completely transparent for all values less than or equal to 0, and as completely opaque for all values greater than or equal to 1. All values between 0 and 1 represent partial opacity. </p><p>This method fails if the <em>opacity</em> parameter is NaN, positive infinity, or negative infinity. </p><p>If the Opacity property was previously animated, this method removes the animation and sets the Opacity property to the specified static value. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new value of the Opacity property.</p> </dd> <p>Sets the 3D transformation effect object that modifies the rasterization of the visuals that this effect group is applied to.</p> <p>This method fails if <em>transform3D</em> is an invalid reference, or if the reference was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as this effect group. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p><p>If the <em>transform3D</em> parameter is {{NULL}}, the effect group does not apply any perspective transformations to the visuals. Setting the transform to {{NULL}} is equivalent to setting the transform to an <strong>{{IDCompositionMatrixTransform3D}}</strong> object where the specified matrix is the identity matrix. However, an application should use a {{NULL}} transform whenever possible because it is slightly faster. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>Pointer to an <strong>{{IDCompositionTransform3D}}</strong> interface or one of its derived interfaces. This parameter can be {{NULL}}.</p> </dd> <p>Represents a clip object that is used to restrict the rendering of a visual subtree to a rectangular area. </p> <p>Represents a clip object that restricts the rendering of a visual subtree to the specified rectangular region. Optionally, the clip object may have rounded corners specified.</p> <p>Animates the value of the Left property of a clip rectangle. The Left property specifies the x-coordinate of the upper-left corner of the clip rectangle.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the Left property unless this method is called again. If the Left property was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An animation object that determines how the value of the Left property changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Animates the value of the Top property of a clip rectangle. The Top property specifies the y-coordinate of the upper-left corner of the clip rectangle.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the Top property unless this method is called again. If the Top property was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An animation object that determines how the value of the Top property changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Animates the value of the Right property of a clip rectangle. The Right property specifies the x-coordinate of the lower-right corner of the clip rectangle.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the Right property unless this method is called again. If the Right property was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An animation object that determines how the value of the Right property changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Changes the value of the Bottom property of a clip object. The Bottom property specifies the y-coordinate of the lower-right corner of the clip rectangle. </p> <p> This method fails if the <em>bottom</em> parameter is NaN, positive infinity, or negative infinity. </p><p> If the Bottom property was previously animated, this method removes the animation and sets the Bottom property to the specified static value. </p> <p> If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes. </p> <dd> <p>The new value of the Bottom property, in pixels. This parameter has a numerical limit of -2^21 to 2^21. The {{API}} accepts numbers outside of this range, but they are always clamped to this range.</p> </dd> <p>Changes the value of the TopLeftRadiusX property of this clip. The TopLeftRadiusX property specifies the x radius of the ellipse that rounds the top-left corner of the clip.</p> <p> This method fails if the <em>radius</em> parameter is NaN, positive infinity, or negative infinity. </p><p> If the <em>radius</em> property was previously animated, this method removes the animation and sets the <em>radius</em> property to the specified static value. </p> <p> If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes. </p> <dd> <p>The new value of the x radius. This parameter has a numerical limit of -2^21 to 2^21. The {{API}} accepts numbers outside of this range, but they are always clamped to this range.</p> </dd> <p>Changes the value of the TopLeftRadiusY property of this clip. The TopLeftRadiusY property specifies the y radius of the ellipse that rounds the top-left corner of the clip.</p> <p> This method fails if the <em>radius</em> parameter is NaN, positive infinity, or negative infinity. </p><p> If the <em>radius</em> property was previously animated, this method removes the animation and sets the <em>radius</em> property to the specified static value. </p> <p> If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes. </p> <dd> <p>The new value of the y radius. This parameter has a numerical limit of -2^21 to 2^21. The {{API}} accepts numbers outside of this range, but they are always clamped to this range.</p> </dd> <p>Animates the value of the TopRightRadiusX property of this clip. The TopRightRadiusX property specifies the x radius of the ellipse that rounds the top-right corner of the clip.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the x radius unless this method is called again. If the x radius was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An animation object that determines how the value of the x radius changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Changes the value of the TopRightRadiusY property of this clip. The TopRightRadiusY property specifies the y radius of the ellipse that rounds the top-right corner of the clip.</p> <p> This method fails if the <em>radius</em> parameter is NaN, positive infinity, or negative infinity. </p><p> If the <em>radius</em> property was previously animated, this method removes the animation and sets the <em>radius</em> property to the specified static value. </p> <p> If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes. </p> <dd> <p>The new value of the y radius. This parameter has a numerical limit of -2^21 to 2^21. The {{API}} accepts numbers outside of this range, but they are always clamped to this range.</p> </dd> Changes or animates the value of the BottomLeftRadiusX property of this clip. The BottomLeftRadiusX property specifies the x radius of the ellipse that rounds the lower-left corner of the clip. <p>Changes the value of the BottomLeftRadiusY property of this clip. The BottomLeftRadiusY property specifies the y radius of the ellipse that rounds the lower-left corner of the clip.</p> <p> This method fails if the <em>radius</em> parameter is NaN, positive infinity, or negative infinity. </p><p> If the <em>radius</em> property was previously animated, this method removes the animation and sets the <em>radius</em> property to the specified static value. </p> <p> If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes. </p> <dd> <p>The new value of the y radius. This parameter has a numerical limit of -2^21 to 2^21. The {{API}} accepts numbers outside of this range, but they are always clamped to this range.</p> </dd> <p>Animates the value of the BottomRightRadiusX property of this clip. The BottomRightRadiusX property specifies the x radius of the ellipse that rounds the lower-right corner of the clip.</p> <p>This method makes a copy of the specified animation. If the object referenced by the <em>animation</em> parameter is changed after calling this method, the change does not affect the x radius unless this method is called again. If the x radius was previously animated, calling this method replaces the previous animation with the new animation. </p><p>This method fails if <em>animation</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface as the affected visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An animation object that determines how the value of the x radius changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Changes the value of the BottomRightRadiusY property of this clip. The BottomRightRadiusY property specifies the y radius of the ellipse that rounds the lower-right corner of the clip.</p> <p> This method fails if the <em>radius</em> parameter is NaN, positive infinity, or negative infinity. </p><p> If the <em>radius</em> property was previously animated, this method removes the animation and sets the <em>radius</em> property to the specified static value. </p> <p> If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes. </p> <dd> <p>The new value of the y radius. This parameter has a numerical limit of -2^21 to 2^21. The {{API}} accepts numbers outside of this range, but they are always clamped to this range.</p> </dd> <p>Initiates drawing on this Microsoft DirectComposition surface object. The update rectangle must be within the boundaries of the surface; otherwise, this method fails. </p> <p>This method enables an application to incrementally update the contents of a DirectComposition surface object. The application must use the following sequence: </p><ol> <li>Call <strong>BeginDraw</strong> to initiate the incremental update.</li> <li>Use the retrieved surface as a render target and draw the updated contents at the retrieved offset.</li> <li>Call the <strong>{{IDCompositionSurface::EndDraw}}</strong> method to finish the update.</li> </ol><p>The update object returned by this method is either a Direct2D device context or a {{DXGI}} surface, depending on the value of the <em>iid</em> parameter and on how the DirectComposition surface object was created. If the <em>iid</em> parameter is __uuidof({{ID2D1DeviceContext}}), then the returned object is a Direct2D device context that already has the DirectComposition surface selected as a render target. Otherwise, it is a {{DXGI}} surface which the application may use as a render target. In either case, the returned object is associated with the Direct2D or {{DXGI}} device passed by the application to the {{DCompositionCreateDevice2}} function or the <strong>{{IDCompositionDevice2::CreateSurfaceFactory}}</strong> method. </p><p>The <em>iid</em> parameter may only be __uuidof({{ID2D1DeviceContext}}) if the DirectComposition surface object was created from a DirectComposition device or surface factory that was, itself, created with an associated Direct2D device. In particular, the application must have called either the {{DCompositionCreateDevice2}} function or the <strong>{{IDCompositionDevice2::CreateSurfaceFactory}}</strong> method with a Direct2D device as the <em>renderingDevice</em> parameter. If the DirectComposition surface was created via a surface factory that was not associated with a Direct2D device, or if it was created directly via the {{IDCompositionDevice2}} interface and the device was not directly associated with a Direct2D device, then passing __uuidof({{ID2D1DeviceContext}}) as the iid parameter causes this method to return {{E_INVALIDARG}}. </p><p>If the application successfully retrieves a Direct2D device context as the update object, then the application should not call either the {{ID2D1DeviceContext::BeginDraw}} or {{ID2D1DeviceContext::EndDraw}} methods on the returned Direct2D device context. </p><p>The retrieved offset is not necessarily the same as the top-left corner of the requested update rectangle. The application must transform its rendering primitives to draw within a rectangle of the same width and height as the input rectangle, but at the given offset. The application should not draw outside of this rectangle. </p><p>If the <em>updateRectangle</em> parameter is {{NULL}}, the entire surface is updated. In that case, because the retrieved offset still might not be (0,0), the application still needs to transform its rendering primitives accordingly. </p><p>If the surface is not a virtual surface, then the first time the application calls this method for a particular non-virtual surface, the update rectangle must cover the entire surface, either by specifying the full surface in the requested update rectangle, or by specifying {{NULL}} as the <em>updateRectangle</em> parameter. For virtual surfaces, the first call may be any sub-rectangle of the surface. </p><p>Because each call to this method might retrieve a different object in the <em>updateObject</em> surface, the application should not cache the retrieved surface reference. The application should release the retrieved reference as soon as it finishes drawing. </p><p>The retrieved surface rectangle does not contain the previous contents of the bitmap. The application must update every pixel in the update rectangle, either by first clearing the render target, or by issuing enough rendering primitives to fully cover the update rectangle. Because the initial contents of the update surface are undefined, failing to update every pixel leads to undefined behavior. </p><p>Only one DirectComposition surface can be updated at a time. An application must suspend drawing on one surface before beginning or resuming to draw on another surface. If the application calls <strong>BeginDraw</strong> twice, either for the same surface or for another surface belonging to the same DirectComposition device, without an intervening call to <strong>{{IDCompositionSurface::EndDraw}}</strong>, the second call fails. If the application calls <strong>{{IDCompositionDevice2::Commit}}</strong> without calling <strong>EndDraw</strong>, the update remains pending. The update takes effect only after the application calls <strong>EndDraw</strong> and then calls the <strong>{{IDCompositionDevice2::Commit}}</strong> method.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The rectangle to be updated. If this parameter is {{NULL}}, the entire bitmap is updated.</p> </dd> <dd> <p>The identifier of the interface to retrieve.</p> </dd> <dd> <p>Receives an interface reference of the type specified in the <em>iid</em> parameter. This parameter must not be {{NULL}}.</p> <strong>Note</strong>??In Windows?8, this parameter was <em>surface</em>. ? </dd> <dd> <p>The offset into the surface where the application should draw updated content. This offset will reference the upper left corner of the update rectangle.</p> </dd> <p>Initiates drawing on this Microsoft DirectComposition surface object. The update rectangle must be within the boundaries of the surface; otherwise, this method fails. </p> <p>This method enables an application to incrementally update the contents of a DirectComposition surface object. The application must use the following sequence: </p><ol> <li>Call <strong>BeginDraw</strong> to initiate the incremental update.</li> <li>Use the retrieved surface as a render target and draw the updated contents at the retrieved offset.</li> <li>Call the <strong>{{IDCompositionSurface::EndDraw}}</strong> method to finish the update.</li> </ol><p>The update object returned by this method is either a Direct2D device context or a {{DXGI}} surface, depending on the value of the <em>iid</em> parameter and on how the DirectComposition surface object was created. If the <em>iid</em> parameter is __uuidof({{ID2D1DeviceContext}}), then the returned object is a Direct2D device context that already has the DirectComposition surface selected as a render target. Otherwise, it is a {{DXGI}} surface which the application may use as a render target. In either case, the returned object is associated with the Direct2D or {{DXGI}} device passed by the application to the {{DCompositionCreateDevice2}} function or the <strong>{{IDCompositionDevice2::CreateSurfaceFactory}}</strong> method. </p><p>The <em>iid</em> parameter may only be __uuidof({{ID2D1DeviceContext}}) if the DirectComposition surface object was created from a DirectComposition device or surface factory that was, itself, created with an associated Direct2D device. In particular, the application must have called either the {{DCompositionCreateDevice2}} function or the <strong>{{IDCompositionDevice2::CreateSurfaceFactory}}</strong> method with a Direct2D device as the <em>renderingDevice</em> parameter. If the DirectComposition surface was created via a surface factory that was not associated with a Direct2D device, or if it was created directly via the {{IDCompositionDevice2}} interface and the device was not directly associated with a Direct2D device, then passing __uuidof({{ID2D1DeviceContext}}) as the iid parameter causes this method to return {{E_INVALIDARG}}. </p><p>If the application successfully retrieves a Direct2D device context as the update object, then the application should not call either the {{ID2D1DeviceContext::BeginDraw}} or {{ID2D1DeviceContext::EndDraw}} methods on the returned Direct2D device context. </p><p>The retrieved offset is not necessarily the same as the top-left corner of the requested update rectangle. The application must transform its rendering primitives to draw within a rectangle of the same width and height as the input rectangle, but at the given offset. The application should not draw outside of this rectangle. </p><p>If the <em>updateRectangle</em> parameter is {{NULL}}, the entire surface is updated. In that case, because the retrieved offset still might not be (0,0), the application still needs to transform its rendering primitives accordingly. </p><p>If the surface is not a virtual surface, then the first time the application calls this method for a particular non-virtual surface, the update rectangle must cover the entire surface, either by specifying the full surface in the requested update rectangle, or by specifying {{NULL}} as the <em>updateRectangle</em> parameter. For virtual surfaces, the first call may be any sub-rectangle of the surface. </p><p>Because each call to this method might retrieve a different object in the <em>updateObject</em> surface, the application should not cache the retrieved surface reference. The application should release the retrieved reference as soon as it finishes drawing. </p><p>The retrieved surface rectangle does not contain the previous contents of the bitmap. The application must update every pixel in the update rectangle, either by first clearing the render target, or by issuing enough rendering primitives to fully cover the update rectangle. Because the initial contents of the update surface are undefined, failing to update every pixel leads to undefined behavior. </p><p>Only one DirectComposition surface can be updated at a time. An application must suspend drawing on one surface before beginning or resuming to draw on another surface. If the application calls <strong>BeginDraw</strong> twice, either for the same surface or for another surface belonging to the same DirectComposition device, without an intervening call to <strong>{{IDCompositionSurface::EndDraw}}</strong>, the second call fails. If the application calls <strong>{{IDCompositionDevice2::Commit}}</strong> without calling <strong>EndDraw</strong>, the update remains pending. The update takes effect only after the application calls <strong>EndDraw</strong> and then calls the <strong>{{IDCompositionDevice2::Commit}}</strong> method.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. </p> <dd> <p>The rectangle to be updated. If this parameter is {{NULL}}, the entire bitmap is updated.</p> </dd> <dd> <p>The identifier of the interface to retrieve.</p> </dd> <dd> <p>Receives an interface reference of the type specified in the <em>iid</em> parameter. This parameter must not be {{NULL}}.</p> <strong>Note</strong>??In Windows?8, this parameter was <em>surface</em>. ? </dd> <dd> <p>The offset into the surface where the application should draw updated content. This offset will reference the upper left corner of the update rectangle.</p> </dd> <p>Marks the end of drawing on this Microsoft DirectComposition surface object.</p> <p>This method completes an update that was begun by a previous call to the <strong>{{IDCompositionSurface::BeginDraw}}</strong> method. After this method returns, the application can start another update on the same surface object or on a different one. </p><p>If the application calls <strong>{{IDCompositionDevice2::Commit}}</strong> before calling <strong>{{IDCompositionSurface::EndDraw}}</strong> for a surface with a pending update, that update is not processed by that Commit call. The update only takes effect on screen after the application calls <strong>{{IDCompositionSurface::EndDraw}}</strong> followed by the {{IDCompositionDevice2::Commit}} method.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code, which can include {{DCOMPOSITION_ERROR_SURFACE_NOT_BEING_RENDERED}}. </p> <p>Suspends the drawing on this Microsoft DirectComposition surface object.</p> <p>Because only one surface can be open for drawing at a time, calling <strong>SuspendDraw</strong> allows the user to call <strong>{{IDCompositionSurface::BeginDraw}}</strong> on a different surface. Drawing to this surface can be resumed by calling <strong>{{IDCompositionSurface::ResumeDraw}}</strong>.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code, which can include {{DCOMPOSITION_ERROR_SURFACE_BEING_RENDERED}} and {{DCOMPOSITION_ERROR_SURFACE_NOT_BEING_RENDERED}}. </p> <p>Resumes drawing on this Microsoft DirectComposition surface object.</p> <p> This method allows the surface update to continue unless there are other surfaces that have active, unsuspended draws.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code, which can include {{DCOMPOSITION_ERROR_SURFACE_BEING_RENDERED}} and {{DCOMPOSITION_ERROR_SURFACE_NOT_BEING_RENDERED}}. </p> <p>Scrolls a rectangular area of a Microsoft DirectComposition logical surface.</p> <p>This method allows an application to blt/copy a sub-rectangle of a DirectComposition surface object. This avoids re-rendering content that is already available. </p><p>The <em>scrollRect</em> rectangle must be contained in the boundaries of the surface. If the <em>scrollRect</em> rectangle goes outside the bounds of the surface, this method fails. </p><p>The bits copied by the scroll operation (source) are defined by the intersection of the <em>scrollRect</em> and <em>clipRect</em> rectangles. </p><p>The bits shown on the screen (destination) are defined by the intersection of the offset source rectangle and <em>clipRect</em>. </p><p>Scroll operations can only be called before calling <strong>BeginDraw</strong> or after calling <strong>EndDraw</strong>. Suspended or resumed surfaces are not candidates for scrolling because they are still being updated. </p><p>The application is responsible for ensuring that the scrollable area for an <strong>{{IDCompositionVirtualSurface}}</strong> is limited to valid pixels. The behavior for invalid pixels in the <em>scrollRect</em> is undefined. </p><p>Virtual surface sub-rectangular areas that were discarded by a trim or a resize operation can't be scrolled even if the trim or resize is applied in the same batch. <strong>Trim</strong> and <strong>Resize</strong> are applied immediately. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The rectangular area of the surface to be scrolled, relative to the upper-left corner of the surface. If this parameter is {{NULL}}, the entire surface is scrolled.</p> </dd> <dd> <p>The <em>clipRect</em> clips the destination (<em>scrollRect</em> after offset) of the scroll. The only bitmap content that will be scrolled are those that remain inside the clip rectangle after the scroll is completed.</p> </dd> <dd> <p>The amount of horizontal scrolling, in pixels. Use positive values to scroll right, and negative values to scroll left.</p> </dd> <dd> <p>The amount of vertical scrolling, in pixels. Use positive values to scroll down, and negative values to scroll up.</p> </dd> <p>Changes the logical size of this virtual surface object.</p> <p>When a virtual surface is resized, its contents are preserved up to the new boundaries of the surface. If the surface is made smaller, any previously allocated pixels that fall outside of the new width or height are discarded.</p><p>This method fails if <strong>{{IDCompositionSurface::BeginDraw}}</strong> was called for this bitmap without a corresponding call to <strong>{{IDCompositionSurface::EndDraw}}</strong>.</p><p>This method fails if <em>width</em> or <em>height</em> exceeds 16,777,216 pixels. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new width of the virtual surface, in pixels. The maximum width is 16,777,216 pixels.</p> </dd> <dd> <p>The new height of the virtual surface, in pixels. The maximum height is 16,777,216 pixels.</p> </dd> <p>Changes the logical size of this virtual surface object.</p> <p>When a virtual surface is resized, its contents are preserved up to the new boundaries of the surface. If the surface is made smaller, any previously allocated pixels that fall outside of the new width or height are discarded.</p><p>This method fails if <strong>{{IDCompositionSurface::BeginDraw}}</strong> was called for this bitmap without a corresponding call to <strong>{{IDCompositionSurface::EndDraw}}</strong>.</p><p>This method fails if <em>width</em> or <em>height</em> exceeds 16,777,216 pixels. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new width of the virtual surface, in pixels. The maximum width is 16,777,216 pixels.</p> </dd> <dd> <p>The new height of the virtual surface, in pixels. The maximum height is 16,777,216 pixels.</p> </dd> <p>Discards pixels that fall outside of the specified trim rectangles.</p> <p>A virtual surface might not have enough storage for every pixel in the surface. An application instructs the composition engine to allocate memory for the surface by calling the <strong>{{IDCompositionSurface::BeginDraw}}</strong> method, and to release memory for the surface by calling the <strong>{{IDCompositionVirtualSurface::Trim}}</strong> method. The array of rectangles represents the regions of the virtual surface that should remain allocated after this method returns. Any pixels that are outside the specified set of rectangles are no longer used for texturing, and their memory may be reclaimed. </p><p>If the <em>count</em> parameter is zero, no pixels are kept, and all of the memory allocated for the virtual surface may be reclaimed. The <em>rectangles</em> parameter can be {{NULL}} only if the <em>count</em> parameter is zero. This method fails if <strong>{{IDCompositionSurface::BeginDraw}}</strong> was called for this bitmap without a corresponding call to <strong>{{IDCompositionSurface::EndDraw}}</strong>.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An array of rectangles to keep.</p> </dd> <dd> <p>The number of rectangles in the <em>rectangles</em> array.</p> </dd> <p>Represents a filter effect.</p><p>{{IDCompositionFilterEffect}} exposes a subset of Direct2D's image effects through Direction Composition for use in {{CSS}} filters in the browser platform.</p> <p>Sets the the input at an index to the specified filter effect.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Specifies the index the to apply the filter effect at.</p> </dd> <dd> <p>The filter effect to apply. The following effects are available: </p> <ul> <li> <strong>{{IDCompositionAffineTransform2DEffect}}</strong> </li> <li> <strong>{{IDCompositionArithmeticCompositeEffect}}</strong> </li> <li> <strong>{{IDCompositionBlendEffect}}</strong> </li> <li> <strong>{{IDCompositionBrightnessEffect}}</strong> </li> <li> <strong>{{IDCompositionColorNatrixEffect}}</strong> </li> <li> <strong>{{IDCompositionCompositeEffect}}</strong> </li> <li> <strong>{{IDCompositionFloodEffect}}</strong> </li> <li> <strong>{{IDCompositionGaussianBlurEffect}}</strong> </li> <li> <strong>{{IDCompositionHueRotationEffect}}</strong> </li> <li> <strong>{{IDCompositionLinearTransferRffect}}</strong> </li> <li> <strong>{{IDCompositionSaturationRffect}}</strong> </li> <li> <strong>{{IDCompositionShadowEffect}}</strong> </li> <li> <strong>{{IDCompositionTableTransferEffect}}</strong> </li> <li> <strong>{{IDCompositionTurbulenceEffect}}</strong> </li> </ul> </dd> <dd> <p>Flags to apply to the filter effect. </p> </dd> <p></p> <p>Sets the amount of blur to be applied to the image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The amount of blur to be applied to the image. You can compute the blur radius of the kernel by multiplying the standard deviation by 3. The units of both the standard deviation and blur radius are {{DIPs}}. A value of zero {{DIPs}} disables this effect entirely. </p> </dd> <p>Sets the mode used to calculate the border of the image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The mode used to calculate the border of the image.</p> </dd> <p>The brightness effect controls the brightness of the image.</p> <p>Sets the upper portion of the brightness transfer curve. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The upper portion of the brightness transfer curve. The white point adjusts the appearance of the brighter portions of the image. This vector is for both the x value and the y value, in that order. Each of the values must be between 0 and 1, inclusive.</p> </dd> <p>Specifies the lower portion of the brightness transfer curve for the brightness effect.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The lower portion of the brightness transfer curve. The black point adjusts the appearance of the darker portions of the image. The vector is for both the x value and the y value, in that order. Each of the values must be between 0 and 1, inclusive.</p> </dd> <p>Sets the x value of the white point.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The x value of the white point. This value must be between 0 and 1.</p> </dd> <p>Sets the y value of the white point.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An animation that represents how the y value of the white point changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Sets the x value of the black point.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The x value of the black point.</p> </dd> <p>Sets the y value of the black point.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An animation that represents how the y value of the black point changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Specifies whether the effect clamps color values to between 0 and 1 before the effects passes the values to the next effect in the chain.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A boolean value indicating whether the effect clamps color values to between 0 and 1 before the effects passes the values to the next effect in the chain.</p> </dd> <p>Sets the matrix used by the effect to multiply the {{RGBA}} values of the image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The matrix used by the effect to multiply the {{RGBA}} values of the image. The matrix is column major and is applied as shown in the following equation: </p></dd> <p>Sets an element of the color matrix.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The row of the element.</p> </dd> <dd> <p>The column of the element.</p> </dd> <dd> <p>An animation that represents how the element value changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Sets the alpha mode of the output for the color matrix effect.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The alpha mode of the output for the color matrix effect.</p> </dd> <p>Specifies whether the effect clamps color values to between 0 and 1 before the effects passes the values to the next effect in the chain.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A boolean value indicating whether the effect clamps color values to between 0 and 1 before the effects passes the values to the next effect in the chain.</p> </dd> <p> The shadow effect is used to generate a shadow from the alpha channel of an image. The shadow is more opaque for higher alpha values and more transparent for lower alpha values. You can set the amount of blur and the color of the shadow. </p> <p>Sets the amount of blur to be applied to the alpha channel of the image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The amount of blur to be applied to the alpha channel of the image. You can compute the blur radius of the kernel by multiplying the standard deviation by 3. The units of both the standard deviation and blur radius are {{DIPs}}. </p> </dd> <p>Sets color of the shadow.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The color of the shadow.</p> </dd> <p>Sets the red value for the color of the shadow.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An animation that represents how the red value for the color of the shadow changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Sets the green value for the color of the shadow.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The green value for the color of the shadow.</p> </dd> <p>Sets the blue value for the color of the shadow.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The blue value for the color of the shadow.</p> </dd> <p>Sets the alpha value for the effect.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An animation that represents how the alpha value for the effect changes over time. This parameter must not be {{NULL}}.</p> </dd> <p> The hue rotate effect alters the hue of an image by applying a color matrix based on the rotation angle. </p> <p>Sets the angle to rotate the hue.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An animation that represents how the angle value changes over time. The effect calculates a color matrix based on the rotation angle (?) according to the following matrix equations: </p><p> This parameter must not be {{NULL}}.</p> </dd> <p> This effect is used to alter the saturation of an image. The saturation effect is a specialization of the?color matrix?effect. </p> <p>Sets the saturation of the image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An animation that represents how the saturation of the image changes over time. This parameter must not be {{NULL}}. You can set the saturation to a value between 0 and 1. If you set it to 1 the output image is fully saturated. If you set it to 0 the output image is monochrome. The saturation value is unitless. The effect calculates a color matrix based on the saturation value (s in the equation here) using the following equation: </p></dd> <p> The turbulence effect is used to generate a bitmap based on the Perlin noise function. The turbulence effect has no input image. </p> <p>Sets the coordinates where the turbulence output is generated.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The coordinates where the turbulence output is generated. The algorithm used to generate the Perlin noise is position dependent, so a different offset results in a different output. This value is not bounded and the units are specified in {{DIPs}} </p> <strong>Note</strong>??Note The offset does not have the same effect as a translation because the noise function output is infinite and the function will wrap around the tile. ? </dd> <p>Sets the base frequencies in the X and Y direction.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The base frequencies in the X and Y direction. This must be greater than 0. The units are specified in 1/{{DIPs}}. A value of 1 (1/{{DIPs}}) for the base frequency results in the Perlin noise completing an entire cycle between two pixels. The ease interpolation for these pixels results in completely random pixels, since there is no correlation between the pixels. A value of 0.1(1/{{DIPs}}) for the base frequency results in the Perlin noise function repeating every 10 {{DIPs}}. This results in correlation between pixels and the typical turbulence effect is visible. </p> </dd> <p>Sets the size of the turbulence output.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The size of the turbulence output</p> </dd> <p>Sets the number of octaves for the noise function.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The number of octaves for the noise function. This value must be greater than 0.</p> </dd> <p>Sets the seed for the pseudo random generator.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The seed for the pseudo random generator. This value is unbounded.</p> </dd> <p>Sets the turbulence noise mode.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The turbulence noise mode. Indicates whether to generate a bitmap based on Fractal Noise or the Turbulence function.</p> </dd> <p>Specifies whether stitching is on or off.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A boolean value that specifies whether stitching is on or off. The base frequency is adjusted so that the output bitmap can be stitched. This is useful if you want to tile multiple copies of the turbulence effect output. If this value is {{TRUE}}, the output bitmap can be tiled (using the tile effect) without the appearance of seams and the base frequency is adjusted so that output bitmap can be stitched. If this value is {{FALSE}}, the base frequency is not adjusted, so seams may appear between tiles if the bitmap is tiled. </p> </dd> <p> The linear transfer effect is used to map the color intensities of an image using a linear function created from a list of values you provide for each channel. </p> <p>Sets the Y-intercept of the linear function for the red channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The Y-intercept of the linear function for the red channel.</p> </dd> <p>Sets the slope of the linear function for the red channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An animation that represents how the slope of the linear function for the red channel changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Specifies whether to apply the transfer function to the red channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A boolean value that specifies whether to apply the transfer function to the red channel. If you set this to {{TRUE}} the effect does not apply the transfer function to the red channel. If you set this to {{FALSE}} the effect applies the RedLinearTransfer function to the red channel. </p> </dd> <p>Sets the Y-intercept of the linear function for the green channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An animation that represents how the Y-intercept of the linear function for the green channel changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Sets the slope of the linear function for the green channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The slope of the linear function for the green channel.</p> </dd> <p>Specifies whether to apply the transfer function to the green channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A boolean value that specifies whether to apply the transfer function to the green channel. If you set this to {{TRUE}} the effect does not apply the transfer function to the green channel. If you set this to {{FALSE}} it applies the GreenLinearTransfer function to the green channel. </p> </dd> <p>Sets the Y-intercept of the linear function for the blue channel. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An animation that represents how the Y-intercept of the linear function for the blue channel changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Sets the slope of the linear function for the blue channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An animation that represents how the slope of the linear function for the blue channel changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Specifies whether to apply the transfer function to the blue channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A boolean value that specifies whether to apply the transfer function to the blue channel. If you set this to {{TRUE}} the effect does not apply the transfer function to the blue channel. If you set this to {{FALSE}} it applies the BlueLinearTransfer function to the blue channel. </p> </dd> <p>Sets the Y-intercept of the linear function for the Alpha channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An animation that represents how the the Y-intercept of the linear function for the alpha channel. changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Sets the slope of the linear function for the alpha channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An animation that represents how the slope of the linear function for the alpha channel changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Specifies whether to apply the transfer function to the alpha channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A boolean value that specifies whether to apply the transfer function to the alpha channel. If you set this to {{TRUE}} the effect does not apply the transfer function to the Alpha channel. If you set this to {{FALSE}} it applies the AlphaLinearTransfer function to the Alpha channel. </p> </dd> <p>Specifies whether the effect clamps color values to between 0 and 1 before the effect passes the values to the next effect in the graph.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A boolean value that specifies whether the effect clamps color values to between 0 and 1 before the effect passes the values to the next effect in the graph. If you set this to {{TRUE}} the effect will clamp the values. If you set this to {{FALSE}}, the effect will not clamp the color values, but other effects and the output surface may clamp the values if they are not of high enough precision. </p> </dd> <p>The table transfer effect is used to map the color intensities of an image using a transfer function created from interpolating a list of values you provide.</p> <p>Sets the list of values used to define the transfer function for the red channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The list of values used to define the transfer function for the red channel.</p> </dd> <dd> <p>The number of values in the tableValues parameter.</p> </dd> <p>Sets the list of values used to define the transfer function for the green channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The list of values used to define the transfer function for the green channel.</p> </dd> <dd> <p>The number of values in the tableValues parameter.</p> </dd> <p>Sets the list of values used to define the transfer function for the blue channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The list of values used to define the transfer function for the blue channel.</p> </dd> <dd> <p>The number of values in the tableValues parameter.</p> </dd> <p>Sets the list of values used to define the transfer function for the alpha channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The list of values used to define the transfer function for the alpha channel.</p> </dd> <dd> <p>The number of values in the tableValues parameter.</p> </dd> <p>Specifies whether to apply the transfer function to the red channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A boolean value that specifies whether to apply the transfer function to the red channel. If you set this to {{TRUE}} the effect does not apply the transfer function to the red channel. If you set this to {{FALSE}} it applies the RedTableTransfer function to the red channel. </p> </dd> <p>Specifies whether to apply the transfer function to the green channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A boolean value that specifies whether to apply the transfer function to the green channel. If you set this to {{TRUE}} the effect does not apply the transfer function to the green channel. If you set this to {{FALSE}} it applies the GreenTableTransfer function to the green channel. </p> </dd> <p>Specifies whether to apply the transfer function to the blue channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A boolean value that specifies whether to apply the transfer function to the blue channel. If you set this to {{TRUE}} the effect does not apply the transfer function to the blue channel. If you set this to {{FALSE}} it applies the BlueTableTransfer function to the Blue channel. </p> </dd> <p>Specifies whether to apply the transfer function to the Alpha channel.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A boolean value that specifies whether to apply the transfer function to the alpha channel. If you set this to {{TRUE}} the effect does not apply the transfer function to the Alpha channel. If you set this to {{FALSE}} it applies the AlphaTableTransfer function to the Alpha channel. </p> </dd> <p>Specifies whether the effect clamps color values to between 0 and 1 before the effect passes the values to the next effect in the graph.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A boolean value that specifies whether the effect clamps color values to between 0 and 1 before the effect passes the values to the next effect in the graph. If you set this to {{TRUE}} the effect will clamp the values. If you set this to {{FALSE}}, the effect will not clamp the color values, but other effects and the output surface may clamp the values if they are not of high enough precision. The effect clamps the values before it premultiplies the alpha. </p> </dd> <p>Sets a value in the red table.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The index of the value to set.</p> </dd> <dd> <p>An animation that represents how the value changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Sets a value in the green table.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The index of the value to set.</p> </dd> <dd> <p>The value to set.</p> </dd> <p>Sets a value in the blue table.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The index of the value to set.</p> </dd> <dd> <p>An animation that represents how the value changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Sets a value in the alpha table.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The index of the value to set.</p> </dd> <dd> <p>The new value.</p> </dd> <p> The composite effect is used to combine 2 or more images. This effect has 13 different composite modes. The composite effect accepts 2 or more inputs. When you specify 2 images, destination is the first input (index 0) and the source is the second input (index 1). If you specify more than 2 inputs, the images are composited starting with the first input and the second and so on. </p> <p>Sets the mode for the composite effect.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The mode for the composite effect.</p> </dd> <p> The Blend Effect is used to combine 2 images. </p> <p>Sets the blend mode to use when the blend effect combines the two images.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The blend mode to use when the blend effect combines the two images.</p> </dd> <p>The arithmetic composite effect is used to combine 2 images using a weighted sum of pixels from the input images.</p> <p>Sets the coefficients for the equation used to composite the two input images.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The coefficients for the equation used to composite the two input images.</p> </dd> <p>Specifies whether to clamp color values before the effect passes the values to the next effect in the graph.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A boolean value indicating whether to clamp the color values. A value of {{TRUE}} causes color values to be clamped between 0 and 1.</p> </dd> <p>Sets the first coefficient for the equation used to composite the two input images.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An animation that represents how the value changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Sets the second coefficient for the equation used to composite the two input images.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An animation that represents how the value of the second coefficient changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Sets the third coefficient for the equation used to composite the two input images.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An animation that represents how the value of the third coefficient changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Sets the fourth coefficient for the equation used to composite the two input images.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An animation that represents how the value of the fourth coefficient changes over time. This parameter must not be {{NULL}}.</p> </dd> <p> The arithmetic composite effect is used to combine 2 images using a weighted sum of pixels from the input images. </p> <p>Sets the interpolation mode of the effect.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Specifies the interpolation mode of the effect.</p> </dd> <p>Sets the border mode to use with the effect.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Specifies the border mode to use with the effect.</p> </dd> <p>Sets the transform matrix of the effect.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Specifies the transform matrix for the effect to use.</p> </dd> <p>Sets an element of the transform matrix of the effect.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The row of the element.</p> </dd> <dd> <p>The column of the element.</p> </dd> <dd> <p>The new value of the element.</p> </dd> <p>Sets the sharpness of the effect.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An animation that represents how the sharpness value changes over time. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a Microsoft DirectComposition surface factory object, which can be used to create other DirectComposition surface or virtual surface objects</p> <p>A surface factory allows an application to simultaneously use more than one single {{DXGI}} or Direct2D device with DirectComposition. Each surface factory has a permanent association with one {{DXGI}} or Direct2D device, but a DirectComposition device may have any number of surface factories. </p><p>Each surface factory manages resources independently from the others. In particular, DirectComposition pools surface allocations to mitigate surface allocation and deallocation costs. This pool is done on a per-surface factory basis. </p><p>If the <strong>{{DCompositionCreateDevice2}}</strong> function is called with a non-{{NULL}} <em>renderingDevice</em> parameter, the returned DirectComposition device object has an implicit surface factory under the covers associated with the given rendering device. This implicit surface factory is used to service the <strong>{{IDCompositionDevice::CreateSurface}}</strong>, <strong>{{IDCompositionDevice::CreateVirtualSurface}}</strong>, <strong>{{IDCompositionDevice2::CreateSurface}}</strong> and <strong>{{IDCompositionDevice2::CreateVirtualSurface}}</strong> methods. </p><p>A surface object remains alive as long as any of the surfaces or virtual surfaces that it created remain alive, either directly because the application holds a direct reference, or indirectly because one or more such surfaces are associated with one or more visual objects. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>A reference to a DirectX device to be used to create DirectComposition surface objects. Must be a reference to an object implementing the <strong>{{IDXGIDevice}}</strong> or <strong>{{ID2D1Device}}</strong> interfaces. This parameter must not be {{NULL}}.</p> </dd> <dd> <p>The newly created surface factory object. This parameter must not be {{NULL}}.</p> </dd> <p>Commits all DirectComposition commands that are pending on this device.</p> <p>Calls to DirectComposition methods are always batched and executed atomically as a single transaction. Calls take effect only when <strong>{{IDCompositionDevice2::Commit}}</strong> is called, at which time all pending method calls for a device are executed at once.</p><p>An application that uses multiple devices must call <strong>Commit</strong> for each device separately. However, because the composition engine processes the calls individually, the batch of commands might not take effect at the same time.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <p>Waits for the composition engine to finish processing the previous call to the <strong>{{IDCompositionDevice2::Commit}}</strong> method. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <p>Retrieves information from the composition engine about composition times and the frame rate.</p> <p>This method retrieves timing information about the composition engine that an application can use to synchronize the rasterization of bitmaps with independent animations.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>A structure that receives composition times and frame rate information.</p> </dd> <p>Creates a new visual object.</p> <p>A new visual object has a static value of zero for the OffsetX and OffsetY properties, and {{NULL}} for the Transform, Clip, and Content properties. Initially, the visual does not cause the contents of a window to change. The visual must be added as a child of another visual, or as the root of a composition target, before it can affect the appearance of a window.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new visual object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a Microsoft DirectComposition surface factory object, which can be used to create other DirectComposition surface or virtual surface objects</p> <p>A surface factory allows an application to simultaneously use more than one single {{DXGI}} or Direct2D device with DirectComposition. Each surface factory has a permanent association with one {{DXGI}} or Direct2D device, but a DirectComposition device may have any number of surface factories. </p><p>Each surface factory manages resources independently from the others. In particular, DirectComposition pools surface allocations to mitigate surface allocation and deallocation costs. This pool is done on a per-surface factory basis. </p><p>If the <strong>{{DCompositionCreateDevice2}}</strong> function is called with a non-{{NULL}} <em>renderingDevice</em> parameter, the returned DirectComposition device object has an implicit surface factory under the covers associated with the given rendering device. This implicit surface factory is used to service the <strong>{{IDCompositionDevice::CreateSurface}}</strong>, <strong>{{IDCompositionDevice::CreateVirtualSurface}}</strong>, <strong>{{IDCompositionDevice2::CreateSurface}}</strong> and <strong>{{IDCompositionDevice2::CreateVirtualSurface}}</strong> methods. </p><p>A surface object remains alive as long as any of the surfaces or virtual surfaces that it created remain alive, either directly because the application holds a direct reference, or indirectly because one or more such surfaces are associated with one or more visual objects. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>A reference to a DirectX device to be used to create DirectComposition surface objects. Must be a reference to an object implementing the <strong>{{IDXGIDevice}}</strong> or <strong>{{ID2D1Device}}</strong> interfaces. This parameter must not be {{NULL}}.</p> </dd> <dd> <p>The newly created surface factory object. This parameter must not be {{NULL}}.</p> </dd> <p>Represents a fence. This interface extends <strong>{{ID3D12Fence}}</strong>, and supports the retrieval of the flags used to create the original fence. This new feature is useful primarily for opening shared fences.</p><strong>Note</strong> <strong>{{ID3D12Fence1}}</strong> was introduced in the Windows 10 Fall Creators Update, and is the latest version of the <strong>{{ID3D12Fence}}</strong> interface. Applications targeting Windows 10 Fall Creators Update and later should use <strong>{{ID3D12Fence1}}</strong> instead of earlier versions. <p>Creates an updateable surface object that can be associated with one or more visuals for composition.</p> <p>A Microsoft DirectComposition surface is a rectangular array of pixels that can be associated with a visual for composition. </p><p>A newly created surface object is in an uninitialized state. While it is uninitialized, the surface has no effect on the composition of the visual tree. It behaves exactly like a surface that has 100% transparent pixels. </p><p>To initialize the surface with pixel data, use the <strong>{{IDCompositionSurface::BeginDraw}}</strong> and <strong>{{IDCompositionSurface::EndDraw}}</strong> methods. The first call to this method must cover the entire surface area to provide an initial value for every pixel. Subsequent calls may specify smaller sub-rectangles of the surface to update. </p><p>DirectComposition surfaces support the following pixel formats: </p><ul> <li><strong>{{DXGI_FORMAT_B8G8R8A8_UNORM}}</strong></li> <li><strong>{{DXGI_FORMAT_R8G8B8A8_UNORM}}</strong></li> <li><strong>{{DXGI_FORMAT_R16G16B16A16_FLOAT}}</strong></li> </ul> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The width of the surface, in pixels. Constrained by the feature level of the rendering device that was passed in at the time the DirectComposition device was created. </p> </dd> <dd> <p>The height of the surface, in pixels. Constrained by the feature level of the rendering device that was passed in at the time the DirectComposition device was created.</p> </dd> <dd> <p>The pixel format of the surface.</p> </dd> <dd> <p>The format of the alpha channel, if an alpha channel is included in the pixel format. It can be one of the following values:</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{DXGI_ALPHA_MODE_UNSPECIFIED}}</strong></dt> </dl> </td><td> <p>The alpha channel is not specified. This value has the same effect as <strong>{{DXGI_ALPHA_MODE_IGNORE}}</strong>.</p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_ALPHA_MODE_PREMULTIPLIED}}</strong></dt> </dl> </td><td> <p>The color channels contain values that are premultiplied with the alpha channel. </p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_ALPHA_MODE_IGNORE}}</strong></dt> </dl> </td><td> <p>The alpha channel should be ignored and the bitmap should be rendered opaquely.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>The newly created surface object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a sparsely populated surface that can be associated with one or more visuals for composition.</p> <p>A Microsoft DirectComposition sparse surface is a logical object that behaves like a rectangular array of pixels that can be associated with a visual for composition. The surface is not necessarily backed by any physical video or system memory for every one of its pixels. The application can realize or virtualize parts of the logical surface at different times. </p><p>A newly created surface object is in an uninitialized state. While it is uninitialized, the surface has no effect on the composition of the visual tree. It behaves exactly like a surface that is initialized with 100% transparent pixels. </p><p>To initialize the surface with pixel data, use the <strong>{{IDCompositionSurface::BeginDraw}}</strong> and <strong>{{IDCompositionSurface::EndDraw}}</strong> methods. This method not only provides pixels for the surface, but it also allocates actual storage space for those pixels. The memory allocation persists until the application returns some of the memory to the system. The application can free part or all of the allocated memory by calling the <strong>{{IDCompositionVirtualSurface::Trim}}</strong> method.</p><p>DirectComposition surfaces support the following pixel formats:</p><ul> <li><strong>{{DXGI_FORMAT_B8G8R8A8_UNORM}}</strong></li> <li><strong>{{DXGI_FORMAT_R8G8B8A8_UNORM}}</strong></li> <li><strong>{{DXGI_FORMAT_R16G16B16A16_FLOAT}}</strong></li> </ul><p>This method fails if <em>initialWidth</em> or <em>initialHeight</em> exceeds 16,777,216 pixels. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The width of the surface, in pixels. The maximum width is 16,777,216 pixels.</p> </dd> <dd> <p>The height of the surface, in pixels. The maximum height is 16,777,216 pixels.</p> </dd> <dd> <p>The pixel format of the surface.</p> </dd> <dd> <p>The meaning of the alpha channel, if the pixel format contains an alpha channel. It can be one of the following values:</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{DXGI_ALPHA_MODE_UNSPECIFIED}}</strong></dt> </dl> </td><td> <p>The alpha channel is not specified. This value has the same effect as <strong>{{DXGI_ALPHA_MODE_IGNORE}}</strong>.</p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_ALPHA_MODE_PREMULTIPLIED}}</strong></dt> </dl> </td><td> <p>The color channels contain values that are premultiplied with the alpha channel. </p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_ALPHA_MODE_IGNORE}}</strong></dt> </dl> </td><td> <p>The alpha channel should be ignored and the bitmap should be rendered opaquely.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>The newly created surface object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 2D translation transform object.</p> <p>A new 2D translation transform object has a static value of zero for the OffsetX and OffsetY properties.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new 2D translation transform object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 2D scale transform object.</p> <p>A new 2D scale transform object has a static value of zero for the ScaleX, ScaleY, CenterX, and CenterY properties.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new 2D scale transform object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 2D rotation transform object.</p> <p>A new 2D rotation transform object has a static value of zero for the Angle, CenterX, and CenterY properties.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new rotation transform object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 2D skew transform object.</p> <p>A new 2D skew transform object has a static value of zero for the AngleX, AngleY, CenterX, and CenterY properties.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new 2D skew transform object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 2D 3-by-2 matrix transform object.</p> <p>A new matrix transform object has the identity matrix as its initial value. The identity matrix is the 3x2 matrix with ones on the main diagonal and zeros elsewhere, as shown in the following illustration. </p><p></p><p>When an identity transform is applied to an object, it does not change the position, shape, or size of the object. It is similar to the way that multiplying a number by one does not change the number. Any transform other than the identity transform will modify the position, shape, and/or size of objects.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new matrix transform object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 2D transform group object that holds an array of 2D transform objects.</p> <p>The array entries in a transform group cannot be changed. However, each transform in the array can be modified through its own property setting methods. If a transform in the array is modified, the change is reflected in the computed matrix of the transform group.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An array of 2D transform objects that make up this transform group.</p> </dd> <dd> <p>The number of elements in the <em>transforms</em> array.</p> </dd> <dd> <p>The new transform group object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 3D translation transform object.</p> <p>A newly created 3D translation transform has a static value of 0 for the OffsetX, OffsetY, and OffsetZ properties. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The new 3D translation transform object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 3D scale transform object.</p> <p>A new 3D scale transform object has a static value of 1.0 for the ScaleX, ScaleY, and ScaleZ properties.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new 3D scale transform object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 3D rotation transform object.</p> <p>A new 3D rotation transform object has a default static value of zero for the Angle, CenterX, CenterY, CenterZ, AxisX, and AxisY properties, and a default static value of 1.0 for the AxisZ property.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new 3D rotation transform object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 3D 4-by-4 matrix transform object.</p> <p>The new 3D matrix transform has the identity matrix as its value. The identity matrix is the 4-by-4 matrix with ones on the main diagonal and zeros elsewhere, as shown in the following illustration. </p><p></p><p>When an identity transform is applied to an object, it does not change the position, shape, or size of the object. It is similar to the way that multiplying a number by one does not change the number. Any transform other than the identity transform will modify the position, shape, and/or size of objects.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new 3D matrix transform object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a 3D transform group object that holds an array of 3D transform objects.</p> <p>The array entries in a 3D transform group cannot be changed. However, each transform in the array can be modified through its own property setting methods. If a transform in the array is modified, the change is reflected in the computed matrix of the transform group.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An array of 3D transform objects that make up this transform group.</p> </dd> <dd> <p>The number of elements in the <em>transforms</em> array.</p> </dd> <dd> <p>The new 3D transform group object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates an object that represents multiple effects to be applied to a visual subtree.</p> <p>An effect group enables an application to apply multiple effects to a single visual subtree. </p><p>A new effect group has a default opacity value of 1.0 and no 3D transformations.</p><p>To set the opacity and transform values, use the corresponding methods on the <strong>{{IDCompositionEffectGroup}}</strong> that was created.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new effect group object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a clip object that can be used to restrict the rendering of a visual subtree to a rectangular area.</p> <p>A newly created clip object has a static value of {{FLT_MAX}} for the left and top properties, and a static value of ?{{FLT_MAX}} for the right and bottom properties, effectively making it a no-op clip object.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new clip object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates an animation object that is used to animate one or more scalar properties of one or more Microsoft DirectComposition objects. </p> <p>A number of DirectComposition object properties can have an animation object as the value of the property. When a property has an animation object as its value, DirectComposition redraws the visual at the refresh rate to reflect the changing value of the property that is being animated.</p><p>A newly created animation object does not have any animation segments associated with it. An application must use the methods of the <strong>{{IDCompositionAnimation}}</strong> interface to build an animation function before setting the animation object as the property of another DirectComposition object.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The new animation object. This parameter must not be {{NULL}}.</p> </dd> <p>Enables display of performance debugging counters.</p> <p>Performance counters are displayed on the top-right corner of the screen. From left to right, Microsoft DirectComposition displays the following information: </p><ul> <li>The composition engine frame rate, in frames per second, averaged over the last 60 composition frames</li> <li>The overall {{CPU}} usage of the composition thread, in milliseconds </li> </ul><p>The DirectComposition composition engine operates on the entire desktop all at once, so the performance counters measure the total cost of desktop composition, not just the cost of any one particular application. If the application occupies the entire screen, however, it is reasonable to assume that all of the composition cost is due to that one application. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <p>Enables display of performance debugging counters.</p> <p>Performance counters are displayed on the top-right corner of the screen. From left to right, Microsoft DirectComposition displays the following information: </p><ul> <li>The composition engine frame rate, in frames per second, averaged over the last 60 composition frames</li> <li>The overall {{CPU}} usage of the composition thread, in milliseconds </li> </ul><p>The DirectComposition composition engine operates on the entire desktop all at once, so the performance counters measure the total cost of desktop composition, not just the cost of any one particular application. If the application occupies the entire screen, however, it is reasonable to assume that all of the composition cost is due to that one application. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <p>Disables display of performance debugging counters.</p> <p>Microsoft DirectComposition keeps a count of how many DirectComposition devices have performance counters enabled, for the entire desktop session. If the count is non-zero, the performance counters are displayed. Therefore, disabling the counters may not make them go away if another device is also requesting display of the counters.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <p>Creates a composition target object that is bound to the window that is represented by the specified window handle.</p> <p>A DirectComposition visual tree must be bound to a window before anything can be displayed on screen. The window can be a top-level window or a child window. In either case, the window can be a layered window, but in all cases the window must belong to the calling process. If the window belongs to a different process, this method returns {{DCOMPOSITION_ERROR_ACCESS_DENIED}}.</p><p>When DirectComposition content is composed to the window, the content is always composed on top of whatever is drawn directly to that window through the device context returned by the <strong>GetDC</strong> function, or by calls to DirectX Present methods. However, because window clipping rules apply to DirectComposition content, if the window has child windows, those child windows may clip the visual tree. The topmost parameter determines whether child windows clip the visual tree.</p><p>Conceptually, each window consists of four layers:</p><ol> <li>The contents drawn directly to the window handle (this is the bottommost layer).</li> <li>An optional DirectComposition visual tree.</li> <li>The contents of all child windows, if any.</li> <li>Another optional DirectComposition visual tree (this is the topmost layer).</li> </ol><p>All four layers are clipped to the window?s visible region.</p><p>At most, only two composition targets can be created for each window in the system, one topmost and one not topmost. If a composition target is already bound to the specified window at the specified layer, this method fails. When a composition target object is destroyed, the layer it composed is available for use by a new composition target object.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The window to which the composition target object should be bound. This parameter must not be {{NULL}}.</p> </dd> <dd> <p>{{TRUE}} if the visual tree should be displayed on top of the children of the window specified by the hwnd parameter; otherwise, the visual tree is displayed behind the children.</p> </dd> <dd> <p>The new composition target object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a composition target object that is bound to the window that is represented by the specified window handle.</p> <p>A DirectComposition visual tree must be bound to a window before anything can be displayed on screen. The window can be a top-level window or a child window. In either case, the window can be a layered window, but in all cases the window must belong to the calling process. If the window belongs to a different process, this method returns {{DCOMPOSITION_ERROR_ACCESS_DENIED}}.</p><p>When DirectComposition content is composed to the window, the content is always composed on top of whatever is drawn directly to that window through the device context returned by the <strong>GetDC</strong> function, or by calls to DirectX Present methods. However, because window clipping rules apply to DirectComposition content, if the window has child windows, those child windows may clip the visual tree. The topmost parameter determines whether child windows clip the visual tree.</p><p>Conceptually, each window consists of four layers:</p><ol> <li>The contents drawn directly to the window handle (this is the bottommost layer).</li> <li>An optional DirectComposition visual tree.</li> <li>The contents of all child windows, if any.</li> <li>Another optional DirectComposition visual tree (this is the topmost layer).</li> </ol><p>All four layers are clipped to the window?s visible region.</p><p>At most, only two composition targets can be created for each window in the system, one topmost and one not topmost. If a composition target is already bound to the specified window at the specified layer, this method fails. When a composition target object is destroyed, the layer it composed is available for use by a new composition target object.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The window to which the composition target object should be bound. This parameter must not be {{NULL}}.</p> </dd> <dd> <p>{{TRUE}} if the visual tree should be displayed on top of the children of the window specified by the hwnd parameter; otherwise, the visual tree is displayed behind the children.</p> </dd> <dd> <p>The new composition target object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a new composition surface object that wraps an existing composition surface.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The handle of an existing composition surface that was created by a call to the <strong>{{DCompositionCreateSurfaceHandle}}</strong> function. </p> </dd> <dd> <p>The new composition surface object. This parameter must not be {{NULL}}. </p> </dd> <p>Creates a wrapper object that represents the rasterization of a layered window, and that can be associated with a visual for composition.</p> <p>You can use the surface reference in calls to the {{IDCompositionVisual::SetContent}} method to set the content of one or more visuals. After setting the content, the visuals compose the contents of the specified layered window as long as the window is layered. If the window is unlayered, the window content disappears from the output of the composition tree. If the window is later re-layered, the window content reappears as long as it is still associated with a visual. If the window is resized, the affected visuals are re-composed. </p><p>The contents of the window are not cached beyond the life of the window. That is, if the window is destroyed, the affected visuals stop composing the window. </p><p>If the window is moved off-screen or resized to zero, the system stops composing the content of those visuals. You should use the <strong>DwmSetWindowAttribute</strong> function with the {{DWMWA_CLOAK}} flag to "cloak" the layered child window when you need to hide the original window while allowing the system to continue to compose the content of the visuals. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The handle of the layered window for which to create a wrapper. A layered window is created by specifying {{WS_EX_LAYERED}} when creating the window with the <strong>CreateWindowEx</strong> function or by setting {{WS_EX_LAYERED}} via <strong>SetWindowLong</strong> after the window has been created.</p> </dd> <dd> <p>The new composition surface object. This parameter must not be {{NULL}}. </p> </dd> <p>Represents one DirectComposition visual in a visual tree.</p> <p>Sets the opacity mode for this visual.</p> <p>The opacity mode affects how the Opacity property of an effect group object affects the composition of a visual sub-tree. DirectComposition supports two opacity modes: Layer and Multiply. In Layer mode, each visual sub-tree can be logically viewed as a bitmap that contains the opaque rasterization of that entire sub-tree, to which the opacity value is then applied. In this manner, overlapping opaque surfaces blend with the sub-tree?s background, but not with each other. In contrast, in Multiply mode the opacity is applied individually to each surface as it is composed, so surfaces blend with each other. Multiply mode is faster than Layer mode and always preferred if the visual tree contains entirely non-overlapping contents. However, Multiply mode may produce undesired visual results for overlapping elements. </p><p>By default, a visual inherits the opacity mode of its parent visual, which may inherit the opacity mode of its parent visual, and so on. A visual uses the {{DCOMPOSITION_OPACITY_MODE_LAYER}} mode if this method is never called for the visual, or if this method is called with {{DCOMPOSITION_OPACITY_MODE_INHERIT}}. If no visuals set the opacity mode, the default for the entire visual tree is {{DCOMPOSITION_OPACITY_MODE_LAYER}}. </p><p>If the <em>opacityMode</em> parameter is anything other than {{DCOMPOSITION_OPACITY_MODE_INHERIT}}, this visual's surfaces are composed with the specified opacity mode. In addition, this opacity mode becomes the new default for the children of the current visual. That is, if the opacity mode of this visual's children is unchanged or explicitly set to {{DCOMPOSITION_OPACITY_MODE_INHERIT}}, the surfaces the child visuals are composed using the opacity mode of this visual. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p> The opacity mode to use when composing the visual to the screen.</p> </dd> <p>Specifies whether or not surfaces that have 3D transformations applied to them should be displayed when facing away from the observer.</p> <p>The back face visibility property affects how surfaces that have 3D transformations applied are rendered. </p><p>By default, a visual inherits the back face visibility property of its parent visual, which may inherit the back face visibility property of its parent visual, and so on. A visual uses the {{DCOMPOSITION_BACKFACE_VISIBILITY_VISIBLE}} mode if this method is never called for the visual, or if this method is called with {{DCOMPOSITION_BACKFACE_VISIBILITY_INHERIT}}. If no visuals set the back face visibility property, the default for the entire visual tree is {{DCOMPOSITION_BACKFACE_VISIBILITY_VISIBLE}}. </p><p>If the <em>visibility</em> parameter is anything other than {{DCOMPOSITION_BACKFACE_VISIBILITY_INHERIT}}, this visual's surfaces are composed with the specified visibility mode. In addition, this visibility mode becomes the new default for the children of the current visual. That is, if the visibility mode of this visual's children is unchanged or explicitly set to {{DCOMPOSITION_BACKFACE_VISIBILITY_INHERIT}}, the surfaces the child visuals are composed using the visibility mode of this visual. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The back face visibility to use when composing surfaces in this visual?s sub-tree to the screen.</p> </dd> <p>Represents a debug visual.</p> <p>Enables a visual heatmap that represents overdraw regions.</p> <p>Heatmaps can be enabled by calling <strong>EnableHeatMap</strong>. The heatmaps are drawn on the source of the VisualDebug visual and child visuals. The heatmaps are represented in a specified color for all visual content. The heatmap color must have an transparency in order to see the overlaying overdraw regions. The colored surfaces are blended together to visually show all overdraw regions in a single view. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd></dd> <p>Disables visual heatmaps.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <p>Enables highlighting visuals when content is being redrawn.</p> <p>Highlighting redraw regions can be enabled by calling <strong>EnableRedrawRegions</strong>. With this function, redrawn client areas are visually highlighted every frame the visual is updated. Redraw regions are drawn on the source of the VisualDebug and child visuals. Redraw is triggered when properties of a visual are updated. The updated visusal does not neccessarly need to visually change to trigger a redraw. The highlighting will cycle through Blue, Yellow, Pink and Green to provide an order of which content is being updated. The redraw regions are only visible while the window of the VisualDebug is being updated. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <p>Disables visual redraw regions.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <p>Creates a surface object that can be associated with one or more visuals for composition.</p> <p>A Microsoft DirectComposition surface is a rectangular array of pixels that can be associated with a visual for composition. A newly created surface object is in an uninitialized state. While it is uninitialized, the surface has no effect on the composition of the visual tree. It behaves exactly like a surface that has 100% transparent pixels. </p><p>To initialize the surface with pixel data, use the <strong>{{IDCompositionSurface::BeginDraw}}</strong> method. The first call to this method must cover the entire surface area to provide an initial value for every pixel. Subsequent calls may specify smaller sub-rectangles of the surface to update. </p><p>This method will fail if either the width or height exceed the max texture size. If your scenario requires dimensions beyond the max texture size, use <strong>CreateVirtualSurface</strong> method.</p><p>DirectComposition surfaces support the following pixel formats: </p><ul> <li>{{DXGI_FORMAT_B8G8R8A8_UNORM}} </li> <li>{{DXGI_FORMAT_R8G8B8A8_UNORM}} </li> <li>{{DXGI_FORMAT_R16G16B16A16_FLOAT}}</li> </ul> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The width of the surface, in pixels.</p> </dd> <dd> <p>The height of the surface, in pixels. </p> </dd> <dd> <p>The pixel format of the surface. </p> </dd> <dd> <p>The format of the alpha channel, if an alpha channel is included in the pixel format. This can be one of {{DXGI_ALPHA_MODE_PREMULTIPLIED}} or {{DXGI_ALPHA_MODE_IGNORE}}. It can also be {{DXGI_ALPHA_MODE_UNSPECIFIED}}, which is interpreted as {{DXGI_ALPHA_MODE_IGNORE}}. </p> </dd> <dd> <p> The newly created surface object. This parameter must not be {{NULL}}. </p> </dd> <p>Creates a surface object that can be associated with one or more visuals for composition.</p> <p>A Microsoft DirectComposition surface is a rectangular array of pixels that can be associated with a visual for composition. A newly created surface object is in an uninitialized state. While it is uninitialized, the surface has no effect on the composition of the visual tree. It behaves exactly like a surface that has 100% transparent pixels. </p><p>To initialize the surface with pixel data, use the <strong>{{IDCompositionSurface::BeginDraw}}</strong> method. The first call to this method must cover the entire surface area to provide an initial value for every pixel. Subsequent calls may specify smaller sub-rectangles of the surface to update. </p><p>This method will fail if either the width or height exceed the max texture size. If your scenario requires dimensions beyond the max texture size, use <strong>CreateVirtualSurface</strong> method.</p><p>DirectComposition surfaces support the following pixel formats: </p><ul> <li>{{DXGI_FORMAT_B8G8R8A8_UNORM}} </li> <li>{{DXGI_FORMAT_R8G8B8A8_UNORM}} </li> <li>{{DXGI_FORMAT_R16G16B16A16_FLOAT}}</li> </ul> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The width of the surface, in pixels.</p> </dd> <dd> <p>The height of the surface, in pixels. </p> </dd> <dd> <p>The pixel format of the surface. </p> </dd> <dd> <p>The format of the alpha channel, if an alpha channel is included in the pixel format. This can be one of {{DXGI_ALPHA_MODE_PREMULTIPLIED}} or {{DXGI_ALPHA_MODE_IGNORE}}. It can also be {{DXGI_ALPHA_MODE_UNSPECIFIED}}, which is interpreted as {{DXGI_ALPHA_MODE_IGNORE}}. </p> </dd> <dd> <p> The newly created surface object. This parameter must not be {{NULL}}. </p> </dd> <p>Creates a sparsely populated surface that can be associated with one or more visuals for composition.</p> <p>A newly created virtual surface object is in an uninitialized state. While it is uninitialized, the surface has no effect on the composition of the visual tree. It behaves exactly like a surface that is initialized with 100% transparent pixels. </p><p>To initialize the surface with pixel data, use the <strong>{{IDCompositionSurface::BeginDraw}}</strong> method. This method not only provides pixels for the surface, but it also allocates actual storage space for those pixels. The memory allocation persists until the application returns some of the memory to the system. The application can free part or all of the allocated memory by calling the <strong>{{IDCompositionVirtualSurface::Trim}}</strong> or <strong>{{IDCompositionVirtualSurface::Resize}}</strong> method.</p><p>Microsoft DirectComposition surfaces support the following pixel formats: </p><ul> <li>{{DXGI_FORMAT_B8G8R8A8_UNORM}} </li> <li>{{DXGI_FORMAT_R8G8B8A8_UNORM}} </li> <li>{{DXGI_FORMAT_R16G16B16A16_FLOAT}}</li> </ul> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The width of the surface, in pixels. The maximum width is 16,777,216 pixels.</p> </dd> <dd> <p>The height of the surface, in pixels. The maximum height is 16,777,216 pixels.</p> </dd> <dd> <p>The pixel format of the surface. </p> </dd> <dd> <p>The format of the alpha channel, if an alpha channel is included in the pixel format. This can be one of {{DXGI_ALPHA_MODE_PREMULTIPLIED}} or {{DXGI_ALPHA_MODE_IGNORE}}. It can also be {{DXGI_ALPHA_MODE_UNSPECIFIED}}, which is interpreted as {{DXGI_ALPHA_MODE_IGNORE}}. </p> </dd> <dd> <p> The newly created virtual surface object. This parameter must not be {{NULL}}. </p> </dd> <p> Serves as a factory for all other Microsoft DirectComposition objects and provides methods to control transactional composition. </p> <p>Creates an instance of <strong>{{IDCompositionGaussianBlurEffect}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Creates an instance of <strong>{{IDCompositionBrightnessEffect}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an instance of <strong>{{IDCompositionColorMatrixEffect}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Creates an instance of <strong>{{IDCompositionShadowEffect}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Creates an instance of <strong>{{IDCompositionHueRotationEffect}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Creates an instance of <strong>{{IDCompositionSaturationEffect}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Creates an instance of <strong>{{IDCompositionTurbulenceEffect}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Creates an instance of <strong>{{IDCompositionLinearTransferEffect}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Creates an instance of <strong>{{IDCompositionTableTransferEffect}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Creates an instance of <strong>{{IDCompositionCompositeEffect}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an instance of <strong>{{IDCompositionBlendEffect}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an instance of <strong>{{IDCompositionArithmeticCompositeEffect}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an instance of <strong>{{IDCompositionAffineTransform2DEffect}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Represents one DirectComposition visual in a visual tree.</p> <p>Sets the depth mode property associated with this visual.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The new depth mode.</p> </dd> <p>Changes the value of OffsetZ property.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The new value.</p> </dd> <p>Sets the value of the visual's opacity property.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The new value for the opacity property.</p> </dd> <p>Sets the Transform property of this visual to the specified 3D transform object.</p> <p>Setting the Transform property transforms the coordinate system of the entire visual subtree that is rooted at this visual. If the Clip property of this visual is specified, the clip rectangle is also transformed. </p><p>If the Transform property previously specified a transform matrix, the newly specified transform object replaces the transform matrix.</p><p>A transformation specified by the Transform property is applied after the OffsetX and OffsetY properties. In other words, the effect of setting the Transform property and the OffsetX and OffsetY properties is the same as setting only the Transform property on a transform group where the first member of the group is an <strong>{{IDCompositionTranslateTransform}}</strong> object that has those same OffsetX and OffsetY values. However, you should use the <strong>{{IDCompositionVisual::SetOffsetX}}</strong> and <strong>SetOffsetY</strong> methods whenever possible because they are slightly faster. </p><p>This method fails if <em>transform</em> is an invalid reference or if it was not created by the same <strong>{{IDCompositionDevice}}</strong> interface that created this visual. The interface cannot be a custom implementation; only interfaces created by Microsoft DirectComposition can be used with this method. </p><p>If the <em>transform</em> parameter is {{NULL}}, the coordinate system of this visual is transformed only by its OffsetX and OffsetY properties. Setting the Transform property to {{NULL}} is equivalent to setting it to an <strong>{{IDCompositionMatrixTransform}}</strong> object where the specified matrix is the identity matrix. However, an application should set the Transform property to {{NULL}} whenever possible because it is slightly faster.</p><p>If the OffsetX and OffsetY properties are set to 0, and the Transform property is set to {{NULL}}, the coordinate system of the visual is the same as that of its parent.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The transform object that is used to modify the coordinate system of this visual. This parameter can point to an <strong>{{IDCompositionTransform}}</strong> interface or one of its derived interfaces. This parameter can be {{NULL}}.</p> </dd> <p>Changes the value of the visual's Visible property.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The new value for the visible property.</p> </dd> <p>Creates a new device object that can be used to create other Microsoft DirectComposition objects.</p> <p>A device object serves as the factory for all other DirectComposition objects. It also controls transactional composition through the <strong>{{IDCompositionDevice::Commit}}</strong> method.</p><p>The {{DXGI}} device specified by <em>dxgiDevice</em> is used to create all DirectComposition surface objects. In particular, the <strong>{{IDCompositionSurface::BeginDraw}}</strong> method returns an interface reference to a {{DXGI}} surface that belongs to the device specified by the <em>dxgiDevice</em> parameter. </p><p>When creating the {{DXGI}} device, developers must specify the <strong>{{D3D11_CREATE_DEVICE}} {{BGRA_SUPPORT}}</strong> or <strong>{{D3D10_CREATE_DEVICE_BGRA_SUPPORT}}</strong> flag for Direct2D interoperability with Microsoft Direct3D resources.</p><p>The <em>iid</em> parameter must be <code>__uuidof({{IDCompositionDevice}})</code>, and the <em>dcompositionDevice</em> parameter receives a reference to an <strong>{{IDCompositionDevice}}</strong> interface. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The {{DXGI}} device to use to create DirectComposition surface objects.</p> </dd> <dd> <p>The identifier of the interface to retrieve. </p> </dd> <dd> <p>Receives an interface reference to the newly created device object. The reference is of the type specified by the <em>iid</em> parameter. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a new device object that can be used to create other Microsoft DirectComposition objects.</p> <p>A device object serves as the factory for all other DirectComposition objects. It also controls transactional composition through the {{IDCompositionDevice2::Commit}} method. </p><p>The <em>renderingDevice</em> parameter may point to a {{DXGI}}, Direct3D, Direct2D device object, or it may be {{NULL}}. This parameter affects the behavior of the {{IDCompositionDevice2::CreateSurface}}, {{IDCompositionDevice2::CreateVirtualSurface}} and {{IDCompositionSurface::BeginDraw}} methods. </p><p>If the <em>renderingDevice</em> parameter is {{NULL}} then the returned DirectComposition device cannot directly create DirectComposition surface objects. In particular, {{IDCompositionDevice2::CreateSurface}} and {{IDCompositionDevice2::CreateVirtualSurface}} methods return {{E_INVALIDARG}}, regardless of the supplied parameters. However, such a DirectComposition device object can still be used to indirectly create surfaces if the application creates a surface factory object via the {{IDCompositionDevice2::CreateSurfaceFactory}} method. </p><p>If the <em>renderingDevice</em> parameter points to a {{DXGI}} device, that device is used to allocate all video memory needed by the {{IDCompositionDevice2::CreateSurface}} and {{IDCompositionDevice2::CreateVirtualSurface}} methods. Moreover, the {{IDCompositionSurface::BeginDraw}} method returns an interface reference to a {{DXGI}} surface that belongs to that same {{DXGI}} device. </p><p>If the <em>renderingDevice</em> parameter points to a Direct2D device object, DirectComposition extracts from it the underlying {{DXGI}} device object and uses it as if that {{DXGI}} device object had been passed in as the <em>renderingDevice</em> parameter. However, passing in a Direct2D object further causes {{IDCompositionSurface::BeginDraw}} to accept __uuidof({{ID2D1DeviceContext}}) for its <em>iid</em> parameter for any objects created with the {{IDCompositionDevice2::CreateSurface}} or {{IDCompositionDevice2::CreateVirtualSurface}} methods. In that case, the Direct2D device context object returned by {{IDCompositionSurface::BeginDraw}} will belong to the same Direct2D device passed as the <em>renderingDevice</em> parameter. </p><p>If the <em>iid</em> parameter is __uuidof({{IDCompositionDevice}}), then the dcompositionDevice parameter receives a reference to a Version 1 {{IDCompositionDevice}} interface, but the underlying object is a Version 2 desktop device object. The application can later obtain a reference to either the {{IDCompositionDevice2}} or {{IDCompositionDesktopDevice}} interfaces by calling the <strong>QueryInterface</strong> method on that device. Similarly, all DirectComposition objects created from such a device are Version 2 objects under the covers. For example, the {{IDCompositionDevice::CreateVisual}} method will return an {{IDCompositionVisual}} interface to the created visual, but the application can obtain a reference to the {{IDCompositionVisual2}} interface via the QueryInterface method. This behavior allows an application written to the DirectComposition {{V1}} {{API}} to incrementally adopt DirectComposition {{V2}} features by changing the device creation method from {{DCompositionCreateDevice}} to {{DCompositionCreateDevice2}}, while still requesting the {{IDCompositionDevice2}} interface. This allows the rest of the code to remain unchanged, while allowing the application to use QueryInterface in just the places where new functionality is needed. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>An optional reference to a DirectX device to be used to create DirectComposition surface objects. Must be a reference to an object implementing the <strong>{{IDXGIDevice}}</strong> or <strong>{{ID2D1Device}}</strong> interfaces.</p> </dd> <dd> <p>The identifier of the interface to retrieve. This must be one of __uuidof({{IDCompositionDevice}}) or __uuidof({{IDCompositionDesktopDevice}}).</p> </dd> <dd> <p>Receives an interface reference to the newly created device object. The reference is of the type specified by the <em>iid</em> parameter. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a new DirectComposition device object, which can be used to create other DirectComposition objects.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An optional reference to a DirectX device to be used to create DirectComposition surface objects. Must be a reference to an object implementing the <strong>{{IDXGIDevice}}</strong> or <strong>{{ID2D1Device}}</strong> interfaces.</p> </dd> <dd> <p>The identifier of the interface to retrieve. This must be one of __uuidof({{IDCompositionDevice}}) or __uuidof({{IDCompositionDesktopDevice}}).</p> </dd> <dd> <p>Receives an interface reference to the newly created device object. The reference is of the type specified by the <em>iid</em> parameter. This parameter must not be {{NULL}}.</p> </dd> <p>Creates a new composition surface object that can be bound to a Microsoft DirectX swap chain or swap buffer and associated with a visual.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes. </p> <dd> <p>The requested access to the composition surface object. It can be one of the following values:</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong></strong></dt> <dt>0x0000L</dt> </dl> </td><td> <p>No access.</p> </td></tr> <tr><td><dl> <dt><strong>{{COMPOSITIONSURFACE_READ}}</strong></dt> <dt>0x0001L</dt> </dl> </td><td> <p>Read access. For internal use only.</p> </td></tr> <tr><td><dl> <dt><strong>{{COMPOSITIONSURFACE_WRITE}}</strong></dt> <dt>0x0002L</dt> </dl> </td><td> <p>Write access. For internal use only.</p> </td></tr> <tr><td><dl> <dt><strong>{{COMPOSITIONSURFACE_ALL_ACCESS}}</strong></dt> <dt>0x0003L</dt> </dl> </td><td> <p>Read/write access. Always specify this flag except when duplicating a surface in another process, in which case set <em>desiredAccess</em> to 0.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Contains the security descriptor for the composition surface object, and specifies whether the handle of the composition surface object is inheritable when a child process is created. If this parameter is {{NULL}}, the composition surface object is created with default security attributes that grant read and write access to the current process, but do not enable child processes to inherit the handle.</p> </dd> <dd> <p>The handle of the new composition surface object. This parameter must not be {{NULL}}.</p> </dd> <p>Creates an Interaction/InputSink to route mouse wheel messages to the given {{HWND}}. This will fail if there is already an interaction attached to this visual. After calling this {{API}}, the device that owns the visual must be committed. </p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The visual to route messages from.</p> </dd> <dd> <p>The {{HWND}} to route messages to.</p> </dd> <dd> <p>Boolean value indicating whether to enable or disable routing.</p> </dd> <p>Creates an Interaction/InputSink to route mouse button down and any subsequent move and up events to the given {{HWND}}. There is no move thresholding; when enabled, all events including and following the down are unconditionally redirected to the specified window. After calling this {{API}}, the device owning the visual must be committed.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The visual to route messages from.</p> </dd> <dd> <p>The {{HWND}} to route messages to.</p> </dd> <dd> <p>Boolean value indicating whether to enable or disable routing.</p> </dd> <p>Represents a function for animating one or more properties of one or more Microsoft DirectComposition objects. Any object property that takes a scalar value can be animated.</p> <p>Resets the animation function so that it contains no segments.</p> <p>This method returns the animation function to a clean state, as when the animation was first constructed. After this method is called, the next segment to be added becomes the first segment of the animation function. Because it is the first segment, it can have any non-negative beginning offset.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <p>Sets the absolute time at which the animation function starts.</p> <p>By default, an animation function starts when the first frame of the animation takes effect. For example, if an application creates a simple animation function with a single primitive at offset zero, associates the animation with some property, and then calls the <strong>{{IDCompositionDevice::Commit}}</strong> method, the first frame that includes the commit samples the animation at offset zero for the first primitive. This implies that the actual default start time of all animations varies depending on the time between when the application creates the animation and calls <strong>Commit</strong>, to the time it takes the composition engine to pick up the committed changes. The application can use the <strong>SetAbsoluteBeginTime</strong> method to exercise finer control over the starting time of an animation. </p><p>This method does not control when animations take effect; it only affects how animations are sampled after they start. If the application specifies the exact time of the next frame as the absolute begin time, the result is the same as not calling this method at all. If the specified begin time is different from the time of the next frame, the result is one of following: </p><ul> <li>If the specified time is later than the next frame time, the animation start is delayed until the specified begin time.</li> <li>If the specified time is earlier than the next frame time, the beginning of the animation is dropped and sampling starts into the animation function. </li> </ul> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The starting time for this animation.</p> </dd> <p>Adds a cubic polynomial segment to the animation function.</p> <p>A cubic segment transitions time along a cubic polynomial. For a given time input (t), the output value is given by the following equation. </p><p><em>x</em>(<em>t</em>) = <em>at</em>? + <em>bt</em>? + <em>ct</em> + <em>d</em></p><p>This method fails if any of the parameters are NaN, positive infinity, or negative infinity.</p><p>Because animation segments must be added in increasing order, this method fails if the <em>beginOffset</em> parameter is less than or equal to the <em>beginOffset</em> parameter of the previous segment, if any.</p><p>This animation segment remains in effect until the begin time of the next segment in the animation function. If the animation function contains no more segments, this segment remains in effect indefinitely. </p><p>If all coefficients except <em>constantCoefficient</em> are zero, the value of this segment remains constant over time, and the animation does not cause a recomposition for the duration of the segment.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The offset, in seconds, from the beginning of the animation function to the point when this segment should take effect.</p> </dd> <dd> <p>The constant coefficient of the polynomial.</p> </dd> <dd> <p>The linear coefficient of the polynomial.</p> </dd> <dd> <p>The quadratic coefficient of the polynomial.</p> </dd> <dd> <p>The cubic coefficient of the polynomial.</p> </dd> <p>Adds a sinusoidal segment to the animation function.</p> <p>This method fails if any of the parameters are NaN, positive infinity, or negative infinity, or if the <em>beginOffset</em> parameter is negative. </p><p>Because animation segments must be added in increasing order, this method fails if the <em>beginOffset</em> parameter is less than or equal to the <em>beginOffset</em> parameter of the previous segment, if any.</p><p>This animation segment remains in effect until the begin time of the next segment in the animation function. If the animation function contains no more segments, this segment remains in effect indefinitely. </p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The offset, in seconds, from the beginning of the animation function to the point when this segment should take effect. </p> </dd> <dd> <p>A constant that is added to the sinusoidal.</p> </dd> <dd> <p>A scale factor that is applied to the sinusoidal.</p> </dd> <dd> <p>A scale factor that is applied to the time offset, in Hertz.</p> </dd> <dd> <p>A constant that is added to the time offset, in degrees.</p> </dd> <p>Adds a repeat segment that causes the specified portion of an animation function to be repeated.</p> <p>This method fails if any of the parameters are NaN, positive infinity, or negative infinity.</p><p>Because animation segments must be added in increasing order, this method fails if the <em>beginOffset</em> parameter is less than or equal to the <em>beginOffset</em> parameter of the previous segment. This method also fails if this is the first segment to be added to the animation function.</p><p>This animation segment remains in effect until the begin time of the next segment. If the animation function contains no more segments, this segment remains in effect indefinitely.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The offset, in seconds, from the beginning of the animation to the point at which the repeat should begin.</p> </dd> <dd> <p>The duration, in seconds, of a portion of the animation immediately preceding the begin time that is specified by <em>beginOffset</em>. This is the portion that will be repeated.</p> </dd> <p>Adds an end segment that marks the end of an animation function. </p> <p>When the specified offset is reached, the property or properties affected by this animation are set to the specified final value, and then the animation stops. If no end segment is added, the final segment of the animation function runs indefinitely. Calling this method is semantically identical to making the last segment of the animation function a cubic polynomial where the cubic, quadratic, and linear coefficients are all zeros, and the constant coefficient is the desired final value.</p><p>Because animation segments must be added in increasing order, this method fails if the <em>endOffset</em> parameter is less than or equal to the <em>beginOffset</em> parameter of the previous segment. This method also fails if this is the first segment to be added to the animation function.</p><p>After this method is called, all methods on this animation object fail except the <strong>{{IDCompositionAnimation::Reset}}</strong> method.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. See DirectComposition Error Codes for a list of error codes.</p> <dd> <p>The offset, in seconds, from the beginning of the animation function to the point when the function ends.</p> </dd> <dd> <p>The final value of the animation.</p> </dd> <p>Specifies the interpolation mode to be used when a bitmap is composed with any transform where the pixels in the bitmap don't line up exactly one-to-one with pixels on screen. </p> <p>The default interpolation mode for a visual is <strong>{{DCOMPOSITION_BITMAP_INTERPOLATION_MODE_INHERIT}}</strong>. If all visuals in a visual tree specify this mode, the default for all visuals is nearest neighbor sampling, which is the fastest mode.</p><p>A single visual can have any combination of visual properties. However, if a visual has the following combination of properties, the borders of the visual will default to <strong>{{DCOMPOSITION_BORDER_MODE_HARD}}</strong>. </p><ul> <li><code>SetCompositeMode({{DCOMPOSITION_COMPOSITE_MODE_DESTINATION_INVERT}}) </code></li> <li><code>SetBorderMode({{DCOMPOSITION_BORDER_MODE_SOFT}}) </code></li> <li><code>SetBitmapInterpolationMode({{DCOMPOSITION_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR}})</code></li> </ul><p>If you want a visual to be drawn with antialiasing, use <strong>{{DCOMPOSITION_BITMAP_INTERPOLATION_MODE_LINEAR}}</strong> for the content of the visual, and <strong>{{DCOMPOSITION_BORDER_MODE_SOFT}}</strong> for the edges. </p> <dd> <p>Bitmaps are interpolated by using nearest-neighbor sampling.</p> </dd> <dd> <p>Bitmaps are interpolated by using linear sampling.</p> </dd> <dd> <p>Bitmaps are interpolated according to the mode established by the parent visual.</p> </dd> <p>Specifies the border mode to use when composing a bitmap or applying a clip with any transform such that the edges of the bitmap or clip are not axis-aligned with integer coordinates. </p> <p>The default border mode for any given visual is <strong>{{DCOMPOSITION_BORDER_MODE_INHERIT}}</strong>, which delegates the determination of the border mode to the parent visual. If all visuals in a visual tree specify this mode, the default for all visuals is aliased rendering, which is the fastest mode.</p><p>A single visual can have any combination of visual properties. However, if a visual has the following combination of properties, the borders of the visual will default to <strong>{{DCOMPOSITION_BORDER_MODE_HARD}}</strong>. </p><ul> <li><code>SetCompositeMode({{DCOMPOSITION_COMPOSITE_MODE_DESTINATION_INVERT}}) </code></li> <li><code>SetBorderMode({{DCOMPOSITION_BORDER_MODE_SOFT}}) </code></li> <li><code>SetBitmapInterpolationMode({{DCOMPOSITION_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR}})</code></li> </ul><p>If you want a visual to be drawn with antialiasing, use <strong>{{DCOMPOSITION_BITMAP_INTERPOLATION_MODE_LINEAR}}</strong> for the content of the visual, and <strong>{{DCOMPOSITION_BORDER_MODE_SOFT}}</strong> for the edges. </p> <dd> <p>Bitmap and clip edges are antialiased.</p> </dd> <dd> <p>Bitmap and clip edges are aliased. See Remarks.</p> </dd> <dd> <p>Bitmap and clip edges are drawn according to the mode established by the parent visual.</p> </dd> <p>The mode to use to blend the bitmap content of a visual with the render target.</p> <p>A single visual can have any combination of visual properties. However, if a visual has the following combination of properties, the borders of the visual will default to <strong>{{DCOMPOSITION_BORDER_MODE_HARD}}</strong>. </p><ul> <li><code>SetCompositeMode({{DCOMPOSITION_COMPOSITE_MODE_DESTINATION_INVERT}}) </code></li> <li><code>SetBorderMode({{DCOMPOSITION_BORDER_MODE_SOFT}}) </code></li> <li><code>SetBitmapInterpolationMode({{DCOMPOSITION_BITMAP_INTERPOLATION_MODE_NEAREST_NEIGHBOR}})</code></li> </ul><p>If you want a visual to be drawn with antialiasing, use <strong>{{DCOMPOSITION_BITMAP_INTERPOLATION_MODE_LINEAR}}</strong> for the content of the visual, and <strong>{{DCOMPOSITION_BORDER_MODE_SOFT}}</strong> for the edges. </p> <dd> <p>The standard source-over-destination blend mode.</p> </dd> <dd> <p>The bitmap colors are inverted. </p> </dd> <dd> <p>Bitmap colors subtract for color channels in the background. </p> </dd> <dd> <p>Bitmaps are blended according to the mode established by the parent visual. </p> </dd> <p>Specifies the backface visibility to be applied to a visual. </p> <dd> <p>Surfaces in this visual's sub-tree are visible regardless of transformation.</p> </dd> <dd> <p>Surfaces in this visual's sub-tree are only visible when facing the observer.</p> </dd> <dd> <p>The back face visibility is the same as that of the target visual's parent visual.</p> </dd> <p>Specifies how the effective opacity value of a visual is applied to that visual?s content and children.</p> <dd> <p>The target visual defines a logical layer into which its entire sub-tree is composed with a starting effective opacity of 1.0. The original opacity value is then used to blend the layer onto the visual?s background.</p> </dd> <dd> <p>The opacity value is multiplied with the effective opacity of the parent visual and the result is then individually applied to each piece of content in this visual?s sub-tree.</p> </dd> <dd> <p>The opacity mode is the same as that of the target visual?s parent visual.</p> </dd> <p>Sets the depth mode property associated with this visual.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The new depth mode.</p> </dd> <p>Describes timing and composition statistics for a frame.</p> <p>The <strong>{{IDCompositionDevice::GetFrameStatistics}}</strong> method fills this structure. An application can use the information in this structure to estimate the timestamp of the next few frames that will be started by the composition engine. Note that this is only an estimate because the composition engine may or may not compose the next frame, depending on whether any active animations or other work are pending for that frame. In addition, the composition engine may change frame rates according to the cost of composing individual frames.</p> <dd> <p>The time stamp of the last batch of commands to be processed by the composition engine.</p> </dd> <dd> <p>The rate at which the composition engine is producing frames, in frames per second.</p> </dd> <dd> <p>The current time as computed by the <strong>QueryPerformanceCounter</strong> function.</p> </dd> <dd> <p>The units in which the <strong>lastFrameTime</strong> and <strong>currentTime</strong> members are specified, in Hertz.</p> </dd> <dd> <p>The estimated time when the next frame will be displayed.</p> </dd> <p>Defines the possible states of Direct Manipulation. The viewport can process input in any state unless otherwise noted.</p> <p>Defines how hit testing is handled by Direct Manipulation when using a dedicated hit-test thread registered through <strong>RegisterHitTestTarget</strong>.</p> <p>Defines the interaction configuration states available in Direct Manipulation.</p> <p>Defines the gestures that can be passed to <strong>SetManualGesture</strong>.</p> <p>By default, Direct Manipulation always reassigns tap and press-and-hold gestures to the application. </p><p>Use <strong>{{DIRECTMANIPULATION_GESTURE_PINCH_ZOOM}}</strong> to zoom instead of scale. </p> <p> Defines the Direct Manipulation motion type.</p> <p>Defines the input behavior options for the viewport.</p> <p><strong>{{DIRECTMANIPULATION_VIEWPORT_OPTIONS}}</strong> is used in the <strong>SetViewportOptions</strong> method. These flags can be combined to set the input behavior for a viewport.</p> <dd> <p>No special behaviors. This is the default value used to set or revert to default behavior.</p> </dd> <dd> <p>At the end of an interaction, the viewport transitions to <strong>{{DIRECTMANIPULATION_READY}}</strong> and then immediately to <strong>{{DIRECTMANIPULATION_DISABLED}}</strong>. The viewport must be explicitly enabled through the <strong>Enable</strong> method before the next interaction can be processed.</p> </dd> <dd> <p> <strong>Update</strong> must be called to redraw the content within the viewport. The content is not updated automatically during an input event.</p> </dd> <dd> <p>All input from a contact associated with the viewport is passed to the {{UI}} thread for processing.</p> </dd> <dd> <p>If set, all <strong>{{WM_POINTERDOWN}}</strong> messages are passed to the application for hit testing. Otherwise, Direct Manipulation will process the messages for hit testing against the existing list of running viewports, and the application will not see the input.</p> <p>Applies only when viewport state is <strong>{{DIRECTMANIPULATION_RUNNING}}</strong> or <strong>{{DIRECTMANIPULATION_INERTIA}}</strong>.</p> </dd> <dd> <p>Specifies that pixel snapping during a manipulation is disabled.</p> <p>Anti-aliasing can create irregular edge rendering. Artifacts, commonly seen as blurry, or semi-transparent, edges can occur when the location of an edge falls in the middle of a device pixel rather than between device pixels. </p> </dd> <p>Modifies how the final inertia end position is calculated.</p> <p>For <strong>{{DIRECTMANIPULATION_SNAPPOINT_MANDATORY}}</strong> or <strong>{{DIRECTMANIPULATION_SNAPPOINT_OPTIONAL}}</strong> snap points, the snap points are chosen based on the natural ending position of inertia as calculated by the touch interaction engine. For <strong>{{DIRECTMANIPULATION_SNAPPOINT_MANDATORY_SINGLE}}</strong> or <strong>{{DIRECTMANIPULATION_SNAPPOINT_OPTIONAL_SINGLE}}</strong> snap points, the selected snap point depends on where inertia started.</p> <dd> <p>Content always stops at the snap point closest to where inertia would naturally stop along the direction of inertia.</p> </dd> <dd> <p>Content stops at a snap point closest to where inertia would naturally stop along the direction of inertia, depending on how close the snap point is. </p> </dd> <dd> <p>Content always stops at the snap point closest to the release point along the direction of inertia.</p> </dd> <dd> <p>Content stops at the next snap point, if the motion starts far from it.</p> </dd> <p>Defines the coordinate system for a collection of snap points.</p> <p>If <strong>{{DIRECTMANIPULATION_COORDINATE_ORIGIN}}</strong> and <strong>{{DIRECTMANIPULATION_COORDINATE_MIRRORED}}</strong> are both specified, the snap points are interpreted as specified from the bottom and right boundaries of the content (the size of the content - the size of the viewport). This is intended for {{RTL}} reading scenarios where content is normally specified and rendered from right-to-left or bottom-to-top.</p> <dd> <p>Default. </p> <p>Snap points are specified relative to the top and left boundaries of the content unless <strong>{{DIRECTMANIPULATION_COORDINATE_MIRRORED}}</strong> is also specified, in which case they are relative to the bottom and right boundaries of the content. For zoom, the boundary is 1.0f.</p> </dd> <dd> <p>Snap points are specified relative to the origin of the viewport.</p> </dd> <dd> <p>Snap points are interpreted as specified in the negative direction of the origin. The origin is shifted to the bottom and right of the viewport or content. Cannot be set for zoom.</p> </dd> <p>Defines the horizontal alignment options for content within a viewport.</p> <dd> <p>No alignment. The object can be positioned anywhere within the viewport.</p> </dd> <dd> <p>Align object along the left side of the viewport.</p> </dd> <dd> <p>Align object to the center of the viewport.</p> </dd> <dd> <p>Align object along the right side of the viewport.</p> </dd> <dd> <p>Content zooms around the center point of the contacts, instead of being locked with the horizontal alignment.</p> </dd> <p>Defines the vertical alignment settings for content within the viewport.</p> <dd> <p>No alignment. The object can be positioned anywhere within the viewport.</p> </dd> <dd> <p>Align object along the top of the viewport.</p> </dd> <dd> <p>Align object to the center of the viewport.</p> </dd> <dd> <p>Align object along the bottom of the viewport.</p> </dd> <dd> <p>Content zooms around the center point of the contacts, instead of being locked with the vertical alignment.</p> </dd> <p>Defines the threading behavior for <strong>SetInputMode</strong> or <strong>SetUpdateMode</strong>. The exact meaning of each constant depends on the method called.</p> <p>Defines the drag-and-drop interaction states for the viewport.</p> <p>For each interaction, the status always starts at <strong>{{DIRECTMANIPULATION_DRAG_DROP_READY}}</strong> and ends at either <strong>{{DIRECTMANIPULATION_DRAG_DROP_CANCELLED}}</strong> or <strong>{{DIRECTMANIPULATION_DRAG_DROP_COMMITTED}}</strong>. There are no explicit callbacks for the transition from {{CANCELLED}}/{{COMMITTED}} to {{READY}}. </p><p>The meaning of the {{CANCELLED}} and {{COMMITED}} values depend on the previous status.</p><ul> <li>For <strong>{{DIRECTMANIPULATION_DRAG_DROP_PRESELECT}}</strong>, they mean the same thing: the content goes back to the original location and no other actions should be taken.</li> <li>{{FOR}} <strong>{{DIRECTMANIPULATION_DRAG_DROP_SELECTING}}</strong>, {{COMMITED}} means apply the selection change; {{CANCELLED}} means avoid the selection change.</li> <li>For <strong>{{DIRECTMANIPULATION_DRAG_DROP_DRAGGING}}</strong>, {{COMMITED}} means perform the drop action; {{CANCELLED}} means cancel the drop action.</li> </ul> <dd> <p>The viewport is at rest and ready for input.</p> </dd> <dd> <p>The viewport is updating its content and the content is not selected.</p> </dd> <dd> <p>The viewport is updating its content and the content is selected.</p> </dd> <dd> <p>The viewport is updating its content and the content is being dragged.</p> </dd> <dd> <p>The viewport has concluded the interaction and requests a revert.</p> </dd> <dd> <p>The viewport has concluded the interaction and requests a commit.</p> </dd> <p>Defines behaviors for the drag-drop interaction.</p> <dd> <p>Specifies that vertical movement is applicable to the chosen gesture.</p> </dd> <dd> <p>Specifies that horizontal movement is applicable to the chosen gesture.</p> </dd> <dd> <p>Specifies that the gesture is to be cross-slide only.</p> </dd> <dd> <p>Specifies that the gesture is a drag initiated by cross-slide.</p> </dd> <dd> <p>Specifies that the gesture a drag initiated by press-and-hold.</p> </dd> <p>Defines gestures recognized by Direct Manipulation.</p> <p>Determines the type and direction of automatic scrolling animation to apply. </p> <dd> <p>If content is scrolling, slowly stop along the direction of the motion.</p> </dd> <dd> <p>Scroll towards the positive boundary of the content.</p> </dd> <dd> <p>Scroll towards the origin of the content.</p> </dd> <p>The factory method that is used to create an instance of secondary content (such as a panning indicator) inside a viewport.</p> <p>Primary content is automatically created at the same time as the viewport and has a one-to-one relationship to a viewport. Therefore, it is not possible to create, add, or remove primary content.</p><p>Secondary content is created independently from the viewport. There is no limit to how much secondary content can be added or removed from a viewport. All secondary content transforms are derived from those supported by the primary content with specific rules applied based on the intended purpose of the element (identified by its Class identifier ({{CLSID}})).</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The frame info provider for the secondary content. This should match the frame info provider used to create the viewport.</p> </dd> <dd> <p>Class identifier ({{CLSID}}) of the secondary content. This {{ID}} specifies the content type.</p> </dd> <dd> <p>{{IID}} of the interface.</p> </dd> <dd> <p>The secondary content object that implements the specified interface.</p> </dd> <p>Activates Direct Manipulation for processing input and handling callbacks on the specified window. </p> <p>The manipulation manager is deactivated, by default. The manager does not receive or respond to input and callbacks until <strong>Activate</strong> is called for the window. </p><p>Calls to <strong>Activate</strong> and <strong>Deactivate</strong> are reference counted. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Deactivates Direct Manipulation for processing input and handling callbacks on the specified window. </p> <p>The manipulation manager is deactivated by default. The manager does not receive or respond to input until <strong>Activate</strong> is called. The manipulation manager should be deactivated when the app does not receive or respond to input. For example, when the app is minimized.</p><p>Calls to <strong>Activate</strong> and <strong>Deactivate</strong> are reference counted. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Registers a dedicated thread for hit testing.</p> <p>Hit testing is typically performed on the application {{UI}} thread. The application receives a <strong>{{WM_POINTERDOWN}}</strong> message on which hit-testing is performed. If a manipulation is required, <strong>SetContact</strong> is called on one or more viewports. An application can use the <strong>RegisterHitTestTarget</strong> method to delegate this hit-testing responsibility to a separate hit-testing thread. </p><p>Once a dedicated hit-test target is successfully registered, <strong>{{WM_POINTERDOWN}}</strong> messages are processed on the hit-testing thread. If a manipulation, such as pan or zoom, is required, <strong>SetContact</strong> is called from this thread. </p><p>If <strong>SetContact</strong> is not called from the hit-testing thread, <strong>{{WM_POINTERDOWN}}</strong> messages may be processed on the {{UI}} thread, depending on the <strong>{{DIRECTMANIPULATION_HITTEST_TYPE}}</strong> specified during registration. </p><p>If <strong>SetContact</strong> is not called by either the hit-test thread or the {{UI}} thread, Direct Manipulation ignores the input which is then handled on the {{UI}} thread. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The handle of the main app window (typically created from the {{UI}} thread).</p> </dd> <dd> <p>The handle of the window in which hit testing is registered (should be created from the hit testing thread). Pass in nullptr to unregister a previously registered hit-test target.</p> </dd> <dd> <p>One of the values from <strong>{{DIRECTMANIPULATION_HITTEST_TYPE}}</strong>. Specifies whether the {{UI}} window or the hit testing window (or both) receives the hit testing <strong>{{WM_POINTERDOWN}}</strong> message , and in what order.</p> </dd> <p>Passes keyboard and mouse messages to the manipulation manager on the app's {{UI}} thread.</p> <p>Call this method for mouse and keyboard input.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The input message to process.</p> </dd> <dd> <p><strong>{{TRUE}}</strong> if no further processing should be done with this message; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p>Gets a reference to an <strong>{{IDirectManipulationUpdateManager}}</strong> object that receives compositor updates. </p> <p>For the compositor to respond to update events from Direct Manipulation, you must associate <strong>{{IDirectManipulationUpdateManager}}</strong> to an <strong>{{IDirectManipulationCompositor}}</strong> object during initialization. Use <strong>GetUpdateManager</strong> to obtain a reference to a <strong>{{IDirectManipulationUpdateManager}}</strong> object. Pass this reference to the compositor using the <strong>SetUpdateManager</strong> method.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>The factory method that is used to create a new <strong>{{IDirectManipulationViewport}}</strong> object.</p><p>The viewport manages the interaction state and mapping of input to output actions.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>The factory method that is used to create an instance of secondary content (such as a panning indicator) inside a viewport.</p> <p>Primary content is automatically created at the same time as the viewport and has a one-to-one relationship to a viewport. Therefore, it is not possible to create, add, or remove primary content.</p><p>Secondary content is created independently from the viewport. There is no limit to how much secondary content can be added or removed from a viewport. All secondary content transforms are derived from those supported by the primary content with specific rules applied based on the intended purpose of the element (identified by its Class identifier ({{CLSID}})).</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The frame info provider for the secondary content. This should match the frame info provider used to create the viewport.</p> </dd> <dd> <p>Class identifier ({{CLSID}}) of the secondary content. This {{ID}} specifies the content type.</p> </dd> <dd> <p>{{IID}} of the interface.</p> </dd> <dd> <p>The secondary content object that implements the specified interface.</p> </dd> <p>Factory method to create a behavior.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>{{CLSID}} of the behavior. The {{CLSID}} specifies the type of behavior.</p> </dd> <dd> <p>The {{IID}} of the behavior interface to create.</p> </dd> <dd> <p>The new behavior object that implements the specified interface.</p> </dd> <p>Factory method to create a behavior.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>{{CLSID}} of the behavior. The {{CLSID}} specifies the type of behavior.</p> </dd> <dd> <p>The {{IID}} of the behavior interface to create.</p> </dd> <dd> <p>The new behavior object that implements the specified interface.</p> </dd> <p>Extends the <strong>{{IDirectManipulationManager2}}</strong> interface that provides access to all the Direct Manipulation features and {{APIs}} available to the client application. </p><p>The <strong>{{IDirectManipulationManager3}}</strong> interface adds support for retrieving an <strong>{{IDirectManipulationDeferContactService}}</strong> object.</p><strong>Note</strong>??To obtain an <strong>{{IDirectManipulationManager3}}</strong> interface reference, <strong>QueryInterface</strong> on an existing <strong>{{IDirectManipulationManager}}</strong> interface reference.? <p>Retrieves an <strong>{{IDirectManipulationDeferContactService}}</strong> object.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets the state of the viewport.</p> <p>This method returns the viewport state at the time of the call and not at the time when the return value is read.</p><p>This method will fail if called after <strong>Abandon</strong>.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>One of the values from <strong>{{DIRECTMANIPULATION_STATUS}}</strong>.</p> </dd> <p>Starts or resumes input processing by the viewport.</p> <p>This method directs a viewport to attempt to respond to input.</p><p>Call this method if the <strong>{{AUTODISABLE}}</strong> option is set. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>, or <strong>{{S_FALSE}}</strong> if there is no work to do (for example, the viewport is already enabled). Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Stops input processing by the viewport.</p> <p>When a viewport is disabled, it immediately stops all transforms and moves the content to the final location. </p><p>Call this method when you want to modify multiple attributes atomically. This method can be called at any time. </p><p>The viewport will not resume processing input until <strong>Enable</strong> is called. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Specifies an association between a contact and the viewport.</p> <p>Call this method when a <strong>{{WM_POINTERDOWN}}</strong> message is received. Upon receiving a <strong>{{WM_POINTERDOWN}}</strong>, the application can use the coordinates of the input to hit-test and determine the viewports to which the contact is associated. </p><p> <strong>DeferContact</strong> must be called before <strong>SetContact</strong>.</p><p>After initialization, Direct Manipulation is not aware of viewport z-order or parent-child relations between viewports. The order of <strong>SetContact</strong> calls defines the viewport tree. To establish the correct viewport hierarchy, <strong>SetContact</strong> should be called first on the child-most viewport, followed by the parent, grand-parent, and so on. </p><p>Use <strong>{{GET_POINTERID_WPARAM}}</strong> to get the reference identifier from a reference message. The contact is removed automatically when <strong>{{WM_POINTERUP}}</strong> is received. </p><p>If a contact is associated with one or more viewports using the <strong>SetContact</strong> method, Direct Manipulation will examine further input from that contact and attempt to identify an appropriate manipulation based on the configuration of the associated viewports. If a manipulation is recognized, the application will then receive a <strong>{{WM_POINTERCAPTURECHANGED}}</strong> message for this contact. In this context, the <strong>{{WM_POINTERCAPTURECHANGED}}</strong> message indicates that Direct Manipulation has captured the contact and the application will not receive input from this contact that is consumed for this manipulation.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{ID}} of the reference.</p> </dd> <p>Removes a contact that is associated with a viewport.</p> <p>This method releases a contact from a specific Direct Manipulation viewport (equivalent to the user removing a touch point). </p><p>The viewport state is not affected unless the last remaining contact on the viewport is removed, in which case the viewport will transition to inertia, if supported. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{ID}} of the reference.</p> </dd> <p>Removes all contacts that are associated with the viewport. Inertia is started if the viewport supports inertia.</p> <p>This is equivalent to calling <strong>ReleaseContact</strong> on every contact associated with the viewport. The outcome is equivalent to the user removing all touch points from the viewport. </p><p>If supported, inertia will be started after calling this method.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets the state of the viewport.</p> <p>This method returns the viewport state at the time of the call and not at the time when the return value is read.</p><p>This method will fail if called after <strong>Abandon</strong>.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>One of the values from <strong>{{DIRECTMANIPULATION_STATUS}}</strong>.</p> </dd> <p>Gets the tag value of a viewport.</p> <p>A tag is a pairing of an integer {{ID}} with a Component Object Model ({{COM}}) object. It can be used by an app to identify the viewport.</p><p> The out parameters are optional, so the method can return an {{ID}}, the viewport object, or both. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>{{IID}} to the interface.</p> </dd> <dd> <p>The object portion of the tag.</p> </dd> <dd> <p>The identifier portion of the tag.</p> </dd> <p>Sets a viewport tag.</p> <p>A tag is a pairing of an integer {{ID}} with a Component Object Model ({{COM}}) object. It can be used by an app to identify the viewport.</p><p> The object parameter is optional, so that the method can set just an {{ID}}. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The object portion of the tag.</p> </dd> <dd> <p>The {{ID}} portion of the tag.</p> </dd> <p>Retrieves the rectangle for the viewport relative to the origin of the viewport coordinate system specified by <strong>SetViewportRect</strong>.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Sets the bounding rectangle for the viewport, relative to the origin of the viewport coordinate system.</p> <p>The viewport rectangle specifies the region of content that is visible to the user. In conjunction with the primary content rectangle, the viewport rectangle is used to determine chaining behaviors.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The bounding rectangle.</p> </dd> <p>Moves the viewport to a specific area of the primary content and specifies whether to animate the transition.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The leftmost coordinate of the rectangle in the primary content coordinate space.</p> </dd> <dd> <p>The topmost coordinate of the rectangle in the primary content coordinate space.</p> </dd> <dd> <p>The rightmost coordinate of the rectangle in the primary content coordinate space.</p> </dd> <dd> <p>The bottommost coordinate of the rectangle in the primary content coordinate space.</p> </dd> <dd> <p>Specifies whether to animate the zoom behavior.</p> </dd> <p>Specifies the transform from the viewport coordinate system to the window client coordinate system. </p> <p>Call this function to specify the viewport position, scaling and orientation on the screen. Viewport position, scaling, orientation and size are uniquely determined by the viewport transform and the viewport rectangle. The application can specify the viewport transform using this method, and the viewport rectangle using <strong>SetViewportRect</strong>. </p><p>The viewport rectangle (the rectangular area inside the content that is visible to the user) is specified in viewport coordinates. If the viewport rectangle top-left point is (0,0), the viewport rectangle is positioned exactly at the viewport coordinate system origin. Viewports offset from the viewport coordinate system origin can be specified in two ways:</p><ul> <li>Through the viewport rectangle top-left point</li> <li>Through the viewport transform translation component (_31, _32)</li> </ul><p>The viewport transform converts from the viewport coordinate system to the window client coordinate system. Direct Manipulation ignores the window {{RTL}} property, so the client area origin is always the top-left point. The transforms are applied in the following order: </p><ol> <li>Viewport rectangle offset</li> <li>Viewport transform (from viewport to client coordinate system)</li> <li>Client to screen mapping (from client to screen coordinate system) </li> </ol> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The transform matrix, in row-wise order: _11, _12, _21, _22, _31, _32.</p> </dd> <dd> <p>The size of the transform matrix. This value is always 6, because a 3x2 matrix is used for all direct manipulation transforms.</p> </dd> <p>Specifies a display transform for the viewport, and synchronizes the output transform with the new value of the display transform.</p> <p>If the application performs special output processing of the content outside of the compositor (content not fully captured in the viewport transform), it should call this method to specify the display transform for the special processing. </p><p>The display transform affects how manipulation updates are applied to the output transform. For example, if the display transform is set to scale 3x, panning will move the content 3x the original distance. </p><p>When a display transform is changed using this method, the output transform will be synchronized to the new value of the display transform. </p><p>This method cannot be called if the viewport status is <strong>{{DIRECTMANIPULATION_RUNNING}}</strong> or <strong>{{DIRECTMANIPULATION_INERTIA}}</strong>. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The transform matrix, in row-wise order: _11, _12, _21, _22, _31, _32.</p> </dd> <dd> <p>The size of the transform matrix. This value is always 6, because a 3x2 matrix is used for all direct manipulation transforms.</p> </dd> <p>Gets the primary content of a viewport that implements <strong>{{IDirectManipulationContent}}</strong> and <strong>{{IDirectManipulationPrimaryContent}}</strong>. </p><p>Primary content is an element that gets transformed (e.g. moved, scaled, rotated) in response to a user interaction. Primary content is created at the same time as the viewport and cannot be added or removed.</p> <p> This method gets the content of the viewport that implements <strong>{{IDirectManipulationContent}}</strong> and <strong>{{IDirectManipulationPrimaryContent}}</strong>. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Adds secondary content, such as a panning indicator, to a viewport.</p> <p>Secondary content is created by calling <strong>CreateContent</strong>. Once added, the secondary content will move relative to the primary content in response to a manipulation. Its motion is determined by rules associated with each type of secondary content.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The content to add to the viewport.</p> </dd> <p>Removes secondary content from a viewport.</p> <p>Secondary content can be removed from the viewport at any time.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The content object to remove.</p> </dd> <p>Sets how the viewport handles input and output.</p><p>Calling this method overrides all settings previously specified with <strong>SetUpdateMode</strong> or <strong>SetInputMode</strong>.</p> <p>Calling this method with <strong>{{DIRECTMANIPULATION_INPUT_MODE_MANUAL}}</strong> set is similar to calling <strong>SetViewportOptions({{DIRECTMANIPULATION_VIEWPORT_OPTIONS_INPUT}})</strong>.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Adds an interaction configuration for the viewport.</p> <p>An interaction configuration specifies how the manipulation engine responds to input and which manipulations are supported. Any number of possible configurations can be added to the viewport using <strong>AddConfiguration</strong> before processing input. </p><p>Configurations can be switched by the application at runtime using <strong>ActivateConfiguration</strong>. </p><p>When a configuration is no longer required (and is not currently active), it can be removed using <strong>RemoveConfiguration</strong>. </p><p>If a configuration has not been added using <strong>AddConfiguration</strong>, it can be automatically added and then activated by calling <strong>ActivateConfiguration</strong>. </p><strong>Note</strong>??If input processing is occurring, this call will fail.?<p>This method fails if a drag and drop behavior has been specified. </p><p>A drag and drop behavior object cannot be attached after successfully calling this method.</p><p>You cannot add another drag and drop behavior after an existing one has already been added.</p><p>This method is designed to allow an application to switch pre-added configurations, as a configuration cannot be changed while a manipulation is occurring. Under most circumstances it is better to update the configuration using <strong>ActivateConfiguration</strong>.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>One of the values from <strong>{{DIRECTMANIPULATION_CONFIGURATION}}</strong> that specifies the interaction configuration for the viewport.</p> </dd> <p>Removes an interaction configuration for the viewport.</p> <p>This method removes a possible configuration that was added by using <strong>AddConfiguration</strong>. This method can be called only if the configuration is not active.</p><p>An interaction configuration specifies how the manipulation engine responds to input and which gestures are supported. Any number of configurations can be added to the viewport using <strong>AddConfiguration</strong>. Configurations can be switched by the application at runtime using <strong>ActivateConfiguration</strong>. When a configuration is no longer required (and is not currently active), it can be removed using <strong>RemoveConfiguration</strong>.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>One of the values from <strong>{{DIRECTMANIPULATION_CONFIGURATION}}</strong> that specifies the interaction configuration for the viewport.</p> </dd> <p>Sets the configuration for input interaction.</p> <p>An interaction configuration specifies how the manipulation engine responds to input and which manipulations are supported. Any number of possible configurations can be added to the viewport using <strong>AddConfiguration</strong> before processing input. </p><p>Configurations can be switched by the application at runtime using <strong>ActivateConfiguration</strong>. </p><p>When a configuration is no longer required (and is not currently active), it can be removed using <strong>RemoveConfiguration</strong>. </p><p>If a configuration has not been added using <strong>AddConfiguration</strong>, it can be automatically added and then activated by calling <strong>ActivateConfiguration</strong>. </p><strong>Note</strong>??If input processing is occurring, this call will fail.?<p>This method fails if a drag and drop behavior has been specified. </p><p>A drag and drop behavior object cannot be attached after successfully calling this method.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>One or more values from <strong>{{DIRECTMANIPULATION_CONFIGURATION}}</strong> that specify the interaction configuration for the viewport.</p> </dd> <p>Sets which gestures are ignored by Direct Manipulation. </p> <p>Use this method to specify which gestures the application processes on the {{UI}} thread. If a gesture is recognized, it will be passed to the application for processing and ignored by Direct Manipulation.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Specifies the motion types supported in a viewport that can be chained to a parent viewport.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>One of the values from <strong>{{DIRECTMANIPULATION_MOTION_TYPES}}</strong> that specifies the motion types that are enabled for this viewport.</p> </dd> <p>Adds a new event handler to listen for viewport events.</p> <p>The event callback is fired from the thread that owns the specified window. Consecutive events of the same callback method may be coalesced. </p><strong>Note</strong>??If the viewport has a drag-drop behavior attached, the event handler should implement <strong>{{IDirectManipulationDragDropEventHandler}}</strong>.? <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The handle of a window owned by the thread for the event callback.</p> </dd> <dd> <p>The handler that is called when viewport status and update events occur. The specified object must implement the <strong>{{IDirectManipulationViewportEventHandler}}</strong> interface.</p> </dd> <dd> <p>The handle that represents this event handler callback.</p> </dd> <p>Removes an existing event handler from the viewport.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A value that was returned by a previous call to <strong>AddEventHandler</strong>.</p> </dd> <p>Specifies if input is visible to the {{UI}} thread.</p> <p>{{DIRECTMANIPULATION_INPUT_MODE_AUTOMATIC}} is the default mode for Direct Manipulation. </p><p> Direct Manipulation consumes all the input that drives the manipulation and the application receives {{WM_POINTERCAPTURECHANGED}} messages. </p><p>In some situations an application may want to receive input that is driving a manipulation. Set {{DIRECTMANIPULATION_INPUT_MODE_MANUAL}} in this case. The application will receive all input messages, even input used by Direct Manipulation to drive a manipulation. </p><strong>Note</strong>??The application will not receive {{WM_POINTERCAPTURECHANGED}} messages.?<p>Calling this method with <strong>{{DIRECTMANIPULATION_INPUT_MODE_MANUAL}}</strong> set is similar to calling <strong>SetViewportOptions({{DIRECTMANIPULATION_VIEWPORT_OPTIONS_INPUT}})</strong>. However, calling <strong>SetViewportOptions</strong> also overrides all other settings.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>One of the values from <strong>{{DIRECTMANIPULATION_INPUT_MODE}}</strong>.</p> </dd> <p> Specifies whether a viewport updates content manually instead of during an input event.</p> <p>{{DIRECTMANIPULATION_INPUT_MODE_AUTOMATIC}} is the default mode for Direct Manipulation. In this mode, visual updates are pushed to compositor driven by input. This is the expected mode of operation if the application is using system-provided implementation of <strong>{{IDirectManipulationCompositor}}</strong>. </p><p>If the application provides its own implementation of <strong>{{IDirectManipulationCompositor}}</strong>, it should switch viewport update mode to manual by setting {{DIRECTMANIPULATION_INPUT_MODE_MANUAL}}. When in manual mode, the compositor pulls visual updates whenever it calls <strong>Update</strong> on Direct Manipulation. </p><p>Calling this method with <strong>{{DIRECTMANIPULATION_INPUT_MODE_MANUAL}}</strong> set is similar to calling <strong>SetViewportOptions({{DIRECTMANIPULATION_VIEWPORT_OPTIONS_INPUT}})</strong>. However, calling <strong>SetViewportOptions</strong> also overrides all other settings.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>One of the values from <strong>{{DIRECTMANIPULATION_INPUT_MODE}}</strong>.</p> </dd> <p> Stops the manipulation and returns the viewport to a ready state. </p> <p>If a mandatory snap point has been configured, the content may animate to the nearest snap point.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Releases all resources that are used by the viewport and prepares it for destruction from memory. </p> <p>Once <strong>Abandon</strong> has been called, do not make subsequent function calls on the viewport. If a function is called after <strong>Abandon</strong>, <strong>{{E_INVALID_STATE}}</strong> will be returned.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Provides management of behaviors on a viewport. A behavior affects the functionality of a particular part of the Direct Manipulation workflow. </p> <p><strong>{{IDirectManipulationViewport2}}</strong> can be used in place of <strong>{{IDirectManipulationViewport}}</strong>. </p><p>Behaviors are created using <strong>{{IDirectManipulationManager2}}</strong> and an appropriate class {{ID}}.</p><p>A behavior can be attached or removed at any time and takes effect immediately (even during an active manipulation or inertia animation).</p> <p>Adds a behavior to the viewport and returns a cookie to the caller.</p> <p>A behavior takes effect immediately after <strong>AddBehavior</strong> is called. This must be considered when adding a behavior during an active manipulation or inertia phase.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. Attaching a behavior that is already attached to this viewport or another viewport results in a failure.</p> <dd> <p>A behavior created using the <strong>CreateBehavior</strong> method.</p> </dd> <dd> <p>A cookie is returned so the caller can remove this behavior later. This allows the caller to release any reference on the behavior and let Direct Manipulation maintain an appropriate lifetime, similar to event handlers. </p> </dd> <p>Removes a behavior from the viewport that matches the given cookie.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. If the behavior has already been removed or if the behavior is not attached to this viewport a failure is returned.</p> <dd> <p>A valid cookie returned from the <strong>AddBehavior</strong> call on the same viewport.</p> </dd> <p>Removes all behaviors added to the viewport.</p> <p><strong>RemoveAllBehaviors</strong> only returns an error if the removal of a behavior from the viewport was unsuccessful. In the event that a specific behavior is not removed successfully, <strong>RemoveAllBehaviors</strong> removes all remaining behaviors.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><p>Defines methods for handling status and update events for the viewport.</p><strong>Note</strong>??When implementing a Direct Manipulation object, ensure that the <strong>{{IUnknown}}</strong> implementation supports multithreading through thread-safe reference counting. For more information, see <strong>InterlockedIncrement</strong> and <strong>InterlockedDecrement</strong>.? <p>Client apps implement this handler to receive status and update events for viewports. Use <strong>AddEventHandler</strong> to set the handler for a viewport. Each viewport can have more than one handler.</p> <p>Called when the status of a viewport changes.</p> <p>If you call <strong>GetStatus</strong> from within this handler, the status returned is not guaranteed to be the same as at the time of the call. This is because of the asynchronous nature of the notification.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The viewport for which status has changed.</p> </dd> <dd> <p>The new status of the viewport.</p> </dd> <dd> <p>The previous status of the viewport.</p> </dd> <p>Called after all content in the viewport has been updated.</p> <p>If you have actions that need to be executed once for a viewport update, implement <strong>OnViewportUpdated</strong>. <strong>OnContentUpdated</strong> is called once for each content change in the viewport. This can result in multiple <strong>OnContentUpdated</strong> calls. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The viewport that has been updated.</p> </dd> <p>Called when content inside a viewport is updated. </p> <p>This method is called once for each content change in the viewport. This can result in multiple <strong>OnContentUpdated</strong> calls. For instance, when the position of the content is changed, you can use <strong>{{IDirectManipualtionContent::GetContentTransform}}</strong> to retrieve the new value.</p><p>If you have actions that need to be executed once for a viewport update, implement <strong>OnViewportUpdated</strong>.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The viewport that is updated.</p> </dd> <dd> <p>The content in the viewport that has changed.</p> </dd> <p> Retrieves the transform applied to the content.</p> <p>This transform contains the default overpan and bounce curves during manipulation and inertia.</p><p>This transform does not contain the sync transform set with <strong>SyncContentTransform</strong>.</p><p></p><dl> <dt>The relationship between the three primary transforms is defined as:</dt> <dd> <code>Output transform = Pixel rounding (Sync transform * Content transform)</code> </dd> </dl><p>When this method returns, the format of <em>matrix</em> is:</p><dl> <dd><em>matrix</em>[0]=ScaleX</dd> <dd><em>matrix</em>[1]=Unused</dd> <dd><em>matrix</em>[2]=Unused</dd> <dd><em>matrix</em>[3]=ScaleY </dd> <dd><em>matrix</em>[4]=TranslateX</dd> <dd><em>matrix</em>[5]=TranslateY</dd> </dl> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The transform matrix.</p> </dd> <dd> <p>The size of the transform matrix. This value is always 6, because a 3x2 matrix is used for all direct manipulation transforms.</p> </dd> <p>Retrieves the bounding rectangle of the content, relative to the bounding rectangle of the viewport (if defined).</p> <p>If the bounding rectangle has not been set using <strong>SetContentRect</strong>, then <strong>{{UI_E_VALUE_NOT_SET}}</strong> is returned. However, the actual content rectangle is (-{{FLT_MAX}}, -{{FLT_MAX}}, {{FLT_MAX}}, {{FLT_MAX}}).</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The bounding rectangle of the content.</p> </dd> <p>Specifies the bounding rectangle of the content, relative to its viewport. </p> <p>The default bounding rectangle is (-{{FLT_MAX}}, -{{FLT_MAX}}, {{FLT_MAX}}, {{FLT_MAX}}).</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The bounding rectangle of the content.</p> </dd> <p>Retrieves the viewport that contains the content.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the identifier of the interface to use.</p> </dd> <dd> <p>The viewport object.</p> </dd> <p> </p><p>Retrieves the tag object set on this content. </p> <p><strong>GetTag</strong> and <strong>SetTag</strong> are useful for associating an external {{COM}} object with the content without an external mapping between the two. They can also be used to pass information to callbacks generated for the content.</p><p><strong>GetTag</strong> queries the tag value for the specified interface and returns a reference to that interface.</p><p>A tag is a pairing of an integer {{ID}} (<em>id</em>) with a Component Object Model ({{COM}}) object (<em>object</em>). It can be used by an app to identify a motion. The parameters are optional, so that the method can return both parts of the tag, the identifier portion, or the tag object. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the identifier of the interface to use. The tag object typically implements this interface.</p> </dd> <dd> <p>The tag object.</p> </dd> <dd> <p>The {{ID}} portion of the tag.</p> </dd> <p>Specifies the tag object for the content. </p> <p> <strong>GetTag</strong> and <strong>SetTag</strong> are useful for associating an external {{COM}} object with the content without an external mapping between the two. They can also be used to pass information to callbacks generated for the content.</p><p>A tag is a pairing of an integer {{ID}} (<em>id</em>) with a Component Object Model ({{COM}}) object (<em>object</em>). It can be used by an app to store and retrieve an arbitrary object associated with the content.</p><p>The <em>object</em> parameter is optional, so that the method can set just the identifier portion. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The object portion of the tag.</p> </dd> <dd> <p>The {{ID}} portion of the tag.</p> </dd> <p>Gets the final transform applied to the content.</p> <p>This transform might contain the other custom curves applied during manipulation and inertia.</p><p>This transform contains both the content transform and the sync transform set with <strong>SyncContentTransform</strong>. </p><p></p><dl> <dt>The relationship between the three primary transforms is defined as:</dt> <dd> <code>Output transform = Pixel rounding (Sync transform * Content transform)</code> </dd> </dl> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The transform matrix.</p> </dd> <dd> <p>The size of the transform matrix. This value is always 6, because a 3x2 matrix is used for all direct manipulation transforms.</p> </dd> <p> Retrieves the transform applied to the content.</p> <p>This transform contains the default overpan and bounce curves during manipulation and inertia.</p><p>This transform does not contain the sync transform set with <strong>SyncContentTransform</strong>.</p><p></p><dl> <dt>The relationship between the three primary transforms is defined as:</dt> <dd> <code>Output transform = Pixel rounding (Sync transform * Content transform)</code> </dd> </dl><p>When this method returns, the format of <em>matrix</em> is:</p><dl> <dd><em>matrix</em>[0]=ScaleX</dd> <dd><em>matrix</em>[1]=Unused</dd> <dd><em>matrix</em>[2]=Unused</dd> <dd><em>matrix</em>[3]=ScaleY </dd> <dd><em>matrix</em>[4]=TranslateX</dd> <dd><em>matrix</em>[5]=TranslateY</dd> </dl> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The transform matrix.</p> </dd> <dd> <p>The size of the transform matrix. This value is always 6, because a 3x2 matrix is used for all direct manipulation transforms.</p> </dd> <p>Modifies the content transform while maintaining the output transform.</p> <p>This method will fail if the viewport state is <strong>{{DIRECTMANIPULATION_RUNNING}}</strong>, <strong>{{DIRECTMANIPULATION_INERTIA}}</strong> or <strong>{{DIRECTMANIPULATION_SUSPENDED}}</strong>.</p><p>This method is useful when the application wants to apply transforms on top of the content transforms at the end of a manipulation, while preserving the visual output transform of the content.</p><p></p><dl> <dt>The relationship between the three primary transforms is defined as:</dt> <dd> <code>Output transform = Pixel rounding (Sync transform * Content transform)</code> </dd> </dl> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The transform matrix.</p> </dd> <dd> <p>The size of the transform matrix. This value is always 6, because a 3x2 matrix is used for all direct manipulation transforms.</p> </dd> <p>Sets the horizontal alignment of the primary content relative to the viewport.</p> <p>If you have activated a configuration consisting only of zoom or zoom inertia, specify {{DIRECTMANIPULATION_HORIZONTALALIGNMENT_UNLOCKCENTER}} to respect the zoom center point.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>One or more values from <strong>{{DIRECTMANIPULATION_HORIZONTALALIGNMENT}}</strong>. The default is <strong>{{DIRECTMANIPULATION_HORIZONTALALIGNMENT_NONE}}</strong>.</p> <strong>Note</strong>??You cannot combine the following options: {{DIRECTMANIPULATION_HORIZONTALALIGNMENT_LEFT}}, {{DIRECTMANIPULATION}}-{{HORIZONTALALIGNMENT_CENTER}}, {{DIRECTMANIPULATION_HORIZONTALALIGNMENT_RIGHT}}. {{DIRECTMANIPULATION_HORIZONTALALIGNMENT_UNLOCKCENTER}} can be combined with any option but cannot be configured by itself. ? </dd> <p> Specifies snap points for the inertia end position at uniform intervals.</p> <p>Snap point locations are in content coordinate units. </p><p>Specify snap points through <strong>SetSnapPoints</strong> or <strong>SetSnapInterval</strong>. </p><p>If snap points are invalid (for example, outside of the content boundaries), they are ignored and the content is always within the content boundaries. </p><p>Snap points are not at boundaries by default. If you wish for content to stop at a boundary, a snap point must be set at the boundary.</p><p> Snap points set by <strong>SetSnapInterval</strong> can be cleared by calling <strong>SetSnapInterval</strong> with an interval of 0.0f.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>One of the <strong>{{DIRECTMANIPULATION_MOTION_TYPES}}</strong> enumeration values.</p> </dd> <dd> <p>The interval between each snap point.</p> </dd> <dd> <p>The offset from the coordinate specified in <strong>SetSnapCoordinate</strong>.</p> </dd> <p>Specifies the snap points for the inertia rest position.</p> <p>If snap points are invalid (for example, outside of the content boundaries), they are ignored and the content is always within the content boundaries. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. If there is no change in the snap points, this method can return <strong>{{S_FALSE}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code. If invalid snap points are specified, existing snap points might be affected.</p> <dd> <p>One or more of the <strong>{{DIRECTMANIPULATION_MOTION_TYPES}}</strong> enumeration values. Only <strong>{{DIRECTMANIPULATION_MOTION_TRANSLATE_X}}</strong>, <strong>{{DIRECTMANIPULATION_MOTION_TRANSLATE_Y}}</strong>, or <strong>{{DIRECTMANIPULATION_MOTION_ZOOM}}</strong> are allowed.</p> </dd> <dd> <p>An array of snap points within the boundaries of the content to snap to. Should be specified in increasing order relative to the origin set in <strong>SetSnapCoordinate</strong>.</p> </dd> <dd> <p> The size of the array of snap points. Should be greater than 0.</p> </dd> <p>Specifies the type of snap point.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>One or more of the <strong>{{DIRECTMANIPULATION_MOTION_TYPES}}</strong> enumeration values.</p> </dd> <dd> <p>One of the <strong>{{DIRECTMANIPULATION_SNAPPOINT_TYPE}}</strong> enumeration values.</p> <p>If set to <strong>{{DIRECTMANIPULATION_SNAPPOINT_TYPE_NONE}}</strong>, snap points specified through <strong>SetSnapPoints</strong> or <strong>SetSnapInterval</strong> are cleared.</p> </dd> <p> Specifies the coordinate system for snap points or snap intervals. </p> <p>The origin is relative to the content boundaries. If no boundary has been set (<strong>SetContentRect</strong> is never called) the default boundaries are (-{{FLT_MAX}}, {{FLT_MAX}}). </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>One of the values from <strong>{{DIRECTMANIPULATION_MOTION_TYPES}}</strong>. </p> </dd> <dd> <p>One of the values from <strong>{{DIRECTMANIPULATION_SNAPPOINT_COORDINATE}}</strong>. </p> <p>If <em>motion</em> is set to translation (<strong>{{DIRECTMANIPULATION_MOTION_TRANSLATEX}}</strong> or <strong>{{DIRECTMANIPULATION_MOTION_TRANSLATEY}}</strong>), all values of <strong>{{DIRECTMANIPULATION_SNAPPOINT_COORDINATE}}</strong> are valid. </p> <p>If <em>motion</em> is set to <strong>{{DIRECTMANIPULATION_MOTION_ZOOM}}</strong>, only <strong>{{DIRECTMANIPULATION_COORDINATE_ORIGIN}}</strong> of <strong>{{DIRECTMANIPULATION_SNAPPOINT_COORDINATE}}</strong> is valid (<em>origin</em> must be set to 0.0f).</p> </dd> <dd> <p>The initial, or starting, snap point. All snap points are relative to this one. Only used when <strong>{{DIRECTMANIPULATION_COORDINATE_ORIGIN}}</strong> is set. </p> <p>If <em>motion</em> is set to <strong>{{DIRECTMANIPULATION_MOTION_ZOOM}}</strong>, then <em>origin</em> must be set to 0.0f.</p> </dd> <p>Specifies the minimum and maximum boundaries for zoom.</p> <p>If the content is outside the new boundaries, and the viewport is {{ENABLED}} or {{READY}}, then the content is reset to be within the new boundaries. If inertia configuration is enabled, the reset operation uses an inertia animation. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The minimum zoom level allowed. Must be greater than or equal to 0.1f, which corresponds to 100% zoom.</p> </dd> <dd> <p>The maximum zoom allowed. Must be greater than <em>zoomMinimum</em> and less than {{FLT_MAX}}.</p> </dd> <p>Sets the horizontal alignment of the primary content relative to the viewport.</p> <p>If you have activated a configuration consisting only of zoom or zoom inertia, specify {{DIRECTMANIPULATION_HORIZONTALALIGNMENT_UNLOCKCENTER}} to respect the zoom center point.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>One or more values from <strong>{{DIRECTMANIPULATION_HORIZONTALALIGNMENT}}</strong>. The default is <strong>{{DIRECTMANIPULATION_HORIZONTALALIGNMENT_NONE}}</strong>.</p> <strong>Note</strong>??You cannot combine the following options: {{DIRECTMANIPULATION_HORIZONTALALIGNMENT_LEFT}}, {{DIRECTMANIPULATION}}-{{HORIZONTALALIGNMENT_CENTER}}, {{DIRECTMANIPULATION_HORIZONTALALIGNMENT_RIGHT}}. {{DIRECTMANIPULATION_HORIZONTALALIGNMENT_UNLOCKCENTER}} can be combined with any option but cannot be configured by itself. ? </dd> <p>Specifies the vertical alignment of the primary content in the viewport.</p> <p>If you have activated a configuration consisting only of zoom or zoom inertia, specify <strong>{{DIRECTMANIPULATION_VERTICALALIGNMENT_UNLOCKCENTER}}</strong> to respect the zoom center point.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>One or more values from <strong>{{DIRECTMANIPULATION_VERTICALALIGNMENT}}</strong>.</p> <strong>Note</strong>??You cannot combine <strong>{{DIRECTMANIPULATION_VERTICALALIGNMENT_TOP}}</strong>, <strong>{{DIRECTMANIPULATION_VERTICALALIGNMENT_CENTER}}</strong>, or <strong>{{DIRECTMANIPULATION_VERTICALALIGNMENT_BOTTOM}}</strong>. <strong>{{DIRECTMANIPULATION_VERTICALALIGNMENT_UNLOCKCENTER}}</strong> can be combined with any option but cannot be configured by itself. ? </dd> <p>Gets the final transform, including inertia, of the primary content.</p> <strong>Warning</strong>??Calling this method can cause a race condition if inertia has ended or been interrupted. This can also occur during the <strong>OnViewportStatusChanged</strong> callback.? <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The transformed matrix that represents the inertia ending position.</p> </dd> <dd> <p>The size of the matrix. </p> <p> This value is always 6, because a 3x2 matrix is used for all direct manipulation transforms.</p> </dd> <p> Retrieves the center point of the manipulation in content coordinates. If there is no manipulation in progress, retrieves the center point of the viewport.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The center on the horizontal axis.</p> </dd> <dd> <p>The center on the vertical axis.</p> </dd> <p>Defines methods to handle drag-drop behavior events.</p><strong>Note</strong>??When implementing this interface, ensure that the <strong>{{IUnknown}}</strong> implementation supports multithreading through thread-safe reference counting. For more information, see <strong>InterlockedIncrement</strong> and <strong>InterlockedDecrement</strong>.? <p>Called when a status change happens in the viewport that the drag-and-drop behavior is attached to. </p> <p>If a class is implementing <strong>{{IDirectManipulationViewportEventHandler}}</strong> it should also implement <strong>{{IDirectManipulationDragDropEventHandler}}</strong> if that viewport will use drag and drop. Direct Manipulation will query the <strong>{{IDirectManipulationViewportEventHandler}}</strong> instances to verify that they also implement <strong>{{IDirectManipulationDragDropEventHandler}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The updated viewport.</p> </dd> <dd> <p>The current state of the drag-drop interaction from <strong>{{DIRECTMANIPULATION_DRAG_DROP_STATUS}}</strong>. </p> </dd> <dd> <p>The previous state of the drag-drop interaction from <strong>{{DIRECTMANIPULATION_DRAG_DROP_STATUS}}</strong>. </p> </dd> <p>Sets the configuration of the drag-drop interaction for the viewport this behavior is attached to. </p> <p>The configuration of the behavior can be set before or after it has been added to a viewport. If a configuration change is made while an interaction is occurring, the new configuration takes effect on the next interaction. ? </p><p> <strong>{{IDirectManipulationViewport::ActivateConfiguration}}</strong> should not be called prior to calling <strong>{{IDirectManipulationDragDropBehavior::SetConfiguration}}</strong>. This will result in unexpected behavior.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Combination of values from <strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION}}</strong>.</p> <p>For the configuration to be valid, <em>configuration</em> must contain exactly one of the following three values: </p><ul> <li><strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_SELECT_ONLY}}</strong></li> <li><strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_SELECT_DRAG}}</strong></li> <li><strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_HOLD_DRAG}}</strong></li> </ul> <p>If <strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_SELECT_ONLY}}</strong> or <strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_SELECT_DRAG}}</strong> is specified, one of <strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_VERTICAL}}</strong> or <strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_HORIZONTAL}}</strong> is required. </p> <p>If <strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_HOLD_DRAG}}</strong> is specified, both <strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_VERTICAL}}</strong> and <strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_HORIZONTAL}}</strong> are required. </p> </dd> <p>Sets the configuration of the drag-drop interaction for the viewport this behavior is attached to. </p> <p>The configuration of the behavior can be set before or after it has been added to a viewport. If a configuration change is made while an interaction is occurring, the new configuration takes effect on the next interaction. ? </p><p> <strong>{{IDirectManipulationViewport::ActivateConfiguration}}</strong> should not be called prior to calling <strong>{{IDirectManipulationDragDropBehavior::SetConfiguration}}</strong>. This will result in unexpected behavior.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Combination of values from <strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION}}</strong>.</p> <p>For the configuration to be valid, <em>configuration</em> must contain exactly one of the following three values: </p><ul> <li><strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_SELECT_ONLY}}</strong></li> <li><strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_SELECT_DRAG}}</strong></li> <li><strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_HOLD_DRAG}}</strong></li> </ul> <p>If <strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_SELECT_ONLY}}</strong> or <strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_SELECT_DRAG}}</strong> is specified, one of <strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_VERTICAL}}</strong> or <strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_HORIZONTAL}}</strong> is required. </p> <p>If <strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_HOLD_DRAG}}</strong> is specified, both <strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_VERTICAL}}</strong> and <strong>{{DIRECTMANIPULATION_DRAG_DROP_CONFIGURATION_HORIZONTAL}}</strong> are required. </p> </dd> <p>Gets the status of the drag-drop interaction for the viewport this behavior is attached to. </p> <p>This method returns the drag-drop status at the time of the call and not at the time when the return value is read.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>One of the values from <strong>{{DIRECTMANIPULATION_DRAG_DROP_STATUS}}</strong>.</p> </dd> <p>Defines methods to handle interactions when they are detected.</p><strong>Note</strong>??When implementing this interface, ensure that the <strong>{{IUnknown}}</strong> implementation supports multithreading through thread-safe reference counting. For more information, see <strong>InterlockedIncrement</strong> and <strong>InterlockedDecrement</strong>.? <p>Called when an interaction is detected.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The viewport on which the interaction was detected.</p> </dd> <dd> <p>One of the values from <strong>{{DIRECTMANIPULATION_INTERACTION_TYPE}}</strong>.</p> </dd> <p>Represents a time-keeping object that measures the latency of the composition infrastructure used by the application and provides this data to Direct Manipulation. </p> <p>Retrieves the composition timing information from the compositor.</p> <p>The system implementation of <strong>{{IDirectManipulationFrameInfoProvider}}</strong> uses DirectComposition. <strong>GetFrameStatistics</strong> is used to calculate the parameter values for <strong>GetNextFrameInfo</strong>.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The current time, in milliseconds.</p> </dd> <dd> <p>The time, in milliseconds, when the compositor begins constructing the next frame.</p> </dd> <dd> <p>The time, in milliseconds, when the compositor finishes composing and drawing the next frame on the screen.</p> </dd> <p> </p><p>Represents a compositor object that associates manipulated content with a drawing surface, such as <strong>canvas</strong> (Windows Store app using JavaScript) or <strong>Canvas</strong> (Windows Store app using C++, C#, or Visual Basic).</p> <p>The content of a Direct Manipulation viewport must be manually updated during an input event for custom implementations of <strong>{{IDirectManipulationCompositor}}</strong>. Call <strong>Update</strong> to redraw the content within the viewport. </p><p>You specify manual mode on a viewport by calling either of these functions:</p><ul> <li> <strong>SetViewportOptions</strong>, with <strong>{{DIRECTMANIPULATION_VIEWPORT_OPTIONS_MANUALUPDATE}}</strong> specified.</li> <li> <strong>SetUpdateMode</strong>, with <strong>{{DIRECTMANIPULATION_INPUT_MODE_MANUAL}}</strong> specified.</li> </ul> <p>Associates content (owned by the caller) with the compositor, assigns a composition device to the content, and specifies the position of the content in the composition tree relative to other composition visuals. </p> <p>This method inserts a small visual tree (owned by the Direct Manipulation device) between the <em>parentVisual</em> and the <em>childVisual</em>. Transforms can then be applied to the inserted content. </p><p>All content, regardless of type, must be added to the compositor. This can be primary content, obtained from the viewport by calling <strong>GetPrimaryContent</strong>, or secondary content, such as a panning indicator, created by calling <strong>CreateContent</strong>. </p><p>If the application uses a system-provided <strong>{{IDirectManipulationCompositor}}</strong>:</p><ul> <li><em>device</em> must be an <strong>{{IDCompositionDevice}}</strong> object, and parent and child visuals must be <strong>{{IDCompositionVisual}}</strong> objects.</li> <li><em>device</em>, <em>parentVisual</em>, and <em>childVisual</em> cannot be {{NULL}}. </li> <li><em>device</em>, <em>parentVisual</em>, and <em>childVisual</em> objects are created and owned by the application. </li> <li>When content is added to the composition tree using this method, the new composition visuals are inserted between <em>parentVisual</em> and <em>childVisual</em>. The new visuals should not be destroyed until they are disassociated from the compositor with <strong>RemoveContent</strong>.</li> </ul><p>If the application uses a custom implementation of <strong>{{IDirectManipulationCompositor}}</strong>:</p><ul> <li><em>device</em>, <em>parentVisual</em>, and <em>childVisual</em> must be a valid type for the compositor. They do not have to be <strong>{{IDCompositionDevice}}</strong> or <strong>{{IDCompositionVisual}}</strong> objects.</li> <li><em>device</em>, <em>parentVisual</em>, and <em>childVisual</em> can be {{NULL}}, depending on the compositor. </li> </ul> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The content to add to the composition tree.</p> <p><em>content</em> is placed between <em>parentVisual</em> and <em>childVisual</em> in the composition tree. </p> </dd> <dd> <p>The device used to compose the content. </p> <strong>Note</strong>??<em>device</em> is created by the application. ? </dd> <dd> <p>The parent visuals in the composition tree of the content being added.</p> <p><em>parentVisual</em> must also be a parent of <em>childVisual</em> in the composition tree.</p> </dd> <dd> <p>The child visuals in the composition tree of the content being added.</p> <p><em>parentVisual</em> must also be a parent of <em>childVisual</em> in the composition tree.</p> </dd> <p>Removes content from the compositor.</p> <p>This method removes content added with <strong>AddContent</strong> and restores the original relationships between parent visuals and child visuals in the composition tree. In other words, <strong>RemoveContent</strong> undoes <strong>AddContent</strong>.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The content to remove from the composition tree.</p> </dd> <p> </p><p> Sets the update manager used to send compositor updates to Direct Manipulation. </p> <p>Retrieve <em>updateManager</em> by calling <strong>GetUpdateManager</strong>.</p><p>Call this method during Direct Manipulation initialization to connect the compositor to the <em>update manager</em>.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Commits all pending updates in the compositor to the system for rendering.</p> <p>This method enables Direct Manipulation to flush any pending changes to its visuals before a system event, such as a process suspension.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Associates content (owned by the component host) with the compositor, assigns a composition device to the content, and specifies the position of the content in the composition tree relative to other composition visuals. Represents a compositor object that associates manipulated content with drawing surfaces across multiple processes.</p> <p>This method inserts a small visual tree (owned by the Direct Manipulation device) between the <em>parentVisual</em> and the <em>childVisual</em>. Transforms can then be applied to the inserted content. </p><p>All content, regardless of type, must be added to the compositor. </p><p>If the application uses a system-provided <strong>{{IDirectManipulationCompositor}}</strong>:</p><ul> <li><em>device</em> must be an <strong>{{IDCompositionDevice}}</strong> object, and parent and child visuals must be <strong>{{IDCompositionVisual}}</strong> objects.</li> <li><em>device</em>, <em>parentVisual</em>, and <em>childVisual</em> cannot be {{NULL}}. </li> <li><em>device</em>, <em>parentVisual</em>, and <em>childVisual</em> objects are created and owned by the application. </li> <li>When content is added to the composition tree using this method, the new composition visuals are inserted between <em>parentVisual</em> and <em>childVisual</em>. The new visuals should not be destroyed until they are disassociated from the compositor with <strong>RemoveContent</strong>.</li> </ul><p>If the application uses a custom implementation of <strong>{{IDirectManipulationCompositor}}</strong>:</p><ul> <li><em>device</em>, <em>parentVisual</em>, and <em>childVisual</em> must be a valid type for the compositor. They do not have to be <strong>{{IDCompositionDevice}}</strong> or <strong>{{IDCompositionVisual}}</strong> objects.</li> <li><em>device</em>, <em>parentVisual</em>, and <em>childVisual</em> can be {{NULL}}, depending on the compositor. </li> </ul><p>The cross-process reference events (<strong>{{WM_POINTERROUTEDAWAY}}</strong>, <strong>{{WM_POINTERROUTEDRELEASED}}</strong>, and <strong>{{WM_POINTERROUTEDTO}}</strong>) should be handled appropriately. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The content to add to the composition tree.</p> <p><em>content</em> is placed between <em>parentVisual</em> and <em>childVisual</em> in the composition tree. </p> <p>Only primary content, created at the same time as the viewport, is valid.</p> </dd> <dd> <p>The device used to compose the content. </p> <strong>Note</strong>??<em>device</em> is created by the application. ? </dd> <dd> <p>The parent visuals in the composition tree of the content being added.</p> <p><em>parentVisual</em> must also be a parent of <em>childVisual</em> in the composition tree.</p> </dd> <dd> <p>The child visuals in the composition tree of the content being added.</p> <p><em>parentVisual</em> must also be a parent of <em>childVisual</em> in the composition tree.</p> </dd> <p>Associates content (owned by the component host) with the compositor, assigns a composition device to the content, and specifies the position of the content in the composition tree relative to other composition visuals. Represents a compositor object that associates manipulated content with drawing surfaces across multiple processes.</p> <p>This method inserts a small visual tree (owned by the Direct Manipulation device) between the <em>parentVisual</em> and the <em>childVisual</em>. Transforms can then be applied to the inserted content. </p><p>All content, regardless of type, must be added to the compositor. </p><p>If the application uses a system-provided <strong>{{IDirectManipulationCompositor}}</strong>:</p><ul> <li><em>device</em> must be an <strong>{{IDCompositionDevice}}</strong> object, and parent and child visuals must be <strong>{{IDCompositionVisual}}</strong> objects.</li> <li><em>device</em>, <em>parentVisual</em>, and <em>childVisual</em> cannot be {{NULL}}. </li> <li><em>device</em>, <em>parentVisual</em>, and <em>childVisual</em> objects are created and owned by the application. </li> <li>When content is added to the composition tree using this method, the new composition visuals are inserted between <em>parentVisual</em> and <em>childVisual</em>. The new visuals should not be destroyed until they are disassociated from the compositor with <strong>RemoveContent</strong>.</li> </ul><p>If the application uses a custom implementation of <strong>{{IDirectManipulationCompositor}}</strong>:</p><ul> <li><em>device</em>, <em>parentVisual</em>, and <em>childVisual</em> must be a valid type for the compositor. They do not have to be <strong>{{IDCompositionDevice}}</strong> or <strong>{{IDCompositionVisual}}</strong> objects.</li> <li><em>device</em>, <em>parentVisual</em>, and <em>childVisual</em> can be {{NULL}}, depending on the compositor. </li> </ul><p>The cross-process reference events (<strong>{{WM_POINTERROUTEDAWAY}}</strong>, <strong>{{WM_POINTERROUTEDRELEASED}}</strong>, and <strong>{{WM_POINTERROUTEDTO}}</strong>) should be handled appropriately. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The content to add to the composition tree.</p> <p><em>content</em> is placed between <em>parentVisual</em> and <em>childVisual</em> in the composition tree. </p> <p>Only primary content, created at the same time as the viewport, is valid.</p> </dd> <dd> <p>The device used to compose the content. </p> <strong>Note</strong>??<em>device</em> is created by the application. ? </dd> <dd> <p>The parent visuals in the composition tree of the content being added.</p> <p><em>parentVisual</em> must also be a parent of <em>childVisual</em> in the composition tree.</p> </dd> <dd> <p>The child visuals in the composition tree of the content being added.</p> <p><em>parentVisual</em> must also be a parent of <em>childVisual</em> in the composition tree.</p> </dd> <p> </p><p>Defines methods for handling manipulation update events.</p><strong>Note</strong>??When implementing a Direct Manipulation object, ensure that the <strong>{{IUnknown}}</strong> implementation supports multithreading through thread-safe reference counting. For more information, see <strong>InterlockedIncrement</strong> and <strong>InterlockedDecrement</strong>.? <p>Notifies the compositor when to update inertia animation.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Manages how compositor updates are sent to Direct Manipulation.</p><p>This interface enables the compositor to trigger an update on Direct Manipulation whenever there is a compositor update. The application should not call the methods of this interface directly. </p> <p>Registers a callback that is triggered by a handle.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The event handle that triggers the callback.</p> </dd> <dd> <p>The event handler to call when the event is fired.</p> </dd> <dd> <p>The unique {{ID}} of the event callback instance.</p> </dd> <p>Deregisters a callback.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The unique {{ID}} of the event callback instance.</p> </dd> <p>Updates Direct Manipulation at the current time.</p> <p>If the application provides its own implementation of <strong>{{IDirectManipulationCompositor}}</strong>, this implementation should call <strong>Update</strong> whenever there is a compositor update. Frame timing information can be provided to Direct Manipulation through the <strong>{{IDirectManipulationFrameInfoProvider}}</strong> interface.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Represents the auto-scroll animation behavior of content as it approaches the boundary of a given axis or axes.</p> <p>Performs the auto-scroll animation for the viewport this behavior is attached to. </p> <p><strong>SetConfiguration</strong> takes effect immediately. If the content is not in inertia, and <strong>{{DIRECTMANIPULATION_AUTOSCROLL_CONFIGURATION_STOP}}</strong> is specified for <em>scrollMotion</em>, then this method returns {{S_FALSE}}. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A combination of <strong>{{DIRECTMANIPULATION_MOTION_TRANSLATEX}}</strong> and <strong>{{DIRECTMANIPULATION_MOTION_TRANSLATEY}}</strong> from <strong>{{DIRECTMANIPULATION_MOTION_TYPES}}</strong>. <strong>{{DIRECTMANIPULATION_MOTION_NONE}}</strong> cannot be specified.</p> </dd> <dd> <p>One of the values from <strong>{{DIRECTMANIPULATION_AUTOSCROLL_CONFIGURATION}}</strong>. </p> </dd> <p>Represents a service for managing associations between a contact and a viewport.</p><p> <strong>SetContact</strong> is called when a <strong>{{WM_POINTERDOWN}}</strong> message is received. Upon receiving a <strong>{{WM_POINTERDOWN}}</strong>, the application can use the coordinates of the input to hit-test and determine the viewports to which the contact is associated. </p> <p>Specifies the amount of time to defer the execution of a call to <strong>SetContact</strong> for this <em>referenceId</em>.</p><p><strong>DeferContact</strong> must be called before <strong>SetContact</strong>.</p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Cancel all scheduled calls to <strong>SetContact</strong> for this <em>referenceId</em>. </p> <p>This function fails if the timeout specified in <strong>DeferContact</strong> has already been reached. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Cancel the deferral set in <strong>DeferContact</strong> and process the scheduled <strong>SetContact</strong> call for this <em>referenceId</em>. </p> <p>If the method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Flags indicating the memory location of a resource.</p> <p>This enum is used by <strong>QueryResourceResidency</strong>.</p> <dd> <p>The resource is located in video memory.</p> </dd> <dd> <p>At least some of the resource is located in {{CPU}} memory.</p> </dd> <dd> <p>At least some of the resource has been paged out to the hard drive.</p> </dd> <p> Options for handling pixels in a display surface after calling <strong>{{IDXGISwapChain1::Present1}}</strong>. </p> <p> This enumeration is used by the <strong>{{DXGI_SWAP_CHAIN_DESC}}</strong> and <strong>{{DXGI_SWAP_CHAIN_DESC1}}</strong>structures. </p><p> To use multisampling with <strong>{{DXGI_SWAP_EFFECT_SEQUENTIAL}}</strong> or <strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong>, you must perform the multisampling in a separate render target. For example, create a multisampled texture by calling <strong>{{ID3D11Device::CreateTexture2D}}</strong> with a filled <strong>{{D3D11_TEXTURE2D_DESC}}</strong> structure (<strong>BindFlags</strong> member set to <strong>{{D3D11_BIND_RENDER_TARGET}}</strong> and <strong>SampleDesc</strong> member with multisampling parameters). Next call <strong>{{ID3D11Device::CreateRenderTargetView}}</strong> to create a render-target view for the texture, and render your scene into the texture. Finally call <strong>{{ID3D11DeviceContext::ResolveSubresource}}</strong> to resolve the multisampled texture into your non-multisampled swap chain. </p><p> The primary difference between presentation models is how back-buffer contents get to the Desktop Window Manager ({{DWM}}) for composition. In the bitblt model, which is used with the <strong>{{DXGI_SWAP_EFFECT_DISCARD}}</strong> and <strong>{{DXGI_SWAP_EFFECT_SEQUENTIAL}}</strong> values, contents of the back buffer get copied into the redirection surface on each call to <strong>{{IDXGISwapChain1::Present1}}</strong>. In the flip model, which is used with the <strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong> value, all back buffers are shared with the {{DWM}}. Therefore, the {{DWM}} can compose straight from those back buffers without any additional copy operations. In general, the flip model is the more efficient model. The flip model also provides more features, such as enhanced present statistics. </p><p> When you call <strong>{{IDXGISwapChain1::Present1}}</strong> on a flip model swap chain (<strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong>) with 0 specified in the <em>SyncInterval</em> parameter, <strong>{{IDXGISwapChain1::Present1}}</strong>'s behavior is the same as the behavior of Direct3D 9Ex's <strong>{{IDirect3DDevice9Ex::PresentEx}}</strong> with <strong>{{D3DSWAPEFFECT_FLIPEX}}</strong> and {{D3DPRESENT_FORCEIMMEDIATE}}. That is, the runtime not only presents the next frame instead of any previously queued frames, it also terminates any remaining time left on the previously queued frames. </p><p> Regardless of whether the flip model is more efficient, an application still might choose the bitblt model because the bitblt model is the only way to mix {{GDI}} and DirectX presentation. In the flip model, the application must create the swap chain with <strong>{{DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE}}</strong>, and then must use <strong>GetDC</strong> on the back buffer explicitly. After the first successful call to <strong>{{IDXGISwapChain1::Present1}}</strong> on a flip-model swap chain, {{GDI}} no longer works with the <strong>{{HWND}}</strong> that is associated with that swap chain, even after the destruction of the swap chain. This restriction even extends to methods like <strong>ScrollWindowEx</strong>. </p><p> For more info about the flip-model swap chain and optimizing presentation, see Enhancing presentation with the flip model, dirty rectangles, and scrolled areas. </p> <p>Options for swap-chain behavior.</p> <p>This enumeration is used by the <strong>{{DXGI_SWAP_CHAIN_DESC}}</strong> structure and the <strong>{{IDXGISwapChain::ResizeTarget}}</strong> method.</p><p>This enumeration is also used by the <strong>{{DXGI_SWAP_CHAIN_DESC1}}</strong> structure.</p><p>You don't need to set <strong>{{DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY}}</strong> for swap chains that you create in full-screen mode with the <strong>{{IDXGIFactory::CreateSwapChain}}</strong> method because those swap chains already behave as if <strong>{{DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY}}</strong> is set. That is, presented content is not accessible by remote access or through the <strong>desktop duplication {{APIs}}</strong>.</p><p>Swap chains that you create with the <strong>{{IDXGIFactory2::CreateSwapChainForHwnd}}</strong>, <strong>{{IDXGIFactory2::CreateSwapChainForCoreWindow}}</strong>, and <strong>{{IDXGIFactory2::CreateSwapChainForComposition}}</strong> methods are not protected if <strong>{{DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY}}</strong> is not set and are protected if <strong>{{DXGI_SWAP_CHAIN_FLAG_DISPLAY_ONLY}}</strong> is set. When swap chains are protected, screen scraping is prevented and, in full-screen mode, presented content is not accessible through the <strong>desktop duplication {{APIs}}</strong>.</p><p>When you call <strong>{{IDXGISwapChain::ResizeBuffers}}</strong> to change the swap chain's back buffer, you can reset or change all <strong>{{DXGI_SWAP_CHAIN_FLAG}}</strong> flags.</p> <dd> <p>Set this flag to turn off automatic image rotation; that is, do not perform a rotation when transferring the contents of the front buffer to the monitor. Use this flag to avoid a bandwidth penalty when an application expects to handle rotation. This option is valid only during full-screen mode. </p> </dd> <dd> <p>Set this flag to enable an application to switch modes by calling <strong>{{IDXGISwapChain::ResizeTarget}}</strong>. When switching from windowed to full-screen mode, the display mode (or monitor resolution) will be changed to match the dimensions of the application window.</p> </dd> <dd> <p>Set this flag to enable an application to render using {{GDI}} on a swap chain or a surface. This will allow the application to call <strong>{{IDXGISurface1::GetDC}}</strong> on the 0th back buffer or a surface.</p> </dd> <dd> <p>Set this flag to indicate that the swap chain might contain protected content; therefore, the operating system supports the creation of the swap chain only when driver and hardware protection is used. If the driver and hardware do not support content protection, the call to create a resource for the swap chain fails.</p> <p><strong>Direct3D 11:??</strong>This enumeration value is supported starting with Windows?8.</p> </dd> <dd> <p>Set this flag to indicate that shared resources that are created within the swap chain must be protected by using the driver?s mechanism for restricting access to shared surfaces.</p> <p><strong>Direct3D 11:??</strong>This enumeration value is supported starting with Windows?8.</p> </dd> <dd> <p>Set this flag to restrict presented content to the local displays. Therefore, the presented content is not accessible via remote accessing or through the <strong>desktop duplication {{APIs}}</strong>. </p> <p>This flag supports the window content protection features of Windows. Applications can use this flag to protect their own onscreen window content from being captured or copied through a specific set of public operating system features and {{APIs}}.</p> <p>If you use this flag with windowed (<strong>{{HWND}}</strong> or <strong>{{IWindow}}</strong>) swap chains where another process created the <strong>{{HWND}}</strong>, the owner of the <strong>{{HWND}}</strong> must use the <strong>SetWindowDisplayAffinity</strong> function appropriately in order to allow calls to <strong>{{IDXGISwapChain::Present}}</strong> or <strong>{{IDXGISwapChain1::Present1}}</strong> to succeed. </p> <p><strong>Direct3D 11:??</strong>This enumeration value is supported starting with Windows?8.</p> </dd> <dd> <p>Set this flag to create a waitable object you can use to ensure rendering does not begin while a frame is still being presented. When this flag is used, the swapchain's latency must be set with the <strong>{{IDXGISwapChain2::SetMaximumFrameLatency}}</strong> {{API}} instead of <strong>{{IDXGIDevice1::SetMaximumFrameLatency}}</strong>.</p> <p><strong>Note</strong>??This enumeration value is supported starting with Windows?8.1.</p> </dd> <dd> <p>Set this flag to create a swap chain in the foreground layer for multi-plane rendering. This flag can only be used with <strong>CoreWindow</strong> swap chains, which are created with <strong>CreateSwapChainForCoreWindow</strong>. Apps should not create foreground swap chains if <strong>{{IDXGIOutput2::SupportsOverlays}}</strong> indicates that hardware support for overlays is not available.</p> <p>Note that <strong>{{IDXGISwapChain::ResizeBuffers}}</strong> cannot be used to add or remove this flag.</p> <p><strong>Note</strong>??This enumeration value is supported starting with Windows?8.1.</p> </dd> <dd> <p>Set this flag to create a swap chain for full-screen video. </p> <p><strong>Note</strong>??This enumeration value is supported starting with Windows?8.1.</p> </dd> <dd> <p>Set this flag to create a swap chain for {{YUV}} video.</p> <p><strong>Note</strong>??This enumeration value is supported starting with Windows?8.1.</p> </dd> <dd> <p>Indicates that the swap chain should be created such that all underlying resources can be protected by the hardware. Resource creation will fail if hardware content protection is not supported.</p> <p>This flag has the following restrictions:</p> <ul> <li>This flag can only be used with swap effect <strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong>.</li> </ul> <strong>Note</strong>??Creating a swap chain using this flag does not automatically guarantee that hardware protection will be enabled for the underlying allocation. Some implementations require that the {{DRM}} components are first initialized prior to any guarantees of protection. ? <p><strong>Note</strong>??This enumeration value is supported starting with Windows?10.</p> </dd> <dd> <p>Tearing support is a requirement to enable displays that support variable refresh rates to function properly when the application presents a swap chain tied to a full screen borderless window. Win32 apps can already achieve tearing in fullscreen exclusive mode by calling <strong>SetFullscreenState</strong>({{TRUE}}), but the recommended approach for Win32 developers is to use this tearing flag instead.</p> <p>To check for hardware support of this feature, refer to <strong>{{IDXGIFactory5::CheckFeatureSupport}}</strong>. For usage information refer to <strong>{{IDXGISwapChain::Present}}</strong> and the <strong>{{DXGI_PRESENT}}</strong> flags.</p> </dd> <p>Identifies the type of {{DXGI}} adapter.</p> <p>The <strong>{{DXGI_ADAPTER_FLAG}}</strong> enumerated type is used by the <strong>Flags</strong> member of the <strong>{{DXGI_ADAPTER_DESC1}}</strong> or <strong>{{DXGI_ADAPTER_DESC2}}</strong> structure to identify the type of {{DXGI}} adapter.</p> <dd> <p>Specifies no flags.</p> </dd> <dd> <p>Value always set to 0. This flag is reserved.</p> </dd> <dd> <p>Specifies a software adapter. For more info about this flag, see new info in Windows?8 about enumerating adapters.</p> <p><strong>Direct3D 11:??</strong>This enumeration value is supported starting with Windows?8.</p> </dd> <dd> <p>Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used.</p> </dd> <p>Describes timing and presentation statistics for a frame.</p> <p>You initialize the <strong>{{DXGI_FRAME_STATISTICS}}</strong> structure with the <strong>{{IDXGIOutput::GetFrameStatistics}}</strong> or <strong>{{IDXGISwapChain::GetFrameStatistics}}</strong> method.</p><p>You can only use <strong>{{IDXGISwapChain::GetFrameStatistics}}</strong> for swap chains that either use the flip presentation model or draw in full-screen mode. You set the <strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong> value in the <strong>SwapEffect</strong> member of the <strong>{{DXGI_SWAP_CHAIN_DESC1}}</strong> structure to specify that the swap chain uses the flip presentation model.</p><p>The values in the <strong>PresentCount</strong> and <strong>PresentRefreshCount</strong> members indicate information about when a frame was presented on the display screen. You can use these values to determine whether a glitch occurred. The values in the <strong>SyncRefreshCount</strong> and <strong>SyncQPCTime</strong> members indicate timing information that you can use for audio and video synchronization or very precise animation. If the swap chain draws in full-screen mode, these values are based on when the computer booted. If the swap chain draws in windowed mode, these values are based on when the swap chain is created.</p> <dd> <p>A value that represents the running total count of times that an image was presented to the monitor since the computer booted.</p> <strong>Note</strong>??The number of times that an image was presented to the monitor is not necessarily the same as the number of times that you called <strong>{{IDXGISwapChain::Present}}</strong> or <strong>{{IDXGISwapChain1::Present1}}</strong>. ? </dd> <dd> <p>A value that represents the running total count of v-blanks at which the last image was presented to the monitor and that have happened since the computer booted (for windowed mode, since the swap chain was created).</p> </dd> <dd> <p>A value that represents the running total count of v-blanks when the scheduler last sampled the machine time by calling <strong>QueryPerformanceCounter</strong> and that have happened since the computer booted (for windowed mode, since the swap chain was created).</p> </dd> <dd> <p>A value that represents the high-resolution performance counter timer. This value is the same as the value returned by the <strong>QueryPerformanceCounter</strong> function.</p> </dd> <dd> <p>Reserved. Always returns 0.</p> </dd> <p>Describes a mapped rectangle that is used to access a surface.</p> <p>The <strong>{{DXGI_MAPPED_RECT}}</strong> structure is initialized by the <strong>{{IDXGISurface::Map}}</strong> method.</p> <dd> <p>A value that describes the width, in bytes, of the surface.</p> </dd> <dd> <p>A reference to the image buffer of the surface.</p> </dd> <p>Describes an adapter (or video card) by using {{DXGI}} 1.0.</p> <p>The <strong>{{DXGI_ADAPTER_DESC}}</strong> structure provides a description of an adapter. This structure is initialized by using the <strong>{{IDXGIAdapter::GetDesc}}</strong> method.</p> <dd> <p>A string that contains the adapter description. On feature level 9 graphics hardware, <strong>GetDesc</strong> returns ?Software Adapter? for the description string.</p> </dd> <dd> <p>The {{PCI}} {{ID}} of the hardware vendor. On feature level 9 graphics hardware, <strong>GetDesc</strong> returns zeros for the {{PCI}} {{ID}} of the hardware vendor.</p> </dd> <dd> <p>The {{PCI}} {{ID}} of the hardware device. On feature level 9 graphics hardware, <strong>GetDesc</strong> returns zeros for the {{PCI}} {{ID}} of the hardware device.</p> </dd> <dd> <p>The {{PCI}} {{ID}} of the sub system. On feature level 9 graphics hardware, <strong>GetDesc</strong> returns zeros for the {{PCI}} {{ID}} of the sub system.</p> </dd> <dd> <p>The {{PCI}} {{ID}} of the revision number of the adapter. On feature level 9 graphics hardware, <strong>GetDesc</strong> returns zeros for the {{PCI}} {{ID}} of the revision number of the adapter.</p> </dd> <dd> <p>The number of bytes of dedicated video memory that are not shared with the {{CPU}}.</p> </dd> <dd> <p>The number of bytes of dedicated system memory that are not shared with the {{CPU}}. This memory is allocated from available system memory at boot time.</p> </dd> <dd> <p>The number of bytes of shared system memory. This is the maximum value of system memory that may be consumed by the adapter during operation. Any incidental memory consumed by the driver as it manages and uses video memory is additional.</p> </dd> <dd> <p>A unique value that identifies the adapter. See <strong>{{LUID}}</strong> for a definition of the structure. <strong>{{LUID}}</strong> is defined in dxgi.h.</p> </dd> <p>Describes an output or physical connection between the adapter (video card) and a device.</p> <p>The <strong>{{DXGI_OUTPUT_DESC}}</strong> structure is initialized by the <strong>{{IDXGIOutput::GetDesc}}</strong> method.</p> <dd> <p>A string that contains the name of the output device.</p> </dd> <dd> <p>A <strong>{{RECT}}</strong> structure containing the bounds of the output in desktop coordinates. Desktop coordinates depend on the dots per inch ({{DPI}}) of the desktop. For info about writing {{DPI}}-aware Win32 apps, see High {{DPI}}.</p> </dd> <dd> <p>True if the output is attached to the desktop; otherwise, false.</p> </dd> <dd> <p>A member of the <strong>{{DXGI_MODE_ROTATION}}</strong> enumerated type describing on how an image is rotated by the output.</p> </dd> <dd> <p>An <strong>{{HMONITOR}}</strong> handle that represents the display monitor. For more information, see {{HMONITOR}} and the Device Context.</p> </dd> <p>Represents a handle to a shared resource.</p> <p>To create a shared surface, pass a shared-resource handle into the <strong>{{IDXGIDevice::CreateSurface}}</strong> method.</p> <dd> <p>A handle to a shared resource.</p> </dd> <p>Describes a surface.</p> <p>This structure is used by the <strong>GetDesc</strong> and <strong>CreateSurface</strong> methods.</p> <dd> <p>A value describing the surface width.</p> </dd> <dd> <p>A value describing the surface height.</p> </dd> <dd> <p>A member of the <strong>{{DXGI_FORMAT}}</strong> enumerated type that describes the surface format.</p> </dd> <dd> <p>A member of the <strong>{{DXGI_SAMPLE_DESC}}</strong> structure that describes multi-sampling parameters for the surface.</p> </dd> <p>Describes a swap chain.</p> <p>This structure is used by the <strong>GetDesc</strong> and <strong>CreateSwapChain</strong> methods.</p><p>In full-screen mode, there is a dedicated front buffer; in windowed mode, the desktop is the front buffer.</p><p>If you create a swap chain with one buffer, specifying <strong>{{DXGI_SWAP_EFFECT_SEQUENTIAL}}</strong> does not cause the contents of the single buffer to be swapped with the front buffer.</p><p>For performance information about flipping swap-chain buffers in full-screen application, see Full-Screen Application Performance Hints.</p> <dd> <p>A <strong>{{DXGI_MODE_DESC}}</strong> structure that describes the backbuffer display mode.</p> </dd> <dd> <p>A <strong>{{DXGI_SAMPLE_DESC}}</strong> structure that describes multi-sampling parameters.</p> </dd> <dd> <p>A member of the <strong>{{DXGI_USAGE}}</strong> enumerated type that describes the surface usage and {{CPU}} access options for the back buffer. The back buffer can be used for shader input or render-target output.</p> </dd> <dd> <p>A value that describes the number of buffers in the swap chain. When you call <strong>{{IDXGIFactory::CreateSwapChain}}</strong> to create a full-screen swap chain, you typically include the front buffer in this value. For more information about swap-chain buffers, see Remarks.</p> </dd> <dd> <p>An <strong>{{HWND}}</strong> handle to the output window. This member must not be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>A Boolean value that specifies whether the output is in windowed mode. <strong>{{TRUE}}</strong> if the output is in windowed mode; otherwise, <strong>{{FALSE}}</strong>. </p> <p>We recommend that you create a windowed swap chain and allow the end user to change the swap chain to full screen through <strong>{{IDXGISwapChain::SetFullscreenState}}</strong>; that is, do not set this member to {{FALSE}} to force the swap chain to be full screen. However, if you create the swap chain as full screen, also provide the end user with a list of supported display modes through the <strong>BufferDesc</strong> member because a swap chain that is created with an unsupported display mode might cause the display to go black and prevent the end user from seeing anything. </p> <p>For more information about choosing windowed verses full screen, see <strong>{{IDXGIFactory::CreateSwapChain}}</strong>.</p> </dd> <dd> <p>A member of the <strong>{{DXGI_SWAP_EFFECT}}</strong> enumerated type that describes options for handling the contents of the presentation buffer after presenting a surface.</p> </dd> <dd> <p>A member of the <strong>{{DXGI_SWAP_CHAIN_FLAG}}</strong> enumerated type that describes options for swap-chain behavior.</p> </dd> <p>Describes an adapter (or video card) using {{DXGI}} 1.1.</p> <p>The <strong>{{DXGI_ADAPTER_DESC1}}</strong> structure provides a {{DXGI}} 1.1 description of an adapter. This structure is initialized by using the <strong>{{IDXGIAdapter1::GetDesc1}}</strong> method.</p> <dd> <p>A string that contains the adapter description. On feature level 9 graphics hardware, <strong>GetDesc1</strong> returns ?Software Adapter? for the description string.</p> </dd> <dd> <p>The {{PCI}} {{ID}} of the hardware vendor. On feature level 9 graphics hardware, <strong>GetDesc1</strong> returns zeros for the {{PCI}} {{ID}} of the hardware vendor.</p> </dd> <dd> <p>The {{PCI}} {{ID}} of the hardware device. On feature level 9 graphics hardware, <strong>GetDesc1</strong> returns zeros for the {{PCI}} {{ID}} of the hardware device.</p> </dd> <dd> <p>The {{PCI}} {{ID}} of the sub system. On feature level 9 graphics hardware, <strong>GetDesc1</strong> returns zeros for the {{PCI}} {{ID}} of the sub system.</p> </dd> <dd> <p>The {{PCI}} {{ID}} of the revision number of the adapter. On feature level 9 graphics hardware, <strong>GetDesc1</strong> returns zeros for the {{PCI}} {{ID}} of the revision number of the adapter.</p> </dd> <dd> <p>The number of bytes of dedicated video memory that are not shared with the {{CPU}}.</p> </dd> <dd> <p>The number of bytes of dedicated system memory that are not shared with the {{CPU}}. This memory is allocated from available system memory at boot time.</p> </dd> <dd> <p>The number of bytes of shared system memory. This is the maximum value of system memory that may be consumed by the adapter during operation. Any incidental memory consumed by the driver as it manages and uses video memory is additional.</p> </dd> <dd> <p>A unique value that identifies the adapter. See <strong>{{LUID}}</strong> for a definition of the structure. <strong>{{LUID}}</strong> is defined in dxgi.h.</p> </dd> <dd> <p>A value of the <strong>{{DXGI_ADAPTER_FLAG}}</strong> enumerated type that describes the adapter type. The <strong>{{DXGI_ADAPTER_FLAG_REMOTE}}</strong> flag is reserved.</p> </dd> <p> Don't use this structure; it is not supported and it will be removed from the header in a future release. </p> <dd> <p> The primary coordinates, as an 8 by 2 array of {{FLOAT}} values. </p> </dd> <dd> <p> The white points, as a 16 by 2 array of {{FLOAT}} values. </p> </dd> <p> An <strong>{{IDXGIObject}}</strong> interface is a base interface for all {{DXGI}} objects; <strong>{{IDXGIObject}}</strong> supports associating caller-defined (private data) with an object and retrieval of an interface to the parent object. </p> <p><strong>{{IDXGIObject}}</strong> implements base-class functionality for the following interfaces: </p><ul> <li> <strong>{{IDXGIAdapter}}</strong> </li> <li> <strong>{{IDXGIDevice}}</strong> </li> <li> <strong>{{IDXGIFactory}}</strong> </li> <li> <strong>{{IDXGIOutput}}</strong> </li> </ul><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Sets application-defined data to the object and associates that data with a {{GUID}}.</p> <p><strong>SetPrivateData</strong> makes a copy of the specified data and stores it with the object.</p><p>Private data that <strong>SetPrivateData</strong> stores in the object occupies the same storage space as private data that is stored by associated Direct3D objects (for example, by a Microsoft Direct3D?11 device through <strong>{{ID3D11Device::SetPrivateData}}</strong> or by a Direct3D?11 child device through <strong>{{ID3D11DeviceChild::SetPrivateData}}</strong>).</p><p>The debug layer reports memory leaks by outputting a list of object interface references along with their friendly names. The default friendly name is "&lt;unnamed&gt;". You can set the friendly name so that you can determine if the corresponding object interface reference caused the leak. To set the friendly name, use the <strong>SetPrivateData</strong> method and the well-known private data {{GUID}} (<strong>{{WKPDID_D3DDebugObjectName}}</strong>) that is in {{D3Dcommon}}.h. For example, to give pContext a friendly name of <em>My name</em>, use the following code:</p><pre> static const char c_szName[] = "My name"; hr = pContext-&gt;SetPrivateData( {{WKPDID_D3DDebugObjectName}}, sizeof( c_szName ) - 1, c_szName ); </pre><p>You can use <strong>{{WKPDID_D3DDebugObjectName}}</strong> to track down memory leaks and understand performance characteristics of your applications. This information is reflected in the output of the debug layer that is related to memory leaks (<strong>{{ID3D11Debug::ReportLiveDeviceObjects}}</strong>) and with the event tracing for Windows events that we've added to Windows?8. </p> <p>Returns one of the {{DXGI_ERROR}} values.</p> <dd> <p>A {{GUID}} that identifies the data. Use this {{GUID}} in a call to <strong>GetPrivateData</strong> to get the data.</p> </dd> <dd> <p>The size of the object's data.</p> </dd> <dd> <p>A reference to the object's data.</p> </dd> <p>Set an interface in the object's private data.</p> <p>This {{API}} associates an interface reference with the object.</p><p>When the interface is set its reference count is incremented. When the data are overwritten (by calling {{SPD}} or {{SPDI}} with the same {{GUID}}) or the object is destroyed, ::Release() is called and the interface's reference count is decremented.</p> <p>Returns one of the following {{DXGI_ERROR}}.</p> <dd> <p>A {{GUID}} identifying the interface.</p> </dd> <dd> <p>The interface to set.</p> </dd> <p>Get a reference to the object's data.</p> <p>If the data returned is a reference to an <strong>{{IUnknown}}</strong>, or one of its derivative classes, previously set by <strong>{{IDXGIObject::SetPrivateDataInterface}}</strong>, you must call <strong>::Release()</strong> on the reference before the reference is freed to decrement the reference count.</p><p>You can pass <strong>{{GUID_DeviceType}}</strong> in the <em>Name</em> parameter of <strong>GetPrivateData</strong> to retrieve the device type from the display adapter object (<strong>{{IDXGIAdapter}}</strong>, <strong>{{IDXGIAdapter1}}</strong>, <strong>{{IDXGIAdapter2}}</strong>). </p><p><strong>To get the type of device on which the display adapter was created</strong></p><ol> <li>Call <strong>{{IUnknown::QueryInterface}}</strong> on the <strong>{{ID3D11Device}}</strong> or <strong>{{ID3D10Device}}</strong> object to retrieve the <strong>{{IDXGIDevice}}</strong> object.</li> <li>Call <strong>GetParent</strong> on the <strong>{{IDXGIDevice}}</strong> object to retrieve the <strong>{{IDXGIAdapter}}</strong> object.</li> <li>Call <strong>GetPrivateData</strong> on the <strong>{{IDXGIAdapter}}</strong> object with <strong>{{GUID_DeviceType}}</strong> to retrieve the type of device on which the display adapter was created. <em>pData</em> will point to a value from the driver-type enumeration (for example, a value from <strong>{{D3D_DRIVER_TYPE}}</strong>).</li> </ol><p>On Windows?7 or earlier, this type is either a value from <strong>{{D3D10_DRIVER_TYPE}}</strong> or <strong>{{D3D_DRIVER_TYPE}}</strong> depending on which kind of device was created. On Windows?8, this type is always a value from <strong>{{D3D_DRIVER_TYPE}}</strong>. Don't use <strong>{{IDXGIObject::SetPrivateData}}</strong> with <strong>{{GUID_DeviceType}}</strong> because the behavior when doing so is undefined.</p> <p>Returns one of the following {{DXGI_ERROR}}.</p> <dd> <p>A {{GUID}} identifying the data.</p> </dd> <dd> <p>The size of the data.</p> </dd> <dd> <p>Pointer to the data.</p> </dd> <p>Gets the parent of the object.</p> <p>Returns one of the {{DXGI_ERROR}} values.</p> <dd> <p>The {{ID}} of the requested interface.</p> </dd> <dd> <p>The address of a reference to the parent object.</p> </dd> <p>Inherited from objects that are tied to the device so that they can retrieve a reference to it.</p> <p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Retrieves the device.</p> <p>The type of interface that is returned can be any interface published by the device. For example, it could be an {{IDXGIDevice}} * called pDevice, and therefore the {{REFIID}} would be obtained by calling __uuidof(pDevice).</p> <p>A code that indicates success or failure (see {{DXGI_ERROR}}).</p> <dd> <p>The reference id for the device.</p> </dd> <dd> <p>The address of a reference to the device.</p> </dd> <p>Set the priority for evicting the resource from memory.</p> <p>The eviction priority is a memory-management variable that is used by {{DXGI}} for determining how to populate overcommitted memory.</p><p>You can set priority levels other than the defined values when appropriate. For example, you can set a resource with a priority level of 0x78000001 to indicate that the resource is slightly above normal.</p> <p>Returns one of the following {{DXGI_ERROR}}.</p> <dd> <p>The priority is one of the following values: </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_MINIMUM}} (0x28000000)</strong></dt> </dl> </td><td> <p>The resource is unused and can be evicted as soon as another resource requires the memory that the resource occupies.</p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_LOW}} (0x50000000)</strong></dt> </dl> </td><td> <p>The eviction priority of the resource is low. The placement of the resource is not critical, and minimal work is performed to find a location for the resource. For example, if a {{GPU}} can render with a vertex buffer from either local or non-local memory with little difference in performance, that vertex buffer is low priority. Other more critical resources (for example, a render target or texture) can then occupy the faster memory.</p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_NORMAL}} (0x78000000)</strong></dt> </dl> </td><td> <p>The eviction priority of the resource is normal. The placement of the resource is important, but not critical, for performance. The resource is placed in its preferred location instead of a low-priority resource. </p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_HIGH}} (0xa0000000)</strong></dt> </dl> </td><td> <p>The eviction priority of the resource is high. The resource is placed in its preferred location instead of a low-priority or normal-priority resource.</p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_MAXIMUM}} (0xc8000000)</strong></dt> </dl> </td><td> <p>The resource is evicted from memory only if there is no other way of resolving the memory requirement.</p> </td></tr> </table> <p>?</p> </dd> <p>[Starting with Direct3D 11.1, we recommend not to use <strong>GetSharedHandle</strong> anymore to retrieve the handle to a shared resource. Instead, use <strong>{{IDXGIResource1::CreateSharedHandle}}</strong> to get a handle for sharing. To use <strong>{{IDXGIResource1::CreateSharedHandle}}</strong>, you must create the resource as shared and specify that it uses {{NT}} handles (that is, you set the <strong>{{D3D11_RESOURCE_MISC_SHARED_NTHANDLE}}</strong> flag). We also recommend that you create shared resources that use {{NT}} handles so you can use <strong>CloseHandle</strong>, <strong>DuplicateHandle</strong>, and so on on those shared resources.]</p><p>Gets the handle to a shared resource.</p> <p><strong>GetSharedHandle</strong> returns a handle for the resource that you created as shared (that is, you set the <strong>{{D3D11_RESOURCE_MISC_SHARED}}</strong> with or without the <strong>{{D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX}}</strong> flag). You can pass this handle to the <strong>{{ID3D11Device::OpenSharedResource}}</strong> method to give another device access to the shared resource. You can also marshal this handle to another process to share a resource with a device in another process. However, this handle is not an {{NT}} handle. Therefore, don't use the handle with <strong>CloseHandle</strong>, <strong>DuplicateHandle</strong>, and so on.</p><p>The creator of a shared resource must not destroy the resource until all intended entities have opened the resource. The validity of the handle is tied to the lifetime of the underlying video memory. If no resource objects exist on any devices that refer to this resource, the handle is no longer valid. To extend the lifetime of the handle and video memory, you must open the shared resource on a device.</p><p><strong>GetSharedHandle</strong> can also return handles for resources that were passed into <strong>{{ID3D11Device::OpenSharedResource}}</strong> to open those resources.</p><p><strong>GetSharedHandle</strong> fails if the resource to which it wants to get a handle is not shared.</p> <p>Returns one of the {{DXGI_ERROR}} values.</p> <p>Get the expected resource usage.</p> <p>Returns one of the following {{DXGI_ERROR}}.</p> <dd> <p>A reference to a usage flag (see {{DXGI_USAGE}}). For Direct3D 10, a surface can be used as a shader input or a render-target output.</p> </dd> <p>Set the priority for evicting the resource from memory.</p> <p>The eviction priority is a memory-management variable that is used by {{DXGI}} for determining how to populate overcommitted memory.</p><p>You can set priority levels other than the defined values when appropriate. For example, you can set a resource with a priority level of 0x78000001 to indicate that the resource is slightly above normal.</p> <p>Returns one of the following {{DXGI_ERROR}}.</p> <dd> <p>The priority is one of the following values: </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_MINIMUM}} (0x28000000)</strong></dt> </dl> </td><td> <p>The resource is unused and can be evicted as soon as another resource requires the memory that the resource occupies.</p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_LOW}} (0x50000000)</strong></dt> </dl> </td><td> <p>The eviction priority of the resource is low. The placement of the resource is not critical, and minimal work is performed to find a location for the resource. For example, if a {{GPU}} can render with a vertex buffer from either local or non-local memory with little difference in performance, that vertex buffer is low priority. Other more critical resources (for example, a render target or texture) can then occupy the faster memory.</p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_NORMAL}} (0x78000000)</strong></dt> </dl> </td><td> <p>The eviction priority of the resource is normal. The placement of the resource is important, but not critical, for performance. The resource is placed in its preferred location instead of a low-priority resource. </p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_HIGH}} (0xa0000000)</strong></dt> </dl> </td><td> <p>The eviction priority of the resource is high. The resource is placed in its preferred location instead of a low-priority or normal-priority resource.</p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_MAXIMUM}} (0xc8000000)</strong></dt> </dl> </td><td> <p>The resource is evicted from memory only if there is no other way of resolving the memory requirement.</p> </td></tr> </table> <p>?</p> </dd> <p>Get the eviction priority.</p> <p>The eviction priority is a memory-management variable that is used by {{DXGI}} to determine how to manage overcommitted memory.</p><p>Priority levels other than the defined values are used when appropriate. For example, a resource with a priority level of 0x78000001 indicates that the resource is slightly above normal.</p> <p>Returns one of the following {{DXGI_ERROR}}.</p> <dd> <p>A reference to the eviction priority, which determines when a resource can be evicted from memory. </p> <p>The following defined values are possible.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_MINIMUM}} (0x28000000)</strong></dt> </dl> </td><td> <p>The resource is unused and can be evicted as soon as another resource requires the memory that the resource occupies.</p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_LOW}} (0x50000000)</strong></dt> </dl> </td><td> <p>The eviction priority of the resource is low. The placement of the resource is not critical, and minimal work is performed to find a location for the resource. For example, if a {{GPU}} can render with a vertex buffer from either local or non-local memory with little difference in performance, that vertex buffer is low priority. Other more critical resources (for example, a render target or texture) can then occupy the faster memory.</p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_NORMAL}} (0x78000000)</strong></dt> </dl> </td><td> <p>The eviction priority of the resource is normal. The placement of the resource is important, but not critical, for performance. The resource is placed in its preferred location instead of a low-priority resource. </p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_HIGH}} (0xa0000000)</strong></dt> </dl> </td><td> <p>The eviction priority of the resource is high. The resource is placed in its preferred location instead of a low-priority or normal-priority resource.</p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_MAXIMUM}} (0xc8000000)</strong></dt> </dl> </td><td> <p>The resource is evicted from memory only if there is no other way of resolving the memory requirement.</p> </td></tr> </table> <p>?</p> </dd> <p>Represents a keyed mutex, which allows exclusive access to a shared resource that is used by multiple devices.</p> <p>The <strong>{{IDXGIFactory1}}</strong> is required to create a resource capable of supporting the <strong>{{IDXGIKeyedMutex}}</strong> interface.</p><p>An <strong>{{IDXGIKeyedMutex}}</strong> should be retrieved for each device sharing a resource. In Direct3D 10.1, such a resource that is shared between two or more devices is created with the <strong>{{D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX}}</strong> flag. In Direct3D 11, such a resource that is shared between two or more devices is created with the <strong>{{D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX}}</strong> flag.</p><p>For information about creating a keyed mutex, see the <strong>{{IDXGIKeyedMutex::AcquireSync}}</strong> method.</p> <p>Using a key, acquires exclusive rendering access to a shared resource.</p> <p>The <strong>AcquireSync</strong> method creates a lock to a surface that is shared between multiple devices, allowing only one device to render to a surface at a time. This method uses a key to determine which device currently has exclusive access to the surface.</p><p>When a surface is created using the <strong>{{D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX}}</strong> value of the <strong>{{D3D10_RESOURCE_MISC_FLAG}}</strong> enumeration, you must call the <strong>AcquireSync</strong> method before rendering to the surface. You must call the <strong>ReleaseSync</strong> method when you are done rendering to a surface.</p><p>To acquire a reference to the keyed mutex object of a shared resource, call the <strong>QueryInterface</strong> method of the resource and pass in the <strong>{{UUID}}</strong> of the <strong>{{IDXGIKeyedMutex}}</strong> interface. For more information about acquiring this reference, see the following code example.</p><p>The <strong>AcquireSync</strong> method uses the key as follows, depending on the state of the surface:</p><ul> <li>On initial creation, the surface is unowned and any device can call the <strong>AcquireSync</strong> method to gain access. For an unowned device, only a key of 0 will succeed. Calling the <strong>AcquireSync</strong> method for any other key will stall the calling {{CPU}} thread.</li> <li>If the surface is owned by a device when you call the <strong>AcquireSync</strong> method, the {{CPU}} thread that called the <strong>AcquireSync</strong> method will stall until the owning device calls the <strong>ReleaseSync</strong> method using the same Key.</li> <li>If the surface is unowned when you call the <strong>AcquireSync</strong> method (for example, the last owning device has already called the <strong>ReleaseSync</strong> method), the <strong>AcquireSync</strong> method will succeed if you specify the same key that was specified when the <strong>ReleaseSync</strong> method was last called. Calling the <strong>AcquireSync</strong> method using any other key will cause a stall.</li> <li>When the owning device calls the <strong>ReleaseSync</strong> method with a particular key, and more than one device is waiting after calling the <strong>AcquireSync</strong> method using the same key, any one of the waiting devices could be woken up first. The order in which devices are woken up is undefined.</li> <li>A keyed mutex does not support recursive calls to the <strong>AcquireSync</strong> method.</li> </ul> <p>Return {{S_OK}} if successful.</p><p>If the owning device attempted to create another keyed mutex on the same shared resource, <strong>AcquireSync</strong> returns {{E_FAIL}}.</p><p><strong>AcquireSync</strong> can also return the following <strong>{{DWORD}}</strong> constants. Therefore, you should explicitly check for these constants. If you only use the <strong>{{SUCCEEDED}}</strong> macro on the return value to determine if <strong>AcquireSync</strong> succeeded, you will not catch these constants.</p><ul> <li>{{WAIT_ABANDONED}} - The shared surface and keyed mutex are no longer in a consistent state. If <strong>AcquireSync</strong> returns this value, you should release and recreate both the keyed mutex and the shared surface.</li> <li>{{WAIT_TIMEOUT}} - The time-out interval elapsed before the specified key was released.</li> </ul> <dd> <p>A value that indicates which device to give access to. This method will succeed when the device that currently owns the surface calls the <strong>{{IDXGIKeyedMutex::ReleaseSync}}</strong> method using the same value. This value can be any {{UINT64}} value.</p> </dd> <dd> <p>The time-out interval, in milliseconds. This method will return if the interval elapses, and the keyed mutex has not been released using the specified <em>Key</em>. If this value is set to zero, the <strong>AcquireSync</strong> method will test to see if the keyed mutex has been released and returns immediately. If this value is set to {{INFINITE}}, the time-out interval will never elapse.</p> </dd> <p>Using a key, releases exclusive rendering access to a shared resource.</p> <p>The <strong>ReleaseSync</strong> method releases a lock to a surface that is shared between multiple devices. This method uses a key to determine which device currently has exclusive access to the surface.</p><p>When a surface is created using the <strong>{{D3D10_RESOURCE_MISC_SHARED_KEYEDMUTEX}}</strong> value of the <strong>{{D3D10_RESOURCE_MISC_FLAG}}</strong> enumeration, you must call the <strong>{{IDXGIKeyedMutex::AcquireSync}}</strong> method before rendering to the surface. You must call the <strong>ReleaseSync</strong> method when you are done rendering to a surface.</p><p>After you call the <strong>ReleaseSync</strong> method, the shared resource is unset from the rendering pipeline. </p><p>To acquire a reference to the keyed mutex object of a shared resource, call the <strong>QueryInterface</strong> method of the resource and pass in the <strong>{{UUID}}</strong> of the <strong>{{IDXGIKeyedMutex}}</strong> interface. For more information about acquiring this reference, see the following code example.</p> <p>Returns {{S_OK}} if successful.</p><p>If the device attempted to release a keyed mutex that is not valid or owned by the device, <strong>ReleaseSync</strong> returns {{E_FAIL}}.</p> <dd> <p>A value that indicates which device to give access to. This method succeeds when the device that currently owns the surface calls the <strong>ReleaseSync</strong> method using the same value. This value can be any {{UINT64}} value.</p> </dd> <p>The <strong>{{IDXGISurface}}</strong> interface implements methods for image-data objects.</p> <p>An image-data object is a 2D section of memory, commonly called a surface. To get the surface from an output, call <strong>{{IDXGIOutput::GetDisplaySurfaceData}}</strong>. </p><p>The runtime automatically creates an <strong>{{IDXGISurface}}</strong> interface when it creates a Direct3D resource object that represents a surface. For example, the runtime creates an <strong>{{IDXGISurface}}</strong> interface when you call <strong>{{ID3D11Device::CreateTexture2D}}</strong> or <strong>{{ID3D10Device::CreateTexture2D}}</strong> to create a 2D texture. To retrieve the <strong>{{IDXGISurface}}</strong> interface that represents the 2D texture surface, call <strong>{{ID3D11Texture2D::QueryInterface}}</strong> or <strong>{{ID3D10Texture2D::QueryInterface}}</strong>. In this call, you must pass the identifier of <strong>{{IDXGISurface}}</strong>. If the 2D texture has only a single {{MIP}}-map level and does not consist of an array of textures, <strong>QueryInterface</strong> succeeds and returns a reference to the <strong>{{IDXGISurface}}</strong> interface reference. Otherwise, <strong>QueryInterface</strong> fails and does not return the reference to <strong>{{IDXGISurface}}</strong>.</p> <p>Get a description of the surface.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the error codes that are described in the {{DXGI_ERROR}} topic.</p> <dd> <p>A reference to the surface description (see <strong>{{DXGI_SURFACE_DESC}}</strong>).</p> </dd> <p>Get a reference to the data contained in the surface, and deny {{GPU}} access to the surface.</p> <p>Use <strong>{{IDXGISurface::Map}}</strong> to access a surface from the {{CPU}}. To release a mapped surface (and allow {{GPU}} access) call <strong>{{IDXGISurface::Unmap}}</strong>.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the error codes that are described in the {{DXGI_ERROR}} topic.</p> <dd> <p>A reference to the surface data (see <strong>{{DXGI_MAPPED_RECT}}</strong>).</p> </dd> <dd> <p>{{CPU}} read-write flags. These flags can be combined with a logical {{OR}}. </p> <ul> <li>{{DXGI_MAP_READ}} - Allow {{CPU}} read access.</li> <li>{{DXGI_MAP_WRITE}} - Allow {{CPU}} write access.</li> <li>{{DXGI_MAP_DISCARD}} - Discard the previous contents of a resource when it is mapped.</li> </ul> </dd> <p>Get a reference to the data contained in the surface, and deny {{GPU}} access to the surface.</p> <p>Use <strong>{{IDXGISurface::Map}}</strong> to access a surface from the {{CPU}}. To release a mapped surface (and allow {{GPU}} access) call <strong>{{IDXGISurface::Unmap}}</strong>.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the error codes that are described in the {{DXGI_ERROR}} topic.</p> <dd> <p>A reference to the surface data (see <strong>{{DXGI_MAPPED_RECT}}</strong>).</p> </dd> <dd> <p>{{CPU}} read-write flags. These flags can be combined with a logical {{OR}}. </p> <ul> <li>{{DXGI_MAP_READ}} - Allow {{CPU}} read access.</li> <li>{{DXGI_MAP_WRITE}} - Allow {{CPU}} write access.</li> <li>{{DXGI_MAP_DISCARD}} - Discard the previous contents of a resource when it is mapped.</li> </ul> </dd> <p>The <strong>{{IDXGISurface1}}</strong> interface extends the <strong>{{IDXGISurface}}</strong> by adding support for using Windows Graphics Device Interface ({{GDI}}) to render to a Microsoft DirectX Graphics Infrastructure ({{DXGI}}) surface.</p> <p>This interface is not supported by {{DXGI}} 1.0, which shipped in Windows?Vista and Windows Server?2008. {{DXGI}} 1.1 support is required, which is available on Windows?7, Windows Server?2008?{{R2}}, and as an update to Windows?Vista with Service Pack?2 ({{SP2}}) ({{KB}} 971644) and Windows Server?2008 ({{KB}} 971512).</p><p>An image-data object is a 2D section of memory, commonly called a surface. To get the surface from an output, call <strong>{{IDXGIOutput::GetDisplaySurfaceData}}</strong>. Then, call <strong>QueryInterface</strong> on the <strong>{{IDXGISurface}}</strong> object that <strong>{{IDXGIOutput::GetDisplaySurfaceData}}</strong> returns to retrieve the <strong>{{IDXGISurface1}}</strong> interface.</p><p>Any object that supports <strong>{{IDXGISurface}}</strong> also supports <strong>{{IDXGISurface1}}</strong>.</p><p>The runtime automatically creates an <strong>{{IDXGISurface1}}</strong> interface when it creates a Direct3D resource object that represents a surface. For example, the runtime creates an <strong>{{IDXGISurface1}}</strong> interface when you call <strong>{{ID3D11Device::CreateTexture2D}}</strong> or <strong>{{ID3D10Device::CreateTexture2D}}</strong> to create a 2D texture. To retrieve the <strong>{{IDXGISurface1}}</strong> interface that represents the 2D texture surface, call <strong>{{ID3D11Texture2D::QueryInterface}}</strong> or <strong>{{ID3D10Texture2D::QueryInterface}}</strong>. In this call, you must pass the identifier of <strong>{{IDXGISurface1}}</strong>. If the 2D texture has only a single {{MIP}}-map level and does not consist of an array of textures, <strong>QueryInterface</strong> succeeds and returns a reference to the <strong>{{IDXGISurface1}}</strong> interface reference. Otherwise, <strong>QueryInterface</strong> fails and does not return the reference to <strong>{{IDXGISurface1}}</strong>.</p> <p>Returns a device context ({{DC}}) that allows you to render to a Microsoft DirectX Graphics Infrastructure ({{DXGI}}) surface using Windows Graphics Device Interface ({{GDI}}).</p> <p>This method is not supported by {{DXGI}} 1.0, which shipped in Windows?Vista and Windows Server?2008. {{DXGI}} 1.1 support is required, which is available on Windows?7, Windows Server?2008?{{R2}}, and as an update to Windows?Vista with Service Pack?2 ({{SP2}}) ({{KB}} 971644) and Windows Server?2008 ({{KB}} 971512).</p><p>After you use the <strong>GetDC</strong> method to retrieve a {{DC}}, you can render to the {{DXGI}} surface by using {{GDI}}. The <strong>GetDC</strong> method readies the surface for {{GDI}} rendering and allows inter-operation between {{DXGI}} and {{GDI}} technologies. </p><p>Keep the following in mind when using this method:</p><ul> <li>You must create the surface by using the <strong>{{D3D11_RESOURCE_MISC_GDI_COMPATIBLE}}</strong> flag for a surface or by using the <strong>{{DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE}}</strong> flag for swap chains, otherwise this method fails.</li> <li>You must release the device and call the <strong>{{IDXGISurface1::ReleaseDC}}</strong> method before you issue any new Direct3D commands.</li> <li>This method fails if an outstanding {{DC}} has already been created by this method.</li> <li>The format for the surface or swap chain must be <strong>{{DXGI_FORMAT_B8G8R8A8_UNORM_SRGB}}</strong> or <strong>{{DXGI_FORMAT_B8G8R8A8_UNORM}}</strong>.</li> <li>On <strong>GetDC</strong>, the render target in the output merger of the Direct3D pipeline is unbound from the surface. You must call the <strong>{{ID3D11DeviceContext::OMSetRenderTargets}}</strong> method on the device prior to Direct3D rendering after {{GDI}} rendering.</li> <li>Prior to resizing buffers you must release all outstanding {{DCs}}.</li> </ul><p> You can also call <strong>GetDC</strong> on the back buffer at index 0 of a swap chain by obtaining an <strong>{{IDXGISurface1}}</strong> from the swap chain. The following code illustrates the process.</p><pre> {{IDXGISwapChain}}* g_pSwapChain = {{NULL}}; {{IDXGISurface1}}* g_pSurface1 = {{NULL}}; ... //Setup the device and and swapchain g_pSwapChain-&gt;GetBuffer(0, __uuidof({{IDXGISurface1}}), (void**) &amp;g_pSurface1); g_pSurface1-&gt;GetDC( {{FALSE}}, &amp;g_hDC ); ... //Draw on the {{DC}} using {{GDI}} ... //When finish drawing release the {{DC}} g_pSurface1-&gt;ReleaseDC( {{NULL}} ); </pre> <p>Returns {{S_OK}} if successful; otherwise, an error code.</p> <dd> <p>A Boolean value that specifies whether to preserve Direct3D contents in the {{GDI}} {{DC}}. <strong>{{TRUE}}</strong> directs the runtime not to preserve Direct3D contents in the {{GDI}} {{DC}}; that is, the runtime discards the Direct3D contents. <strong>{{FALSE}}</strong> guarantees that Direct3D contents are available in the {{GDI}} {{DC}}.</p> </dd> <dd> <p>A reference to an <strong>{{HDC}}</strong> handle that represents the current device context for {{GDI}} rendering.</p> </dd> <p>Releases the {{GDI}} device context ({{DC}}) that is associated with the current surface and allows you to use Direct3D to render.</p> <p>This method is not supported by {{DXGI}} 1.0, which shipped in Windows?Vista and Windows Server?2008. {{DXGI}} 1.1 support is required, which is available on Windows?7, Windows Server?2008?{{R2}}, and as an update to Windows?Vista with Service Pack?2 ({{SP2}}) ({{KB}} 971644) and Windows Server?2008 ({{KB}} 971512).</p><p>Use the <strong>ReleaseDC</strong> method to release the {{DC}} and indicate that your application finished all {{GDI}} rendering to this surface. You must call the <strong>ReleaseDC</strong> method before you can use Direct3D to perform additional rendering.</p><p>Prior to resizing buffers you must release all outstanding {{DCs}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a <strong>{{RECT}}</strong> structure that identifies the dirty region of the surface. A dirty region is any part of the surface that you used for {{GDI}} rendering and that you want to preserve. This area is used as a performance hint to graphics subsystem in certain scenarios. Do not use this parameter to restrict rendering to the specified rectangular region. If you pass in <strong>{{NULL}}</strong>, <strong>ReleaseDC</strong> considers the whole surface as dirty. Otherwise, <strong>ReleaseDC</strong> uses the area specified by the {{RECT}} as a performance hint to indicate what areas have been manipulated by {{GDI}} rendering.</p> <p>You can pass a reference to an empty <strong>{{RECT}}</strong> structure (a rectangle with no position or area) if you didn't change any content.</p> </dd> <p> The <strong>{{IDXGIAdapter}}</strong> interface represents a display subsystem (including one or more {{GPUs}}, {{DACs}} and video memory). </p> <p> A display subsystem is often referred to as a video card, however, on some machines the display subsystem is part of the motherboard. </p><p> To enumerate the display subsystems, use <strong>{{IDXGIFactory::EnumAdapters}}</strong>. </p><p> To get an interface to the adapter for a particular device, use <strong>{{IDXGIDevice::GetAdapter}}</strong>. </p><p> To create a software adapter, use <strong>{{IDXGIFactory::CreateSoftwareAdapter}}</strong>. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Enumerate adapter (video card) outputs.</p> <strong>Note</strong>??If you call this {{API}} in a Session 0 process, it returns <strong>{{DXGI_ERROR_NOT_CURRENTLY_AVAILABLE}}</strong>.?<p>When the <strong>EnumOutputs</strong> method succeeds and fills the <em>ppOutput</em> parameter with the address of the reference to the output interface, <strong>EnumOutputs</strong> increments the output interface's reference count. To avoid a memory leak, when you finish using the output interface, call the <strong>Release</strong> method to decrement the reference count.</p><p><strong>EnumOutputs</strong> first returns the output on which the desktop primary is displayed. This output corresponds with an index of zero. <strong>EnumOutputs</strong> then returns other outputs.</p> <p>A code that indicates success or failure (see {{DXGI_ERROR}}). {{DXGI_ERROR_NOT_FOUND}} is returned if the index is greater than the number of outputs.</p><p>If the adapter came from a device created using {{D3D_DRIVER_TYPE_WARP}}, then the adapter has no outputs, so {{DXGI_ERROR_NOT_FOUND}} is returned. </p> <dd> <p>The index of the output.</p> </dd> <dd> <p>The address of a reference to an <strong>{{IDXGIOutput}}</strong> interface at the position specified by the <em>Output</em> parameter.</p> </dd> <p>Gets a {{DXGI}} 1.0 description of an adapter (or video card).</p> <p>Graphics apps can use the {{DXGI}} {{API}} to retrieve an accurate set of graphics memory values on systems that have Windows Display Driver Model ({{WDDM}}) drivers. The following are the critical steps involved.</p><ul> <li> Graphics driver model determination ? Because {{DXGI}} is only available on systems with {{WDDM}} drivers, the app must first confirm the driver model by using the following {{API}}. <pre> HasWDDMDriver() { {{LPDIRECT3DCREATE9EX}} pD3D9Create9Ex = {{NULL}}; {{HMODULE}} hD3D9 = {{NULL}}; hD3D9 = LoadLibrary( L"d3d9.dll" ); if ( {{NULL}} == hD3D9 ) { return false; } // /* Try to create {{IDirect3D9Ex}} interface (also known as a {{DX9L}} interface). This interface can only be created if the driver is a {{WDDM}} driver. */ // pD3D9Create9Ex = ({{LPDIRECT3DCREATE9EX}}) GetProcAddress( hD3D9, "Direct3DCreate9Ex" ); return pD3D9Create9Ex != {{NULL}}; } </pre> </li> <li> Retrieval of graphics memory values.? After the app determines the driver model to be {{WDDM}}, the app can use the Direct3D 10 or later {{API}} and {{DXGI}} to get the amount of graphics memory. After you create a Direct3D device, use this code to obtain a <strong>{{DXGI_ADAPTER_DESC}}</strong> structure that contains the amount of available graphics memory. <pre> {{IDXGIDevice}} * pDXGIDevice; hr = g_pd3dDevice-&gt;QueryInterface(__uuidof({{IDXGIDevice}}), (void **)&amp;pDXGIDevice); {{IDXGIAdapter}} * pDXGIAdapter; pDXGIDevice-&gt;GetAdapter(&amp;pDXGIAdapter); {{DXGI_ADAPTER_DESC}} adapterDesc; pDXGIAdapter-&gt;GetDesc(&amp;adapterDesc); </pre> </li> </ul> <p>Returns {{S_OK}} if successful; otherwise returns {{E_INVALIDARG}} if the <em>pDesc</em> parameter is <strong>{{NULL}}</strong>. </p> <dd> <p>A reference to a <strong>{{DXGI_ADAPTER_DESC}}</strong> structure that describes the adapter. This parameter must not be <strong>{{NULL}}</strong>. On feature level 9 graphics hardware, <strong>GetDesc</strong> returns zeros for the {{PCI}} {{ID}} in the <strong>VendorId</strong>, <strong>DeviceId</strong>, <strong>SubSysId</strong>, and <strong>Revision</strong> members of <strong>{{DXGI_ADAPTER_DESC}}</strong> and ?Software Adapter? for the description string in the <strong>Description</strong> member.</p> </dd> <p>Checks whether the system supports a device interface for a graphics component.</p> <strong>Note</strong>??You can use <strong>CheckInterfaceSupport</strong> only to check whether a Direct3D 10.x interface is supported, and only on Windows Vista {{SP1}} and later versions of the operating system. If you try to use <strong>CheckInterfaceSupport</strong> to check whether a Direct3D 11.x and later version interface is supported, <strong>CheckInterfaceSupport</strong> returns {{DXGI_ERROR_UNSUPPORTED}}. Therefore, do not use <strong>CheckInterfaceSupport</strong>. Instead, to verify whether the operating system supports a particular interface, try to create the interface. For example, if you call the <strong>{{ID3D11Device::CreateBlendState}}</strong> method and it fails, the operating system does not support the <strong>{{ID3D11BlendState}}</strong> interface.? <p>{{S_OK}} indicates that the interface is supported, otherwise {{DXGI_ERROR_UNSUPPORTED}} is returned (For more information, see {{DXGI_ERROR}}).</p> <dd> <p>The {{GUID}} of the interface of the device version for which support is being checked. For example, __uuidof({{ID3D10Device}}).</p> </dd> <dd> <p>The user mode driver version of <em>InterfaceName</em>. This is returned only if the interface is supported, otherwise this parameter will be <strong>{{NULL}}</strong>.</p> </dd> <p>An <strong>{{IDXGIOutput}}</strong> interface represents an adapter output (such as a monitor).</p> <p>To see the outputs available, use <strong>{{IDXGIAdapter::EnumOutputs}}</strong>. To see the specific output that the swap chain will update, use <strong>{{IDXGISwapChain::GetContainingOutput}}</strong>.</p> <p>Get a description of the output.</p> <p> On a high {{DPI}} desktop, <strong>GetDesc</strong> returns the visualized screen size unless the app is marked high {{DPI}} aware. For info about writing {{DPI}}-aware Win32 apps, see High {{DPI}}.</p> <p>Returns a code that indicates success or failure. {{S_OK}} if successful, {{DXGI_ERROR_INVALID_CALL}} if <em>pDesc</em> is passed in as <strong>{{NULL}}</strong>.</p> <dd> <p>A reference to the output description (see <strong>{{DXGI_OUTPUT_DESC}}</strong>).</p> </dd> <p>[Starting with Direct3D 11.1, we recommend not to use <strong>GetDisplayModeList</strong> anymore to retrieve the matching display mode. Instead, use <strong>{{IDXGIOutput1::GetDisplayModeList1}}</strong>, which supports stereo display mode.]</p><p>Gets the display modes that match the requested format and other input options.</p> <p>In general, when switching from windowed to full-screen mode, a swap chain automatically chooses a display mode that meets (or exceeds) the resolution, color depth and refresh rate of the swap chain. To exercise more control over the display mode, use this {{API}} to poll the set of display modes that are validated against monitor capabilities, or all modes that match the desktop (if the desktop settings are not validated against the monitor).</p><p>As shown, this {{API}} is designed to be called twice. First to get the number of modes available, and second to return a description of the modes.</p><pre> {{UINT}} num = 0; {{DXGI_FORMAT}} format = {{DXGI_FORMAT_R32G32B32A32_FLOAT}}; {{UINT}} flags = {{DXGI_ENUM_MODES_INTERLACED}}; pOutput-&gt;GetDisplayModeList( format, flags, &amp;num, 0); ... {{DXGI_MODE_DESC}} * pDescs = new {{DXGI_MODE_DESC}}[num]; pOutput-&gt;GetDisplayModeList( format, flags, &amp;num, pDescs); </pre> <p>Returns one of the following {{DXGI_ERROR}}. It is rare, but possible, that the display modes available can change immediately after calling this method, in which case {{DXGI_ERROR_MORE_DATA}} is returned (if there is not enough room for all the display modes). If <strong>GetDisplayModeList</strong> is called from a Remote Desktop Services session (formerly Terminal Services session), {{DXGI_ERROR_NOT_CURRENTLY_AVAILABLE}} is returned.</p> <p>[Starting with Direct3D 11.1, we recommend not to use <strong>FindClosestMatchingMode</strong> anymore to find the display mode that most closely matches the requested display mode. Instead, use <strong>{{IDXGIOutput1::FindClosestMatchingMode1}}</strong>, which supports stereo display mode.]</p><p>Finds the display mode that most closely matches the requested display mode.</p> <p><strong>FindClosestMatchingMode</strong> behaves similarly to the <strong>{{IDXGIOutput1::FindClosestMatchingMode1}}</strong> except <strong>FindClosestMatchingMode</strong> considers only the mono display modes. <strong>{{IDXGIOutput1::FindClosestMatchingMode1}}</strong> considers only stereo modes if you set the <strong>Stereo</strong> member in the <strong>{{DXGI_MODE_DESC1}}</strong> structure that <em>pModeToMatch</em> points to, and considers only mono modes if <strong>Stereo</strong> is not set.</p><p> <strong>{{IDXGIOutput1::FindClosestMatchingMode1}}</strong> returns a matched display-mode set with only stereo modes or only mono modes. <strong>FindClosestMatchingMode</strong> behaves as though you specified the input mode as mono.</p> <p>Returns one of the following {{DXGI_ERROR}}.</p> <p>Halt a thread until the next vertical blank occurs.</p> <p>A vertical blank occurs when the raster moves from the lower right corner to the upper left corner to begin drawing the next frame.</p> <p>Returns one of the following {{DXGI_ERROR}}.</p> <p>Takes ownership of an output.</p> <p>When you are finished with the output, call <strong>{{IDXGIOutput::ReleaseOwnership}}</strong>.</p><p><strong>TakeOwnership</strong> should not be called directly by applications, since results will be unpredictable. It is called implicitly by the {{DXGI}} swap chain object during full-screen transitions, and should not be used as a substitute for swap-chain methods.</p> <p>Returns one of the {{DXGI_ERROR}} values.</p> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of a device (such as an <strong>{{ID3D10Device}}</strong>).</p> </dd> <dd> <p>Set to <strong>{{TRUE}}</strong> to enable other threads or applications to take ownership of the device; otherwise, set to <strong>{{FALSE}}</strong>.</p> </dd> <p>Releases ownership of the output.</p> <p>If you are not using a swap chain, get access to an output by calling <strong>{{IDXGIOutput::TakeOwnership}}</strong> and release it when you are finished by calling <strong>{{IDXGIOutput::ReleaseOwnership}}</strong>. An application that uses a swap chain will typically not call either of these methods.</p> <p>Returns nothing.</p> <p>Gets a description of the gamma-control capabilities.</p> <p> </p><strong>Note</strong>??Calling this method is only supported while in full-screen mode.?<p>For info about using gamma correction, see Using gamma correction. </p> <p>Returns one of the {{DXGI_ERROR}} values.</p> <dd> <p>A reference to a description of the gamma-control capabilities (see <strong>{{DXGI_GAMMA_CONTROL_CAPABILITIES}}</strong>).</p> </dd> <p>Sets the gamma controls.</p> <p> </p><strong>Note</strong>??Calling this method is only supported while in full-screen mode.?<p>For info about using gamma correction, see Using gamma correction. </p> <p>Returns one of the {{DXGI_ERROR}} values.</p> <dd> <p>A reference to a <strong>{{DXGI_GAMMA_CONTROL}}</strong> structure that describes the gamma curve to set.</p> </dd> <p>Gets the gamma control settings.</p> <p> </p><strong>Note</strong>??Calling this method is only supported while in full-screen mode.?<p>For info about using gamma correction, see Using gamma correction. </p> <p>Returns one of the {{DXGI_ERROR}} values.</p> <dd> <p>An array of gamma control settings (see <strong>{{DXGI_GAMMA_CONTROL}}</strong>).</p> </dd> <p>Changes the display mode.</p> <p><strong>{{IDXGIOutput::SetDisplaySurface}}</strong> should not be called directly by applications, since results will be unpredictable. It is called implicitly by the {{DXGI}} swap chain object during full-screen transitions, and should not be used as a substitute for swap-chain methods.</p><p>This method should only be called between <strong>{{IDXGIOutput::TakeOwnership}}</strong> and <strong>{{IDXGIOutput::ReleaseOwnership}}</strong> calls.</p> <p>Returns one of the {{DXGI_ERROR}} values.</p> <dd> <p>A reference to a surface (see <strong>{{IDXGISurface}}</strong>) used for rendering an image to the screen. The surface must have been created as a back buffer ({{DXGI_USAGE_BACKBUFFER}}).</p> </dd> <p>[Starting with Direct3D 11.1, we recommend not to use <strong>GetDisplaySurfaceData</strong> anymore to retrieve the current display surface. Instead, use <strong>{{IDXGIOutput1::GetDisplaySurfaceData1}}</strong>, which supports stereo display mode.]</p><p>Gets a copy of the current display surface.</p> <p><strong>{{IDXGIOutput::GetDisplaySurfaceData}}</strong> can only be called when an output is in full-screen mode. If the method succeeds, {{DXGI}} fills the destination surface.</p><p>Use <strong>{{IDXGIOutput::GetDesc}}</strong> to determine the size (width and height) of the output when you want to allocate space for the destination surface. This is true regardless of target monitor rotation. A destination surface created by a graphics component (such as Direct3D 10) must be created with {{CPU}}-write permission (see {{D3D10_CPU_ACCESS_WRITE}}). Other surfaces should be created with {{CPU}} read-write permission (see {{D3D10_CPU_ACCESS_READ_WRITE}}). This method will modify the surface data to fit the destination surface (stretch, shrink, convert format, rotate). The stretch and shrink is performed with point-sampling.</p> <p>Returns one of the {{DXGI_ERROR}} values.</p> <p>Gets statistics about recently rendered frames.</p> <p>This {{API}} is similar to <strong>{{IDXGISwapChain::GetFrameStatistics}}</strong>.</p><p> </p><strong>Note</strong>??Calling this method is only supported while in full-screen mode.? <p>If this function succeeds, it returns {{S_OK}}. Otherwise, it might return {{DXGI_ERROR_INVALID_CALL}}.</p> <dd> <p>A reference to frame statistics (see <strong>{{DXGI_FRAME_STATISTICS}}</strong>).</p> </dd> <p>An <strong>{{IDXGISwapChain}}</strong> interface implements one or more <strong>surfaces</strong> for storing rendered data before presenting it to an output.</p> <p>You can create a swap chain by calling <strong>{{IDXGIFactory2::CreateSwapChainForHwnd}}</strong>, <strong>{{IDXGIFactory2::CreateSwapChainForCoreWindow}}</strong>, or <strong>{{IDXGIFactory2::CreateSwapChainForComposition}}</strong>. You can also create a swap chain when you call <strong>{{D3D11CreateDeviceAndSwapChain}}</strong>; however, you can then only access the sub-set of swap-chain functionality that the <strong>{{IDXGISwapChain}}</strong> interface provides.</p> <p>Presents a rendered image to the user.</p> <p>Starting with Direct3D 11.1, consider using <strong>{{IDXGISwapChain1::Present1}}</strong> because you can then use dirty rectangles and the scroll rectangle in the swap chain presentation and as such use less memory bandwidth and as a result less system power. For more info about using dirty rectangles and the scroll rectangle in swap chain presentation, see Using dirty rectangles and the scroll rectangle in swap chain presentation.</p><p>For the best performance when flipping swap-chain buffers in a full-screen application, see Full-Screen Application Performance Hints.</p><p>Because calling <strong>Present</strong> might cause the render thread to wait on the message-pump thread, be careful when calling this method in an application that uses multiple threads. For more details, see Multithreading Considerations.</p><table> <tr><td> <p>Differences between Direct3D 9 and Direct3D 10:</p> <p>Specifying <strong>{{DXGI_PRESENT_TEST}}</strong> in the <em>Flags</em> parameter is analogous to <strong>{{IDirect3DDevice9::TestCooperativeLevel}}</strong> in Direct3D 9.</p> </td></tr> </table><p>?</p><p>For flip presentation model swap chains that you create with the <strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong> value set, a successful presentation unbinds back buffer 0 from the graphics pipeline, except for when you pass the <strong>{{DXGI_PRESENT_DO_NOT_SEQUENCE}}</strong> flag in the <em>Flags</em> parameter.</p><p>For info about how data values change when you present content to the screen, see Converting data for the color space.</p> <p>Possible return values include: {{S_OK}}, {{DXGI_ERROR_DEVICE_RESET}} or {{DXGI_ERROR_DEVICE_REMOVED}} (see {{DXGI_ERROR}}), {{DXGI_STATUS_OCCLUDED}} (see {{DXGI_STATUS}}), or {{D3DDDIERR_DEVICEREMOVED}}. </p><strong>Note</strong>??The <strong>Present</strong> method can return either {{DXGI_ERROR_DEVICE_REMOVED}} or {{D3DDDIERR_DEVICEREMOVED}} if a video card has been physically removed from the computer, or a driver upgrade for the video card has occurred.? <dd> <p>An integer that specifies how to synchronize presentation of a frame with the vertical blank. </p> <p>For the bit-block transfer (bitblt) model (<strong>{{DXGI_SWAP_EFFECT_DISCARD}}</strong> or <strong>{{DXGI_SWAP_EFFECT_SEQUENTIAL}}</strong>), values are:</p> <ul> <li>0 - The presentation occurs immediately, there is no synchronization.</li> <li>1 through 4 - Synchronize presentation after the <em>n</em>th vertical blank.</li> </ul> <p>For the flip model (<strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong>), values are:</p> <ul> <li>0 - Cancel the remaining time on the previously presented frame and discard this frame if a newer frame is queued. </li> <li>1 through 4 - Synchronize presentation for at least <em>n</em> vertical blanks. </li> </ul> <p>For an example that shows how sync-interval values affect a flip presentation queue, see Remarks.</p> <p>If the update region straddles more than one output (each represented by <strong>{{IDXGIOutput}}</strong>), <strong>Present</strong> performs the synchronization to the output that contains the largest sub-rectangle of the target window's client area.</p> </dd> <dd> <p>An integer value that contains swap-chain presentation options. These options are defined by the {{DXGI_PRESENT}} constants.</p> </dd> <p>Accesses one of the swap-chain's back buffers.</p> <p>Returns one of the following {{DXGI_ERROR}}.</p> <dd> <p>A zero-based buffer index. </p> <p>If the swap chain's swap effect is <strong>{{DXGI_SWAP_EFFECT_DISCARD}}</strong>, this method can only access the first buffer; for this situation, set the index to zero.</p> <p>If the swap chain's swap effect is either <strong>{{DXGI_SWAP_EFFECT_SEQUENTIAL}}</strong> or <strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong>, only the swap chain's zero-index buffer can be read from and written to. The swap chain's buffers with indexes greater than zero can only be read from; so if you call the <strong>{{IDXGIResource::GetUsage}}</strong> method for such buffers, they have the <strong>{{DXGI_USAGE_READ_ONLY}}</strong> flag set.</p> </dd> <dd> <p>The type of interface used to manipulate the buffer.</p> </dd> <dd> <p>A reference to a back-buffer interface.</p> </dd> <p>Sets the display state to windowed or full screen.</p> <p>{{DXGI}} may change the display state of a swap chain in response to end user or system requests.</p><p>We recommend that you create a windowed swap chain and allow the end user to change the swap chain to full screen through <strong>SetFullscreenState</strong>; that is, do not set the <strong>Windowed</strong> member of <strong>{{DXGI_SWAP_CHAIN_DESC}}</strong> to {{FALSE}} to force the swap chain to be full screen. However, if you create the swap chain as full screen, also provide the end user with a list of supported display modes because a swap chain that is created with an unsupported display mode might cause the display to go black and prevent the end user from seeing anything. Also, we recommend that you have a time-out confirmation screen or other fallback mechanism when you allow the end user to change display modes.</p> <p>This methods returns: </p><ul> <li>{{S_OK}} if the action succeeded and the swap chain was placed in the requested state.</li> <li>{{DXGI_ERROR_NOT_CURRENTLY_AVAILABLE}} if the action failed. There are many reasons why a windowed-mode swap chain cannot switch to full-screen mode. For instance: <ul> <li>The application is running over Terminal Server.</li> <li>The output window is occluded.</li> <li>The output window does not have keyboard focus.</li> <li>Another application is already in full-screen mode.</li> </ul> <p>When this error is returned, an application can continue to run in windowed mode and try to switch to full-screen mode later.</p> </li> <li>{{DXGI_STATUS_MODE_CHANGE_IN_PROGRESS}} is returned if a fullscreen/windowed mode transition is occurring when this {{API}} is called.</li> <li>Other error codes if you run out of memory or encounter another unexpected fault; these codes may be treated as hard, non-continuable errors.</li> </ul> <dd> <p>A Boolean value that specifies whether to set the display state to windowed or full screen. <strong>{{TRUE}}</strong> for full screen, and <strong>{{FALSE}}</strong> for windowed.</p> </dd> <dd> <p>If you pass <strong>{{TRUE}}</strong> to the <em>Fullscreen</em> parameter to set the display state to full screen, you can optionally set this parameter to a reference to an <strong>{{IDXGIOutput}}</strong> interface for the output target that contains the swap chain. If you set this parameter to <strong>{{NULL}}</strong>, {{DXGI}} will choose the output based on the swap-chain's device and the output window's placement. If you pass <strong>{{FALSE}}</strong> to <em>Fullscreen</em>, you must set this parameter to <strong>{{NULL}}</strong>.</p> </dd> <p>Get the state associated with full-screen mode.</p> <p>When the swap chain is in full-screen mode, a reference to the target output will be returned and its reference count will be incremented.</p> <p>Returns one of the following {{DXGI_ERROR}}.</p> <dd> <p>A reference to a boolean whose value is either: </p> <ul> <li><strong>{{TRUE}}</strong> if the swap chain is in full-screen mode</li> <li><strong>{{FALSE}}</strong> if the swap chain is in windowed mode</li> </ul> </dd> <dd> <p>A reference to the output target (see <strong>{{IDXGIOutput}}</strong>) when the mode is full screen; otherwise <strong>{{NULL}}</strong>.</p> </dd> <p>[Starting with Direct3D 11.1, we recommend not to use <strong>GetDesc</strong> anymore to get a description of the swap chain. Instead, use <strong>{{IDXGISwapChain1::GetDesc1}}</strong>.]</p><p>Get a description of the swap chain.</p> <p>Returns one of the following {{DXGI_ERROR}}.</p> <p> Changes the swap chain's back buffer size, format, and number of buffers. This should be called when the application window is resized. </p> <p> You can't resize a swap chain unless you release all outstanding references to its back buffers. You must release all of its direct and indirect references on the back buffers in order for <strong>ResizeBuffers</strong> to succeed. </p><p> Direct references are held by the application after it calls <strong>AddRef</strong> on a resource. </p><p> Indirect references are held by views to a resource, binding a view of the resource to a device context, a command list that used the resource, a command list that used a view to that resource, a command list that executed another command list that used the resource, and so on. </p><p> Before you call <strong>ResizeBuffers</strong>, ensure that the application releases all references (by calling the appropriate number of <strong>Release</strong> invocations) on the resources, any views to the resource, and any command lists that use either the resources or views, and ensure that neither the resource nor a view is still bound to a device context. You can use <strong>{{ID3D11DeviceContext::ClearState}}</strong> to ensure that all references are released. If a view is bound to a deferred context, you must discard the partially built command list as well (by calling <strong>{{ID3D11DeviceContext::ClearState}}</strong>, then <strong>{{ID3D11DeviceContext::FinishCommandList}}</strong>, then <strong>Release</strong> on the command list). After you call <strong>ResizeBuffers</strong>, you can re-query interfaces via <strong>{{IDXGISwapChain::GetBuffer}}</strong>. </p><p> For swap chains that you created with <strong>{{DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE}}</strong>, before you call <strong>ResizeBuffers</strong>, also call <strong>{{IDXGISurface1::ReleaseDC}}</strong> on the swap chain's back-buffer surface to ensure that you have no outstanding {{GDI}} device contexts ({{DCs}}) open. </p><p> We recommend that you call <strong>ResizeBuffers</strong> when a client window is resized (that is, when an application receives a {{WM_SIZE}} message). </p><p> The only difference between <strong>{{IDXGISwapChain::ResizeBuffers}}</strong> in Windows?8 versus Windows?7 is with flip presentation model swap chains that you create with the <strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong> or {{DXGI_SWAP_EFFECT_FLIP_DISCARD}} value set. In Windows?8, you must call <strong>ResizeBuffers</strong> to realize a transition between full-screen mode and windowed mode; otherwise, your next call to the <strong>{{IDXGISwapChain::Present}}</strong> method fails. </p> <p> Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}. </p> <dd> <p> The number of buffers in the swap chain (including all back and front buffers). This number can be different from the number of buffers with which you created the swap chain. This number can't be greater than <strong>{{DXGI_MAX_SWAP_CHAIN_BUFFERS}}</strong>. Set this number to zero to preserve the existing number of buffers in the swap chain. You can't specify less than two buffers for the flip presentation model. </p> </dd> <dd> <p> The new width of the back buffer. If you specify zero, {{DXGI}} will use the width of the client area of the target window. You can't specify the width as zero if you called the <strong>{{IDXGIFactory2::CreateSwapChainForComposition}}</strong> method to create the swap chain for a composition surface. </p> </dd> <dd> <p> The new height of the back buffer. If you specify zero, {{DXGI}} will use the height of the client area of the target window. You can't specify the height as zero if you called the <strong>{{IDXGIFactory2::CreateSwapChainForComposition}}</strong> method to create the swap chain for a composition surface. </p> </dd> <dd> <p> A <strong>{{DXGI_FORMAT}}</strong>-typed value for the new format of the back buffer. Set this value to <strong>{{DXGI_FORMAT_UNKNOWN}}</strong> to preserve the existing format of the back buffer. The flip presentation model supports a more restricted set of formats than the bit-block transfer (bitblt) model. </p> </dd> <dd> <p> A combination of <strong>{{DXGI_SWAP_CHAIN_FLAG}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies options for swap-chain behavior. </p> </dd> <p>Resizes the output target.</p> <p><strong>ResizeTarget</strong> resizes the target window when the swap chain is in windowed mode, and changes the display mode on the target output when the swap chain is in full-screen mode. Therefore, apps can call <strong>ResizeTarget</strong> to resize the target window (rather than a Microsoft Win32API such as <strong>SetWindowPos</strong>) without knowledge of the swap chain display mode.</p><p>If a Windows Store app calls <strong>ResizeTarget</strong>, it fails with {{DXGI_ERROR_NOT_CURRENTLY_AVAILABLE}}.</p><p>You cannot call <strong>ResizeTarget</strong> on a swap chain that you created with <strong>{{IDXGIFactory2::CreateSwapChainForComposition}}</strong>.</p><p>Apps must still call <strong>{{IDXGISwapChain::ResizeBuffers}}</strong> after they call <strong>ResizeTarget</strong> because only <strong>ResizeBuffers</strong> can change the back buffers. But, if those apps have implemented window resize processing to call <strong>ResizeBuffers</strong>, they don't need to explicitly call <strong>ResizeBuffers</strong> after they call <strong>ResizeTarget</strong> because the window resize processing will achieve what the app requires.</p> <p>Returns a code that indicates success or failure. <strong>{{DXGI_STATUS_MODE_CHANGE_IN_PROGRESS}}</strong> is returned if a full-screen/windowed mode transition is occurring when this {{API}} is called. See {{DXGI_ERROR}} for additional {{DXGI}} error codes.</p> <dd> <p>A reference to a <strong>{{DXGI_MODE_DESC}}</strong> structure that describes the mode, which specifies the new width, height, format, and refresh rate of the target. If the format is <strong>{{DXGI_FORMAT_UNKNOWN}}</strong>, <strong>ResizeTarget</strong> uses the existing format. We only recommend that you use <strong>{{DXGI_FORMAT_UNKNOWN}}</strong> when the swap chain is in full-screen mode as this method is not thread safe.</p> </dd> <p>Get the output (the display monitor) that contains the majority of the client area of the target window.</p> <p>If the method succeeds, the output interface will be filled and its reference count incremented. When you are finished with it, be sure to release the interface to avoid a memory leak.</p><p>The output is also owned by the adapter on which the swap chain's device was created.</p><p>You cannot call <strong>GetContainingOutput</strong> on a swap chain that you created with <strong>{{IDXGIFactory2::CreateSwapChainForComposition}}</strong>.</p> <p>Returns one of the following {{DXGI_ERROR}}.</p> <dd> <p>A reference to the output interface (see <strong>{{IDXGIOutput}}</strong>).</p> </dd> <p>Gets performance statistics about the last render frame.</p> <p>You cannot use <strong>GetFrameStatistics</strong> for swap chains that both use the bit-block transfer (bitblt) presentation model and draw in windowed mode.</p><p>You can only use <strong>GetFrameStatistics</strong> for swap chains that either use the flip presentation model or draw in full-screen mode. You set the <strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong> value in the <strong>SwapEffect</strong> member of the <strong>{{DXGI_SWAP_CHAIN_DESC1}}</strong> structure to specify that the swap chain uses the flip presentation model.</p> <p>Returns one of the {{DXGI_ERROR}} values.</p> <dd> <p>A reference to a <strong>{{DXGI_FRAME_STATISTICS}}</strong> structure for the frame statistics.</p> </dd> <p>Gets the number of times that <strong>{{IDXGISwapChain::Present}}</strong> or <strong>{{IDXGISwapChain1::Present1}}</strong> has been called.</p> <p>For info about presentation statistics for a frame, see <strong>{{DXGI_FRAME_STATISTICS}}</strong>.</p> <p>Returns one of the {{DXGI_ERROR}} values.</p> <p> An <strong>{{IDXGIFactory}}</strong> interface implements methods for generating {{DXGI}} objects (which handle full screen transitions). </p> <p> Create a factory by calling <strong>CreateDXGIFactory</strong>. </p><p> Because you can create a Direct3D device without creating a swap chain, you might need to retrieve the factory that is used to create the device in order to create a swap chain. You can request the <strong>{{IDXGIDevice}}</strong> interface from the Direct3D device and then use the <strong>{{IDXGIObject::GetParent}}</strong> method to locate the factory. The following code shows how. </p><pre>{{IDXGIDevice}} * pDXGIDevice = nullptr; hr = g_pd3dDevice-&gt;QueryInterface(__uuidof({{IDXGIDevice}}), (void **)&amp;pDXGIDevice); {{IDXGIAdapter}} * pDXGIAdapter = nullptr; hr = pDXGIDevice-&gt;GetAdapter( &amp;pDXGIAdapter ); {{IDXGIFactory}} * pIDXGIFactory = nullptr; pDXGIAdapter-&gt;GetParent(__uuidof({{IDXGIFactory}}), (void **)&amp;pIDXGIFactory);</pre><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Enumerates the adapters (video cards).</p> <p>When you create a factory, the factory enumerates the set of adapters that are available in the system. Therefore, if you change the adapters in a system, you must destroy and recreate the <strong>{{IDXGIFactory}}</strong> object. The number of adapters in a system changes when you add or remove a display card, or dock or undock a laptop. </p><p>When the <strong>EnumAdapters</strong> method succeeds and fills the <em>ppAdapter</em> parameter with the address of the reference to the adapter interface, <strong>EnumAdapters</strong> increments the adapter interface's reference count. When you finish using the adapter interface, call the <strong>Release</strong> method to decrement the reference count before you destroy the reference.</p><p><strong>EnumAdapters</strong> first returns the adapter with the output on which the desktop primary is displayed. This adapter corresponds with an index of zero. <strong>EnumAdapters</strong> next returns other adapters with outputs. <strong>EnumAdapters</strong> finally returns adapters without outputs. </p> <p>Returns {{S_OK}} if successful; otherwise, returns {{DXGI_ERROR_NOT_FOUND}} if the index is greater than or equal to the number of adapters in the local system, or {{DXGI_ERROR_INVALID_CALL}} if <em>ppAdapter</em> parameter is <strong>{{NULL}}</strong>.</p> <dd> <p>The index of the adapter to enumerate.</p> </dd> <dd> <p>The address of a reference to an <strong>{{IDXGIAdapter}}</strong> interface at the position specified by the <em>Adapter</em> parameter. This parameter must not be <strong>{{NULL}}</strong>.</p> </dd> <p>Allows {{DXGI}} to monitor an application's message queue for the alt-enter key sequence (which causes the application to switch from windowed to full screen or vice versa).</p> <strong>Note</strong>??If you call this {{API}} in a Session 0 process, it returns <strong>{{DXGI_ERROR_NOT_CURRENTLY_AVAILABLE}}</strong>.?<p>The combination of <em>WindowHandle</em> and <em>Flags</em> informs {{DXGI}} to stop monitoring window messages for the previously-associated window.</p><p>If the application switches to full-screen mode, {{DXGI}} will choose a full-screen resolution to be the smallest supported resolution that is larger or the same size as the current back buffer size.</p><p>Applications can make some changes to make the transition from windowed to full screen more efficient. For example, on a {{WM_SIZE}} message, the application should release any outstanding swap-chain back buffers, call <strong>{{IDXGISwapChain::ResizeBuffers}}</strong>, then re-acquire the back buffers from the swap chain(s). This gives the swap chain(s) an opportunity to resize the back buffers, and/or recreate them to enable full-screen flipping operation. If the application does not perform this sequence, {{DXGI}} will still make the full-screen/windowed transition, but may be forced to use a stretch operation (since the back buffers may not be the correct size), which may be less efficient. Even if a stretch is not required, presentation may not be optimal because the back buffers might not be directly interchangeable with the front buffer. Thus, a call to <strong>ResizeBuffers</strong> on {{WM_SIZE}} is always recommended, since {{WM_SIZE}} is always sent during a fullscreen transition.</p><p>While windowed, the application can, if it chooses, restrict the size of its window's client area to sizes to which it is comfortable rendering. A fully flexible application would make no such restriction, but {{UI}} elements or other design considerations can, of course, make this flexibility untenable. If the application further chooses to restrict its window's client area to just those that match supported full-screen resolutions, the application can field {{WM_SIZING}}, then check against <strong>{{IDXGIOutput::FindClosestMatchingMode}}</strong>. If a matching mode is found, allow the resize. (The {{IDXGIOutput}} can be retrieved from <strong>{{IDXGISwapChain::GetContainingOutput}}</strong>. Absent subsequent changes to desktop topology, this will be the same output that will be chosen when alt-enter is fielded and fullscreen mode is begun for that swap chain.)</p><p>Applications that want to handle mode changes or Alt+Enter themselves should call <strong>MakeWindowAssociation</strong> with the {{DXGI_MWA_NO_WINDOW_CHANGES}} flag after swap chain creation. The <em>WindowHandle</em> argument, if non-<strong>{{NULL}}</strong>, specifies that the application message queues will not be handled by the {{DXGI}} runtime for all swap chains of a particular target <strong>{{HWND}}</strong>. Calling <strong>MakeWindowAssociation</strong> with the {{DXGI_MWA_NO_WINDOW_CHANGES}} flag after swapchain creation ensures that {{DXGI}} will not interfere with application's handling of window mode changes or Alt+Enter.</p> <p> {{DXGI_ERROR_INVALID_CALL}} if <em>WindowHandle</em> is invalid, or {{E_OUTOFMEMORY}}.</p> <dd> <p>The handle of the window that is to be monitored. This parameter can be <strong>{{NULL}}</strong>; but only if the flags are also 0. </p> </dd> <dd> <p>One or more of the following values: </p> <ul> <li>{{DXGI_MWA_NO_WINDOW_CHANGES}} - Prevent {{DXGI}} from monitoring an applications message queue; this makes {{DXGI}} unable to respond to mode changes.</li> <li>{{DXGI_MWA_NO_ALT_ENTER}} - Prevent {{DXGI}} from responding to an alt-enter sequence.</li> <li>{{DXGI_MWA_NO_PRINT_SCREEN}} - Prevent {{DXGI}} from responding to a print-screen key.</li> </ul> </dd> <p>Get the window through which the user controls the transition to and from full screen.</p> <strong>Note</strong>??If you call this {{API}} in a Session 0 process, it returns <strong>{{DXGI_ERROR_NOT_CURRENTLY_AVAILABLE}}</strong>.? <p>Returns a code that indicates success or failure. <strong>{{S_OK}}</strong> indicates success, {{DXGI_ERROR_INVALID_CALL}} indicates <em>pWindowHandle</em> was passed in as <strong>{{NULL}}</strong>.</p> <dd> <p>A reference to a window handle.</p> </dd> <p>[Starting with Direct3D 11.1, we recommend not to use <strong>CreateSwapChain</strong> anymore to create a swap chain. Instead, use <strong>CreateSwapChainForHwnd</strong>, <strong>CreateSwapChainForCoreWindow</strong>, or <strong>CreateSwapChainForComposition</strong> depending on how you want to create the swap chain.]</p><p>Creates a swap chain.</p> <strong>Note</strong>??If you call this {{API}} in a Session 0 process, it returns <strong>{{DXGI_ERROR_NOT_CURRENTLY_AVAILABLE}}</strong>.?<p>If you attempt to create a swap chain in full-screen mode, and full-screen mode is unavailable, the swap chain will be created in windowed mode and {{DXGI_STATUS_OCCLUDED}} will be returned.</p><p>If the buffer width or the buffer height is zero, the sizes will be inferred from the output window size in the swap-chain description.</p><p>Because the target output can't be chosen explicitly when the swap chain is created, we recommend not to create a full-screen swap chain. This can reduce presentation performance if the swap chain size and the output window size do not match. Here are two ways to ensure that the sizes match:</p><ul> <li>Create a windowed swap chain and then set it full-screen using <strong>{{IDXGISwapChain::SetFullscreenState}}</strong>.</li> <li>Save a reference to the swap chain immediately after creation, and use it to get the output window size during a {{WM_SIZE}} event. Then resize the swap chain buffers (with <strong>{{IDXGISwapChain::ResizeBuffers}}</strong>) during the transition from windowed to full-screen.</li> </ul><p>If the swap chain is in full-screen mode, before you release it you must use <strong>SetFullscreenState</strong> to switch it to windowed mode. For more information about releasing a swap chain, see the "Destroying a Swap Chain" section of {{DXGI}} Overview.</p><p>After the runtime renders the initial frame in full screen, the runtime might unexpectedly exit full screen during a call to <strong>{{IDXGISwapChain::Present}}</strong>. To work around this issue, we recommend that you execute the following code right after you call <strong>CreateSwapChain</strong> to create a full-screen swap chain (<strong>Windowed</strong> member of <strong>{{DXGI_SWAP_CHAIN_DESC}}</strong> set to <strong>{{FALSE}}</strong>). </p><pre> // Detect if newly created full-screen swap chain isn't actually full screen. {{IDXGIOutput}}* pTarget; {{BOOL}} bFullscreen; if ({{SUCCEEDED}}(pSwapChain-&gt;GetFullscreenState(&amp;bFullscreen, &amp;pTarget))) { pTarget-&gt;Release(); } else bFullscreen = {{FALSE}}; // If not full screen, enable full screen again. if (!bFullscreen) { ShowWindow(hWnd, {{SW_MINIMIZE}}); ShowWindow(hWnd, {{SW_RESTORE}}); pSwapChain-&gt;SetFullscreenState({{TRUE}}, {{NULL}}); } </pre><p>You can specify <strong>{{DXGI_SWAP_EFFECT}}</strong> and <strong>{{DXGI_SWAP_CHAIN_FLAG}}</strong> values in the swap-chain description that <em>pDesc</em> points to. These values allow you to use features like flip-model presentation and content protection by using pre-Windows?8 {{APIs}}.</p><p>However, to use stereo presentation and to change resize behavior for the flip model, applications must use the <strong>{{IDXGIFactory2::CreateSwapChainForHwnd}}</strong> method. Otherwise, the back-buffer contents implicitly scale to fit the presentation target size; that is, you can't turn off scaling.</p> <p> {{DXGI_ERROR_INVALID_CALL}} if <em>pDesc</em> or <em>ppSwapChain</em> is <strong>{{NULL}}</strong>, {{DXGI_STATUS_OCCLUDED}} if you request full-screen mode and it is unavailable, or {{E_OUTOFMEMORY}}. Other error codes defined by the type of device passed in may also be returned.</p> <p>Create an adapter interface that represents a software adapter.</p> <p>A software adapter is a {{DLL}} that implements the entirety of a device driver interface, plus emulation, if necessary, of kernel-mode graphics components for Windows. Details on implementing a software adapter can be found in the Windows Vista Driver Development Kit. This is a very complex development task, and is not recommended for general readers.</p><p>Calling this method will increment the module's reference count by one. The reference count can be decremented by calling <strong>FreeLibrary</strong>.</p><p>The typical calling scenario is to call <strong>LoadLibrary</strong>, pass the handle to <strong>CreateSoftwareAdapter</strong>, then immediately call <strong>FreeLibrary</strong> on the {{DLL}} and forget the {{DLL}}'s <strong>{{HMODULE}}</strong>. Since the software adapter calls <strong>FreeLibrary</strong> when it is destroyed, the lifetime of the {{DLL}} will now be owned by the adapter, and the application is free of any further consideration of its lifetime.</p> <p>A return code indicating success or failure.</p> <dd> <p>Handle to the software adapter's dll. {{HMODULE}} can be obtained with <strong>GetModuleHandle</strong> or <strong>LoadLibrary</strong>.</p> </dd> <dd> <p>Address of a reference to an adapter (see <strong>{{IDXGIAdapter}}</strong>).</p> </dd> <p> An <strong>{{IDXGIDevice}}</strong> interface implements a derived class for {{DXGI}} objects that produce image data. </p> <p> The <strong>{{IDXGIDevice}}</strong> interface is designed for use by {{DXGI}} objects that need access to other {{DXGI}} objects. This interface is useful to applications that do not use Direct3D to communicate with {{DXGI}}. </p><p> The Direct3D create device functions return a Direct3D device object. This Direct3D device object implements the <strong>{{IUnknown}}</strong> interface. You can query this Direct3D device object for the device's corresponding <strong>{{IDXGIDevice}}</strong> interface. To retrieve the <strong>{{IDXGIDevice}}</strong> interface of a Direct3D device, use the following code: </p><pre>{{IDXGIDevice}} * pDXGIDevice; hr = g_pd3dDevice-&gt;QueryInterface(__uuidof({{IDXGIDevice}}), (void **)&amp;pDXGIDevice); </pre><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Returns the adapter for the specified device.</p> <p>If the <strong>GetAdapter</strong> method succeeds, the reference count on the adapter interface will be incremented. To avoid a memory leak, be sure to release the interface when you are finished using it.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the {{DXGI_ERROR}} that indicates failure. If the <em>pAdapter</em> parameter is <strong>{{NULL}}</strong> this method returns {{E_INVALIDARG}}.</p> <dd> <p>The address of an <strong>{{IDXGIAdapter}}</strong> interface reference to the adapter. This parameter must not be <strong>{{NULL}}</strong>.</p> </dd> <p>Returns a surface. This method is used internally and you should not call it directly in your application.</p> <p>The <strong>CreateSurface</strong> method creates a buffer to exchange data between one or more devices. It is used internally, and you should not directly call it.</p><p>The runtime automatically creates an <strong>{{IDXGISurface}}</strong> interface when it creates a Direct3D resource object that represents a surface. For example, the runtime creates an <strong>{{IDXGISurface}}</strong> interface when it calls <strong>{{ID3D11Device::CreateTexture2D}}</strong> or <strong>{{ID3D10Device::CreateTexture2D}}</strong> to create a 2D texture. To retrieve the <strong>{{IDXGISurface}}</strong> interface that represents the 2D texture surface, call <strong>{{ID3D11Texture2D::QueryInterface}}</strong> or <strong>{{ID3D10Texture2D::QueryInterface}}</strong>. In this call, you must pass the identifier of <strong>{{IDXGISurface}}</strong>. If the 2D texture has only a single {{MIP}}-map level and does not consist of an array of textures, <strong>QueryInterface</strong> succeeds and returns a reference to the <strong>{{IDXGISurface}}</strong> interface reference. Otherwise, <strong>QueryInterface</strong> fails and does not return the reference to <strong>{{IDXGISurface}}</strong>. </p> <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p>A reference to a <strong>{{DXGI_SURFACE_DESC}}</strong> structure that describes the surface.</p> </dd> <dd> <p>The number of surfaces to create.</p> </dd> <dd> <p>A {{DXGI_USAGE}} flag that specifies how the surface is expected to be used.</p> </dd> <dd> <p>An optional reference to a <strong>{{DXGI_SHARED_RESOURCE}}</strong> structure that contains shared resource information for opening views of such resources.</p> </dd> <dd> <p>The address of an <strong>{{IDXGISurface}}</strong> interface reference to the first created surface.</p> </dd> <p>Gets the residency status of an array of resources.</p> <p>The information returned by the <em>pResidencyStatus</em> argument array describes the residency status at the time that the <strong>QueryResourceResidency</strong> method was called. </p><strong>Note</strong>??The residency status will constantly change.?<p>If you call the <strong>QueryResourceResidency</strong> method during a device removed state, the <em>pResidencyStatus</em> argument will return the <strong>{{DXGI_RESIDENCY_RESIDENT_IN_SHARED_MEMORY}}</strong> flag.</p><strong>Note</strong>??This method should not be called every frame as it incurs a non-trivial amount of overhead.? <p>Returns {{S_OK}} if successful; otherwise, returns {{DXGI_ERROR_DEVICE_REMOVED}}, {{E_INVALIDARG}}, or {{E_POINTER}} (see Common {{HRESULT}} Values and WinError.h for more information).</p> <dd> <p>An array of <strong>{{IDXGIResource}}</strong> interfaces.</p> </dd> <dd> <p>An array of <strong>{{DXGI_RESIDENCY}}</strong> flags. Each element describes the residency status for corresponding element in the <em>ppResources</em> argument array.</p> </dd> <dd> <p>The number of resources in the <em>ppResources</em> argument array and <em>pResidencyStatus</em> argument array.</p> </dd> <p>Sets the {{GPU}} thread priority.</p> <p>The values for the <em>Priority</em> parameter function as follows:</p><ul> <li>Positive values increase the likelihood that the {{GPU}} scheduler will grant {{GPU}} execution cycles to the device when rendering.</li> <li>Negative values lessen the likelihood that the device will receive {{GPU}} execution cycles when devices compete for them.</li> <li>The device is guaranteed to receive some {{GPU}} execution cycles at all settings.</li> </ul><p>To use the <strong>SetGPUThreadPriority</strong> method, you should have a comprehensive understanding of {{GPU}} scheduling. You should profile your application to ensure that it behaves as intended. If used inappropriately, the <strong>SetGPUThreadPriority</strong> method can impede rendering speed and result in a poor user experience.</p> <p>Return {{S_OK}} if successful; otherwise, returns {{E_INVALIDARG}} if the <em>Priority</em> parameter is invalid.</p> <dd> <p>A value that specifies the required {{GPU}} thread priority. This value must be between -7 and 7, inclusive, where 0 represents normal priority.</p> </dd> <p>Gets the {{GPU}} thread priority.</p> <p>Return {{S_OK}} if successful; otherwise, returns {{E_POINTER}} if the <em>pPriority</em> parameter is <strong>{{NULL}}</strong>.</p> <dd> <p>A reference to a variable that receives a value that indicates the current {{GPU}} thread priority. The value will be between -7 and 7, inclusive, where 0 represents normal priority.</p> </dd> <p>The <strong>{{IDXGIFactory1}}</strong> interface implements methods for generating {{DXGI}} objects.</p> <p>This interface is not supported by {{DXGI}} 1.0, which shipped in Windows?Vista and Windows Server?2008. {{DXGI}} 1.1 support is required, which is available on Windows?7, Windows Server?2008?{{R2}}, and as an update to Windows?Vista with Service Pack?2 ({{SP2}}) ({{KB}} 971644) and Windows Server?2008 ({{KB}} 971512).</p><p>To create a factory, call the <strong>CreateDXGIFactory1</strong> function.</p><p>Because you can create a Direct3D device without creating a swap chain, you might need to retrieve the factory that is used to create the device in order to create a swap chain. You can request the <strong>{{IDXGIDevice}}</strong> or <strong>{{IDXGIDevice1}}</strong> interface from the Direct3D device and then use the <strong>{{IDXGIObject::GetParent}}</strong> method to locate the factory. The following code shows how.</p><pre>{{IDXGIDevice1}} * pDXGIDevice; hr = g_pd3dDevice-&gt;QueryInterface(__uuidof({{IDXGIDevice1}}), (void **)&amp;pDXGIDevice); {{IDXGIAdapter}} * pDXGIAdapter; hr = pDXGIDevice-&gt;GetParent(__uuidof({{IDXGIAdapter}}), (void **)&amp;pDXGIAdapter); {{IDXGIFactory1}} * pIDXGIFactory; pDXGIAdapter-&gt;GetParent(__uuidof({{IDXGIFactory1}}), (void **)&amp;pIDXGIFactory); </pre> <p>Enumerates both adapters (video cards) with or without outputs.</p> <p>This method is not supported by {{DXGI}} 1.0, which shipped in Windows?Vista and Windows Server?2008. {{DXGI}} 1.1 support is required, which is available on Windows?7, Windows Server?2008?{{R2}}, and as an update to Windows?Vista with Service Pack?2 ({{SP2}}) ({{KB}} 971644) and Windows Server?2008 ({{KB}} 971512).</p><p>When you create a factory, the factory enumerates the set of adapters that are available in the system. Therefore, if you change the adapters in a system, you must destroy and recreate the <strong>{{IDXGIFactory1}}</strong> object. The number of adapters in a system changes when you add or remove a display card, or dock or undock a laptop. </p><p>When the <strong>EnumAdapters1</strong> method succeeds and fills the <em>ppAdapter</em> parameter with the address of the reference to the adapter interface, <strong>EnumAdapters1</strong> increments the adapter interface's reference count. When you finish using the adapter interface, call the <strong>Release</strong> method to decrement the reference count before you destroy the reference.</p><p><strong>EnumAdapters1</strong> first returns the adapter with the output on which the desktop primary is displayed. This adapter corresponds with an index of zero. <strong>EnumAdapters1</strong> next returns other adapters with outputs. <strong>EnumAdapters1</strong> finally returns adapters without outputs.</p> <p>Returns {{S_OK}} if successful; otherwise, returns {{DXGI_ERROR_NOT_FOUND}} if the index is greater than or equal to the number of adapters in the local system, or {{DXGI_ERROR_INVALID_CALL}} if <em>ppAdapter</em> parameter is <strong>{{NULL}}</strong>.</p> <dd> <p>The index of the adapter to enumerate.</p> </dd> <dd> <p>The address of a reference to an <strong>{{IDXGIAdapter1}}</strong> interface at the position specified by the <em>Adapter</em> parameter. This parameter must not be <strong>{{NULL}}</strong>.</p> </dd> <p>Informs an application of the possible need to re-enumerate adapters.</p> <p>This method is not supported by {{DXGI}} 1.0, which shipped in Windows?Vista and Windows Server?2008. {{DXGI}} 1.1 support is required, which is available on Windows?7, Windows Server?2008?{{R2}}, and as an update to Windows?Vista with Service Pack?2 ({{SP2}}) ({{KB}} 971644) and Windows Server?2008 ({{KB}} 971512).</p> <p><strong>{{FALSE}}</strong>, if a new adapter is becoming available or the current adapter is going away. <strong>{{TRUE}}</strong>, no adapter changes.</p><p><strong>IsCurrent</strong> returns <strong>{{FALSE}}</strong> to inform the calling application to re-enumerate adapters.</p> <p> The <strong>{{IDXGIAdapter1}}</strong> interface represents a display sub-system (including one or more {{GPU}}'s, {{DACs}} and video memory). </p> <p> This interface is not supported by {{DXGI}} 1.0, which shipped in Windows?Vista and Windows Server?2008. {{DXGI}} 1.1 support is required, which is available on Windows?7, Windows Server?2008?{{R2}}, and as an update to Windows?Vista with Service Pack?2 ({{SP2}}) ({{KB}} 971644) and Windows Server?2008 ({{KB}} 971512). </p><p>A display sub-system is often referred to as a video card, however, on some machines the display sub-system is part of the mother board.</p><p> To enumerate the display sub-systems, use <strong>{{IDXGIFactory1::EnumAdapters1}}</strong>. To get an interface to the adapter for a particular device, use <strong>{{IDXGIDevice::GetAdapter}}</strong>. To create a software adapter, use <strong>{{IDXGIFactory::CreateSoftwareAdapter}}</strong>. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Gets a {{DXGI}} 1.1 description of an adapter (or video card).</p> <p>This method is not supported by {{DXGI}} 1.0, which shipped in Windows?Vista and Windows Server?2008. {{DXGI}} 1.1 support is required, which is available on Windows?7, Windows Server?2008?{{R2}}, and as an update to Windows?Vista with Service Pack?2 ({{SP2}}) ({{KB}} 971644) and Windows Server?2008 ({{KB}} 971512).</p><p>Use the <strong>GetDesc1</strong> method to get a {{DXGI}} 1.1 description of an adapter. To get a {{DXGI}} 1.0 description, use the <strong>{{IDXGIAdapter}}</strong> method.</p> <p>Returns {{S_OK}} if successful; otherwise, returns {{E_INVALIDARG}} if the <em>pDesc</em> parameter is <strong>{{NULL}}</strong>. </p> <dd> <p>A reference to a <strong>{{DXGI_ADAPTER_DESC1}}</strong> structure that describes the adapter. This parameter must not be <strong>{{NULL}}</strong>. On feature level 9 graphics hardware, <strong>GetDesc1</strong> returns zeros for the {{PCI}} {{ID}} in the <strong>VendorId</strong>, <strong>DeviceId</strong>, <strong>SubSysId</strong>, and <strong>Revision</strong> members of <strong>{{DXGI_ADAPTER_DESC1}}</strong> and ?Software Adapter? for the description string in the <strong>Description</strong> member.</p> </dd> <p> An <strong>{{IDXGIDevice1}}</strong> interface implements a derived class for {{DXGI}} objects that produce image data. </p> <p>This interface is not supported by Direct3D 12 devices. Direct3D 12 applications have direct control over their swapchain management, so better latency control should be handled by the application. You can make use of Waitable objects (refer to <strong>{{DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT}}</strong>) and the <strong>{{IDXGISwapChain2::SetMaximumFrameLatency}}</strong> method if desired. </p><p> This interface is not supported by {{DXGI}} 1.0, which shipped in Windows?Vista and Windows Server?2008. {{DXGI}} 1.1 support is required, which is available on Windows?7, Windows Server?2008?{{R2}}, and as an update to Windows?Vista with Service Pack?2 ({{SP2}}) ({{KB}} 971644) and Windows Server?2008 ({{KB}} 971512). </p><p> The <strong>{{IDXGIDevice1}}</strong> interface is designed for use by {{DXGI}} objects that need access to other {{DXGI}} objects. This interface is useful to applications that do not use Direct3D to communicate with {{DXGI}}. </p><p> The Direct3D create device functions return a Direct3D device object. This Direct3D device object implements the <strong>{{IUnknown}}</strong> interface. You can query this Direct3D device object for the device's corresponding <strong>{{IDXGIDevice1}}</strong> interface. To retrieve the <strong>{{IDXGIDevice1}}</strong> interface of a Direct3D device, use the following code: </p><pre>{{IDXGIDevice1}} * pDXGIDevice; hr = g_pd3dDevice-&gt;QueryInterface(__uuidof({{IDXGIDevice1}}), (void **)&amp;pDXGIDevice); </pre><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Sets the number of frames that the system is allowed to queue for rendering.</p> <p>This method is not supported by {{DXGI}} 1.0, which shipped in Windows?Vista and Windows Server?2008. {{DXGI}} 1.1 support is required, which is available on Windows?7, Windows Server?2008?{{R2}}, and as an update to Windows?Vista with Service Pack?2 ({{SP2}}) ({{KB}} 971644) and Windows Server?2008 ({{KB}} 971512).</p><p>Frame latency is the number of frames that are allowed to be stored in a queue before submission for rendering. Latency is often used to control how the {{CPU}} chooses between responding to user input and frames that are in the render queue. It is often beneficial for applications that have no user input (for example, video playback) to queue more than 3 frames of data.</p> <p>Returns {{S_OK}} if successful; otherwise, {{DXGI_ERROR_DEVICE_REMOVED}} if the device was removed.</p> <dd> <p>The maximum number of back buffer frames that a driver can queue. The value defaults to 3, but can range from 1 to 16. A value of 0 will reset latency to the default. For multi-head devices, this value is specified per-head.</p> </dd> <p>Gets the number of frames that the system is allowed to queue for rendering.</p> <p>This method is not supported by {{DXGI}} 1.0, which shipped in Windows?Vista and Windows Server?2008. {{DXGI}} 1.1 support is required, which is available on Windows?7, Windows Server?2008?{{R2}}, and as an update to Windows?Vista with Service Pack?2 ({{SP2}}) ({{KB}} 971644) and Windows Server?2008 ({{KB}} 971512).</p><p>Frame latency is the number of frames that are allowed to be stored in a queue before submission for rendering. Latency is often used to control how the {{CPU}} chooses between responding to user input and frames that are in the render queue. It is often beneficial for applications that have no user input (for example, video playback) to queue more than 3 frames of data.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the following members of the {{D3DERR}} enumerated type:</p><ul> <li><strong>{{D3DERR_DEVICELOST}}</strong></li> <li><strong>{{D3DERR_DEVICEREMOVED}}</strong></li> <li><strong>{{D3DERR_DRIVERINTERNALERROR}}</strong></li> <li><strong>{{D3DERR_INVALIDCALL}}</strong></li> <li><strong>{{D3DERR_OUTOFVIDEOMEMORY}}</strong></li> </ul> <dd> <p>This value is set to the number of frames that can be queued for render. This value defaults to 3, but can range from 1 to 16.</p> </dd> <p>Creates a {{DXGI}} 1.0 factory that you can use to generate other {{DXGI}} objects.</p> <p>Use a {{DXGI}} factory to generate objects that <strong>enumerate adapters</strong>, <strong>create swap chains</strong>, and <strong>associate a window</strong> with the alt+enter key sequence for toggling to and from the fullscreen display mode.</p><p>If the <strong>CreateDXGIFactory</strong> function succeeds, the reference count on the <strong>{{IDXGIFactory}}</strong> interface is incremented. To avoid a memory leak, when you finish using the interface, call the <strong>{{IDXGIFactory::Release}}</strong> method to release the interface.</p><strong>Note</strong>??Do not mix the use of {{DXGI}} 1.0 (<strong>{{IDXGIFactory}}</strong>) and {{DXGI}} 1.1 (<strong>{{IDXGIFactory1}}</strong>) in an application. Use <strong>{{IDXGIFactory}}</strong> or <strong>{{IDXGIFactory1}}</strong>, but not both in an application.?<strong>Note</strong>??<strong>CreateDXGIFactory</strong> fails if your app's <strong>DllMain</strong> function calls it. For more info about how {{DXGI}} responds from <strong>DllMain</strong>, see {{DXGI}} Responses from {{DLLMain}}.?<strong>Note</strong>??Starting with Windows?8, all {{DXGI}} factories (regardless if they were created with <strong>CreateDXGIFactory</strong> or <strong>CreateDXGIFactory1</strong>) enumerate adapters identically. The enumeration order of adapters, which you retrieve with <strong>{{IDXGIFactory::EnumAdapters}}</strong> or <strong>{{IDXGIFactory1::EnumAdapters1}}</strong>, is as follows: <ul> <li>Adapter with the output on which the desktop primary is displayed. This adapter corresponds with an index of zero.</li> <li>Adapters with outputs.</li> <li>Adapters without outputs.</li> </ul>?<p>The <strong>CreateDXGIFactory</strong> function does not exist for Windows Store apps. Instead, Windows Store apps use the <strong>CreateDXGIFactory1</strong> function.</p> <p>Returns <strong>{{S_OK}}</strong> if successful; otherwise, returns one of the following {{DXGI_ERROR}}.</p> <dd> <p>The globally unique identifier ({{GUID}}) of the <strong>{{IDXGIFactory}}</strong> object referenced by the <em>ppFactory</em> parameter.</p> </dd> <dd> <p>Address of a reference to an <strong>{{IDXGIFactory}}</strong> object.</p> </dd> <p>Creates a {{DXGI}} 1.1 factory that you can use to generate other {{DXGI}} objects.</p> <p>Use a {{DXGI}} 1.1 factory to generate objects that <strong>enumerate adapters</strong>, <strong>create swap chains</strong>, and <strong>associate a window</strong> with the alt+enter key sequence for toggling to and from the full-screen display mode. </p><p>If the <strong>CreateDXGIFactory1</strong> function succeeds, the reference count on the <strong>{{IDXGIFactory1}}</strong> interface is incremented. To avoid a memory leak, when you finish using the interface, call the <strong>{{IDXGIFactory1::Release}}</strong> method to release the interface.</p><p>This entry point is not supported by {{DXGI}} 1.0, which shipped in Windows?Vista and Windows Server?2008. {{DXGI}} 1.1 support is required, which is available on Windows?7, Windows Server?2008?{{R2}}, and as an update to Windows?Vista with Service Pack?2 ({{SP2}}) ({{KB}} 971644) and Windows Server?2008 ({{KB}} 971512).</p><strong>Note</strong>??Do not mix the use of {{DXGI}} 1.0 (<strong>{{IDXGIFactory}}</strong>) and {{DXGI}} 1.1 (<strong>{{IDXGIFactory1}}</strong>) in an application. Use <strong>{{IDXGIFactory}}</strong> or <strong>{{IDXGIFactory1}}</strong>, but not both in an application.?<strong>Note</strong>??<strong>CreateDXGIFactory1</strong> fails if your app's <strong>DllMain</strong> function calls it. For more info about how {{DXGI}} responds from <strong>DllMain</strong>, see {{DXGI}} Responses from {{DLLMain}}.?<strong>Note</strong>??Starting with Windows?8, all {{DXGI}} factories (regardless if they were created with <strong>CreateDXGIFactory</strong> or <strong>CreateDXGIFactory1</strong>) enumerate adapters identically. The enumeration order of adapters, which you retrieve with <strong>{{IDXGIFactory::EnumAdapters}}</strong> or <strong>{{IDXGIFactory1::EnumAdapters1}}</strong>, is as follows: <ul> <li>Adapter with the output on which the desktop primary is displayed. This adapter corresponds with an index of zero.</li> <li>Adapters with outputs.</li> <li>Adapters without outputs.</li> </ul>? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p>The globally unique identifier ({{GUID}}) of the <strong>{{IDXGIFactory1}}</strong> object referenced by the <em>ppFactory</em> parameter.</p> </dd> <dd> <p>Address of a reference to an <strong>{{IDXGIFactory1}}</strong> object.</p> </dd> <p> Resource data formats, including fully-typed and typeless formats. A list of modifiers at the bottom of the page more fully describes each format type. </p> <dd> <p>The format is not known.</p> </dd> <dd> <p>A four-component, 128-bit typeless format that supports 32 bits per channel including alpha. ?</p> </dd> <dd> <p>A four-component, 128-bit floating-point format that supports 32 bits per channel including alpha. 1,5,8</p> </dd> <dd> <p>A four-component, 128-bit unsigned-integer format that supports 32 bits per channel including alpha. ?</p> </dd> <dd> <p>A four-component, 128-bit signed-integer format that supports 32 bits per channel including alpha. ?</p> </dd> <dd> <p>A three-component, 96-bit typeless format that supports 32 bits per color channel.</p> </dd> <dd> <p>A three-component, 96-bit floating-point format that supports 32 bits per color channel.5,8</p> </dd> <dd> <p>A three-component, 96-bit unsigned-integer format that supports 32 bits per color channel.</p> </dd> <dd> <p>A three-component, 96-bit signed-integer format that supports 32 bits per color channel.</p> </dd> <dd> <p>A four-component, 64-bit typeless format that supports 16 bits per channel including alpha.</p> </dd> <dd> <p>A four-component, 64-bit floating-point format that supports 16 bits per channel including alpha.5,7</p> </dd> <dd> <p>A four-component, 64-bit unsigned-normalized-integer format that supports 16 bits per channel including alpha.</p> </dd> <dd> <p>A four-component, 64-bit unsigned-integer format that supports 16 bits per channel including alpha.</p> </dd> <dd> <p>A four-component, 64-bit signed-normalized-integer format that supports 16 bits per channel including alpha.</p> </dd> <dd> <p>A four-component, 64-bit signed-integer format that supports 16 bits per channel including alpha.</p> </dd> <dd> <p>A two-component, 64-bit typeless format that supports 32 bits for the red channel and 32 bits for the green channel.</p> </dd> <dd> <p>A two-component, 64-bit floating-point format that supports 32 bits for the red channel and 32 bits for the green channel.5,8</p> </dd> <dd> <p>A two-component, 64-bit unsigned-integer format that supports 32 bits for the red channel and 32 bits for the green channel.</p> </dd> <dd> <p>A two-component, 64-bit signed-integer format that supports 32 bits for the red channel and 32 bits for the green channel.</p> </dd> <dd> <p>A two-component, 64-bit typeless format that supports 32 bits for the red channel, 8 bits for the green channel, and 24 bits are unused.</p> </dd> <dd> <p>A 32-bit floating-point component, and two unsigned-integer components (with an additional 32 bits). This format supports 32-bit depth, 8-bit stencil, and 24 bits are unused.?</p> </dd> <dd> <p>A 32-bit floating-point component, and two typeless components (with an additional 32 bits). This format supports 32-bit red channel, 8 bits are unused, and 24 bits are unused.?</p> </dd> <dd> <p>A 32-bit typeless component, and two unsigned-integer components (with an additional 32 bits). This format has 32 bits unused, 8 bits for green channel, and 24 bits are unused.</p> </dd> <dd> <p>A four-component, 32-bit typeless format that supports 10 bits for each color and 2 bits for alpha.</p> </dd> <dd> <p>A four-component, 32-bit unsigned-normalized-integer format that supports 10 bits for each color and 2 bits for alpha.</p> </dd> <dd> <p>A four-component, 32-bit unsigned-integer format that supports 10 bits for each color and 2 bits for alpha.</p> </dd> <dd> <p>Three partial-precision floating-point numbers encoded into a single 32-bit value (a variant of s10e5, which is sign bit, 10-bit mantissa, and 5-bit biased (15) exponent). There are no sign bits, and there is a 5-bit biased (15) exponent for each channel, 6-bit mantissa for R and G, and a 5-bit mantissa for B, as shown in the following illustration.5,7</p> <p></p> </dd> <dd> <p>A four-component, 32-bit typeless format that supports 8 bits per channel including alpha.</p> </dd> <dd> <p>A four-component, 32-bit unsigned-normalized-integer format that supports 8 bits per channel including alpha.</p> </dd> <dd> <p>A four-component, 32-bit unsigned-normalized integer sRGB format that supports 8 bits per channel including alpha.</p> </dd> <dd> <p>A four-component, 32-bit unsigned-integer format that supports 8 bits per channel including alpha.</p> </dd> <dd> <p>A four-component, 32-bit signed-normalized-integer format that supports 8 bits per channel including alpha.</p> </dd> <dd> <p>A four-component, 32-bit signed-integer format that supports 8 bits per channel including alpha.</p> </dd> <dd> <p>A two-component, 32-bit typeless format that supports 16 bits for the red channel and 16 bits for the green channel.</p> </dd> <dd> <p>A two-component, 32-bit floating-point format that supports 16 bits for the red channel and 16 bits for the green channel.5,7</p> </dd> <dd> <p>A two-component, 32-bit unsigned-normalized-integer format that supports 16 bits each for the green and red channels.</p> </dd> <dd> <p>A two-component, 32-bit unsigned-integer format that supports 16 bits for the red channel and 16 bits for the green channel.</p> </dd> <dd> <p>A two-component, 32-bit signed-normalized-integer format that supports 16 bits for the red channel and 16 bits for the green channel.</p> </dd> <dd> <p>A two-component, 32-bit signed-integer format that supports 16 bits for the red channel and 16 bits for the green channel.</p> </dd> <dd> <p>A single-component, 32-bit typeless format that supports 32 bits for the red channel.</p> </dd> <dd> <p>A single-component, 32-bit floating-point format that supports 32 bits for depth.5,8</p> </dd> <dd> <p>A single-component, 32-bit floating-point format that supports 32 bits for the red channel.5,8</p> </dd> <dd> <p>A single-component, 32-bit unsigned-integer format that supports 32 bits for the red channel.</p> </dd> <dd> <p>A single-component, 32-bit signed-integer format that supports 32 bits for the red channel.</p> </dd> <dd> <p>A two-component, 32-bit typeless format that supports 24 bits for the red channel and 8 bits for the green channel.</p> </dd> <dd> <p>A 32-bit z-buffer format that supports 24 bits for depth and 8 bits for stencil.</p> </dd> <dd> <p>A 32-bit format, that contains a 24 bit, single-component, unsigned-normalized integer, with an additional typeless 8 bits. This format has 24 bits red channel and 8 bits unused.</p> </dd> <dd> <p>A 32-bit format, that contains a 24 bit, single-component, typeless format, with an additional 8 bit unsigned integer component. This format has 24 bits unused and 8 bits green channel.</p> </dd> <dd> <p>A two-component, 16-bit typeless format that supports 8 bits for the red channel and 8 bits for the green channel.</p> </dd> <dd> <p>A two-component, 16-bit unsigned-normalized-integer format that supports 8 bits for the red channel and 8 bits for the green channel.</p> </dd> <dd> <p>A two-component, 16-bit unsigned-integer format that supports 8 bits for the red channel and 8 bits for the green channel.</p> </dd> <dd> <p>A two-component, 16-bit signed-normalized-integer format that supports 8 bits for the red channel and 8 bits for the green channel.</p> </dd> <dd> <p>A two-component, 16-bit signed-integer format that supports 8 bits for the red channel and 8 bits for the green channel.</p> </dd> <dd> <p>A single-component, 16-bit typeless format that supports 16 bits for the red channel.</p> </dd> <dd> <p>A single-component, 16-bit floating-point format that supports 16 bits for the red channel.5,7</p> </dd> <dd> <p>A single-component, 16-bit unsigned-normalized-integer format that supports 16 bits for depth.</p> </dd> <dd> <p>A single-component, 16-bit unsigned-normalized-integer format that supports 16 bits for the red channel.</p> </dd> <dd> <p>A single-component, 16-bit unsigned-integer format that supports 16 bits for the red channel.</p> </dd> <dd> <p>A single-component, 16-bit signed-normalized-integer format that supports 16 bits for the red channel.</p> </dd> <dd> <p>A single-component, 16-bit signed-integer format that supports 16 bits for the red channel.</p> </dd> <dd> <p>A single-component, 8-bit typeless format that supports 8 bits for the red channel.</p> </dd> <dd> <p>A single-component, 8-bit unsigned-normalized-integer format that supports 8 bits for the red channel.</p> </dd> <dd> <p>A single-component, 8-bit unsigned-integer format that supports 8 bits for the red channel.</p> </dd> <dd> <p>A single-component, 8-bit signed-normalized-integer format that supports 8 bits for the red channel.</p> </dd> <dd> <p>A single-component, 8-bit signed-integer format that supports 8 bits for the red channel.</p> </dd> <dd> <p>A single-component, 8-bit unsigned-normalized-integer format for alpha only.</p> </dd> <dd> <p>A single-component, 1-bit unsigned-normalized integer format that supports 1 bit for the red channel. ?.</p> </dd> <dd> <p>Three partial-precision floating-point numbers encoded into a single 32-bit value all sharing the same 5-bit exponent (variant of s10e5, which is sign bit, 10-bit mantissa, and 5-bit biased (15) exponent). There is no sign bit, and there is a shared 5-bit biased (15) exponent and a 9-bit mantissa for each channel, as shown in the following illustration. 2,6,7.</p> <p></p> </dd> <dd> <p>A four-component, 32-bit unsigned-normalized-integer format. This packed {{RGB}} format is analogous to the {{UYVY}} format. Each 32-bit block describes a pair of pixels: ({{R8}}, {{G8}}, {{B8}}) and ({{R8}}, {{G8}}, {{B8}}) where the {{R8}}/{{B8}} values are repeated, and the {{G8}} values are unique to each pixel. ?</p> <p>Width must be even.</p> </dd> <dd> <p>A four-component, 32-bit unsigned-normalized-integer format. This packed {{RGB}} format is analogous to the {{YUY2}} format. Each 32-bit block describes a pair of pixels: ({{R8}}, {{G8}}, {{B8}}) and ({{R8}}, {{G8}}, {{B8}}) where the {{R8}}/{{B8}} values are repeated, and the {{G8}} values are unique to each pixel. ?</p> <p>Width must be even.</p> </dd> <dd> <p>Four-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>Four-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>Four-component block-compression format for sRGB data. For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>Four-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>Four-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>Four-component block-compression format for sRGB data. For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>Four-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>Four-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>Four-component block-compression format for sRGB data. For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>One-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>One-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>One-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>Two-component typeless block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>Two-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>Two-component block-compression format. For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>A three-component, 16-bit unsigned-normalized-integer format that supports 5 bits for blue, 6 bits for green, and 5 bits for red.</p> <p><strong>Direct3D 10 through Direct3D 11:??</strong>This value is defined for {{DXGI}}. However, Direct3D 10, 10.1, or 11 devices do not support this format.</p> <p><strong>Direct3D 11.1:??</strong>This value is not supported until Windows?8.</p> </dd> <dd> <p>A four-component, 16-bit unsigned-normalized-integer format that supports 5 bits for each color channel and 1-bit alpha.</p> <p><strong>Direct3D 10 through Direct3D 11:??</strong>This value is defined for {{DXGI}}. However, Direct3D 10, 10.1, or 11 devices do not support this format.</p> <p><strong>Direct3D 11.1:??</strong>This value is not supported until Windows?8.</p> </dd> <dd> <p>A four-component, 32-bit unsigned-normalized-integer format that supports 8 bits for each color channel and 8-bit alpha.</p> </dd> <dd> <p>A four-component, 32-bit unsigned-normalized-integer format that supports 8 bits for each color channel and 8 bits unused.</p> </dd> <dd> <p>A four-component, 32-bit 2.8-biased fixed-point format that supports 10 bits for each color channel and 2-bit alpha.</p> </dd> <dd> <p>A four-component, 32-bit typeless format that supports 8 bits for each channel including alpha. ?</p> </dd> <dd> <p>A four-component, 32-bit unsigned-normalized standard {{RGB}} format that supports 8 bits for each channel including alpha. ?</p> </dd> <dd> <p>A four-component, 32-bit typeless format that supports 8 bits for each color channel, and 8 bits are unused. ?</p> </dd> <dd> <p>A four-component, 32-bit unsigned-normalized standard {{RGB}} format that supports 8 bits for each color channel, and 8 bits are unused. ?</p> </dd> <dd> <p>A typeless block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>A block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.?</p> </dd> <dd> <p>A block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.?</p> </dd> <dd> <p>A typeless block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>A block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>A block-compression format. ? For information about block-compression formats, see Texture Block Compression in Direct3D 11.</p> </dd> <dd> <p>Most common {{YUV}} 4:4:4 video resource format. Valid view formats for this video resource format are {{DXGI_FORMAT_R8G8B8A8_UNORM}} and {{DXGI_FORMAT_R8G8B8A8_UINT}}. For {{UAVs}}, an additional valid view format is {{DXGI_FORMAT_R32_UINT}}. By using {{DXGI_FORMAT_R32_UINT}} for {{UAVs}}, you can both read and write as opposed to just write for {{DXGI_FORMAT_R8G8B8A8_UNORM}} and {{DXGI_FORMAT_R8G8B8A8_UINT}}. Supported view types are {{SRV}}, {{RTV}}, and {{UAV}}. One view provides a straightforward mapping of the entire surface. The mapping to the view channel is V-&gt;{{R8}}, U-&gt;{{G8}}, Y-&gt;{{B8}}, and A-&gt;{{A8}}.</p> <p>For more info about {{YUV}} formats for video rendering, see Recommended 8-Bit {{YUV}} Formats for Video Rendering. </p> <p><strong>Direct3D 11.1:??</strong>This value is not supported until Windows?8.</p> </dd> <dd> <p>10-bit per channel packed {{YUV}} 4:4:4 video resource format. Valid view formats for this video resource format are {{DXGI_FORMAT_R10G10B10A2_UNORM}} and {{DXGI_FORMAT_R10G10B10A2_UINT}}. For {{UAVs}}, an additional valid view format is {{DXGI_FORMAT_R32_UINT}}. By using {{DXGI_FORMAT_R32_UINT}} for {{UAVs}}, you can both read and write as opposed to just write for {{DXGI_FORMAT_R10G10B10A2_UNORM}} and {{DXGI_FORMAT_R10G10B10A2_UINT}}. Supported view types are {{SRV}} and {{UAV}}. One view provides a straightforward mapping of the entire surface. The mapping to the view channel is U-&gt;{{R10}}, Y-&gt;{{G10}}, V-&gt;{{B10}}, and A-&gt;{{A2}}.</p> <p>For more info about {{YUV}} formats for video rendering, see Recommended 8-Bit {{YUV}} Formats for Video Rendering. </p> <p><strong>Direct3D 11.1:??</strong>This value is not supported until Windows?8.</p> </dd> <dd> <p>16-bit per channel packed {{YUV}} 4:4:4 video resource format. Valid view formats for this video resource format are {{DXGI_FORMAT_R16G16B16A16_UNORM}} and {{DXGI_FORMAT_R16G16B16A16_UINT}}. Supported view types are {{SRV}} and {{UAV}}. One view provides a straightforward mapping of the entire surface. The mapping to the view channel is U-&gt;{{R16}}, Y-&gt;{{G16}}, V-&gt;{{B16}}, and A-&gt;{{A16}}.</p> <p>For more info about {{YUV}} formats for video rendering, see Recommended 8-Bit {{YUV}} Formats for Video Rendering. </p> <p><strong>Direct3D 11.1:??</strong>This value is not supported until Windows?8.</p> </dd> <dd> <p>Most common {{YUV}} 4:2:0 video resource format. Valid luminance data view formats for this video resource format are {{DXGI_FORMAT_R8_UNORM}} and {{DXGI_FORMAT_R8_UINT}}. Valid chrominance data view formats (width and height are each 1/2 of luminance view) for this video resource format are {{DXGI_FORMAT_R8G8_UNORM}} and {{DXGI_FORMAT_R8G8_UINT}}. Supported view types are {{SRV}}, {{RTV}}, and {{UAV}}. For luminance data view, the mapping to the view channel is Y-&gt;{{R8}}. For chrominance data view, the mapping to the view channel is U-&gt;{{R8}} and V-&gt;{{G8}}.</p> <p>For more info about {{YUV}} formats for video rendering, see Recommended 8-Bit {{YUV}} Formats for Video Rendering. </p> <p>Width and height must be even. Direct3D 11 staging resources and initData parameters for this format use (rowPitch * (height + (height / 2))) bytes. The first (SysMemPitch * height) bytes are the Y plane, the remaining (SysMemPitch * (height / 2)) bytes are the {{UV}} plane.</p> <p>An app using the {{YUY}} 4:2:0 formats must map the luma (Y) plane separately from the chroma ({{UV}}) planes. Developers do this by calling <strong>{{ID3D12Device::CreateShaderResourceView}}</strong> twice for the same texture and passing in 1-channel and 2-channel formats. Passing in a 1-channel format compatible with the Y plane maps only the Y plane. Passing in a 2-channel format compatible with the {{UV}} planes (together) maps only the U and V planes as a single resource view.</p> <p><strong>Direct3D 11.1:??</strong>This value is not supported until Windows?8.</p> </dd> <dd> <p>10-bit per channel planar {{YUV}} 4:2:0 video resource format. Valid luminance data view formats for this video resource format are {{DXGI_FORMAT_R16_UNORM}} and {{DXGI_FORMAT_R16_UINT}}. The runtime does not enforce whether the lowest 6 bits are 0 (given that this video resource format is a 10-bit format that uses 16 bits). If required, application shader code would have to enforce this manually. From the runtime's point of view, {{DXGI_FORMAT_P010}} is no different than {{DXGI_FORMAT_P016}}. Valid chrominance data view formats (width and height are each 1/2 of luminance view) for this video resource format are {{DXGI_FORMAT_R16G16_UNORM}} and {{DXGI_FORMAT_R16G16_UINT}}. For {{UAVs}}, an additional valid chrominance data view format is {{DXGI_FORMAT_R32_UINT}}. By using {{DXGI_FORMAT_R32_UINT}} for {{UAVs}}, you can both read and write as opposed to just write for {{DXGI_FORMAT_R16G16_UNORM}} and {{DXGI_FORMAT_R16G16_UINT}}. Supported view types are {{SRV}}, {{RTV}}, and {{UAV}}. For luminance data view, the mapping to the view channel is Y-&gt;{{R16}}. For chrominance data view, the mapping to the view channel is U-&gt;{{R16}} and V-&gt;{{G16}}.</p> <p>For more info about {{YUV}} formats for video rendering, see Recommended 8-Bit {{YUV}} Formats for Video Rendering. </p> <p>Width and height must be even. Direct3D 11 staging resources and initData parameters for this format use (rowPitch * (height + (height / 2))) bytes. The first (SysMemPitch * height) bytes are the Y plane, the remaining (SysMemPitch * (height / 2)) bytes are the {{UV}} plane.</p> <p>An app using the {{YUY}} 4:2:0 formats must map the luma (Y) plane separately from the chroma ({{UV}}) planes. Developers do this by calling <strong>{{ID3D12Device::CreateShaderResourceView}}</strong> twice for the same texture and passing in 1-channel and 2-channel formats. Passing in a 1-channel format compatible with the Y plane maps only the Y plane. Passing in a 2-channel format compatible with the {{UV}} planes (together) maps only the U and V planes as a single resource view.</p> <p><strong>Direct3D 11.1:??</strong>This value is not supported until Windows?8.</p> </dd> <dd> <p>16-bit per channel planar {{YUV}} 4:2:0 video resource format. Valid luminance data view formats for this video resource format are {{DXGI_FORMAT_R16_UNORM}} and {{DXGI_FORMAT_R16_UINT}}. Valid chrominance data view formats (width and height are each 1/2 of luminance view) for this video resource format are {{DXGI_FORMAT_R16G16_UNORM}} and {{DXGI_FORMAT_R16G16_UINT}}. For {{UAVs}}, an additional valid chrominance data view format is {{DXGI_FORMAT_R32_UINT}}. By using {{DXGI_FORMAT_R32_UINT}} for {{UAVs}}, you can both read and write as opposed to just write for {{DXGI_FORMAT_R16G16_UNORM}} and {{DXGI_FORMAT_R16G16_UINT}}. Supported view types are {{SRV}}, {{RTV}}, and {{UAV}}. For luminance data view, the mapping to the view channel is Y-&gt;{{R16}}. For chrominance data view, the mapping to the view channel is U-&gt;{{R16}} and V-&gt;{{G16}}.</p> <p>For more info about {{YUV}} formats for video rendering, see Recommended 8-Bit {{YUV}} Formats for Video Rendering. </p> <p>Width and height must be even. Direct3D 11 staging resources and initData parameters for this format use (rowPitch * (height + (height / 2))) bytes. The first (SysMemPitch * height) bytes are the Y plane, the remaining (SysMemPitch * (height / 2)) bytes are the {{UV}} plane.</p> <p>An app using the {{YUY}} 4:2:0 formats must map the luma (Y) plane separately from the chroma ({{UV}}) planes. Developers do this by calling <strong>{{ID3D12Device::CreateShaderResourceView}}</strong> twice for the same texture and passing in 1-channel and 2-channel formats. Passing in a 1-channel format compatible with the Y plane maps only the Y plane. Passing in a 2-channel format compatible with the {{UV}} planes (together) maps only the U and V planes as a single resource view.</p> <p><strong>Direct3D 11.1:??</strong>This value is not supported until Windows?8.</p> </dd> <dd> <p>8-bit per channel planar {{YUV}} 4:2:0 video resource format. This format is subsampled where each pixel has its own Y value, but each 2x2 pixel block shares a single U and V value. The runtime requires that the width and height of all resources that are created with this format are multiples of 2. The runtime also requires that the left, right, top, and bottom members of any {{RECT}} that are used for this format are multiples of 2. This format differs from {{DXGI_FORMAT_NV12}} in that the layout of the data within the resource is completely opaque to applications. Applications cannot use the {{CPU}} to map the resource and then access the data within the resource. You cannot use shaders with this format. Because of this behavior, legacy hardware that supports a non-{{NV12}} 4:2:0 layout (for example, {{YV12}}, and so on) can be used. Also, new hardware that has a 4:2:0 implementation better than {{NV12}} can be used when the application does not need the data to be in a standard layout. </p> <p>For more info about {{YUV}} formats for video rendering, see Recommended 8-Bit {{YUV}} Formats for Video Rendering. </p> <p>Width and height must be even. Direct3D 11 staging resources and initData parameters for this format use (rowPitch * (height + (height / 2))) bytes. </p> <p>An app using the {{YUY}} 4:2:0 formats must map the luma (Y) plane separately from the chroma ({{UV}}) planes. Developers do this by calling <strong>{{ID3D12Device::CreateShaderResourceView}}</strong> twice for the same texture and passing in 1-channel and 2-channel formats. Passing in a 1-channel format compatible with the Y plane maps only the Y plane. Passing in a 2-channel format compatible with the {{UV}} planes (together) maps only the U and V planes as a single resource view.</p> <p><strong>Direct3D 11.1:??</strong>This value is not supported until Windows?8.</p> </dd> <dd> <p>Most common {{YUV}} 4:2:2 video resource format. Valid view formats for this video resource format are {{DXGI_FORMAT_R8G8B8A8_UNORM}} and {{DXGI_FORMAT_R8G8B8A8_UINT}}. For {{UAVs}}, an additional valid view format is {{DXGI_FORMAT_R32_UINT}}. By using {{DXGI_FORMAT_R32_UINT}} for {{UAVs}}, you can both read and write as opposed to just write for {{DXGI_FORMAT_R8G8B8A8_UNORM}} and {{DXGI_FORMAT_R8G8B8A8_UINT}}. Supported view types are {{SRV}} and {{UAV}}. One view provides a straightforward mapping of the entire surface. The mapping to the view channel is {{Y0}}-&gt;{{R8}}, {{U0}}-&gt;{{G8}}, {{Y1}}-&gt;{{B8}}, and {{V0}}-&gt;{{A8}}.</p> <p>A unique valid view format for this video resource format is {{DXGI_FORMAT_R8G8_B8G8_UNORM}}. With this view format, the width of the view appears to be twice what the {{DXGI_FORMAT_R8G8B8A8_UNORM}} or {{DXGI_FORMAT_R8G8B8A8_UINT}} view would be when hardware reconstructs {{RGBA}} automatically on read and before filtering. This Direct3D hardware behavior is legacy and is likely not useful any more. With this view format, the mapping to the view channel is {{Y0}}-&gt;{{R8}}, {{U0}}-&gt; {{G8}}[0], {{Y1}}-&gt;{{B8}}, and {{V0}}-&gt; {{G8}}[1].</p> <p>For more info about {{YUV}} formats for video rendering, see Recommended 8-Bit {{YUV}} Formats for Video Rendering. </p> <p>Width must be even.</p> <p><strong>Direct3D 11.1:??</strong>This value is not supported until Windows?8.</p> </dd> <dd> <p>10-bit per channel packed {{YUV}} 4:2:2 video resource format. Valid view formats for this video resource format are {{DXGI_FORMAT_R16G16B16A16_UNORM}} and {{DXGI_FORMAT_R16G16B16A16_UINT}}. The runtime does not enforce whether the lowest 6 bits are 0 (given that this video resource format is a 10-bit format that uses 16 bits). If required, application shader code would have to enforce this manually. From the runtime's point of view, {{DXGI_FORMAT_Y210}} is no different than {{DXGI_FORMAT_Y216}}. Supported view types are {{SRV}} and {{UAV}}. One view provides a straightforward mapping of the entire surface. The mapping to the view channel is {{Y0}}-&gt;{{R16}}, U-&gt;{{G16}}, {{Y1}}-&gt;{{B16}}, and V-&gt;{{A16}}.</p> <p>For more info about {{YUV}} formats for video rendering, see Recommended 8-Bit {{YUV}} Formats for Video Rendering. </p> <p>Width must be even.</p> <p><strong>Direct3D 11.1:??</strong>This value is not supported until Windows?8.</p> </dd> <dd> <p>16-bit per channel packed {{YUV}} 4:2:2 video resource format. Valid view formats for this video resource format are {{DXGI_FORMAT_R16G16B16A16_UNORM}} and {{DXGI_FORMAT_R16G16B16A16_UINT}}. Supported view types are {{SRV}} and {{UAV}}. One view provides a straightforward mapping of the entire surface. The mapping to the view channel is {{Y0}}-&gt;{{R16}}, U-&gt;{{G16}}, {{Y1}}-&gt;{{B16}}, and V-&gt;{{A16}}.</p> <p>For more info about {{YUV}} formats for video rendering, see Recommended 8-Bit {{YUV}} Formats for Video Rendering. </p> <p>Width must be even.</p> <p><strong>Direct3D 11.1:??</strong>This value is not supported until Windows?8.</p> </dd> <dd> <p>Most common planar {{YUV}} 4:1:1 video resource format. Valid luminance data view formats for this video resource format are {{DXGI_FORMAT_R8_UNORM}} and {{DXGI_FORMAT_R8_UINT}}. Valid chrominance data view formats (width and height are each 1/4 of luminance view) for this video resource format are {{DXGI_FORMAT_R8G8_UNORM}} and {{DXGI_FORMAT_R8G8_UINT}}. Supported view types are {{SRV}}, {{RTV}}, and {{UAV}}. For luminance data view, the mapping to the view channel is Y-&gt;{{R8}}. For chrominance data view, the mapping to the view channel is U-&gt;{{R8}} and V-&gt;{{G8}}.</p> <p>For more info about {{YUV}} formats for video rendering, see Recommended 8-Bit {{YUV}} Formats for Video Rendering. </p> <p>Width must be a multiple of 4. Direct3D11 staging resources and initData parameters for this format use (rowPitch * height * 2) bytes. The first (SysMemPitch * height) bytes are the Y plane, the next ((SysMemPitch / 2) * height) bytes are the {{UV}} plane, and the remainder is padding. </p> <p><strong>Direct3D 11.1:??</strong>This value is not supported until Windows?8.</p> </dd> <dd> <p>4-bit palletized {{YUV}} format that is commonly used for {{DVD}} subpicture.</p> <p>For more info about {{YUV}} formats for video rendering, see Recommended 8-Bit {{YUV}} Formats for Video Rendering. </p> <p><strong>Direct3D 11.1:??</strong>This value is not supported until Windows?8.</p> </dd> <dd> <p>4-bit palletized {{YUV}} format that is commonly used for {{DVD}} subpicture.</p> <p>For more info about {{YUV}} formats for video rendering, see Recommended 8-Bit {{YUV}} Formats for Video Rendering. </p> <p><strong>Direct3D 11.1:??</strong>This value is not supported until Windows?8.</p> </dd> <dd> <p>8-bit palletized format that is used for palletized {{RGB}} data when the processor processes {{ISDB}}-T data and for palletized {{YUV}} data when the processor processes BluRay data.</p> <p>For more info about {{YUV}} formats for video rendering, see Recommended 8-Bit {{YUV}} Formats for Video Rendering. </p> <p><strong>Direct3D 11.1:??</strong>This value is not supported until Windows?8.</p> </dd> <dd> <p>8-bit palletized format with 8 bits of alpha that is used for palletized {{YUV}} data when the processor processes BluRay data.</p> <p>For more info about {{YUV}} formats for video rendering, see Recommended 8-Bit {{YUV}} Formats for Video Rendering. </p> <p><strong>Direct3D 11.1:??</strong>This value is not supported until Windows?8.</p> </dd> <dd> <p>A four-component, 16-bit unsigned-normalized integer format that supports 4 bits for each channel including alpha.</p> <p><strong>Direct3D 11.1:??</strong>This value is not supported until Windows?8.</p> </dd> <dd> <p>A video format; an 8-bit version of a hybrid planar 4:2:2 format.</p> </dd> <dd> <p>An 8 bit {{YCbCrA}} 4:4 rendering format. </p> </dd> <dd> <p>An 8 bit {{YCbCrA}} 4:4:4:4 rendering format. </p> </dd> <dd> <p>Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used.</p> </dd> <p> Flags used with <strong>ReportLiveObjects</strong> to specify the amount of info to report about an object's lifetime. </p> <p> Use this enumeration with <strong>{{IDXGIDebug::ReportLiveObjects}}</strong>. </p><strong>Note</strong>?? This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Values that specify categories of debug messages.</p> <p>Use this enumeration when you call <strong>{{IDXGIInfoQueue::GetMessage}}</strong> to retrieve a message and when you call <strong>{{IDXGIInfoQueue::AddMessage}}</strong> to add a message. When you create an info queue filter, you can use these values to allow or deny any categories of messages to pass through the storage and retrieval filters.</p><strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <dd> <p>Unknown category.</p> </dd> <dd> <p>Miscellaneous category.</p> </dd> <dd> <p>Initialization category.</p> </dd> <dd> <p>Cleanup category.</p> </dd> <dd> <p>Compilation category.</p> </dd> <dd> <p>State creation category.</p> </dd> <dd> <p>State setting category.</p> </dd> <dd> <p>State getting category.</p> </dd> <dd> <p>Resource manipulation category.</p> </dd> <dd> <p>Execution category.</p> </dd> <dd> <p>Shader category.</p> </dd> <p>Values that specify debug message severity levels for an information queue.</p> <p>Use this enumeration when you call <strong>{{IDXGIInfoQueue::GetMessage}}</strong> to retrieve a message and when you call <strong>{{IDXGIInfoQueue::AddMessage}}</strong> to add a message. Also, use this enumeration with <strong>{{IDXGIInfoQueue::AddApplicationMessage}}</strong>. </p><strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <dd> <p>Defines some type of corruption that has occurred.</p> </dd> <dd> <p>Defines an error message.</p> </dd> <dd> <p>Defines a warning message.</p> </dd> <dd> <p>Defines an information message.</p> </dd> <dd> <p>Defines a message other than corruption, error, warning, or information.</p> </dd> <p>Describes a debug message in the information queue.</p> <p> <strong>{{IDXGIInfoQueue::GetMessage}}</strong> returns a reference to this structure.</p><strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <dd> <p>A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that produced the message.</p> </dd> <dd> <p>A <strong>{{DXGI_INFO_QUEUE_MESSAGE_CATEGORY}}</strong>-typed value that specifies the category of the message.</p> </dd> <dd> <p>A <strong>{{DXGI_INFO_QUEUE_MESSAGE_SEVERITY}}</strong>-typed value that specifies the severity of the message.</p> </dd> <dd> <p>An integer that uniquely identifies the message.</p> </dd> <dd> <p>The message string.</p> </dd> <dd> <p>The length of the message string at <strong>pDescription</strong>, in bytes.</p> </dd> <p>Describes the types of messages to allow or deny to pass through a filter.</p> <p>This structure is a member of the <strong>{{DXGI_INFO_QUEUE_FILTER}}</strong> structure.</p><p>This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.</p> <dd> <p>The number of message categories to allow or deny.</p> </dd> <dd> <p>An array of <strong>{{DXGI_INFO_QUEUE_MESSAGE_CATEGORY}}</strong> enumeration values that describe the message categories to allow or deny. The array must have at least <strong>NumCategories</strong> number of elements.</p> </dd> <dd> <p>The number of message severity levels to allow or deny.</p> </dd> <dd> <p>An array of <strong>{{DXGI_INFO_QUEUE_MESSAGE_SEVERITY}}</strong> enumeration values that describe the message severity levels to allow or deny. The array must have at least <strong>NumSeverities</strong> number of elements.</p> </dd> <dd> <p>The number of message {{IDs}} to allow or deny.</p> </dd> <dd> <p>An array of integers that represent the message {{IDs}} to allow or deny. The array must have at least <strong>NumIDs</strong> number of elements.</p> </dd> <p>Describes a debug message filter, which contains lists of message types to allow and deny.</p> <p>Use with an <strong>{{IDXGIInfoQueue}}</strong> interface.</p><strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <dd> <p>A <strong>{{DXGI_INFO_QUEUE_FILTER_DESC}}</strong> structure that describes the types of messages to allow.</p> </dd> <dd> <p>A <strong>{{DXGI_INFO_QUEUE_FILTER_DESC}}</strong> structure that describes the types of messages to deny.</p> </dd> <p>This interface controls the debug information queue, and can only be used if the debug layer is turned on.</p> <p>This interface is obtained by calling the <strong>{{DXGIGetDebugInterface}}</strong> function.</p><p>For more info about the debug layer, see Debug Layer.</p><strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Sets the maximum number of messages that can be added to the message queue.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that sets the limit on the number of messages.</p> </dd> <dd> <p>The maximum number of messages that can be added to the queue. ?1 means no limit.</p> </dd> <p>Clears all messages from the message queue.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>This method does not return a value.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that clears the messages.</p> </dd> <p>Gets a message from the message queue.</p> <p>This method doesn't remove any messages from the message queue.</p><p>This method gets a message from the message queue after an optional retrieval filter has been applied.</p><p>Call this method twice to retrieve a message, first to obtain the size of the message and second to get the message. Here is a typical example:</p><pre> // Get the size of the message. {{SIZE_T}} messageLength = 0; {{HRESULT}} hr = pInfoQueue-&gt;GetMessage({{DXGI_DEBUG_ALL}}, 0, {{NULL}}, &amp;messageLength); // Allocate space and get the message. {{DXGI_INFO_QUEUE_MESSAGE}} * pMessage = ({{DXGI_INFO_QUEUE_MESSAGE}}*)malloc(messageLength); hr = pInfoQueue-&gt;GetMessage({{DXGI_DEBUG_ALL}}, 0, pMessage, &amp;messageLength); </pre><strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that gets the message.</p> </dd> <dd> <p>An index into the message queue after an optional retrieval filter has been applied. This can be between 0 and the number of messages in the message queue that pass through the retrieval filter. Call <strong>{{IDXGIInfoQueue::GetNumStoredMessagesAllowedByRetrievalFilters}}</strong> to obtain this number. 0 is the message at the beginning of the message queue.</p> </dd> <dd> <p>A reference to a <strong>{{DXGI_INFO_QUEUE_MESSAGE}}</strong> structure that describes the message.</p> </dd> <dd> <p>A reference to a variable that receives the size, in bytes, of the message description that <em>pMessage</em> points to. This size includes the size of the message string that <em>pMessage</em> points to.</p> </dd> <p>Gets the number of messages that can pass through a retrieval filter.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns the number of messages that can pass through a retrieval filter.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that gets the number.</p> </dd> <p>Gets the number of messages currently stored in the message queue.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns the number of messages currently stored in the message queue.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that gets the number.</p> </dd> <p>Gets the number of messages that were discarded due to the message count limit.</p> <p>Get and set the message count limit with <strong>{{IDXGIInfoQueue::GetMessageCountLimit}}</strong> and <strong>{{IDXGIInfoQueue::SetMessageCountLimit}}</strong>, respectively. </p><strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns the number of messages that were discarded.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that gets the number.</p> </dd> <p>Gets the maximum number of messages that can be added to the message queue.</p> <p>When the number of messages in the message queue reaches the maximum limit, new messages coming in push old messages out.</p><strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns the maximum number of messages that can be added to the queue. ?1 means no limit.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that gets the number.</p> </dd> <p>Gets the number of messages that a storage filter allowed to pass through.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns the number of messages allowed by a storage filter.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that gets the number.</p> </dd> <p>Gets the number of messages that were denied passage through a storage filter.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns the number of messages denied by a storage filter.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that gets the number.</p> </dd> <p>Adds storage filters to the top of the storage-filter stack.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that produced the filters.</p> </dd> <dd> <p>An array of <strong>{{DXGI_INFO_QUEUE_FILTER}}</strong> structures that describe the filters.</p> </dd> <p>Gets the storage filter at the top of the storage-filter stack.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that gets the filter.</p> </dd> <dd> <p>A reference to a <strong>{{DXGI_INFO_QUEUE_FILTER}}</strong> structure that describes the filter.</p> </dd> <dd> <p>A reference to a variable that receives the size, in bytes, of the filter description to which <em>pFilter</em> points. If <em>pFilter</em> is <strong>{{NULL}}</strong>, <strong>GetStorageFilter</strong> outputs the size of the storage filter.</p> </dd> <p>Removes a storage filter from the top of the storage-filter stack.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>This method does not return a value.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that removes the filter.</p> </dd> <p>Pushes an empty storage filter onto the storage-filter stack.</p> <p>An empty storage filter allows all messages to pass through.</p><strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that pushes the empty storage filter.</p> </dd> <p>Pushes a deny-all storage filter onto the storage-filter stack.</p> <p>A deny-all storage filter prevents all messages from passing through.</p><strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that pushes the filter.</p> </dd> <p>Pushes a copy of the storage filter that is currently on the top of the storage-filter stack onto the storage-filter stack.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that pushes the copy of the storage filter.</p> </dd> <p>Pushes a storage filter onto the storage-filter stack.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that pushes the filter.</p> </dd> <dd> <p>A reference to a <strong>{{DXGI_INFO_QUEUE_FILTER}}</strong> structure that describes the filter.</p> </dd> <p>Pops a storage filter from the top of the storage-filter stack.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>This method does not return a value.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that pops the filter.</p> </dd> <p>Gets the size of the storage-filter stack in bytes.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns the size of the storage-filter stack in bytes.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that gets the size.</p> </dd> <p>Adds retrieval filters to the top of the retrieval-filter stack.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that produced the filters.</p> </dd> <dd> <p>An array of <strong>{{DXGI_INFO_QUEUE_FILTER}}</strong> structures that describe the filters.</p> </dd> <p>Gets the retrieval filter at the top of the retrieval-filter stack.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that gets the filter.</p> </dd> <dd> <p>A reference to a <strong>{{DXGI_INFO_QUEUE_FILTER}}</strong> structure that describes the filter.</p> </dd> <dd> <p>A reference to a variable that receives the size, in bytes, of the filter description to which <em>pFilter</em> points. If <em>pFilter</em> is <strong>{{NULL}}</strong>, <strong>GetRetrievalFilter</strong> outputs the size of the retrieval filter.</p> </dd> <p>Removes a retrieval filter from the top of the retrieval-filter stack.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>This method does not return a value.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that removes the filter.</p> </dd> <p>Pushes an empty retrieval filter onto the retrieval-filter stack.</p> <p>An empty retrieval filter allows all messages to pass through.</p><strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that pushes the empty retrieval filter.</p> </dd> <p>Pushes a deny-all retrieval filter onto the retrieval-filter stack.</p> <p>A deny-all retrieval filter prevents all messages from passing through.</p><strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that pushes the deny-all retrieval filter.</p> </dd> <p>Pushes a copy of the retrieval filter that is currently on the top of the retrieval-filter stack onto the retrieval-filter stack.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that pushes the copy of the retrieval filter.</p> </dd> <p>Pushes a retrieval filter onto the retrieval-filter stack.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that pushes the filter.</p> </dd> <dd> <p>A reference to a <strong>{{DXGI_INFO_QUEUE_FILTER}}</strong> structure that describes the filter.</p> </dd> <p>Pops a retrieval filter from the top of the retrieval-filter stack.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>This method does not return a value.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that pops the filter.</p> </dd> <p>Gets the size of the retrieval-filter stack in bytes.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns the size of the retrieval-filter stack in bytes.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that gets the size.</p> </dd> <p>Adds a debug message to the message queue and sends that message to the debug output.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that produced the message.</p> </dd> <dd> <p>A <strong>{{DXGI_INFO_QUEUE_MESSAGE_CATEGORY}}</strong>-typed value that specifies the category of the message.</p> </dd> <dd> <p>A <strong>{{DXGI_INFO_QUEUE_MESSAGE_SEVERITY}}</strong>-typed value that specifies the severity of the message.</p> </dd> <dd> <p>An integer that uniquely identifies the message.</p> </dd> <dd> <p>The message string.</p> </dd> <p>Adds a user-defined message to the message queue and sends that message to the debug output.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p>A <strong>{{DXGI_INFO_QUEUE_MESSAGE_SEVERITY}}</strong>-typed value that specifies the severity of the message.</p> </dd> <dd> <p>The message string.</p> </dd> <p>Sets a message category to break on when a message with that category passes through the storage filter.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that sets the breaking condition.</p> </dd> <dd> <p>A <strong>{{DXGI_INFO_QUEUE_MESSAGE_CATEGORY}}</strong>-typed value that specifies the category of the message.</p> </dd> <dd> <p>A Boolean value that specifies whether <strong>SetBreakOnCategory</strong> turns on or off this breaking condition (<strong>{{TRUE}}</strong> for on, <strong>{{FALSE}}</strong> for off).</p> </dd> <p>Sets a message severity level to break on when a message with that severity level passes through the storage filter.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that sets the breaking condition.</p> </dd> <dd> <p>A <strong>{{DXGI_INFO_QUEUE_MESSAGE_SEVERITY}}</strong>-typed value that specifies the severity of the message.</p> </dd> <dd> <p>A Boolean value that specifies whether <strong>SetBreakOnSeverity</strong> turns on or off this breaking condition (<strong>{{TRUE}}</strong> for on, <strong>{{FALSE}}</strong> for off).</p> </dd> <p>Sets a message identifier to break on when a message with that identifier passes through the storage filter.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that sets the breaking condition.</p> </dd> <dd> <p>An integer value that specifies the identifier of the message.</p> </dd> <dd> <p>A Boolean value that specifies whether <strong>SetBreakOnID</strong> turns on or off this breaking condition (<strong>{{TRUE}}</strong> for on, <strong>{{FALSE}}</strong> for off).</p> </dd> <p>Determines whether the break on a message category is turned on or off.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns a Boolean value that specifies whether this category of breaking condition is turned on or off (<strong>{{TRUE}}</strong> for on, <strong>{{FALSE}}</strong> for off).</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that gets the breaking status.</p> </dd> <dd> <p>A <strong>{{DXGI_INFO_QUEUE_MESSAGE_CATEGORY}}</strong>-typed value that specifies the category of the message.</p> </dd> <p>Determines whether the break on a message severity level is turned on or off.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns a Boolean value that specifies whether this severity of breaking condition is turned on or off (<strong>{{TRUE}}</strong> for on, <strong>{{FALSE}}</strong> for off).</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that gets the breaking status.</p> </dd> <dd> <p>A <strong>{{DXGI_INFO_QUEUE_MESSAGE_SEVERITY}}</strong>-typed value that specifies the severity of the message.</p> </dd> <p>Determines whether the break on a message identifier is turned on or off.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns a Boolean value that specifies whether this break on a message identifier is turned on or off (<strong>{{TRUE}}</strong> for on, <strong>{{FALSE}}</strong> for off).</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that gets the breaking status.</p> </dd> <dd> <p>An integer value that specifies the identifier of the message.</p> </dd> <p>Turns the debug output on or off.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>This method does not return a value.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that gets the mute status.</p> </dd> <dd> <p>A Boolean value that specifies whether to turn the debug output on or off (<strong>{{TRUE}}</strong> for on, <strong>{{FALSE}}</strong> for off).</p> </dd> <p>Determines whether the debug output is turned on or off.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns a Boolean value that specifies whether the debug output is turned on or off (<strong>{{TRUE}}</strong> for on, <strong>{{FALSE}}</strong> for off).</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that gets the mute status.</p> </dd> <p>This interface controls debug settings, and can only be used if the debug layer is turned on.</p> <p> This interface is obtained by calling the <strong>{{DXGIGetDebugInterface}}</strong> function. </p><p> For more info about the debug layer, see Debug Layer. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p><strong>Note</strong>?? This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Reports info about the lifetime of an object or objects.</p> <strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p>The globally unique identifier ({{GUID}}) of the object or objects to get info about. Use one of the <strong>{{DXGI_DEBUG_ID}}</strong> {{GUIDs}}.</p> </dd> <dd> <p>A <strong>{{DXGI_DEBUG_RLO_FLAGS}}</strong>-typed value that specifies the amount of info to report.</p> </dd> <p>Controls debug settings for Microsoft DirectX Graphics Infrastructure ({{DXGI}}). You can use the <strong>{{IDXGIDebug1}}</strong> interface in Windows Store apps. </p> <p>Call the <strong>{{DXGIGetDebugInterface1}}</strong> function to obtain the <strong>{{IDXGIDebug1}}</strong> interface.</p><p>The <strong>{{IDXGIDebug1}}</strong> interface can be used only if the debug layer is turned on. For more info, see Debug Layer.</p> <p>Retrieves a debugging interface.</p> <p> <strong>{{IDXGIDebug}}</strong> and <strong>{{IDXGIInfoQueue}}</strong> are debugging interfaces.</p><p>To access <strong>{{DXGIGetDebugInterface}}</strong>, call the <strong>GetModuleHandle</strong> function to get Dxgidebug.dll and the <strong>GetProcAddress</strong> function to get the address of <strong>{{DXGIGetDebugInterface}}</strong>.</p><p><strong>Windows?8.1:??</strong>Starting in Windows?8.1, Windows Store apps call the <strong>{{DXGIGetDebugInterface1}}</strong> function to get an <strong>{{IDXGIDebug1}}</strong> interface.</p><strong>Note</strong>??This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows?8.? <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p>The globally unique identifier ({{GUID}}) of the requested interface type.</p> </dd> <dd> <p>A reference to a buffer that receives a reference to the debugging interface.</p> </dd> <p>Flags indicating the method the raster uses to create an image on a surface.</p> <p>This enum is used by the <strong>{{DXGI_MODE_DESC1}}</strong> and <strong>{{DXGI_SWAP_CHAIN_FULLSCREEN_DESC}}</strong> structures.</p> <dd> <p>Scanline order is unspecified.</p> </dd> <dd> <p>The image is created from the first scanline to the last without skipping any.</p> </dd> <dd> <p>The image is created beginning with the upper field.</p> </dd> <dd> <p>The image is created beginning with the lower field.</p> </dd> <p>Flags indicating how an image is stretched to fit a given monitor's resolution.</p> <p>Selecting the {{CENTERED}} or {{STRETCHED}} modes can result in a mode change even if you specify the native resolution of the display in the {{DXGI_MODE_DESC}}. If you know the native resolution of the display and want to make sure that you do not initiate a mode change when transitioning a swap chain to full screen (either via {{ALT}}+{{ENTER}} or <strong>{{IDXGISwapChain::SetFullscreenState}}</strong>), you should use {{UNSPECIFIED}}.</p><p>This enum is used by the <strong>{{DXGI_MODE_DESC1}}</strong> and <strong>{{DXGI_SWAP_CHAIN_FULLSCREEN_DESC}}</strong> structures.</p> <dd> <p>Unspecified scaling.</p> </dd> <dd> <p>Specifies no scaling. The image is centered on the display. This flag is typically used for a fixed-dot-pitch display (such as an {{LED}} display).</p> </dd> <dd> <p>Specifies stretched scaling.</p> </dd> <p>Flags that indicate how the back buffers should be rotated to fit the physical rotation of a monitor.</p> <dd> <p>Unspecified rotation.</p> </dd> <dd> <p>Specifies no rotation.</p> </dd> <dd> <p>Specifies 90 degrees of rotation.</p> </dd> <dd> <p>Specifies 180 degrees of rotation.</p> </dd> <dd> <p>Specifies 270 degrees of rotation.</p> </dd> <p>Represents an {{RGB}} color.</p> <p>This structure is a member of the <strong>{{DXGI_GAMMA_CONTROL}}</strong> structure.</p> <dd> <p>A value representing the color of the red component. The range of this value is between 0 and 1.</p> </dd> <dd> <p>A value representing the color of the green component. The range of this value is between 0 and 1.</p> </dd> <dd> <p>A value representing the color of the blue component. The range of this value is between 0 and 1.</p> </dd> <p>Describes color values.</p> <p>You can set the members of this structure to values outside the range of 0 through 1 to implement some unusual effects. Values greater than 1 produce strong lights that tend to wash out a scene. Negative values produce dark lights that actually remove light from a scene. </p> <dd> <p>Floating-point value that specifies the red component of a color. This value generally is in the range from 0.0 through 1.0. A value of 0.0 indicates the complete absence of the red component, while a value of 1.0 indicates that red is fully present.</p> </dd> <dd> <p>Floating-point value that specifies the green component of a color. This value generally is in the range from 0.0 through 1.0. A value of 0.0 indicates the complete absence of the green component, while a value of 1.0 indicates that green is fully present.</p> </dd> <dd> <p>Floating-point value that specifies the blue component of a color. This value generally is in the range from 0.0 through 1.0. A value of 0.0 indicates the complete absence of the blue component, while a value of 1.0 indicates that blue is fully present.</p> </dd> <dd> <p>Floating-point value that specifies the alpha component of a color. This value generally is in the range from 0.0 through 1.0. A value of 0.0 indicates fully transparent, while a value of 1.0 indicates fully opaque.</p> </dd> <p>Controls the settings of a gamma curve.</p> <p>The <strong>{{DXGI_GAMMA_CONTROL}}</strong> structure is used by the <strong>{{IDXGIOutput::SetGammaControl}}</strong> method.</p><p>For info about using gamma correction, see Using gamma correction. </p> <dd> <p>A <strong>{{DXGI_RGB}}</strong> structure with scalar values that are applied to rgb values before being sent to the gamma look up table.</p> </dd> <dd> <p>A <strong>{{DXGI_RGB}}</strong> structure with offset values that are applied to the rgb values before being sent to the gamma look up table.</p> </dd> <dd> <p>An array of <strong>{{DXGI_RGB}}</strong> structures that control the points of a gamma curve.</p> </dd> <p>Controls the gamma capabilities of an adapter.</p> <p>To get a list of the capabilities for controlling gamma correction, call <strong>{{IDXGIOutput::GetGammaControlCapabilities}}</strong>.</p><p>For info about using gamma correction, see Using gamma correction. </p> <dd> <p>True if scaling and offset operations are supported during gamma correction; otherwise, false.</p> </dd> <dd> <p>A value describing the maximum range of the control-point positions.</p> </dd> <dd> <p>A value describing the minimum range of the control-point positions.</p> </dd> <dd> <p>A value describing the number of control points in the array.</p> </dd> <dd> <p>An array of values describing control points; the maximum length of control points is 1025.</p> </dd> <p>Describes a display mode.</p> <p>This structure is used by the <strong>GetDisplayModeList</strong> and <strong>FindClosestMatchingMode</strong> methods.</p><p>The following format values are valid for display modes and when you create a bit-block transfer (bitblt) model swap chain. The valid values depend on the feature level that you are working with.</p><ul> <li> <p>Feature level &gt;= 9.1</p> <ul> <li> <strong>{{DXGI_FORMAT_R8G8B8A8_UNORM}}</strong> </li> <li><strong>{{DXGI_FORMAT_R8G8B8A8_UNORM_SRGB}}</strong></li> <li> <strong>{{DXGI_FORMAT_B8G8R8A8_UNORM}}</strong> (except 10.x on Windows?Vista)</li> <li><strong>{{DXGI_FORMAT_B8G8R8A8_UNORM_SRGB}}</strong> (except 10.x on Windows?Vista)</li> </ul> </li> <li> <p>Feature level &gt;= 10.0</p> <ul> <li> <strong>{{DXGI_FORMAT_R16G16B16A16_FLOAT}}</strong> </li> <li><strong>{{DXGI_FORMAT_R10G10B10A2_UNORM}}</strong></li> </ul> </li> <li> <p>Feature level &gt;= 11.0</p> <ul> <li><strong>{{DXGI_FORMAT_R10G10B10_XR_BIAS_A2_UNORM}}</strong></li> </ul> </li> </ul><p>You can pass one of these format values to <strong>{{ID3D11Device::CheckFormatSupport}}</strong> to determine if it is a valid format for displaying on screen. If <strong>{{ID3D11Device::CheckFormatSupport}}</strong> returns <strong>{{D3D11_FORMAT_SUPPORT_DISPLAY}}</strong> in the bit field to which the <em>pFormatSupport</em> parameter points, the format is valid for displaying on screen.</p><p>Starting with Windows?8 for a flip model swap chain (that is, a swap chain that has the <strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong> value set in the <strong>SwapEffect</strong> member of <strong>{{DXGI_SWAP_CHAIN_DESC}}</strong>), you must set the <strong>Format</strong> member of <strong>{{DXGI_MODE_DESC}}</strong> to <strong>{{DXGI_FORMAT_R16G16B16A16_FLOAT}}</strong>, <strong>{{DXGI_FORMAT_B8G8R8A8_UNORM}}</strong>, or <strong>{{DXGI_FORMAT_R8G8B8A8_UNORM}}</strong>.</p><p>Because of the relaxed render target creation rules that Direct3D 11 has for back buffers, applications can create a <strong>{{DXGI_FORMAT_B8G8R8A8_UNORM_SRGB}}</strong> render target view from a <strong>{{DXGI_FORMAT_B8G8R8A8_UNORM}}</strong> swap chain so they can use automatic color space conversion when they render the swap chain.</p> <dd> <p>A value that describes the resolution width. If you specify the width as zero when you call the <strong>{{IDXGIFactory::CreateSwapChain}}</strong> method to create a swap chain, the runtime obtains the width from the output window and assigns this width value to the swap-chain description. You can subsequently call the <strong>{{IDXGISwapChain::GetDesc}}</strong> method to retrieve the assigned width value.</p> </dd> <dd> <p>A value describing the resolution height. If you specify the height as zero when you call the <strong>{{IDXGIFactory::CreateSwapChain}}</strong> method to create a swap chain, the runtime obtains the height from the output window and assigns this height value to the swap-chain description. You can subsequently call the <strong>{{IDXGISwapChain::GetDesc}}</strong> method to retrieve the assigned height value.</p> </dd> <dd> <p>A <strong>{{DXGI_RATIONAL}}</strong> structure describing the refresh rate in hertz</p> </dd> <dd> <p>A <strong>{{DXGI_FORMAT}}</strong> structure describing the display format.</p> </dd> <dd> <p>A member of the <strong>{{DXGI_MODE_SCANLINE_ORDER}}</strong> enumerated type describing the scanline drawing mode.</p> </dd> <dd> <p>A member of the <strong>{{DXGI_MODE_SCALING}}</strong> enumerated type describing the scaling mode.</p> </dd> <p>Describes a {{JPEG}} {{DC}} huffman table.</p> <dd> <p>The number of codes for each code length.</p> </dd> <dd> <p>The Huffman code values, in order of increasing code length.</p> </dd> <p>Describes a {{JPEG}} {{AC}} huffman table.</p> <dd> <p>The number of codes for each code length.</p> </dd> <dd> <p>The Huffman code values, in order of increasing code length.</p> </dd> <p>Describes a {{JPEG}} quantization table.</p> <dd> <p>An array of bytes containing the elements of the quantization table.</p> </dd> <p>Specifies color space types.</p> <p>This enum is used within {{DXGI}} in the <strong>CheckColorSpaceSupport</strong>, <strong>SetColorSpace1</strong> and <strong>CheckOverlayColorSpaceSupport</strong> methods. It is also referenced in {{D3D11}} video methods such as <strong>{{ID3D11VideoContext1::VideoProcessorSetOutputColorSpace1}}</strong>, and {{D2D}} methods such as <strong>{{ID2D1DeviceContext2::CreateImageSourceFromDxgi}}</strong>.</p><p>The following color parameters are defined:</p> <dd> <table> <tr><td><strong>Property</strong></td><td><strong>Value</strong></td></tr> <tr><td>{{Colorspace}}</td><td>{{RGB}}</td></tr> <tr><td>{{Range}}</td><td>0-255</td></tr> <tr><td>{{Gamma}}</td><td>2.2</td></tr> <tr><td>{{Siting}}</td><td>Image</td></tr> <tr><td>{{Primaries}}</td><td>{{BT}}.709</td></tr> </table> <p>?</p> <p>This is the standard definition for sRGB. Note that this is often implemented with a linear segment, but in that case the exponent is corrected to stay aligned with a gamma 2.2 curve. This is usually used with 8 bit and 10 bit color channels. </p> </dd> <dd> <table> <tr><td><strong>Property</strong></td><td><strong>Value</strong></td></tr> <tr><td>{{Colorspace}}</td><td>{{RGB}}</td></tr> <tr><td>{{Range}}</td><td>0-255</td></tr> <tr><td>{{Gamma}}</td><td>1.0</td></tr> <tr><td>{{Siting}}</td><td>Image</td></tr> <tr><td>{{Primaries}}</td><td>{{BT}}.709</td></tr> </table> <p>?</p> <p>This is the standard definition for scRGB, and is usually used with 16 bit integer, 16 bit floating point, and 32 bit floating point channels. </p> </dd> <dd> <table> <tr><td><strong>Property</strong></td><td><strong>Value</strong></td></tr> <tr><td>{{Colorspace}}</td><td>{{RGB}}</td></tr> <tr><td>{{Range}}</td><td>16-235</td></tr> <tr><td>{{Gamma}}</td><td>2.2</td></tr> <tr><td>{{Siting}}</td><td>Image</td></tr> <tr><td>{{Primaries}}</td><td>{{BT}}.709</td></tr> </table> <p>?</p> <p>This is the standard definition for {{ITU}}-R Recommendation {{BT}}.709. Note that due to the inclusion of a linear segment, the transfer curve looks similar to a pure exponential gamma of 1.9. This is usually used with 8 bit and 10 bit color channels. </p> </dd> <dd> <table> <tr><td><strong>Property</strong></td><td><strong>Value</strong></td></tr> <tr><td>{{Colorspace}}</td><td>{{RGB}}</td></tr> <tr><td>{{Range}}</td><td>16-235</td></tr> <tr><td>{{Gamma}}</td><td>2.2</td></tr> <tr><td>{{Siting}}</td><td>Image</td></tr> <tr><td>{{Primaries}}</td><td>{{BT}}.2020</td></tr> </table> <p>?</p> <p>This is usually used with 10, 12, or 16 bit color channels. </p> </dd> <dd> <p>Reserved.</p> </dd> <dd> <table> <tr><td><strong>Property</strong></td><td><strong>Value</strong></td></tr> <tr><td>{{Colorspace}}</td><td>{{YCbCr}}</td></tr> <tr><td>{{Range}}</td><td>0-255</td></tr> <tr><td>{{Gamma}}</td><td>2.2</td></tr> <tr><td>{{Siting}}</td><td>Image</td></tr> <tr><td>{{Primaries}}</td><td>{{BT}}.709</td></tr> <tr><td>{{Transfer}}</td><td>{{BT}}.601</td></tr> </table> <p>?</p> <p>This definition is commonly used for {{JPG}}, and is usually used with 8, 10, 12, or 16 bit color channels. </p> </dd> <dd> <table> <tr><td><strong>Property</strong></td><td><strong>Value</strong></td></tr> <tr><td>{{Colorspace}}</td><td>{{YCbCr}}</td></tr> <tr><td>{{Range}}</td><td>16-235</td></tr> <tr><td>{{Gamma}}</td><td>2.2</td></tr> <tr><td>{{Siting}}</td><td>Video</td></tr> <tr><td>{{Primaries}}</td><td>{{BT}}.601</td></tr> </table> <p>?</p> <p>This definition is commonly used for {{MPEG2}}, and is usually used with 8, 10, 12, or 16 bit color channels. </p> </dd> <dd> <table> <tr><td><strong>Property</strong></td><td><strong>Value</strong></td></tr> <tr><td>{{Colorspace}}</td><td>{{YCbCr}}</td></tr> <tr><td>{{Range}}</td><td>0-255</td></tr> <tr><td>{{Gamma}}</td><td>2.2</td></tr> <tr><td>{{Siting}}</td><td>Video</td></tr> <tr><td>{{Primaries}}</td><td>{{BT}}.601</td></tr> </table> <p>?</p> <p>This is sometimes used for H.264 camera capture, and is usually used with 8, 10, 12, or 16 bit color channels. </p> </dd> <dd> <table> <tr><td><strong>Property</strong></td><td><strong>Value</strong></td></tr> <tr><td>{{Colorspace}}</td><td>{{YCbCr}}</td></tr> <tr><td>{{Range}}</td><td>16-235</td></tr> <tr><td>{{Gamma}}</td><td>2.2</td></tr> <tr><td>{{Siting}}</td><td>Video</td></tr> <tr><td>{{Primaries}}</td><td>{{BT}}.709</td></tr> </table> <p>?</p> <p>This definition is commonly used for H.264 and {{HEVC}}, and is usually used with 8, 10, 12, or 16 bit color channels. </p> </dd> <dd> <table> <tr><td><strong>Property</strong></td><td><strong>Value</strong></td></tr> <tr><td>{{Colorspace}}</td><td>{{YCbCr}}</td></tr> <tr><td>{{Range}}</td><td>0-255</td></tr> <tr><td>{{Gamma}}</td><td>2.2</td></tr> <tr><td>{{Siting}}</td><td>Video</td></tr> <tr><td>{{Primaries}}</td><td>{{BT}}.709</td></tr> </table> <p>?</p> <p>This is sometimes used for H.264 camera capture, and is usually used with 8, 10, 12, or 16 bit color channels. </p> </dd> <dd> <table> <tr><td><strong>Property</strong></td><td><strong>Value</strong></td></tr> <tr><td>{{Colorspace}}</td><td>{{YCbCr}}</td></tr> <tr><td>{{Range}}</td><td>16-235</td></tr> <tr><td>{{Gamma}}</td><td>2.2</td></tr> <tr><td>{{Siting}}</td><td>Video</td></tr> <tr><td>{{Primaries}}</td><td>{{BT}}.2020</td></tr> </table> <p>?</p> <p>This definition may be used by {{HEVC}}, and is usually used with 10, 12, or 16 bit color channels. </p> </dd> <dd> <table> <tr><td><strong>Property</strong></td><td><strong>Value</strong></td></tr> <tr><td>{{Colorspace}}</td><td>{{YCbCr}}</td></tr> <tr><td>{{Range}}</td><td>0-255</td></tr> <tr><td>{{Gamma}}</td><td>2.2</td></tr> <tr><td>{{Siting}}</td><td>Video</td></tr> <tr><td>{{Primaries}}</td><td>{{BT}}.2020</td></tr> </table> <p>?</p> <p>This is usually used with 10, 12, or 16 bit color channels.</p> </dd> <dd> <table> <tr><td><strong>Property</strong></td><td><strong>Value</strong></td></tr> <tr><td>{{Colorspace}}</td><td>{{RGB}}</td></tr> <tr><td>{{Range}}</td><td>0-255</td></tr> <tr><td>{{Gamma}}</td><td>2084</td></tr> <tr><td>{{Siting}}</td><td>Image</td></tr> <tr><td>{{Primaries}}</td><td>{{BT}}.2020</td></tr> </table> <p>?</p> <p>This is usually used with 10, 12, or 16 bit color channels.</p> </dd> <dd> <table> <tr><td><strong>Property</strong></td><td><strong>Value</strong></td></tr> <tr><td>{{Colorspace}}</td><td>{{YCbCr}}</td></tr> <tr><td>{{Range}}</td><td>16-235</td></tr> <tr><td>{{Gamma}}</td><td>2084</td></tr> <tr><td>{{Siting}}</td><td>Video</td></tr> <tr><td>{{Primaries}}</td><td>{{BT}}.2020</td></tr> </table> <p>?</p> <p>This is usually used with 10, 12, or 16 bit color channels.</p> </dd> <dd> <table> <tr><td><strong>Property</strong></td><td><strong>Value</strong></td></tr> <tr><td>{{Colorspace}}</td><td>{{RGB}}</td></tr> <tr><td>{{Range}}</td><td>16-235</td></tr> <tr><td>{{Gamma}}</td><td>2084</td></tr> <tr><td>{{Siting}}</td><td>Image</td></tr> <tr><td>{{Primaries}}</td><td>{{BT}}.2020</td></tr> </table> <p>?</p> <p>This is usually used with 10, 12, or 16 bit color channels.</p> </dd> <dd> <table> <tr><td><strong>Property</strong></td><td><strong>Value</strong></td></tr> <tr><td>{{Colorspace}}</td><td>{{YCbCr}}</td></tr> <tr><td>{{Range}}</td><td>16-235</td></tr> <tr><td>{{Gamma}}</td><td>2.2</td></tr> <tr><td>{{Siting}}</td><td>Video</td></tr> <tr><td>{{Primaries}}</td><td>{{BT}}.2020</td></tr> </table> <p>?</p> <p>This is usually used with 10, 12, or 16 bit color channels.</p> </dd> <dd> <table> <tr><td><strong>Property</strong></td><td><strong>Value</strong></td></tr> <tr><td>{{Colorspace}}</td><td>{{YCbCr}}</td></tr> <tr><td>{{Range}}</td><td>16-235</td></tr> <tr><td>{{Gamma}}</td><td>2084</td></tr> <tr><td>{{Siting}}</td><td>Video</td></tr> <tr><td>{{Primaries}}</td><td>{{BT}}.2020</td></tr> </table> <p>?</p> <p>This is usually used with 10, 12, or 16 bit color channels.</p> </dd> <dd> <table> <tr><td><strong>Property</strong></td><td><strong>Value</strong></td></tr> <tr><td>{{Colorspace}}</td><td>{{RGB}}</td></tr> <tr><td>{{Range}}</td><td>0-255</td></tr> <tr><td>{{Gamma}}</td><td>2.2</td></tr> <tr><td>{{Siting}}</td><td>Image</td></tr> <tr><td>{{Primaries}}</td><td>{{BT}}.2020</td></tr> </table> <p>?</p> <p>This is usually used with 10, 12, or 16 bit color channels.</p> </dd> <dd> <p>A custom color definition is used. </p> </dd> <p>Represents a rational number.</p> <p>This structure is a member of the <strong>{{DXGI_MODE_DESC}}</strong> structure.</p><p>The <strong>{{DXGI_RATIONAL}}</strong> structure operates under the following rules:</p><ul> <li>0/0 is legal and will be interpreted as 0/1.</li> <li>0/anything is interpreted as zero.</li> <li>If you are representing a whole number, the denominator should be 1.</li> </ul> <dd> <p>An unsigned integer value representing the top of the rational number.</p> </dd> <dd> <p>An unsigned integer value representing the bottom of the rational number.</p> </dd> <p>Describes multi-sampling parameters for a resource.</p> <p>This structure is a member of the <strong>{{DXGI_SWAP_CHAIN_DESC1}}</strong> structure.</p><p>The default sampler mode, with no anti-aliasing, has a count of 1 and a quality level of 0.</p><p>If multi-sample antialiasing is being used, all bound render targets and depth buffers must have the same sample counts and quality levels.</p><table> <tr><td> <p>Differences between Direct3D 10.0 and Direct3D 10.1 and between Direct3D 10.0 and Direct3D 11:</p> <p>Direct3D 10.1 has defined two standard quality levels: <strong>{{D3D10_STANDARD_MULTISAMPLE_PATTERN}}</strong> and <strong>{{D3D10_CENTER_MULTISAMPLE_PATTERN}}</strong> in the <strong>{{D3D10_STANDARD_MULTISAMPLE_QUALITY_LEVELS}}</strong> enumeration in {{D3D10_1}}.h.</p> <p>Direct3D 11 has defined two standard quality levels: <strong>{{D3D11_STANDARD_MULTISAMPLE_PATTERN}}</strong> and <strong>{{D3D11_CENTER_MULTISAMPLE_PATTERN}}</strong> in the <strong>{{D3D11_STANDARD_MULTISAMPLE_QUALITY_LEVELS}}</strong> enumeration in {{D3D11}}.h.</p> </td></tr> </table><p>?</p> <dd> <p>The number of multisamples per pixel.</p> </dd> <dd> <p>The image quality level. The higher the quality, the lower the performance. The valid range is between zero and one less than the level returned by <strong>{{ID3D10Device::CheckMultisampleQualityLevels}}</strong> for Direct3D 10 or <strong>{{ID3D11Device::CheckMultisampleQualityLevels}}</strong> for Direct3D 11.</p> <p>For Direct3D 10.1 and Direct3D 11, you can use two special quality level values. For more information about these quality level values, see Remarks.</p> </dd> <p>Identifies the type of reference shape.</p> <dd> <p>The reference type is a monochrome mouse reference, which is a monochrome bitmap. The bitmap's size is specified by width and height in a 1 bits per pixel (bpp) device independent bitmap ({{DIB}}) format {{AND}} mask that is followed by another 1 bpp {{DIB}} format {{XOR}} mask of the same size.</p> </dd> <dd> <p>The reference type is a color mouse reference, which is a color bitmap. The bitmap's size is specified by width and height in a 32 bpp {{ARGB}} {{DIB}} format.</p> </dd> <dd> <p>The reference type is a masked color mouse reference. A masked color mouse reference is a 32 bpp {{ARGB}} format bitmap with the mask value in the alpha bits. The only allowed mask values are 0 and 0xFF. When the mask value is 0, the {{RGB}} value should replace the screen pixel. When the mask value is 0xFF, an {{XOR}} operation is performed on the {{RGB}} value and the screen pixel; the result replaces the screen pixel.</p> </dd> <p>Identifies the alpha value, transparency behavior, of a surface.</p> <p>For more information about alpha mode, see <strong>{{D2D1_ALPHA_MODE}}</strong>.</p> <dd> <p>Indicates that the transparency behavior is not specified.</p> </dd> <dd> <p>Indicates that the transparency behavior is premultiplied. Each color is first scaled by the alpha value. The alpha value itself is the same in both straight and premultiplied alpha. Typically, no color channel value is greater than the alpha channel value. If a color channel value in a premultiplied format is greater than the alpha channel, the standard source-over blending math results in an additive blend.</p> </dd> <dd> <p>Indicates that the transparency behavior is not premultiplied. The alpha channel indicates the transparency of the color.</p> </dd> <dd> <p>Indicates to ignore the transparency behavior.</p> </dd> <dd> <p>Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used.</p> </dd> <p> Identifies the importance of a resource?s content when you call the <strong>{{IDXGIDevice2::OfferResources}}</strong> method to offer the resource. </p> <p>Priority determines how likely the operating system is to discard an offered resource. Resources offered with lower priority are discarded first.</p> <p>Identifies resize behavior when the back-buffer size does not match the size of the target output.</p> <p>The {{DXGI_SCALING_NONE}} value is supported only for flip presentation model swap chains that you create with the <strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong> value. You pass these values in a call to <strong>{{IDXGIFactory2::CreateSwapChainForHwnd}}</strong>, <strong>{{IDXGIFactory2::CreateSwapChainForCoreWindow}}</strong>, or <strong>{{IDXGIFactory2::CreateSwapChainForComposition}}</strong>. </p><p>{{DXGI_SCALING_ASPECT_RATIO_STRETCH}} will prefer to use a horizontal fill, otherwise it will use a vertical fill, using the following logic.</p><code>float aspectRatio = backBufferWidth / float(backBufferHeight); // Horizontal fill float scaledWidth = outputWidth; float scaledHeight = outputWidth / aspectRatio; if (scaledHeight &gt;= outputHeight) { // Do vertical fill scaledWidth = outputHeight * aspectRatio; scaledHeight = outputHeight; } float offsetX = (outputWidth - scaledWidth) * 0.5f; float offsetY = (outputHeight - scaledHeight) * 0.5f; rect.left = static_cast&lt;{{LONG}}&gt;(offsetX); rect.top = static_cast&lt;{{LONG}}&gt;(offsetY); rect.right = static_cast&lt;{{LONG}}&gt;(offsetX + scaledWidth); rect.bottom = static_cast&lt;{{LONG}}&gt;(offsetY + scaledHeight); rect.left = std::max&lt;{{LONG}}&gt;(0, rect.left); rect.top = std::max&lt;{{LONG}}&gt;(0, rect.top); rect.right = std::min&lt;{{LONG}}&gt;(static_cast&lt;{{LONG}}&gt;(outputWidth), rect.right); rect.bottom = std::min&lt;{{LONG}}&gt;(static_cast&lt;{{LONG}}&gt;(outputHeight), rect.bottom); </code><p>Note that <em>outputWidth</em> and <em>outputHeight</em> are the pixel sizes of the presentation target size. In the case of <strong>CoreWindow</strong>, this requires converting the <em>logicalWidth</em> and <em>logicalHeight</em> values from {{DIPS}} to pixels using the window's {{DPI}} property.</p> <dd> <p>Directs {{DXGI}} to make the back-buffer contents scale to fit the presentation target size. This is the implicit behavior of {{DXGI}} when you call the <strong>{{IDXGIFactory::CreateSwapChain}}</strong> method.</p> </dd> <dd> <p>Directs {{DXGI}} to make the back-buffer contents appear without any scaling when the presentation target size is not equal to the back-buffer size. The top edges of the back buffer and presentation target are aligned together. If the {{WS_EX_LAYOUTRTL}} style is associated with the <strong>{{HWND}}</strong> handle to the target output window, the right edges of the back buffer and presentation target are aligned together; otherwise, the left edges are aligned together. All target area outside the back buffer is filled with window background color.</p> <p>This value specifies that all target areas outside the back buffer of a swap chain are filled with the background color that you specify in a call to <strong>{{IDXGISwapChain1::SetBackgroundColor}}</strong>.</p> </dd> <dd> <p>Directs {{DXGI}} to make the back-buffer contents scale to fit the presentation target size, while preserving the aspect ratio of the back-buffer. If the scaled back-buffer does not fill the presentation area, it will be centered with black borders.</p> <p>This constant is supported on Windows Phone 8 and Windows 10. </p> <p>Note that with legacy Win32 window swapchains, this works the same as {{DXGI_SCALING_STRETCH}}. </p> </dd> <p>Identifies the granularity at which the graphics processing unit ({{GPU}}) can be preempted from performing its current graphics rendering task.</p> <p>You call the <strong>{{IDXGIAdapter2::GetDesc2}}</strong> method to retrieve the granularity level at which the {{GPU}} can be preempted from performing its current graphics rendering task. The operating system specifies the graphics granularity level in the <strong>GraphicsPreemptionGranularity</strong> member of the <strong>{{DXGI_ADAPTER_DESC2}}</strong> structure.</p><p>The following figure shows granularity of graphics rendering tasks.</p> <dd> <p>Indicates the preemption granularity as a {{DMA}} buffer.</p> </dd> <dd> <p>Indicates the preemption granularity as a graphics primitive. A primitive is a section in a {{DMA}} buffer and can be a group of triangles.</p> </dd> <dd> <p>Indicates the preemption granularity as a triangle. A triangle is a part of a primitive.</p> </dd> <dd> <p>Indicates the preemption granularity as a pixel. A pixel is a part of a triangle.</p> </dd> <dd> <p>Indicates the preemption granularity as a graphics instruction. A graphics instruction operates on a pixel.</p> </dd> <p>Identifies the granularity at which the graphics processing unit ({{GPU}}) can be preempted from performing its current compute task.</p> <p>You call the <strong>{{IDXGIAdapter2::GetDesc2}}</strong> method to retrieve the granularity level at which the {{GPU}} can be preempted from performing its current compute task. The operating system specifies the compute granularity level in the <strong>ComputePreemptionGranularity</strong> member of the <strong>{{DXGI_ADAPTER_DESC2}}</strong> structure.</p> <dd> <p>Indicates the preemption granularity as a compute packet.</p> </dd> <dd> <p>Indicates the preemption granularity as a dispatch (for example, a call to the <strong>{{ID3D11DeviceContext::Dispatch}}</strong> method). A dispatch is a part of a compute packet.</p> </dd> <dd> <p>Indicates the preemption granularity as a thread group. A thread group is a part of a dispatch.</p> </dd> <dd> <p>Indicates the preemption granularity as a thread in a thread group. A thread is a part of a thread group.</p> </dd> <dd> <p>Indicates the preemption granularity as a compute instruction in a thread.</p> </dd> <p>The <strong>{{DXGI_OUTDUPL_MOVE_RECT}}</strong> structure describes the movement of a rectangle.</p> <p>This structure is used by <strong>GetFrameMoveRects</strong>.</p> <dd> <p>The starting position of a rectangle.</p> </dd> <dd> <p>The target region to which to move a rectangle.</p> </dd> <p>The {{DXGI_OUTDUPL_DESC}} structure describes the dimension of the output and the surface that contains the desktop image. The format of the desktop image is always <strong>{{DXGI_FORMAT_B8G8R8A8_UNORM}}</strong>.</p> <p>This structure is used by <strong>GetDesc</strong>.</p> <p>The <strong>{{DXGI_OUTDUPL_POINTER_POSITION}}</strong> structure describes the position of the hardware cursor.</p> <p>The <strong>Position</strong> member is valid only if the <strong>Visible</strong> member?s value is set to <strong>{{TRUE}}</strong>.</p> <dd> <p>The position of the hardware cursor relative to the top-left of the adapter output.</p> </dd> <dd> <p>Specifies whether the hardware cursor is visible. <strong>{{TRUE}}</strong> if visible; otherwise, <strong>{{FALSE}}</strong>. If the hardware cursor is not visible, the calling application does not display the cursor in the client.</p> </dd> <p>The <strong>{{DXGI_OUTDUPL_POINTER_SHAPE_INFO}}</strong> structure describes information about the cursor shape.</p> <p>An application draws the cursor shape with the top-left-hand corner drawn at the position that the <strong>Position</strong> member of the <strong>{{DXGI_OUTDUPL_POINTER_POSITION}}</strong> structure specifies; the application does not use the hot spot to draw the cursor shape.</p><p>An application calls the <strong>{{IDXGIOutputDuplication::GetFramePointerShape}}</strong> method to retrieve cursor shape information in a <strong>{{DXGI_OUTDUPL_POINTER_SHAPE_INFO}}</strong> structure.</p> <dd> <p>A <strong>{{DXGI_OUTDUPL_POINTER_SHAPE_TYPE}}</strong>-typed value that specifies the type of cursor shape. </p> </dd> <dd> <p>The width in pixels of the mouse cursor.</p> </dd> <dd> <p>The height in scan lines of the mouse cursor.</p> </dd> <dd> <p>The width in bytes of the mouse cursor.</p> </dd> <dd> <p>The position of the cursor's hot spot relative to its upper-left pixel. An application does not use the hot spot when it determines where to draw the cursor shape.</p> </dd> <p>The <strong>{{DXGI_OUTDUPL_FRAME_INFO}}</strong> structure describes the current desktop image.</p> <p>A non-zero <strong>LastMouseUpdateTime</strong> indicates an update to either a mouse reference position or a mouse reference position and shape. That is, the mouse reference position is always valid for a non-zero <strong>LastMouseUpdateTime</strong>; however, the application must check the value of the <strong>PointerShapeBufferSize</strong> member to determine whether the shape was updated too.</p><p>If only the reference was updated (that is, the desktop image was not updated), the <strong>AccumulatedFrames</strong>, <strong>TotalMetadataBufferSize</strong>, and <strong>LastPresentTime</strong> members are set to zero.</p><p>An <strong>AccumulatedFrames</strong> value of one indicates that the application completed processing the last frame before a new desktop image was presented. If the <strong>AccumulatedFrames</strong> value is greater than one, more desktop image updates have occurred while the application processed the last desktop update. In this situation, the operating system accumulated the update regions. For more information about desktop updates, see Desktop Update Data.</p><p>A non-zero <strong>TotalMetadataBufferSize</strong> indicates the total size of the buffers that are required to store all the desktop update metadata. An application cannot determine the size of each type of metadata. The application must call the <strong>{{IDXGIOutputDuplication::GetFrameDirtyRects}}</strong>, <strong>{{IDXGIOutputDuplication::GetFrameMoveRects}}</strong>, or <strong>{{IDXGIOutputDuplication::GetFramePointerShape}}</strong> method to obtain information about each type of metadata.</p><strong>Note</strong>??To correct visual effects, an application must process the move region data before it processes the dirty rectangles.? <dd> <p>The time stamp of the last update of the desktop image. The operating system calls the <strong>QueryPerformanceCounter</strong> function to obtain the value. A zero value indicates that the desktop image was not updated since an application last called the <strong>{{IDXGIOutputDuplication::AcquireNextFrame}}</strong> method to acquire the next frame of the desktop image.</p> </dd> <dd> <p>The time stamp of the last update to the mouse. The operating system calls the <strong>QueryPerformanceCounter</strong> function to obtain the value. A zero value indicates that the position or shape of the mouse was not updated since an application last called the <strong>{{IDXGIOutputDuplication::AcquireNextFrame}}</strong> method to acquire the next frame of the desktop image. The mouse position is always supplied for a mouse update. A new reference shape is indicated by a non-zero value in the <strong>PointerShapeBufferSize</strong> member.</p> </dd> <dd> <p>The number of frames that the operating system accumulated in the desktop image surface since the calling application processed the last desktop image. For more information about this number, see Remarks.</p> </dd> <dd> <p>Specifies whether the operating system accumulated updates by coalescing dirty regions. Therefore, the dirty regions might contain unmodified pixels. <strong>{{TRUE}}</strong> if dirty regions were accumulated; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <dd> <p>Specifies whether the desktop image might contain protected content that was already blacked out in the desktop image. <strong>{{TRUE}}</strong> if protected content was already blacked; otherwise, <strong>{{FALSE}}</strong>. The application can use this information to notify the remote user that some of the desktop content might be protected and therefore not visible.</p> </dd> <dd> <p>A <strong>{{DXGI_OUTDUPL_POINTER_POSITION}}</strong> structure that describes the most recent mouse position if the <strong>LastMouseUpdateTime</strong> member is a non-zero value; otherwise, this value is ignored. This value provides the coordinates of the location where the top-left-hand corner of the reference shape is drawn; this value is not the desktop position of the hot spot.</p> </dd> <dd> <p>Size in bytes of the buffers to store all the desktop update metadata for this frame. For more information about this size, see Remarks.</p> </dd> <dd> <p>Size in bytes of the buffer to hold the new pixel data for the mouse shape. For more information about this size, see Remarks.</p> </dd> <p>Describes a display mode and whether the display mode supports stereo.</p> <p><strong>{{DXGI_MODE_DESC1}}</strong> is identical to <strong>{{DXGI_MODE_DESC}}</strong> except that <strong>{{DXGI_MODE_DESC1}}</strong> includes the <strong>Stereo</strong> member.</p><p>This structure is used by the <strong>GetDisplayModeList1</strong> and <strong>FindClosestMatchingMode1</strong> methods.</p> <dd> <p>A value that describes the resolution width.</p> </dd> <dd> <p>A value that describes the resolution height.</p> </dd> <dd> <p>A <strong>{{DXGI_RATIONAL}}</strong> structure that describes the refresh rate in hertz.</p> </dd> <dd> <p>A <strong>{{DXGI_FORMAT}}</strong>-typed value that describes the display format.</p> </dd> <dd> <p>A <strong>{{DXGI_MODE_SCANLINE_ORDER}}</strong>-typed value that describes the scan-line drawing mode.</p> </dd> <dd> <p>A <strong>{{DXGI_MODE_SCALING}}</strong>-typed value that describes the scaling mode.</p> </dd> <dd> <p>Specifies whether the full-screen display mode is stereo. <strong>{{TRUE}}</strong> if stereo; otherwise, <strong>{{FALSE}}</strong>. </p> </dd> <p>Describes a swap chain.</p> <p>This structure is used by the <strong>CreateSwapChainForHwnd</strong>, <strong>CreateSwapChainForCoreWindow</strong>, <strong>CreateSwapChainForComposition</strong>, <strong>CreateSwapChainForCompositionSurfaceHandle</strong>, and <strong>GetDesc1</strong> methods.</p><strong>Note</strong>??You cannot cast a <strong>{{DXGI_SWAP_CHAIN_DESC1}}</strong> to a <strong>{{DXGI_SWAP_CHAIN_DESC}}</strong> and vice versa. An application must explicitly use the <strong>{{IDXGISwapChain1::GetDesc1}}</strong> method to retrieve the newer version of the swap-chain description structure.?<p>In full-screen mode, there is a dedicated front buffer; in windowed mode, the desktop is the front buffer.</p><p>For a flip-model swap chain (that is, a swap chain that has the <strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong> value set in the <strong>SwapEffect</strong> member), you must set the <strong>Format</strong> member to <strong>{{DXGI_FORMAT_R16G16B16A16_FLOAT}}</strong>, <strong>{{DXGI_FORMAT_B8G8R8A8_UNORM}}</strong>, or <strong>{{DXGI_FORMAT_R8G8B8A8_UNORM}}</strong>; you must set the <strong>Count</strong> member of the <strong>{{DXGI_SAMPLE_DESC}}</strong> structure that the <strong>SampleDesc</strong> member specifies to one and the <strong>Quality</strong> member of <strong>{{DXGI_SAMPLE_DESC}}</strong> to zero because multiple sample antialiasing ({{MSAA}}) is not supported; you must set the <strong>BufferCount</strong> member to from two to sixteen. For more info about flip-model swap chain, see {{DXGI}} Flip Model.</p> <dd> <p>A value that describes the resolution width. If you specify the width as zero when you call the <strong>{{IDXGIFactory2::CreateSwapChainForHwnd}}</strong> method to create a swap chain, the runtime obtains the width from the output window and assigns this width value to the swap-chain description. You can subsequently call the <strong>{{IDXGISwapChain1::GetDesc1}}</strong> method to retrieve the assigned width value. You cannot specify the width as zero when you call the <strong>{{IDXGIFactory2::CreateSwapChainForComposition}}</strong> method.</p> </dd> <dd> <p>A value that describes the resolution height. If you specify the height as zero when you call the <strong>{{IDXGIFactory2::CreateSwapChainForHwnd}}</strong> method to create a swap chain, the runtime obtains the height from the output window and assigns this height value to the swap-chain description. You can subsequently call the <strong>{{IDXGISwapChain1::GetDesc1}}</strong> method to retrieve the assigned height value. You cannot specify the height as zero when you call the <strong>{{IDXGIFactory2::CreateSwapChainForComposition}}</strong> method.</p> </dd> <dd> <p>A <strong>{{DXGI_FORMAT}}</strong> structure that describes the display format.</p> </dd> <dd> <p>Specifies whether the full-screen display mode or the swap-chain back buffer is stereo. <strong>{{TRUE}}</strong> if stereo; otherwise, <strong>{{FALSE}}</strong>. If you specify stereo, you must also specify a flip-model swap chain (that is, a swap chain that has the <strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong> value set in the <strong>SwapEffect</strong> member).</p> </dd> <dd> <p>A <strong>{{DXGI_SAMPLE_DESC}}</strong> structure that describes multi-sampling parameters. This member is valid only with bit-block transfer (bitblt) model swap chains.</p> </dd> <dd> <p>A <strong>{{DXGI_USAGE}}</strong>-typed value that describes the surface usage and {{CPU}} access options for the back buffer. The back buffer can be used for shader input or render-target output.</p> </dd> <dd> <p>A value that describes the number of buffers in the swap chain. When you create a full-screen swap chain, you typically include the front buffer in this value.</p> </dd> <dd> <p>A <strong>{{DXGI_SCALING}}</strong>-typed value that identifies resize behavior if the size of the back buffer is not equal to the target output.</p> </dd> <dd> <p>A <strong>{{DXGI_SWAP_EFFECT}}</strong>-typed value that describes the presentation model that is used by the swap chain and options for handling the contents of the presentation buffer after presenting a surface. You must specify the <strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong> value when you call the <strong>{{IDXGIFactory2::CreateSwapChainForComposition}}</strong> method because this method supports only flip presentation model.</p> </dd> <dd> <p>A <strong>{{DXGI_ALPHA_MODE}}</strong>-typed value that identifies the transparency behavior of the swap-chain back buffer.</p> </dd> <dd> <p>A combination of <strong>{{DXGI_SWAP_CHAIN_FLAG}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies options for swap-chain behavior.</p> </dd> <p>Describes full-screen mode for a swap chain.</p> <p>This structure is used by the <strong>CreateSwapChainForHwnd</strong> and <strong>GetFullscreenDesc</strong> methods.</p> <dd> <p>A <strong>{{DXGI_RATIONAL}}</strong> structure that describes the refresh rate in hertz.</p> </dd> <dd> <p>A member of the <strong>{{DXGI_MODE_SCANLINE_ORDER}}</strong> enumerated type that describes the scan-line drawing mode.</p> </dd> <dd> <p>A member of the <strong>{{DXGI_MODE_SCALING}}</strong> enumerated type that describes the scaling mode.</p> </dd> <dd> <p>A Boolean value that specifies whether the swap chain is in windowed mode. <strong>{{TRUE}}</strong> if the swap chain is in windowed mode; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p>Describes information about present that helps the operating system optimize presentation.</p> <p>This structure is used by the <strong>Present1</strong> method.</p><p>The scroll rectangle and the list of dirty rectangles could overlap. In this situation, the dirty rectangles take priority. Applications can then have pieces of dynamic content on top of a scrolled area. For example, an application could scroll a page and play video at the same time.</p><p>The following diagram and coordinates illustrate this example.</p><code> DirtyRectsCount = 2 pDirtyRects[ 0 ] = { 10, 30, 40, 50 } // Video pDirtyRects[ 1 ] = { 0, 70, 50, 80 } // New line *pScrollRect = { 0, 0, 50, 70 } *pScrollOffset = { 0, -10 } </code><p>Parts of the previous frame and content that the application renders are combined to produce the final frame that the operating system presents on the display screen. Most of the window is scrolled from the previous frame. The application must update the video frame with the new chunk of content that appears due to scrolling.</p><p>The dashed rectangle shows the scroll rectangle in the current frame. The scroll rectangle is specified by the <strong>pScrollRect</strong> member. The arrow shows the scroll offset. The scroll offset is specified by the <strong>pScrollOffset</strong> member. Filled rectangles show dirty rectangles that the application updated with new content. The filled rectangles are specified by the <strong>DirtyRectsCount</strong> and <strong>pDirtyRects</strong> members.</p><p>The scroll rectangle and offset are not supported for the <strong>{{DXGI_SWAP_EFFECT_DISCARD}}</strong> or <strong>{{DXGI_SWAP_EFFECT_SEQUENTIAL}}</strong> present option. Dirty rectangles and scroll rectangle are not supported for multisampled swap chains.</p><p>The actual implementation of composition and necessary bitblts is different for the bitblt model and the flip model. For more info about these models, see {{DXGI}} Flip Model.</p><p>For more info about the flip-model swap chain and optimizing presentation, see Enhancing presentation with the flip model, dirty rectangles, and scrolled areas.</p> <dd> <p>The number of updated rectangles that you update in the back buffer for the presented frame. The operating system uses this information to optimize presentation. You can set this member to 0 to indicate that you update the whole frame.</p> </dd> <dd> <p>A list of updated rectangles that you update in the back buffer for the presented frame. An application must update every single pixel in each rectangle that it reports to the runtime; the application cannot assume that the pixels are saved from the previous frame. For more information about updating dirty rectangles, see Remarks. You can set this member to <strong>{{NULL}}</strong> if <strong>DirtyRectsCount</strong> is 0. An application must not update any pixel outside of the dirty rectangles.</p> </dd> <dd> <p> A reference to the scrolled rectangle. The scrolled rectangle is the rectangle of the previous frame from which the runtime bit-block transfers (bitblts) content. The runtime also uses the scrolled rectangle to optimize presentation in terminal server and indirect display scenarios.</p> <p>The scrolled rectangle also describes the destination rectangle, that is, the region on the current frame that is filled with scrolled content. You can set this member to <strong>{{NULL}}</strong> to indicate that no content is scrolled from the previous frame.</p> </dd> <dd> <p>A reference to the offset of the scrolled area that goes from the source rectangle (of previous frame) to the destination rectangle (of current frame). You can set this member to <strong>{{NULL}}</strong> to indicate no offset.</p> </dd> <p>Describes an adapter (or video card) that uses Microsoft DirectX Graphics Infrastructure ({{DXGI}}) 1.2.</p> <p>The <strong>{{DXGI_ADAPTER_DESC2}}</strong> structure provides a {{DXGI}} 1.2 description of an adapter. This structure is initialized by using the <strong>{{IDXGIAdapter2::GetDesc2}}</strong> method.</p> <dd> <p>A string that contains the adapter description.</p> </dd> <dd> <p>The {{PCI}} {{ID}} of the hardware vendor.</p> </dd> <dd> <p>The {{PCI}} {{ID}} of the hardware device.</p> </dd> <dd> <p>The {{PCI}} {{ID}} of the sub system.</p> </dd> <dd> <p>The {{PCI}} {{ID}} of the revision number of the adapter.</p> </dd> <dd> <p>The number of bytes of dedicated video memory that are not shared with the {{CPU}}.</p> </dd> <dd> <p>The number of bytes of dedicated system memory that are not shared with the {{CPU}}. This memory is allocated from available system memory at boot time.</p> </dd> <dd> <p>The number of bytes of shared system memory. This is the maximum value of system memory that may be consumed by the adapter during operation. Any incidental memory consumed by the driver as it manages and uses video memory is additional.</p> </dd> <dd> <p>A unique value that identifies the adapter. See <strong>{{LUID}}</strong> for a definition of the structure. <strong>{{LUID}}</strong> is defined in dxgi.h.</p> </dd> <dd> <p>A value of the <strong>{{DXGI_ADAPTER_FLAG}}</strong> enumerated type that describes the adapter type. The <strong>{{DXGI_ADAPTER_FLAG_REMOTE}}</strong> flag is reserved.</p> </dd> <dd> <p>A value of the <strong>{{DXGI_GRAPHICS_PREEMPTION_GRANULARITY}}</strong> enumerated type that describes the granularity level at which the {{GPU}} can be preempted from performing its current graphics rendering task.</p> </dd> <dd> <p>A value of the <strong>{{DXGI_COMPUTE_PREEMPTION_GRANULARITY}}</strong> enumerated type that describes the granularity level at which the {{GPU}} can be preempted from performing its current compute task.</p> </dd> <p> </p><p> The <strong>{{IDXGIDisplayControl}}</strong> interface exposes methods to indicate user preference for the operating system's stereoscopic 3D display behavior and to set stereoscopic 3D display status to enable or disable. </p><p> We recommend that you not use <strong>{{IDXGIDisplayControl}}</strong> to query or set system-wide stereoscopic 3D settings in your stereoscopic 3D apps. Instead, for your windowed apps, call the <strong>{{IDXGIFactory2::IsWindowedStereoEnabled}}</strong> method to determine whether to render in stereo; for your full-screen apps, call the <strong>{{IDXGIOutput1::GetDisplayModeList1}}</strong> method and then determine whether any of the returned display modes support rendering in stereo. </p> <strong>Note</strong>?? The <strong>{{IDXGIDisplayControl}}</strong> interface is only used by the <strong>Display</strong> app of the operating system's Control Panel or by control applets from third party graphics vendors. This interface is not meant for developers of end-user apps.?<strong>Note</strong>?? The <strong>{{IDXGIDisplayControl}}</strong> interface does not exist for Windows Store apps.?<p> Call <strong>QueryInterface</strong> from a factory object (<strong>{{IDXGIFactory}}</strong>, <strong>{{IDXGIFactory1}}</strong> or <strong>{{IDXGIFactory2}}</strong>) to retrieve the <strong>{{IDXGIDisplayControl}}</strong> interface. The following code shows how. </p><pre>{{IDXGIDisplayControl}} * pDXGIDisplayControl; hr = g_pDXGIFactory-&gt;QueryInterface(__uuidof({{IDXGIDisplayControl}}), (void **)&amp;pDXGIDisplayControl);</pre><p> The operating system processes changes to stereo-enabled configuration asynchronously. Therefore, these changes might not be immediately visible in every process that calls <strong>{{IDXGIDisplayControl::IsStereoEnabled}}</strong> to query for stereo configuration. Control applets can use the <strong>{{IDXGIFactory2::RegisterStereoStatusEvent}}</strong> or <strong>{{IDXGIFactory2::RegisterStereoStatusWindow}}</strong> method to register for notifications of all stereo configuration changes. </p><p><strong>Platform Update for Windows?7:??</strong> Stereoscopic 3D display behavior isn?t available with the Platform Update for Windows?7. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <p>Retrieves a Boolean value that indicates whether the operating system's stereoscopic 3D display behavior is enabled.</p> <p>You pass a Boolean value to the <strong>{{IDXGIDisplayControl::SetStereoEnabled}}</strong> method to either enable or disable the operating system's stereoscopic 3D display behavior. {{TRUE}} enables the operating system's stereoscopic 3D display behavior and {{FALSE}} disables it.</p> <p><strong>IsStereoEnabled</strong> returns {{TRUE}} when the operating system's stereoscopic 3D display behavior is enabled and {{FALSE}} when this behavior is disabled.</p><p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>IsStereoEnabled</strong> always returns {{FALSE}} because stereoscopic 3D display behavior isn?t available with the Platform Update for Windows?7. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <p>Set a Boolean value to either enable or disable the operating system's stereoscopic 3D display behavior.</p> <p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>SetStereoEnabled</strong> doesn't change stereoscopic 3D display behavior because stereoscopic 3D display behavior isn?t available with the Platform Update for Windows?7. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <p>Returns nothing.</p> <dd> <p>A Boolean value that either enables or disables the operating system's stereoscopic 3D display behavior. {{TRUE}} enables the operating system's stereoscopic 3D display behavior and {{FALSE}} disables it.</p> </dd> <p> The <strong>{{IDXGIOutputDuplication}}</strong> interface accesses and manipulates the duplicated desktop image. </p> <p> A collaboration application can use <strong>{{IDXGIOutputDuplication}}</strong> to access the desktop image. <strong>{{IDXGIOutputDuplication}}</strong> is supported in Desktop Window Manager ({{DWM}}) on non-8bpp DirectX full-screen modes and non-8bpp OpenGL full-screen modes. 16-bit or 32-bit {{GDI}} non-{{DWM}} desktop modes are not supported. </p><p> An application can use <strong>{{IDXGIOutputDuplication}}</strong> on a separate thread to receive the desktop images and to feed them into their specific image-processing pipeline. The application uses <strong>{{IDXGIOutputDuplication}}</strong> to perform the following operations: </p><ol> <li>Acquire the next desktop image.</li> <li>Retrieve the information that describes the image.</li> <li> Perform an operation on the image. This operation can be as simple as copying the image to a staging buffer so that the application can read the pixel data on the image. The application reads the pixel data after the application calls <strong>{{IDXGISurface::Map}}</strong>. Alternatively, this operation can be more complex. For example, the application can run some pixel shaders on the updated regions of the image to encode those regions for transmission to a client. </li> <li>After the application finishes processing each desktop image, it releases the image, loops to step 1, and repeats the steps. The application repeats these steps until it is finished processing desktop images.</li> </ol><p>The following components of the operating system can generate the desktop image:</p><ul> <li> The {{DWM}} by composing the desktop image </li> <li>A full-screen DirectX or OpenGL application</li> <li>An application by switching to a separate desktop, for example, the secure desktop that is used to display the login screen</li> </ul><p> All current <strong>{{IDXGIOutputDuplication}}</strong> interfaces become invalid when the operating system switches to a different component that produces the desktop image or when a mode change occurs. In these situations, the application must destroy its current <strong>{{IDXGIOutputDuplication}}</strong> interface and create a new <strong>{{IDXGIOutputDuplication}}</strong> interface. </p><p> Examples of situations in which <strong>{{IDXGIOutputDuplication}}</strong> becomes invalid are: </p><ul> <li>Desktop switch</li> <li>Mode change</li> <li> Switch from {{DWM}} on, {{DWM}} off, or other full-screen application </li> </ul><p> In these situations, the application must release the <strong>{{IDXGIOutputDuplication}}</strong> interface and must create a new <strong>{{IDXGIOutputDuplication}}</strong> interface for the new content. If the application does not have the appropriate privilege to the new desktop image, its call to the <strong>{{IDXGIOutput1::DuplicateOutput}}</strong> method fails. </p><p> While the application processes each desktop image, the operating system accumulates all the desktop image updates into a single update. For more information about desktop updates, see Updating the desktop image data. </p><p> The desktop image is always in the <strong>{{DXGI_FORMAT_B8G8R8A8_UNORM}}</strong> format. </p><p> The <strong>{{IDXGIOutputDuplication}}</strong> interface does not exist for Windows Store apps. </p> <p>Retrieves a description of a duplicated output. This description specifies the dimensions of the surface that contains the desktop image.</p> <p>After an application creates an <strong>{{IDXGIOutputDuplication}}</strong> interface, it calls <strong>GetDesc</strong> to retrieve the dimensions of the surface that contains the desktop image. The format of the desktop image is always <strong>{{DXGI_FORMAT_B8G8R8A8_UNORM}}</strong>.</p> <p>Returns nothing.</p> <dd> <p>A reference to a <strong>{{DXGI_OUTDUPL_DESC}}</strong> structure that describes the duplicated output. This parameter must not be <strong>{{NULL}}</strong>.</p> </dd> <p>Indicates that the application is ready to process the next desktop image.</p> <p>When <strong>AcquireNextFrame</strong> returns successfully, the calling application can access the desktop image that <strong>AcquireNextFrame</strong> returns in the variable at <em>ppDesktopResource</em>. If the caller specifies a zero time-out interval in the <em>TimeoutInMilliseconds</em> parameter, <strong>AcquireNextFrame</strong> verifies whether there is a new desktop image available, returns immediately, and indicates its outcome with the return value. If the caller specifies an <strong>{{INFINITE}}</strong> time-out interval in the <em>TimeoutInMilliseconds</em> parameter, the time-out interval never elapses.</p><strong>Note</strong>??You cannot cancel the wait that you specified in the <em>TimeoutInMilliseconds</em> parameter. Therefore, if you must periodically check for other conditions (for example, a terminate signal), you should specify a non-<strong>{{INFINITE}}</strong> time-out interval. After the time-out interval elapses, you can check for these other conditions and then call <strong>AcquireNextFrame</strong> again to wait for the next frame.?<p><strong>AcquireNextFrame</strong> acquires a new desktop frame when the operating system either updates the desktop bitmap image or changes the shape or position of a hardware reference. The new frame that <strong>AcquireNextFrame</strong> acquires might have only the desktop image updated, only the reference shape or position updated, or both.</p> <p><strong>AcquireNextFrame</strong> returns: </p><ul> <li>{{S_OK}} if it successfully received the next desktop image.</li> <li>{{DXGI_ERROR_ACCESS_LOST}} if the desktop duplication interface is invalid. The desktop duplication interface typically becomes invalid when a different type of image is displayed on the desktop. Examples of this situation are: <ul> <li>Desktop switch</li> <li>Mode change</li> <li>Switch from {{DWM}} on, {{DWM}} off, or other full-screen application</li> </ul>In this situation, the application must release the <strong>{{IDXGIOutputDuplication}}</strong> interface and create a new <strong>{{IDXGIOutputDuplication}}</strong> for the new content.</li> <li>{{DXGI_ERROR_WAIT_TIMEOUT}} if the time-out interval elapsed before the next desktop frame was available.</li> <li>{{DXGI_ERROR_INVALID_CALL}} if the application called <strong>AcquireNextFrame</strong> without releasing the previous frame.</li> <li>{{E_INVALIDARG}} if one of the parameters to <strong>AcquireNextFrame</strong> is incorrect; for example, if <em>pFrameInfo</em> is {{NULL}}.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul> <dd> <p>The time-out interval, in milliseconds. This interval specifies the amount of time that this method waits for a new frame before it returns to the caller. This method returns if the interval elapses, and a new desktop image is not available.</p> <p>For more information about the time-out interval, see Remarks.</p> </dd> <dd> <p>A reference to a memory location that receives the <strong>{{DXGI_OUTDUPL_FRAME_INFO}}</strong> structure that describes timing and presentation statistics for a frame.</p> </dd> <dd> <p>A reference to a variable that receives the <strong>{{IDXGIResource}}</strong> interface of the surface that contains the desktop bitmap.</p> </dd> <p>Gets information about dirty rectangles for the current desktop frame.</p> <p><strong>GetFrameDirtyRects</strong> stores a size value in the variable at <em>pDirtyRectsBufferSizeRequired</em>. This value specifies the number of bytes that <strong>GetFrameDirtyRects</strong> needs to store information about dirty regions. You can use this value in the following situations to determine the amount of memory to allocate for future buffers that you pass to <em>pDirtyRectsBuffer</em>:</p><ul> <li><strong>GetFrameDirtyRects</strong> fails with {{DXGI_ERROR_MORE_DATA}} because the buffer is not big enough.</li> <li><strong>GetFrameDirtyRects</strong> supplies a buffer that is bigger than necessary. The size value returned at <em>pDirtyRectsBufferSizeRequired</em> informs the caller how much buffer space was actually used compared to how much buffer space the caller allocated and specified in the <em>DirtyRectsBufferSize</em> parameter.</li> </ul><p>The caller can also use the value returned at <em>pDirtyRectsBufferSizeRequired</em> to determine the number of <strong>{{RECT}}</strong>s returned in the <em>pDirtyRectsBuffer</em> array.</p><p>The buffer contains the list of dirty <strong>{{RECT}}</strong>s for the current frame.</p><strong>Note</strong>??To produce a visually accurate copy of the desktop, an application must first process all move <strong>{{RECT}}</strong>s before it processes dirty <strong>{{RECT}}</strong>s.? <p><strong>GetFrameDirtyRects</strong> returns: </p><ul> <li>{{S_OK}} if it successfully retrieved information about dirty rectangles.</li> <li>{{DXGI_ERROR_ACCESS_LOST}} if the desktop duplication interface is invalid. The desktop duplication interface typically becomes invalid when a different type of image is displayed on the desktop. Examples of this situation are: <ul> <li>Desktop switch</li> <li>Mode change</li> <li>Switch from {{DWM}} on, {{DWM}} off, or other full-screen application</li> </ul> In this situation, the application must release the <strong>{{IDXGIOutputDuplication}}</strong> interface and create a new <strong>{{IDXGIOutputDuplication}}</strong> for the new content.</li> <li>{{DXGI_ERROR_MORE_DATA}} if the buffer that the calling application provided was not big enough.</li> <li>{{DXGI_ERROR_INVALID_CALL}} if the application called <strong>GetFrameDirtyRects</strong> without owning the desktop image.</li> <li>{{E_INVALIDARG}} if one of the parameters to <strong>GetFrameDirtyRects</strong> is incorrect; for example, if <em>pDirtyRectsBuffer</em> is {{NULL}}.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul> <dd> <p>The size in bytes of the buffer that the caller passed to the <em>pDirtyRectsBuffer</em> parameter.</p> </dd> <dd> <p>A reference to an array of <strong>{{RECT}}</strong> structures that identifies the dirty rectangle regions for the desktop frame.</p> </dd> <dd> <p>Pointer to a variable that receives the number of bytes that <strong>GetFrameDirtyRects</strong> needs to store information about dirty regions in the buffer at <em>pDirtyRectsBuffer</em>.</p> <p>For more information about returning the required buffer size, see Remarks.</p> </dd> <p>Gets information about the moved rectangles for the current desktop frame.</p> <p><strong>GetFrameMoveRects</strong> stores a size value in the variable at <em>pMoveRectsBufferSizeRequired</em>. This value specifies the number of bytes that <strong>GetFrameMoveRects</strong> needs to store information about moved regions. You can use this value in the following situations to determine the amount of memory to allocate for future buffers that you pass to <em>pMoveRectBuffer</em>:</p><ul> <li><strong>GetFrameMoveRects</strong> fails with {{DXGI_ERROR_MORE_DATA}} because the buffer is not big enough.</li> <li><strong>GetFrameMoveRects</strong> supplies a buffer that is bigger than necessary. The size value returned at <em>pMoveRectsBufferSizeRequired</em> informs the caller how much buffer space was actually used compared to how much buffer space the caller allocated and specified in the <em>MoveRectsBufferSize</em> parameter.</li> </ul><p>The caller can also use the value returned at <em>pMoveRectsBufferSizeRequired</em> to determine the number of <strong>{{DXGI_OUTDUPL_MOVE_RECT}}</strong> structures returned.</p><p>The buffer contains the list of move {{RECTs}} for the current frame.</p><strong>Note</strong>??To produce a visually accurate copy of the desktop, an application must first process all move {{RECTs}} before it processes dirty {{RECTs}}.? <p><strong>GetFrameMoveRects</strong> returns: </p><ul> <li>{{S_OK}} if it successfully retrieved information about moved rectangles.</li> <li>{{DXGI_ERROR_ACCESS_LOST}} if the desktop duplication interface is invalid. The desktop duplication interface typically becomes invalid when a different type of image is displayed on the desktop. Examples of this situation are: <ul> <li>Desktop switch</li> <li>Mode change</li> <li>Switch from {{DWM}} on, {{DWM}} off, or other full-screen application</li> </ul> In this situation, the application must release the <strong>{{IDXGIOutputDuplication}}</strong> interface and create a new <strong>{{IDXGIOutputDuplication}}</strong> for the new content.</li> <li>{{DXGI_ERROR_MORE_DATA}} if the buffer that the calling application provided is not big enough.</li> <li>{{DXGI_ERROR_INVALID_CALL}} if the application called <strong>GetFrameMoveRects</strong> without owning the desktop image.</li> <li>{{E_INVALIDARG}} if one of the parameters to <strong>GetFrameMoveRects</strong> is incorrect; for example, if <em>pMoveRectBuffer</em> is {{NULL}}.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul> <dd> <p>The size in bytes of the buffer that the caller passed to the <em>pMoveRectBuffer</em> parameter.</p> </dd> <dd> <p>A reference to an array of <strong>{{DXGI_OUTDUPL_MOVE_RECT}}</strong> structures that identifies the moved rectangle regions for the desktop frame.</p> </dd> <dd> <p>Pointer to a variable that receives the number of bytes that <strong>GetFrameMoveRects</strong> needs to store information about moved regions in the buffer at <em>pMoveRectBuffer</em>.</p> <p>For more information about returning the required buffer size, see Remarks.</p> </dd> <p>Gets information about the new reference shape for the current desktop frame.</p> <p><strong>GetFramePointerShape</strong> stores a size value in the variable at <em>pPointerShapeBufferSizeRequired</em>. This value specifies the number of bytes that <em>pPointerShapeBufferSizeRequired</em> needs to store the new reference shape pixel data. You can use the value in the following situations to determine the amount of memory to allocate for future buffers that you pass to <em>pPointerShapeBuffer</em>:</p><ul> <li><strong>GetFramePointerShape</strong> fails with {{DXGI_ERROR_MORE_DATA}} because the buffer is not big enough.</li> <li><strong>GetFramePointerShape</strong> supplies a bigger than necessary buffer. The size value returned at <em>pPointerShapeBufferSizeRequired</em> informs the caller how much buffer space was actually used compared to how much buffer space the caller allocated and specified in the <em>PointerShapeBufferSize</em> parameter.</li> </ul><p>The <em>pPointerShapeInfo</em> parameter describes the new reference shape.</p> <p><strong>GetFramePointerShape</strong> returns: </p><ul> <li>{{S_OK}} if it successfully retrieved information about the new reference shape.</li> <li>{{DXGI_ERROR_ACCESS_LOST}} if the desktop duplication interface is invalid. The desktop duplication interface typically becomes invalid when a different type of image is displayed on the desktop. Examples of this situation are: <ul> <li>Desktop switch</li> <li>Mode change</li> <li>Switch from {{DWM}} on, {{DWM}} off, or other full-screen application</li> </ul>In this situation, the application must release the <strong>{{IDXGIOutputDuplication}}</strong> interface and create a new <strong>{{IDXGIOutputDuplication}}</strong> for the new content.</li> <li>{{DXGI_ERROR_MORE_DATA}} if the buffer that the calling application provided was not big enough.</li> <li>{{DXGI_ERROR_INVALID_CALL}} if the application called <strong>GetFramePointerShape</strong> without owning the desktop image.</li> <li>{{E_INVALIDARG}} if one of the parameters to <strong>GetFramePointerShape</strong> is incorrect; for example, if <em>pPointerShapeInfo</em> is {{NULL}}.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul> <dd> <p>The size in bytes of the buffer that the caller passed to the <em>pPointerShapeBuffer</em> parameter.</p> </dd> <dd> <p>A reference to a buffer to which <strong>GetFramePointerShape</strong> copies and returns pixel data for the new reference shape.</p> </dd> <dd> <p>Pointer to a variable that receives the number of bytes that <strong>GetFramePointerShape</strong> needs to store the new reference shape pixel data in the buffer at <em>pPointerShapeBuffer</em>.</p> <p>For more information about returning the required buffer size, see Remarks.</p> </dd> <dd> <p>Pointer to a <strong>{{DXGI_OUTDUPL_POINTER_SHAPE_INFO}}</strong> structure that receives the reference shape information.</p> </dd> <p>Provides the {{CPU}} with efficient access to a desktop image if that desktop image is already in system memory.</p> <p>You can successfully call <strong>MapDesktopSurface</strong> if the <strong>DesktopImageInSystemMemory</strong> member of the <strong>{{DXGI_OUTDUPL_DESC}}</strong> structure is set to <strong>{{TRUE}}</strong>. If <strong>DesktopImageInSystemMemory</strong> is <strong>{{FALSE}}</strong>, <strong>MapDesktopSurface</strong> returns {{DXGI_ERROR_UNSUPPORTED}}. Call <strong>{{IDXGIOutputDuplication::GetDesc}}</strong> to retrieve the <strong>{{DXGI_OUTDUPL_DESC}}</strong> structure.</p> <p><strong>MapDesktopSurface</strong> returns: </p><ul> <li>{{S_OK}} if it successfully retrieved the surface data.</li> <li>{{DXGI_ERROR_ACCESS_LOST}} if the desktop duplication interface is invalid. The desktop duplication interface typically becomes invalid when a different type of image is displayed on the desktop. Examples of this situation are: <ul> <li>Desktop switch</li> <li>Mode change</li> <li>Switch from {{DWM}} on, {{DWM}} off, or other full-screen application</li> </ul>In this situation, the application must release the <strong>{{IDXGIOutputDuplication}}</strong> interface and create a new <strong>{{IDXGIOutputDuplication}}</strong> for the new content.</li> <li>{{DXGI_ERROR_INVALID_CALL}} if the application already has an outstanding map on the desktop image. The application must call <strong>UnMapDesktopSurface</strong> before it calls <strong>MapDesktopSurface</strong> again. {{DXGI_ERROR_INVALID_CALL}} is also returned if the application did not own the desktop image when it called <strong>MapDesktopSurface</strong>.</li> <li>{{DXGI_ERROR_UNSUPPORTED}} if the desktop image is not in system memory. In this situation, the application must first transfer the image to a staging surface and then lock the image by calling the <strong>{{IDXGISurface::Map}}</strong> method.</li> <li>{{E_INVALIDARG}} if the <em>pLockedRect</em> parameter is incorrect; for example, if <em>pLockedRect</em> is <strong>{{NULL}}</strong>.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul> <dd> <p>A reference to a <strong>{{DXGI_MAPPED_RECT}}</strong> structure that receives the surface data that the {{CPU}} needs to directly access the surface data. </p> </dd> <p>Invalidates the reference to the desktop image that was retrieved by using <strong>{{IDXGIOutputDuplication::MapDesktopSurface}}</strong>.</p> <p><strong>UnMapDesktopSurface</strong> returns: </p><ul> <li>{{S_OK}} if it successfully completed.</li> <li>{{DXGI_ERROR_INVALID_CALL}} if the application did not map the desktop surface by calling <strong>{{IDXGIOutputDuplication::MapDesktopSurface}}</strong>.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul> <p>Indicates that the application finished processing the frame.</p> <p>The application must release the frame before it acquires the next frame. After the frame is released, the surface that contains the desktop bitmap becomes invalid; you will not be able to use the surface in a DirectX graphics operation.</p><p>For performance reasons, we recommend that you release the frame just before you call the <strong>{{IDXGIOutputDuplication::AcquireNextFrame}}</strong> method to acquire the next frame. When the client does not own the frame, the operating system copies all desktop updates to the surface. This can result in wasted {{GPU}} cycles if the operating system updates the same region for each frame that occurs. When the client acquires the frame, the client is aware of only the final update to this region; therefore, any overlapping updates during previous frames are wasted. When the client acquires a frame, the client owns the surface; therefore, the operating system can track only the updated regions and cannot copy desktop updates to the surface. Because of this behavior, we recommend that you minimize the time between the call to release the current frame and the call to acquire the next frame.</p> <p><strong>ReleaseFrame</strong> returns: </p><ul> <li>{{S_OK}} if it successfully completed.</li> <li>{{DXGI_ERROR_INVALID_CALL}} if the application already released the frame.</li> <li>{{DXGI_ERROR_ACCESS_LOST}} if the desktop duplication interface is invalid. The desktop duplication interface typically becomes invalid when a different type of image is displayed on the desktop. Examples of this situation are: <ul> <li>Desktop switch</li> <li>Mode change</li> <li>Switch from {{DWM}} on, {{DWM}} off, or other full-screen application</li> </ul>In this situation, the application must release the <strong>{{IDXGIOutputDuplication}}</strong> interface and create a new <strong>{{IDXGIOutputDuplication}}</strong> for the new content.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul> <p>The <strong>{{IDXGISurface2}}</strong> interface extends the <strong>{{IDXGISurface1}}</strong> interface by adding support for subresource surfaces and getting a handle to a shared resource.</p> <p>An image-data object is a 2D section of memory, commonly called a surface. To get the surface from an output, call <strong>{{IDXGIOutput::GetDisplaySurfaceData}}</strong>. Then, call <strong>QueryInterface</strong> on the <strong>{{IDXGISurface}}</strong> object that <strong>{{IDXGIOutput::GetDisplaySurfaceData}}</strong> returns to retrieve the <strong>{{IDXGISurface2}}</strong> interface.</p><p>Any object that supports <strong>{{IDXGISurface}}</strong> also supports <strong>{{IDXGISurface2}}</strong>.</p><p>The runtime automatically creates an <strong>{{IDXGISurface2}}</strong> interface when it creates a Direct3D resource object that represents a surface. For example, the runtime creates an <strong>{{IDXGISurface2}}</strong> interface when you call <strong>{{ID3D11Device::CreateTexture2D}}</strong> to create a 2D texture. To retrieve the <strong>{{IDXGISurface2}}</strong> interface that represents the 2D texture surface, call <strong>{{ID3D11Texture2D::QueryInterface}}</strong>. In this call, you must pass the identifier of <strong>{{IDXGISurface2}}</strong>. If the 2D texture has only a single {{MIP}}-map level and does not consist of an array of textures, <strong>QueryInterface</strong> succeeds and returns a reference to the <strong>{{IDXGISurface2}}</strong> interface reference. Otherwise, <strong>QueryInterface</strong> fails and does not return the reference to <strong>{{IDXGISurface2}}</strong>.</p><p>You can call the <strong>{{IDXGIResource1::CreateSubresourceSurface}}</strong> method to create an <strong>{{IDXGISurface2}}</strong> interface that refers to one subresource of a stereo resource.</p> <p>Gets the parent resource and subresource index that support a subresource surface.</p> <p>For subresource surface objects that the <strong>{{IDXGIResource1::CreateSubresourceSurface}}</strong> method creates, <strong>GetResource</strong> simply returns the values that were used to create the subresource surface.</p><p>Current objects that implement <strong>{{IDXGISurface}}</strong> are either resources or views. <strong>GetResource</strong> for these objects returns ?this? or the resource that supports the view respectively. In this situation, the subresource index is 0.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the following values:</p><ul> <li>{{E_NOINTERFACE}} if the object does not implement the {{GUID}} that the <em>riid</em> parameter specifies.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul> <dd> <p>The globally unique identifier ({{GUID}}) of the requested interface type.</p> </dd> <dd> <p>A reference to a buffer that receives a reference to the parent resource object for the subresource surface.</p> </dd> <dd> <p>A reference to a variable that receives the index of the subresource surface.</p> </dd> <p> An <strong>{{IDXGIResource1}}</strong> interface extends the <strong>{{IDXGIResource}}</strong> interface by adding support for creating a subresource surface object and for creating a handle to a shared resource. </p> <p> To determine the type of memory a resource is currently located in, use <strong>{{IDXGIDevice::QueryResourceResidency}}</strong>. To share resources between processes, use <strong>{{ID3D11Device1::OpenSharedResource1}}</strong>. For information about how to share resources between multiple Windows graphics {{APIs}}, including Direct3D 11, Direct2D, Direct3D 10, and Direct3D 9Ex, see Surface Sharing Between Windows Graphics {{APIs}}. </p><p> You can retrieve the <strong>{{IDXGIResource1}}</strong> interface from any video memory resource that you create from a Direct3D 10 and later function. Any Direct3D object that supports <strong>{{ID3D10Resource}}</strong> or <strong>{{ID3D11Resource}}</strong> also supports <strong>{{IDXGIResource1}}</strong>. For example, the Direct3D 2D texture object that you create from <strong>{{ID3D11Device::CreateTexture2D}}</strong> supports <strong>{{IDXGIResource1}}</strong>. You can call <strong>QueryInterface</strong> on the 2D texture object (<strong>{{ID3D11Texture2D}}</strong>) to retrieve the <strong>{{IDXGIResource1}}</strong> interface. For example, to retrieve the <strong>{{IDXGIResource1}}</strong> interface from the 2D texture object, use the following code. </p><pre>{{IDXGIResource1}} * pDXGIResource; hr = g_pd3dTexture2D-&gt;QueryInterface(__uuidof({{IDXGIResource1}}), (void **)&amp;pDXGIResource);</pre><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Creates a subresource surface object.</p> <p>Subresource surface objects implement the <strong>{{IDXGISurface2}}</strong> interface, which inherits from <strong>{{IDXGISurface1}}</strong> and indirectly <strong>{{IDXGISurface}}</strong>. Therefore, the {{GDI}}-interoperable methods of <strong>{{IDXGISurface1}}</strong> work if the original resource interface object was created with the {{GDI}}-interoperable flag (<strong>{{D3D11_RESOURCE_MISC_GDI_COMPATIBLE}}</strong>).</p><p><strong>CreateSubresourceSurface</strong> creates a subresource surface that is based on the resource interface on which <strong>CreateSubresourceSurface</strong> is called. For example, if the original resource interface object is a 2D texture, the created subresource surface is also a 2D texture.</p><p>You can use <strong>CreateSubresourceSurface</strong> to create parts of a stereo resource so you can use Direct2D on either the left or right part of the stereo resource.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the following values:</p><ul> <li>{{DXGI_ERROR_INVALID_CALL}} if the index is out of range or if the subresource is not a valid surface.</li> <li>{{E_OUTOFMEMORY}} if insufficient memory is available to create the subresource surface object.</li> </ul><p>A subresource is a valid surface if the original resource would have been a valid surface had its array size been equal to 1.</p> <dd> <p>The index of the subresource surface object to enumerate.</p> </dd> <dd> <p>The address of a reference to a <strong>{{IDXGISurface2}}</strong> interface that represents the created subresource surface object at the position specified by the <em>index</em> parameter.</p> </dd> <p>Creates a handle to a shared resource. You can then use the returned handle with multiple Direct3D devices. </p> <p><strong>CreateSharedHandle</strong> only returns the {{NT}} handle when you created the resource as shared and specified that it uses {{NT}} handles (that is, you set the <strong>{{D3D11_RESOURCE_MISC_SHARED_NTHANDLE}}</strong> and <strong>{{D3D11_RESOURCE_MISC_SHARED_KEYEDMUTEX}}</strong> flags). If you created the resource as shared and specified that it uses {{NT}} handles, you must use <strong>CreateSharedHandle</strong> to get a handle for sharing. In this situation, you can't use the <strong>{{IDXGIResource::GetSharedHandle}}</strong> method because it will fail.</p><p>You can pass the handle that <strong>CreateSharedHandle</strong> returns in a call to the <strong>{{ID3D11Device1::OpenSharedResource1}}</strong> method to give a device access to a shared resource that you created on a different device.</p><p>Because the handle that <strong>CreateSharedHandle</strong> returns is an {{NT}} handle, you can use the handle with <strong>CloseHandle</strong>, <strong>DuplicateHandle</strong>, and so on. You can call <strong>CreateSharedHandle</strong> only once for a shared resource; later calls fail. If you need more handles to the same shared resource, call <strong>DuplicateHandle</strong>. When you no longer need the shared resource handle, call <strong>CloseHandle</strong> to close the handle, in order to avoid memory leaks.</p><p>If you pass a name for the resource to <em>lpName</em> when you call <strong>CreateSharedHandle</strong> to share the resource, you can subsequently pass this name in a call to the <strong>{{ID3D11Device1::OpenSharedResourceByName}}</strong> method to give another device access to the shared resource. If you use a named resource, a malicious user can use this named resource before you do and prevent your app from starting. To prevent this situation, create a randomly named resource and store the name so that it can only be obtained by an authorized user. Alternatively, you can use a file for this purpose. To limit your app to one instance per user, create a locked file in the user's profile directory.</p><p>If you created the resource as shared and did not specify that it uses {{NT}} handles, you cannot use <strong>CreateSharedHandle</strong> to get a handle for sharing because <strong>CreateSharedHandle</strong> will fail.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the following values:</p><ul> <li>{{DXGI_ERROR_INVALID_CALL}} if one of the parameters is invalid.</li> <li>{{DXGI_ERROR_NAME_ALREADY_EXISTS}} if the supplied name of the resource to share is already associated with another resource.</li> <li>{{E_ACCESSDENIED}} if the object is being created in a protected namespace.</li> <li>{{E_OUTOFMEMORY}} if sufficient memory is not available to create the handle.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic. </li> </ul><p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>CreateSharedHandle</strong> fails with {{E_NOTIMPL}}. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <dd> <p>A reference to a <strong>{{SECURITY_ATTRIBUTES}}</strong> structure that contains two separate but related data members: an optional security descriptor, and a Boolean value that determines whether child processes can inherit the returned handle.</p> <p>Set this parameter to <strong>{{NULL}}</strong> if you want child processes that the application might create to not inherit the handle returned by <strong>CreateSharedHandle</strong>, and if you want the resource that is associated with the returned handle to get a default security descriptor.</p> <p>The <strong>lpSecurityDescriptor</strong> member of the structure specifies a <strong>{{SECURITY_DESCRIPTOR}}</strong> for the resource. Set this member to <strong>{{NULL}}</strong> if you want the runtime to assign a default security descriptor to the resource that is associated with the returned handle. The {{ACLs}} in the default security descriptor for the resource come from the primary or impersonation token of the creator. For more info, see Synchronization Object Security and Access Rights.</p> </dd> <dd> <p>The requested access rights to the resource. In addition to the generic access rights, {{DXGI}} defines the following values:</p> <ul> <li><strong>{{DXGI_SHARED_RESOURCE_READ}}</strong> ( 0x80000000L ) - specifies read access to the resource.</li> <li><strong>{{DXGI_SHARED_RESOURCE_WRITE}}</strong> ( 1 ) - specifies write access to the resource.</li> </ul> <p>You can combine these values by using a bitwise {{OR}} operation.</p> </dd> <dd> <p>The name of the resource to share. The name is limited to {{MAX_PATH}} characters. Name comparison is case sensitive. You will need the resource name if you call the <strong>{{ID3D11Device1::OpenSharedResourceByName}}</strong> method to access the shared resource by name. If you instead call the <strong>{{ID3D11Device1::OpenSharedResource1}}</strong> method to access the shared resource by handle, set this parameter to <strong>{{NULL}}</strong>.</p> <p>If <em>lpName</em> matches the name of an existing resource, <strong>CreateSharedHandle</strong> fails with {{DXGI_ERROR_NAME_ALREADY_EXISTS}}. This occurs because these objects share the same namespace.</p> <p>The name can have a "Global\" or "Local\" prefix to explicitly create the object in the global or session namespace. The remainder of the name can contain any character except the backslash character (\). For more information, see Kernel Object Namespaces. Fast user switching is implemented using Terminal Services sessions. Kernel object names must follow the guidelines outlined for Terminal Services so that applications can support multiple users.</p> <p>The object can be created in a private namespace. For more information, see Object Namespaces.</p> </dd> <dd> <p>A reference to a variable that receives the {{NT}} {{HANDLE}} value to the resource to share. You can use this handle in calls to access the resource.</p> </dd> <p> The <strong>{{IDXGIDevice2}}</strong> interface implements a derived class for {{DXGI}} objects that produce image data. The interface exposes methods to block {{CPU}} processing until the {{GPU}} completes processing, and to offer resources to the operating system. </p> <p> The <strong>{{IDXGIDevice2}}</strong> interface is designed for use by {{DXGI}} objects that need access to other {{DXGI}} objects. This interface is useful to applications that do not use Direct3D to communicate with {{DXGI}}. </p><p> The Direct3D create device functions return a Direct3D device object. This Direct3D device object implements the <strong>{{IUnknown}}</strong> interface. You can query this Direct3D device object for the device's corresponding <strong>{{IDXGIDevice2}}</strong> interface. To retrieve the <strong>{{IDXGIDevice2}}</strong> interface of a Direct3D device, use the following code: </p><pre>{{IDXGIDevice2}} * pDXGIDevice; hr = g_pd3dDevice-&gt;QueryInterface(__uuidof({{IDXGIDevice2}}), (void **)&amp;pDXGIDevice); </pre><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Allows the operating system to free the video memory of resources by discarding their content.</p> <p>The priority value that the <em>Priority</em> parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.</p><p>If you call <strong>OfferResources</strong> to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call <strong>OfferResources</strong> on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the <strong>{{IDXGIDevice2::ReclaimResource}}</strong> method to reclaim the resource. You cannot call <strong>OfferResources</strong> to offer immutable resources.</p><p>To offer shared resources, call <strong>OfferResources</strong> on only one of the sharing devices. To ensure exclusive access to the resources, you must use an <strong>{{IDXGIKeyedMutex}}</strong> object and then call <strong>OfferResources</strong> only while you hold the mutex. In fact, you can't offer shared resources unless you use <strong>{{IDXGIKeyedMutex}}</strong> because offering shared resources without using <strong>{{IDXGIKeyedMutex}}</strong> isn't supported.</p><strong>Note</strong>??The user mode display driver might not immediately offer the resources that you specified in a call to <strong>OfferResources</strong>. The driver can postpone offering them until the next call to <strong>{{IDXGISwapChain::Present}}</strong>, <strong>{{IDXGISwapChain1::Present1}}</strong>, or <strong>{{ID3D11DeviceContext::Flush}}</strong>.?<p><strong>Platform Update for Windows?7:??</strong>The runtime validates that <strong>OfferResources</strong> is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <p><strong>OfferResources</strong> returns: </p><ul> <li>{{S_OK}} if resources were successfully offered</li> <li>{{E_INVALIDARG}} if a resource in the array or the priority is invalid</li> </ul> <dd> <p>The number of resources in the <em>ppResources</em> argument array.</p> </dd> <dd> <p>An array of references to <strong>{{IDXGIResource}}</strong> interfaces for the resources to offer.</p> </dd> <dd> <p>A <strong>{{DXGI_OFFER_RESOURCE_PRIORITY}}</strong>-typed value that indicates how valuable data is.</p> </dd> <p>Restores access to resources that were previously offered by calling <strong>{{IDXGIDevice2::OfferResources}}</strong>.</p> <p>After you call <strong>{{IDXGIDevice2::OfferResources}}</strong> to offer one or more resources, you must call <strong>ReclaimResources</strong> before you can use those resources again. You must check the values in the array at <em>pDiscarded</em> to determine whether each resource?s content was discarded. If a resource?s content was discarded while it was offered, its current content is undefined. Therefore, you must overwrite the resource?s content before you use the resource.</p><p>To reclaim shared resources, call <strong>ReclaimResources</strong> only on one of the sharing devices. To ensure exclusive access to the resources, you must use an <strong>{{IDXGIKeyedMutex}}</strong> object and then call <strong>ReclaimResources</strong> only while you hold the mutex.</p><p><strong>Platform Update for Windows?7:??</strong>The runtime validates that <strong>ReclaimResources</strong> is used correctly on non-shared resources but doesn't perform the intended functionality. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <p><strong>ReclaimResources</strong> returns: </p><ul> <li>{{S_OK}} if resources were successfully reclaimed</li> <li>{{E_INVALIDARG}} if the resources are invalid</li> </ul> <p>Flushes any outstanding rendering commands and sets the specified event object to the signaled state after all previously submitted rendering commands complete.</p> <p><strong>EnqueueSetEvent</strong> calls the <strong>SetEvent</strong> function on the event object after all previously submitted rendering commands complete or the device is removed.</p><p>After an application calls <strong>EnqueueSetEvent</strong>, it can immediately call the <strong>WaitForSingleObject</strong> function to put itself to sleep until rendering commands complete.</p><p>You cannot use <strong>EnqueueSetEvent</strong> to determine work completion that is associated with presentation (<strong>{{IDXGISwapChain::Present}}</strong>); instead, we recommend that you use <strong>{{IDXGISwapChain::GetFrameStatistics}}</strong>.</p> <p>Returns <strong>{{S_OK}}</strong> if successful; otherwise, returns one of the following values:</p><ul> <li><strong>{{E_OUTOFMEMORY}}</strong> if insufficient memory is available to complete the operation.</li> <li><strong>{{E_INVALIDARG}}</strong> if the parameter was validated and determined to be incorrect.</li> </ul><p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>EnqueueSetEvent</strong> fails with {{E_NOTIMPL}}. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <dd> <p>A handle to the event object. The <strong>CreateEvent</strong> or <strong>OpenEvent</strong> function returns this handle. All types of event objects (manual-reset, auto-reset, and so on) are supported.</p> <p>The handle must have the {{EVENT_MODIFY_STATE}} access right. For more information about access rights, see Synchronization Object Security and Access Rights.</p> </dd> <p>Provides presentation capabilities that are enhanced from <strong>{{IDXGISwapChain}}</strong>. These presentation capabilities consist of specifying dirty rectangles and scroll rectangle to optimize the presentation.</p> <p>You can create a swap chain by calling <strong>{{IDXGIFactory2::CreateSwapChainForHwnd}}</strong>, <strong>{{IDXGIFactory2::CreateSwapChainForCoreWindow}}</strong>, or <strong>{{IDXGIFactory2::CreateSwapChainForComposition}}</strong>. You can also create a swap chain when you call <strong>{{D3D11CreateDeviceAndSwapChain}}</strong>; however, you can then only access the sub-set of swap-chain functionality that the <strong>{{IDXGISwapChain}}</strong> interface provides.</p><p><strong>{{IDXGISwapChain1}}</strong> provides the <strong>IsTemporaryMonoSupported</strong> method that you can use to determine whether the swap chain supports "temporary mono? presentation. This type of swap chain is a stereo swap chain that can be used to present mono content. </p><strong>Note</strong>??Some stereo features like the advanced presentation flags are not represented by an explicit interface change. Furthermore, the original (<strong>{{IDXGISwapChain}}</strong>) and new (<strong>{{IDXGISwapChain1}}</strong>) swap chain interfaces generally have the same behavior. For information about how <strong>{{IDXGISwapChain}}</strong> methods are translated into <strong>{{IDXGISwapChain1}}</strong> methods, see the descriptions of the <strong>{{IDXGISwapChain1}}</strong> methods.? <p>Gets a description of the swap chain.</p> <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p>A reference to a <strong>{{DXGI_SWAP_CHAIN_DESC1}}</strong> structure that describes the swap chain.</p> </dd> <p>Gets a description of a full-screen swap chain.</p> <p>The semantics of <strong>GetFullscreenDesc</strong> are identical to that of the <strong>{{IDXGISwapchain::GetDesc}}</strong> method for <strong>{{HWND}}</strong>-based swap chains.</p> <p><strong>GetFullscreenDesc</strong> returns: </p><ul> <li>{{S_OK}} if it successfully retrieved the description of the full-screen swap chain.</li> <li> {{DXGI_ERROR_INVALID_CALL}} for non-<strong>{{HWND}}</strong> swap chains or if <em>pDesc</em> is <strong>{{NULL}}</strong>.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic. </li> </ul> <dd> <p>A reference to a <strong>{{DXGI_SWAP_CHAIN_FULLSCREEN_DESC}}</strong> structure that describes the full-screen swap chain.</p> </dd> <p>Retrieves the underlying <strong>{{HWND}}</strong> for this swap-chain object.</p> <p>Applications call the <strong>{{IDXGIFactory2::CreateSwapChainForHwnd}}</strong> method to create a swap chain that is associated with an <strong>{{HWND}}</strong>.</p> <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p><p>If <em>pHwnd</em> receives <strong>{{NULL}}</strong> (that is, the swap chain is not <strong>{{HWND}}</strong>-based), <strong>GetHwnd</strong> returns {{DXGI_ERROR_INVALID_CALL}}.</p> <p>Retrieves the underlying <strong>CoreWindow</strong> object for this swap-chain object.</p> <p>Applications call the <strong>{{IDXGIFactory2::CreateSwapChainForCoreWindow}}</strong> method to create a swap chain that is associated with an <strong>CoreWindow</strong> object.</p> <p><strong>GetCoreWindow</strong> returns: </p><ul> <li>{{S_OK}} if it successfully retrieved the underlying <strong>CoreWindow</strong> object.</li> <li> {{DXGI_ERROR_INVALID_CALL}} if <em>ppUnk</em> is <strong>{{NULL}}</strong>; that is, the swap chain is not associated with a <strong>CoreWindow</strong> object.</li> <li>Any <strong>{{HRESULT}}</strong> that a call to <strong>QueryInterface</strong> to query for an <strong>CoreWindow</strong> object might typically return.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic. </li> </ul><p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>GetCoreWindow</strong> fails with {{E_NOTIMPL}}. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <p>Presents a frame on the display screen. </p> <p>An app can use <strong>Present1</strong> to optimize presentation by specifying scroll and dirty rectangles. When the runtime has information about these rectangles, the runtime can then perform necessary bitblts during presentation more efficiently and pass this metadata to the Desktop Window Manager ({{DWM}}). The {{DWM}} can then use the metadata to optimize presentation and pass the metadata to indirect displays and terminal servers to optimize traffic over the wire. An app must confine its modifications to only the dirty regions that it passes to <strong>Present1</strong>, as well as modify the entire dirty region to avoid undefined resource contents from being exposed.</p><p>For flip presentation model swap chains that you create with the <strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong> value set, a successful presentation results in an unbind of back buffer 0 from the graphics pipeline, except for when you pass the <strong>{{DXGI_PRESENT_DO_NOT_SEQUENCE}}</strong> flag in the <em>Flags</em> parameter.</p><p>For info about how data values change when you present content to the screen, see Converting data for the color space.</p><p>For info about calling <strong>Present1</strong> when your app uses multiple threads, see Multithread Considerations and Multithreading and {{DXGI}}.</p> <p>Possible return values include: {{S_OK}}, {{DXGI_ERROR_DEVICE_REMOVED}} , {{DXGI_STATUS_OCCLUDED}}, {{DXGI_ERROR_INVALID_CALL}}, or {{E_OUTOFMEMORY}}. </p> <dd> <p>An integer that specifies how to synchronize presentation of a frame with the vertical blank. </p> <p>For the bit-block transfer (bitblt) model (<strong>{{DXGI_SWAP_EFFECT_DISCARD}}</strong> or <strong>{{DXGI_SWAP_EFFECT_SEQUENTIAL}}</strong>), values are:</p> <ul> <li>0 - The presentation occurs immediately, there is no synchronization.</li> <li>1 through 4 - Synchronize presentation after the <em>n</em>th vertical blank.</li> </ul> <p>For the flip model (<strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong>), values are:</p> <ul> <li>0 - Cancel the remaining time on the previously presented frame and discard this frame if a newer frame is queued. </li> <li>1 through 4 - Synchronize presentation for at least <em>n</em> vertical blanks.</li> </ul> <p>For an example that shows how sync-interval values affect a flip presentation queue, see Remarks.</p> <p>If the update region straddles more than one output (each represented by <strong>{{IDXGIOutput1}}</strong>), <strong>Present1</strong> performs the synchronization to the output that contains the largest sub-rectangle of the target window's client area.</p> </dd> <dd> <p>An integer value that contains swap-chain presentation options. These options are defined by the {{DXGI_PRESENT}} constants.</p> </dd> <dd> <p>A reference to a <strong>{{DXGI_PRESENT_PARAMETERS}}</strong> structure that describes updated rectangles and scroll information of the frame to present.</p> </dd> <p>Determines whether a swap chain supports ?temporary mono.?</p> <p>Temporary mono is a feature where a stereo swap chain can be presented using only the content in the left buffer. To present using the left buffer as a mono buffer, an application calls the <strong>{{IDXGISwapChain1::Present1}}</strong> method with the <strong>{{DXGI_PRESENT_STEREO_TEMPORARY_MONO}}</strong> flag. All windowed swap chains support temporary mono. However, full-screen swap chains optionally support temporary mono because not all hardware supports temporary mono on full-screen swap chains efficiently.</p> <p>Indicates whether to use the swap chain in temporary mono mode. <strong>{{TRUE}}</strong> indicates that you can use temporary-mono mode; otherwise, <strong>{{FALSE}}</strong>.</p><p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>IsTemporaryMonoSupported</strong> always returns {{FALSE}} because stereoscopic 3D display behavior isn?t available with the Platform Update for Windows?7. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <p>Gets the output (the display monitor) to which you can restrict the contents of a present operation.</p> <p>If the method succeeds, the runtime fills the buffer at <em>ppRestrictToOutput</em> with a reference to the restrict-to output interface. This restrict-to output interface has its reference count incremented. When you are finished with it, be sure to release the interface to avoid a memory leak.</p><p>The output is also owned by the adapter on which the swap chain's device was created.</p> <p>Returns {{S_OK}} if the restrict-to output was successfully retrieved; otherwise, returns {{E_INVALIDARG}} if the reference is invalid.</p> <dd> <p> A reference to a buffer that receives a reference to the <strong>{{IDXGIOutput}}</strong> interface for the restrict-to output. An application passes this reference to <strong>{{IDXGIOutput}}</strong> in a call to the <strong>{{IDXGIFactory2::CreateSwapChainForHwnd}}</strong>, <strong>{{IDXGIFactory2::CreateSwapChainForCoreWindow}}</strong>, or <strong>{{IDXGIFactory2::CreateSwapChainForComposition}}</strong> method to create the swap chain.</p> </dd> <p>Changes the background color of the swap chain.</p> <p>The background color affects only swap chains that you create with <strong>{{DXGI_SCALING_NONE}}</strong> in windowed mode. You pass this value in a call to <strong>{{IDXGIFactory2::CreateSwapChainForHwnd}}</strong>, <strong>{{IDXGIFactory2::CreateSwapChainForCoreWindow}}</strong>, or <strong>{{IDXGIFactory2::CreateSwapChainForComposition}}</strong>. Typically, the background color is not visible unless the swap-chain contents are smaller than the destination window.</p><p>When you set the background color, it is not immediately realized. It takes effect in conjunction with your next call to the <strong>{{IDXGISwapChain1::Present1}}</strong> method. The <strong>{{DXGI_PRESENT}}</strong> flags that you pass to <strong>{{IDXGISwapChain1::Present1}}</strong> can help achieve the effect that you require. For example, if you call <strong>SetBackgroundColor</strong> and then call <strong>{{IDXGISwapChain1::Present1}}</strong> with the <em>Flags</em> parameter set to <strong>{{DXGI_PRESENT_DO_NOT_SEQUENCE}}</strong>, you change only the background color without changing the displayed contents of the swap chain.</p><p>When you call the <strong>{{IDXGISwapChain1::Present1}}</strong> method to display contents of the swap chain, <strong>{{IDXGISwapChain1::Present1}}</strong> uses the <strong>{{DXGI_ALPHA_MODE}}</strong> value that is specified in the <strong>AlphaMode</strong> member of the <strong>{{DXGI_SWAP_CHAIN_DESC1}}</strong> structure to determine how to handle the <strong>a</strong> member of the <strong>{{DXGI_RGBA}}</strong> structure, the alpha value of the background color, that achieves window transparency. For example, if <strong>AlphaMode</strong> is <strong>{{DXGI_ALPHA_MODE_IGNORE}}</strong>, <strong>{{IDXGISwapChain1::Present1}}</strong> ignores the a member of <strong>{{DXGI_RGBA}}</strong>.</p><strong>Note</strong>??Like all presentation data, we recommend that you perform floating point operations in a linear color space. When the desktop is in a fixed bit color depth mode, the operating system converts linear color data to standard {{RGB}} data (sRGB, gamma 2.2 corrected space) to compose to the screen. For more info, see Converting data for the color space.? <p><strong>SetBackgroundColor</strong> returns: </p><ul> <li>{{S_OK}} if it successfully set the background color.</li> <li>{{E_INVALIDARG}} if the <em>pColor</em> parameter is incorrect, for example, <em>pColor</em> is {{NULL}} or any of the floating-point values of the members of <strong>{{DXGI_RGBA}}</strong> to which <em>pColor</em> points are outside the range from 0.0 through 1.0.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul><p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>SetBackgroundColor</strong> fails with {{E_NOTIMPL}}. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <dd> <p>A reference to a <strong>{{DXGI_RGBA}}</strong> structure that specifies the background color to set.</p> </dd> <p>Retrieves the background color of the swap chain.</p> <strong>Note</strong>??The background color that <strong>GetBackgroundColor</strong> retrieves does not indicate what the screen currently displays. The background color indicates what the screen will display with your next call to the <strong>{{IDXGISwapChain1::Present1}}</strong> method. The default value of the background color is black with full opacity: 0,0,0,1.? <p><strong>GetBackgroundColor</strong> returns: </p><ul> <li>{{S_OK}} if it successfully retrieves the background color.</li> <li> {{DXGI_ERROR_INVALID_CALL}} if the <em>pColor</em> parameter is invalid, for example, <em>pColor</em> is {{NULL}}.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul> <dd> <p>A reference to a <strong>{{DXGI_RGBA}}</strong> structure that receives the background color of the swap chain.</p> </dd> <p>Sets the rotation of the back buffers for the swap chain.</p> <p>You can only use <strong>SetRotation</strong> to rotate the back buffers for flip-model swap chains that you present in windowed mode. </p><p><strong>SetRotation</strong> isn't supported for rotating the back buffers for flip-model swap chains that you present in full-screen mode. In this situation, <strong>SetRotation</strong> doesn't fail, but you must ensure that you specify no rotation (<strong>{{DXGI_MODE_ROTATION_IDENTITY}}</strong>) for the swap chain. Otherwise, when you call <strong>{{IDXGISwapChain1::Present1}}</strong> or <strong>{{IDXGISwapChain::Present}}</strong> to present a frame, the presentation fails.</p> <p><strong>SetRotation</strong> returns: </p><ul> <li>{{S_OK}} if it successfully set the rotation.</li> <li>{{DXGI_ERROR_INVALID_CALL}} if the swap chain is bit-block transfer (bitblt) model. The swap chain must be flip model to successfully call <strong>SetRotation</strong>.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul><p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>SetRotation</strong> fails with {{DXGI_ERROR_INVALID_CALL}}. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <dd> <p>A <strong>{{DXGI_MODE_ROTATION}}</strong>-typed value that specifies how to set the rotation of the back buffers for the swap chain.</p> </dd> <p>Gets the rotation of the back buffers for the swap chain.</p> <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p><p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>GetRotation</strong> fails with {{DXGI_ERROR_INVALID_CALL}}. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <dd> <p>A reference to a variable that receives a <strong>{{DXGI_MODE_ROTATION}}</strong>-typed value that specifies the rotation of the back buffers for the swap chain.</p> </dd> <p> The <strong>{{IDXGIFactory2}}</strong> interface includes methods to create a newer version swap chain with more features than <strong>{{IDXGISwapChain}}</strong> and to monitor stereoscopic 3D capabilities. </p> <p>To create a Microsoft DirectX Graphics Infrastructure ({{DXGI}}) 1.2 factory interface, pass <strong>{{IDXGIFactory2}}</strong> into either the <strong>CreateDXGIFactory</strong> or <strong>CreateDXGIFactory1</strong> function or call <strong>QueryInterface</strong> from a factory object that either <strong>CreateDXGIFactory</strong> or <strong>CreateDXGIFactory1</strong> returns. </p><p>Because you can create a Direct3D device without creating a swap chain, you might need to retrieve the factory that is used to create the device in order to create a swap chain. You can request the <strong>{{IDXGIDevice}}</strong>, <strong>{{IDXGIDevice1}}</strong>, or <strong>{{IDXGIDevice2}}</strong> interface from the Direct3D device and then use the <strong>{{IDXGIObject::GetParent}}</strong> method to locate the factory. The following code shows how.</p><pre>{{IDXGIDevice2}} * pDXGIDevice; hr = g_pd3dDevice-&gt;QueryInterface(__uuidof({{IDXGIDevice2}}), (void **)&amp;pDXGIDevice); {{IDXGIAdapter}} * pDXGIAdapter; hr = pDXGIDevice-&gt;GetParent(__uuidof({{IDXGIAdapter}}), (void **)&amp;pDXGIAdapter); {{IDXGIFactory2}} * pIDXGIFactory; pDXGIAdapter-&gt;GetParent(__uuidof({{IDXGIFactory2}}), (void **)&amp;pIDXGIFactory); </pre> <p>Determines whether to use stereo mode.</p> <p>We recommend that windowed applications call <strong>IsWindowedStereoEnabled</strong> before they attempt to use stereo. <strong>IsWindowedStereoEnabled</strong> returns <strong>{{TRUE}}</strong> if both of the following items are true:</p><ul> <li>All adapters in the computer have drivers that are capable of stereo. This only means that the driver is implemented to the Windows Display Driver Model ({{WDDM}}) for Windows?8 ({{WDDM}} 1.2). However, the adapter does not necessarily have to be able to scan out stereo.</li> <li>The current desktop mode (desktop modes are mono) and system policy and hardware are configured so that the Desktop Window Manager ({{DWM}}) performs stereo composition on at least one adapter output.</li> </ul><p>The creation of a windowed stereo swap chain succeeds if the first requirement is met. However, if the adapter can't scan out stereo, the output on that adapter is reduced to mono.</p><p>The Direct3D 11.1 Simple Stereo 3D Sample shows how to add a stereoscopic 3D effect and how to respond to system stereo changes.</p> <p>Indicates whether to use stereo mode. <strong>{{TRUE}}</strong> indicates that you can use stereo mode; otherwise, <strong>{{FALSE}}</strong>.</p><p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>IsWindowedStereoEnabled</strong> always returns {{FALSE}} because stereoscopic 3D display behavior isn?t available with the Platform Update for Windows?7. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <p>Creates a swap chain that is associated with an <strong>{{HWND}}</strong> handle to the output window for the swap chain.</p> <strong>Note</strong>??Do not use this method in Windows Store apps. Instead, use <strong>{{IDXGIFactory2::CreateSwapChainForCoreWindow}}</strong>.?<p>If you specify the width, height, or both (<strong>Width</strong> and <strong>Height</strong> members of <strong>{{DXGI_SWAP_CHAIN_DESC1}}</strong> that <em>pDesc</em> points to) of the swap chain as zero, the runtime obtains the size from the output window that the <em>hWnd</em> parameter specifies. You can subsequently call the <strong>{{IDXGISwapChain1::GetDesc1}}</strong> method to retrieve the assigned width or height value.</p><p>Because you can associate only one flip presentation model swap chain at a time with an <strong>{{HWND}}</strong>, the Microsoft Direct3D?11 policy of deferring the destruction of objects can cause problems if you attempt to destroy a flip presentation model swap chain and replace it with another swap chain. For more info about this situation, see <strong>Deferred Destruction Issues with Flip Presentation Swap Chains</strong>.</p><p>For info about how to choose a format for the swap chain's back buffer, see Converting data for the color space.</p> <p><strong>CreateSwapChainForHwnd</strong> returns: </p><ul> <li>{{S_OK}} if it successfully created a swap chain.</li> <li>{{E_OUTOFMEMORY}} if memory is unavailable to complete the operation.</li> <li> {{DXGI_ERROR_INVALID_CALL}} if the calling application provided invalid data, for example, if <em>pDesc</em> or <em>ppSwapChain</em> is <strong>{{NULL}}</strong>.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic that are defined by the type of device that you pass to <em>pDevice</em>.</li> </ul><p><strong>Platform Update for Windows?7:??</strong><strong>{{DXGI_SCALING_NONE}}</strong> is not supported on Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed and causes <strong>CreateSwapChainForHwnd</strong> to return {{DXGI_ERROR_INVALID_CALL}} when called. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <p>Creates a swap chain that is associated with the <strong>CoreWindow</strong> object for the output window for the swap chain.</p> <strong>Note</strong>??Use this method in Windows Store apps rather than <strong>{{IDXGIFactory2::CreateSwapChainForHwnd}}</strong>.?<p>If you specify the width, height, or both (<strong>Width</strong> and <strong>Height</strong> members of <strong>{{DXGI_SWAP_CHAIN_DESC1}}</strong> that <em>pDesc</em> points to) of the swap chain as zero, the runtime obtains the size from the output window that the <em>pWindow</em> parameter specifies. You can subsequently call the <strong>{{IDXGISwapChain1::GetDesc1}}</strong> method to retrieve the assigned width or height value.</p><p>Because you can associate only one flip presentation model swap chain (per layer) at a time with a <strong>CoreWindow</strong>, the Microsoft Direct3D?11 policy of deferring the destruction of objects can cause problems if you attempt to destroy a flip presentation model swap chain and replace it with another swap chain. For more info about this situation, see <strong>Deferred Destruction Issues with Flip Presentation Swap Chains</strong>.</p><p>For info about how to choose a format for the swap chain's back buffer, see Converting data for the color space.</p> <p><strong>CreateSwapChainForCoreWindow</strong> returns: </p><ul> <li>{{S_OK}} if it successfully created a swap chain.</li> <li>{{E_OUTOFMEMORY}} if memory is unavailable to complete the operation.</li> <li> {{DXGI_ERROR_INVALID_CALL}} if the calling application provided invalid data, for example, if <em>pDesc</em> or <em>ppSwapChain</em> is <strong>{{NULL}}</strong>.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic that are defined by the type of device that you pass to <em>pDevice</em>.</li> </ul><p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>CreateSwapChainForCoreWindow</strong> fails with {{E_NOTIMPL}}. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <p>Identifies the adapter on which a shared resource object was created.</p> <p>You cannot share resources across adapters. Therefore, you cannot open a shared resource on an adapter other than the adapter on which the resource was created. Call <strong>GetSharedResourceAdapterLuid</strong> before you open a shared resource to ensure that the resource was created on the appropriate adapter. To open a shared resource, call the <strong>{{ID3D11Device1::OpenSharedResource1}}</strong> or <strong>{{ID3D11Device1::OpenSharedResourceByName}}</strong> method.</p> <p><strong>GetSharedResourceAdapterLuid</strong> returns: </p><ul> <li>{{S_OK}} if it identified the adapter.</li> <li>{{DXGI_ERROR_INVALID_CALL}} if <em>hResource</em> is invalid.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul><p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>GetSharedResourceAdapterLuid</strong> fails with {{E_NOTIMPL}}. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <dd> <p>A handle to a shared resource object. The <strong>{{IDXGIResource1::CreateSharedHandle}}</strong> method returns this handle.</p> </dd> <dd> <p>A reference to a variable that receives a locally unique identifier (<strong>{{LUID}}</strong>) value that identifies the adapter. <strong>{{LUID}}</strong> is defined in Dxgi.h. An <strong>{{LUID}}</strong> is a 64-bit value that is guaranteed to be unique only on the operating system on which it was generated. The uniqueness of an <strong>{{LUID}}</strong> is guaranteed only until the operating system is restarted.</p> </dd> <p>Registers an application window to receive notification messages of changes of stereo status.</p> <p><strong>RegisterStereoStatusWindow</strong> returns: </p><ul> <li>{{S_OK}} if it successfully registered the window.</li> <li>{{E_OUTOFMEMORY}} if memory is unavailable to complete the operation.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul><p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>RegisterStereoStatusWindow</strong> fails with {{E_NOTIMPL}}. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <dd> <p>The handle of the window to send a notification message to when stereo status change occurs.</p> </dd> <dd> <p>Identifies the notification message to send. </p> </dd> <dd> <p>A reference to a key value that an application can pass to the <strong>{{IDXGIFactory2::UnregisterStereoStatus}}</strong> method to unregister the notification message that <em>wMsg</em> specifies.</p> </dd> <p>Registers to receive notification of changes in stereo status by using event signaling.</p> <p><strong>RegisterStereoStatusEvent</strong> returns: </p><ul> <li>{{S_OK}} if it successfully registered the event.</li> <li>{{E_OUTOFMEMORY}} if memory is unavailable to complete the operation.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul><p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>RegisterStereoStatusEvent</strong> fails with {{E_NOTIMPL}}. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <dd> <p>A handle to the event object that the operating system sets when notification of stereo status change occurs. The <strong>CreateEvent</strong> or <strong>OpenEvent</strong> function returns this handle. </p> </dd> <dd> <p>A reference to a key value that an application can pass to the <strong>{{IDXGIFactory2::UnregisterStereoStatus}}</strong> method to unregister the notification event that <em>hEvent</em> specifies.</p> </dd> <p>Unregisters a window or an event to stop it from receiving notification when stereo status changes.</p> <p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>UnregisterStereoStatus</strong> has no effect. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <p>Returns nothing.</p> <dd> <p>A key value for the window or event to unregister. The <strong>{{IDXGIFactory2::RegisterStereoStatusWindow}}</strong> or <strong>{{IDXGIFactory2::RegisterStereoStatusEvent}}</strong> method returns this value. </p> </dd> <p>Registers an application window to receive notification messages of changes of occlusion status.</p> <p>Apps choose the Windows message that Windows sends when occlusion status changes.</p> <p><strong>RegisterOcclusionStatusWindow</strong> returns: </p><ul> <li>{{S_OK}} if it successfully registered the window.</li> <li>{{E_OUTOFMEMORY}} if memory is unavailable to complete the operation.</li> <li> {{DXGI_ERROR_INVALID_CALL}} if <em>WindowHandle</em> is not a valid window handle or not the window handle that the current process owns.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul><p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>RegisterOcclusionStatusWindow</strong> fails with {{E_NOTIMPL}}. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <dd> <p>The handle of the window to send a notification message to when occlusion status change occurs.</p> </dd> <dd> <p>Identifies the notification message to send. </p> </dd> <dd> <p>A reference to a key value that an application can pass to the <strong>{{IDXGIFactory2::UnregisterOcclusionStatus}}</strong> method to unregister the notification message that <em>wMsg</em> specifies.</p> </dd> <p>Registers to receive notification of changes in occlusion status by using event signaling.</p> <p>If you call <strong>RegisterOcclusionStatusEvent</strong> multiple times with the same event handle, <strong>RegisterOcclusionStatusEvent</strong> fails with {{DXGI_ERROR_INVALID_CALL}}.</p><p>If you call <strong>RegisterOcclusionStatusEvent</strong> multiple times with the different event handles, <strong>RegisterOcclusionStatusEvent</strong> properly registers the events.</p> <p><strong>RegisterOcclusionStatusEvent</strong> returns: </p><ul> <li>{{S_OK}} if the method successfully registered the event.</li> <li>{{E_OUTOFMEMORY}} if memory is unavailable to complete the operation.</li> <li> {{DXGI_ERROR_INVALID_CALL}} if <em>hEvent</em> is not a valid handle or not an event handle. </li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul><p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>RegisterOcclusionStatusEvent</strong> fails with {{E_NOTIMPL}}. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <dd> <p>A handle to the event object that the operating system sets when notification of occlusion status change occurs. The <strong>CreateEvent</strong> or <strong>OpenEvent</strong> function returns this handle.</p> </dd> <dd> <p>A reference to a key value that an application can pass to the <strong>{{IDXGIFactory2::UnregisterOcclusionStatus}}</strong> method to unregister the notification event that <em>hEvent</em> specifies.</p> </dd> <p>Unregisters a window or an event to stop it from receiving notification when occlusion status changes.</p> <p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>UnregisterOcclusionStatus</strong> has no effect. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <p>Returns nothing.</p> <dd> <p>A key value for the window or event to unregister. The <strong>{{IDXGIFactory2::RegisterOcclusionStatusWindow}}</strong> or <strong>{{IDXGIFactory2::RegisterOcclusionStatusEvent}}</strong> method returns this value. </p> </dd> <p>Creates a swap chain that you can use to send Direct3D content into the DirectComposition {{API}} or the <strong>Windows.{{UI}}.Xaml</strong> framework to compose in a window.</p> <p>You can use composition swap chains with either DirectComposition?s <strong>{{IDCompositionVisual}}</strong> interface or {{XAML}}?s <strong>SwapChainBackgroundPanel</strong> class. For DirectComposition, you can call the <strong>{{IDCompositionVisual::SetContent}}</strong> method to set the swap chain as the content of a visual object, which then allows you to bind the swap chain to the visual tree. For {{XAML}}, the <strong>SwapChainBackgroundPanel</strong> class exposes a classic {{COM}} interface <strong>{{ISwapChainBackgroundPanelNative}}</strong>. You can use the <strong>{{ISwapChainBackgroundPanelNative::SetSwapChain}}</strong> method to bind to the {{XAML}} {{UI}} graph. For info about how to use composition swap chains with {{XAML}}?s <strong>SwapChainBackgroundPanel</strong> class, see DirectX and {{XAML}} interop.</p><p>The <strong>{{IDXGISwapChain::SetFullscreenState}}</strong>, <strong>{{IDXGISwapChain::ResizeTarget}}</strong>, <strong>{{IDXGISwapChain::GetContainingOutput}}</strong>, <strong>{{IDXGISwapChain1::GetHwnd}}</strong>, and <strong>{{IDXGISwapChain::GetCoreWindow}}</strong> methods aren't valid on this type of swap chain. If you call any of these methods on this type of swap chain, they fail.</p><p>For info about how to choose a format for the swap chain's back buffer, see Converting data for the color space.</p> <p><strong>CreateSwapChainForComposition</strong> returns: </p><ul> <li>{{S_OK}} if it successfully created a swap chain.</li> <li>{{E_OUTOFMEMORY}} if memory is unavailable to complete the operation.</li> <li> {{DXGI_ERROR_INVALID_CALL}} if the calling application provided invalid data, for example, if <em>pDesc</em> or <em>ppSwapChain</em> is <strong>{{NULL}}</strong>.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic that are defined by the type of device that you pass to <em>pDevice</em>.</li> </ul><p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>CreateSwapChainForComposition</strong> fails with {{E_NOTIMPL}}. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <p> The <strong>{{IDXGIAdapter2}}</strong> interface represents a display subsystem, which includes one or more {{GPUs}}, {{DACs}}, and video memory. </p> <p> A display subsystem is often referred to as a video card; however, on some computers, the display subsystem is part of the motherboard. </p><p> To enumerate the display subsystems, use <strong>{{IDXGIFactory1::EnumAdapters1}}</strong>. </p><p> To get an interface to the adapter for a particular device, use <strong>{{IDXGIDevice::GetAdapter}}</strong>. </p><p> To create a software adapter, use <strong>{{IDXGIFactory::CreateSoftwareAdapter}}</strong>. </p> <p>Gets a Microsoft DirectX Graphics Infrastructure ({{DXGI}}) 1.2 description of an adapter or video card. This description includes information about the granularity at which the graphics processing unit ({{GPU}}) can be preempted from performing its current task.</p> <p>Use the <strong>GetDesc2</strong> method to get a {{DXGI}} 1.2 description of an adapter. To get a {{DXGI}} 1.1 description, use the <strong>{{IDXGIAdapter1::GetDesc1}}</strong> method. To get a {{DXGI}} 1.0 description, use the <strong>{{IDXGIAdapter::GetDesc}}</strong> method.</p><p>The Windows Display Driver Model ({{WDDM}}) scheduler can preempt the {{GPU}}'s execution of application tasks. The granularity at which the {{GPU}} can be preempted from performing its current task in the {{WDDM}} 1.1 or earlier driver model is a direct memory access ({{DMA}}) buffer for graphics tasks or a compute packet for compute tasks. The {{GPU}} can switch between tasks only after it completes the currently executing unit of work, a {{DMA}} buffer or a compute packet. </p><p>A {{DMA}} buffer is the largest independent unit of graphics work that the {{WDDM}} scheduler can submit to the {{GPU}}. This buffer contains a set of {{GPU}} instructions that the {{WDDM}} driver and {{GPU}} use. A compute packet is the largest independent unit of compute work that the {{WDDM}} scheduler can submit to the {{GPU}}. A compute packet contains dispatches (for example, calls to the <strong>{{ID3D11DeviceContext::Dispatch}}</strong> method), which contain thread groups. The {{WDDM}} 1.2 or later driver model allows the {{GPU}} to be preempted at finer granularity levels than a {{DMA}} buffer or compute packet. You can use the <strong>GetDesc2</strong> method to retrieve the granularity levels for graphics and compute tasks.</p> <p>Returns {{S_OK}} if successful; otherwise, returns {{E_INVALIDARG}} if the <em>pDesc</em> parameter is <strong>{{NULL}}</strong>. </p> <dd> <p>A reference to a <strong>{{DXGI_ADAPTER_DESC2}}</strong> structure that describes the adapter. This parameter must not be <strong>{{NULL}}</strong>. On feature level 9 graphics hardware, earlier versions of <strong>GetDesc2</strong> (<strong>GetDesc</strong> and <strong>GetDesc1</strong>) return zeros for the {{PCI}} {{ID}} in the <strong>VendorId</strong>, <strong>DeviceId</strong>, <strong>SubSysId</strong>, and <strong>Revision</strong> members of the adapter description structure and ?Software Adapter? for the description string in the <strong>Description</strong> member. <strong>GetDesc2</strong> returns the actual feature level 9 hardware values in these members.</p> </dd> <p>An <strong>{{IDXGIOutput1}}</strong> interface represents an adapter output (such as a monitor).</p> <p>To determine the outputs that are available from the adapter, use <strong>{{IDXGIAdapter::EnumOutputs}}</strong>. To determine the specific output that the swap chain will update, use <strong>{{IDXGISwapChain::GetContainingOutput}}</strong>. You can then call <strong>QueryInterface</strong> from any <strong>{{IDXGIOutput}}</strong> object to obtain an <strong>{{IDXGIOutput1}}</strong> object.</p> <p>[Starting with Direct3D 11.1, we recommend not to use <strong>GetDisplayModeList</strong> anymore to retrieve the matching display mode. Instead, use <strong>{{IDXGIOutput1::GetDisplayModeList1}}</strong>, which supports stereo display mode.]</p><p>Gets the display modes that match the requested format and other input options.</p> <p>In general, when switching from windowed to full-screen mode, a swap chain automatically chooses a display mode that meets (or exceeds) the resolution, color depth and refresh rate of the swap chain. To exercise more control over the display mode, use this {{API}} to poll the set of display modes that are validated against monitor capabilities, or all modes that match the desktop (if the desktop settings are not validated against the monitor).</p><p>As shown, this {{API}} is designed to be called twice. First to get the number of modes available, and second to return a description of the modes.</p><pre> {{UINT}} num = 0; {{DXGI_FORMAT}} format = {{DXGI_FORMAT_R32G32B32A32_FLOAT}}; {{UINT}} flags = {{DXGI_ENUM_MODES_INTERLACED}}; pOutput-&gt;GetDisplayModeList( format, flags, &amp;num, 0); ... {{DXGI_MODE_DESC}} * pDescs = new {{DXGI_MODE_DESC}}[num]; pOutput-&gt;GetDisplayModeList( format, flags, &amp;num, pDescs); </pre> <p>Returns one of the following {{DXGI_ERROR}}. It is rare, but possible, that the display modes available can change immediately after calling this method, in which case {{DXGI_ERROR_MORE_DATA}} is returned (if there is not enough room for all the display modes). If <strong>GetDisplayModeList</strong> is called from a Remote Desktop Services session (formerly Terminal Services session), {{DXGI_ERROR_NOT_CURRENTLY_AVAILABLE}} is returned.</p> <p>Finds the display mode that most closely matches the requested display mode.</p> <p>Direct3D devices require {{UNORM}} formats.</p><p><strong>FindClosestMatchingMode1</strong> finds the closest matching available display mode to the mode that you specify in <em>pModeToMatch</em>.</p><p>If you set the <strong>Stereo</strong> member in the <strong>{{DXGI_MODE_DESC1}}</strong> structure to which <em>pModeToMatch</em> points to specify a stereo mode as input, <strong>FindClosestMatchingMode1</strong> considers only stereo modes. <strong>FindClosestMatchingMode1</strong> considers only mono modes if <strong>Stereo</strong> is not set.</p><p><strong>FindClosestMatchingMode1</strong> resolves similarly ranked members of display modes (that is, all specified, or all unspecified, and so on) in the following order:</p><ol> <li><strong>ScanlineOrdering</strong></li> <li><strong>Scaling</strong></li> <li><strong>Format</strong></li> <li><strong>Resolution</strong></li> <li><strong>RefreshRate</strong></li> </ol><p>When <strong>FindClosestMatchingMode1</strong> determines the closest value for a particular member, it uses previously matched members to filter the display mode list choices, and ignores other members. For example, when <strong>FindClosestMatchingMode1</strong> matches <strong>Resolution</strong>, it already filtered the display mode list by a certain <strong>ScanlineOrdering</strong>, <strong>Scaling</strong>, and <strong>Format</strong>, while it ignores <strong>RefreshRate</strong>. This ordering doesn't define the absolute ordering for every usage scenario of <strong>FindClosestMatchingMode1</strong>, because the application can choose some values initially, which effectively changes the order of resolving members.</p><p><strong>FindClosestMatchingMode1</strong> matches members of the display mode one at a time, generally in a specified order.</p><p>If a member is unspecified, <strong>FindClosestMatchingMode1</strong> gravitates toward the values for the desktop related to this output. If this output is not part of the desktop, <strong>FindClosestMatchingMode1</strong> uses the default desktop output to find values. If an application uses a fully unspecified display mode, <strong>FindClosestMatchingMode1</strong> typically returns a display mode that matches the desktop settings for this output. Because unspecified members are lower priority than specified members, <strong>FindClosestMatchingMode1</strong> resolves unspecified members later than specified members.</p> <p>Returns one of the error codes described in the {{DXGI_ERROR}} topic.</p> <dd> <p>A reference to the <strong>{{DXGI_MODE_DESC1}}</strong> structure that describes the display mode to match. Members of <strong>{{DXGI_MODE_DESC1}}</strong> can be unspecified, which indicates no preference for that member. A value of 0 for <strong>Width</strong> or <strong>Height</strong> indicates that the value is unspecified. If either <strong>Width</strong> or <strong>Height</strong> is 0, both must be 0. A numerator and denominator of 0 in <strong>RefreshRate</strong> indicate it is unspecified. Other members of <strong>{{DXGI_MODE_DESC1}}</strong> have enumeration values that indicate that the member is unspecified. If <em>pConcernedDevice</em> is <strong>{{NULL}}</strong>, the <strong>Format</strong> member of <strong>{{DXGI_MODE_DESC1}}</strong> cannot be <strong>{{DXGI_FORMAT_UNKNOWN}}</strong>.</p> </dd> <dd> <p>A reference to the <strong>{{DXGI_MODE_DESC1}}</strong> structure that receives a description of the display mode that most closely matches the display mode described at <em>pModeToMatch</em>.</p> </dd> <dd> <p>A reference to the Direct3D device interface. If this parameter is <strong>{{NULL}}</strong>, <strong>FindClosestMatchingMode1</strong> returns only modes whose format matches that of <em>pModeToMatch</em>; otherwise, <strong>FindClosestMatchingMode1</strong> returns only those formats that are supported for scan-out by the device. For info about the formats that are supported for scan-out by the device at each feature level:</p> <ul> <li> {{DXGI}} Format Support for Direct3D Feature Level 12.1 Hardware </li> <li> {{DXGI}} Format Support for Direct3D Feature Level 12.0 Hardware </li> <li> {{DXGI}} Format Support for Direct3D Feature Level 11.1 Hardware </li> <li> {{DXGI}} Format Support for Direct3D Feature Level 11.0 Hardware </li> <li> Hardware Support for Direct3D 10Level9 Formats </li> <li> Hardware Support for Direct3D 10.1 Formats </li> <li> Hardware Support for Direct3D 10 Formats </li> </ul> </dd> <p>Copies the display surface (front buffer) to a user-provided resource.</p> <p><strong>GetDisplaySurfaceData1</strong> is similar to <strong>{{IDXGIOutput::GetDisplaySurfaceData}}</strong> except <strong>GetDisplaySurfaceData1</strong> takes an <strong>{{IDXGIResource}}</strong> and <strong>{{IDXGIOutput::GetDisplaySurfaceData}}</strong> takes an <strong>{{IDXGISurface}}</strong>.</p><p><strong>GetDisplaySurfaceData1</strong> returns an error if the input resource is not a 2D texture (represented by the <strong>{{ID3D11Texture2D}}</strong> interface) with an array size (<strong>ArraySize</strong> member of the <strong>{{D3D11_TEXTURE2D_DESC}}</strong> structure) that is equal to the swap chain buffers.</p><p>The original <strong>{{IDXGIOutput::GetDisplaySurfaceData}}</strong> and the updated <strong>GetDisplaySurfaceData1</strong> behave exactly the same. <strong>GetDisplaySurfaceData1</strong> was required because textures with an array size equal to 2 (<strong>ArraySize</strong> = 2) do not implement <strong>{{IDXGISurface}}</strong>.</p><p> You can call <strong>GetDisplaySurfaceData1</strong> only when an output is in full-screen mode. If <strong>GetDisplaySurfaceData1</strong> succeeds, it fills the destination resource.</p><p>Use <strong>{{IDXGIOutput::GetDesc}}</strong> to determine the size (width and height) of the output when you want to allocate space for the destination resource. This is true regardless of target monitor rotation. A destination resource created by a graphics component (such as Direct3D 11) must be created with {{CPU}} write permission (see <strong>{{D3D11_CPU_ACCESS_WRITE}}</strong>). Other surfaces can be created with {{CPU}} read-write permission (<strong>{{D3D11_CPU_ACCESS_READ}}</strong> | <strong>{{D3D11_CPU_ACCESS_WRITE}}</strong>). <strong>GetDisplaySurfaceData1</strong> modifies the surface data to fit the destination resource (stretch, shrink, convert format, rotate). <strong>GetDisplaySurfaceData1</strong> performs the stretch and shrink with point sampling. </p> <p>Returns one of the error codes described in the {{DXGI_ERROR}} topic.</p> <dd> <p>A reference to a resource interface that represents the resource to which <strong>GetDisplaySurfaceData1</strong> copies the display surface.</p> </dd> <p>Creates a desktop duplication interface from the <strong>{{IDXGIOutput1}}</strong> interface that represents an adapter output.</p> <p>If an application wants to duplicate the entire desktop, it must create a desktop duplication interface on each active output on the desktop. This interface does not provide an explicit way to synchronize the timing of each output image. Instead, the application must use the time stamp of each output, and then determine how to combine the images.</p><p>For <strong>DuplicateOutput</strong> to succeed, you must create <em>pDevice</em> from <strong>{{IDXGIFactory1}}</strong> or a later version of a {{DXGI}} factory interface that inherits from <strong>{{IDXGIFactory1}}</strong>.</p><p>If the current mode is a stereo mode, the desktop duplication interface provides the image for the left stereo image only.</p><p>By default, only four processes can use a <strong>{{IDXGIOutputDuplication}}</strong> interface at the same time within a single session. A process can have only one desktop duplication interface on a single desktop output; however, that process can have a desktop duplication interface for each output that is part of the desktop. </p><p>For improved performance, consider using <strong>DuplicateOutput1</strong>.</p> <p><strong>DuplicateOutput</strong> returns: </p><ul> <li>{{S_OK}} if <strong>DuplicateOutput</strong> successfully created the desktop duplication interface.</li> <li>{{E_INVALIDARG}} for one of the following reasons: <ul> <li>The specified device (<em>pDevice</em>) is invalid, was not created on the correct adapter, or was not created from <strong>{{IDXGIFactory1}}</strong> (or a later version of a {{DXGI}} factory interface that inherits from <strong>{{IDXGIFactory1}}</strong>).</li> <li>The calling application is already duplicating this desktop output.</li> </ul> </li> <li>{{E_ACCESSDENIED}} if the application does not have access privilege to the current desktop image. For example, only an application that runs at {{LOCAL_SYSTEM}} can access the secure desktop.</li> <li>{{DXGI_ERROR_UNSUPPORTED}} if the created <strong>{{IDXGIOutputDuplication}}</strong> interface does not support the current desktop mode or scenario. For example, 8bpp and non-{{DWM}} desktop modes are not supported. If <strong>DuplicateOutput</strong> fails with {{DXGI_ERROR_UNSUPPORTED}}, the application can wait for system notification of desktop switches and mode changes and then call <strong>DuplicateOutput</strong> again after such a notification occurs. For more information, refer to <strong>{{EVENT_SYSTEM_DESKTOPSWITCH}}</strong> and mode change notification (<strong>{{WM_DISPLAYCHANGE}}</strong>). </li> <li>{{DXGI_ERROR_NOT_CURRENTLY_AVAILABLE}} if {{DXGI}} reached the limit on the maximum number of concurrent duplication applications (default of four). Therefore, the calling application cannot create any desktop duplication interfaces until the other applications close.</li> <li>{{DXGI_ERROR_SESSION_DISCONNECTED}} if <strong>DuplicateOutput</strong> failed because the session is currently disconnected.</li> <li>Other error codes are described in the {{DXGI_ERROR}} topic.</li> </ul><p><strong>Platform Update for Windows?7:??</strong>On Windows?7 or Windows Server?2008?{{R2}} with the Platform Update for Windows?7 installed, <strong>DuplicateOutput</strong> fails with {{E_NOTIMPL}}. For more info about the Platform Update for Windows?7, see Platform Update for Windows 7. </p> <p>Provides the implementation of a shared fixed-size surface for Direct2D drawing.</p><strong>Note</strong>??If the surface is larger than the screen size, use <strong>{{IVirtualSurfaceImageSourceNative}}</strong> instead.? <p>This interface provides the native implementation of the <strong>SurfaceImageSource</strong> Windows runtime type. To obtain a reference to <strong>{{ISurfaceImageSourceNative}}</strong>, you must cast a <strong>SurfaceImageSource</strong> instance to <strong>{{IInspectable}}</strong> or <strong>{{IUnknown}}</strong>, and call <strong>QueryInterface</strong>.</p><pre> Microsoft::WRL::ComPtr&lt;{{ISurfaceImageSourceNative}}&gt; m_sisNative; // ... {{IInspectable}}* sisInspectable = ({{IInspectable}}*) reinterpret_cast&lt;{{IInspectable}}*&gt;(surfaceImageSource); sisInspectable-&gt;QueryInterface(__uuidof({{ISurfaceImageSourceNative}}), (void **)&amp;m_sisNative) </pre> <p>Sets the {{DXGI}} device, created with {{D3D11_CREATE_DEVICE_BGRA_SUPPORT}}, that will draw the surface. This method must be called from the {{UI}} thread.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to the {{DXGI}} device interface.</p> </dd> <p>Opens the supplied {{DXGI}} surface for drawing.</p> <p>If the app window that contains the <strong>SurfaceImageSource</strong> isn't active, like when it's suspended, calling the <strong>BeginDraw</strong> method returns an error.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The region of the surface that will be drawn into.</p> </dd> <dd> <p>Receives a reference to the surface for drawing. </p> </dd> <dd> <p>Receives the point (x,y) offset of the surface that will be drawn into.</p> </dd> <p>Closes the surface draw operation.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Performs the drawing behaviors when an update to <strong>VirtualSurfaceImageSource</strong> is requested.</p> <p>This method is implemented by the developer.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Performs the drawing behaviors when an update to <strong>VirtualSurfaceImageSource</strong> is requested.</p> <p>This method is implemented by the developer.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Provides an interface for the implementation of drawing behaviors when a <strong>VirtualSurfaceImageSource</strong> requests an update. </p> <p>This interface is implemented by the developer to provide specific drawing behaviors for updates to a <strong>VirtualSurfaceImageSource</strong>. Classes that implement this interface are provided to the <strong>{{IVirtualSurfaceImageSourceNative::RegisterForUpdatesNeeded}}</strong>, which calls the <strong>UpdatesNeeded</strong> method implementation whenever an update is requested.</p> <p>Invalidates a specific region of the shared surface for drawing.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The region of the surface to invalidate.</p> </dd> <p>Gets the total number of regions of the surface that must be updated.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the number of regions to update.</p> </dd> <p>Gets the set of regions that must be updated on the shared surface.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The number of regions that must be updated. You obtain this by calling <strong>GetUpdateRectCount</strong>.</p> </dd> <dd> <p>Receives a list of regions that must be updated.</p> </dd> <p>Gets the boundaries of the visible region of the shared surface.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a rectangle that specifies the visible region of the shared surface.</p> </dd> <p>Registers for the callback that will perform the drawing when an update to the shared surface is requested.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to an implementation of <strong>{{IVirtualSurfaceUpdatesCallbackNative}}</strong>.</p> </dd> <p>Resizes the surface.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The updated width of the surface.</p> </dd> <dd> <p>The updated height of the surface.</p> </dd> <p>Sets the DirectX swap chain for <strong>SwapChainBackgroundPanel</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Enables performing bulk operations across all <strong>SurfaceImageSource</strong> objects created in the same process.</p> <p>Flushes all current {{GPU}} work for all <strong>SurfaceImageSource</strong> or <strong>VirtualSurfaceImageSource</strong> objects associated with the given device.</p> <p>The <strong>FlushAllSurfacesWithDevice</strong> method flushes current {{GPU}} work for all <strong>SurfaceImageSource</strong> objects that were created with <em>device</em>. This {{GPU}} work includes Direct2D rendering work and internal {{GPU}} work done by the framework associated with rendering. This is useful if an application has created multiple <strong>SurfaceImageSource</strong> objects and needs to flush the {{GPU}} work for all of these surfaces from the background rendering thread. By flushing this work from the background thread the work can be better parallelized, with work being done on the {{UI}} thread to improve performance.</p><p>You can call the <strong>FlushAllSurfacesWithDevice</strong> method from a non-{{UI}} thread. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Provides the implementation of a shared Microsoft DirectX surface which is displayed in a <strong>SurfaceImageSource</strong> or <strong>VirtualSurfaceImageSource</strong>.</p> <p>The <strong>{{ISurfaceImageSourceNativeWithD2D}}</strong> interface provides the native implementation of the <strong>SurfaceImageSource</strong> class. To get a reference to the <strong>{{ISurfaceImageSourceNativeWithD2D}}</strong> interface, you must cast a <strong>SurfaceImageSource</strong> instance to <strong>{{IInspectable}}</strong> or <strong>{{IUnknown}}</strong>, and call the <strong>QueryInterface</strong> method.</p><pre> Microsoft::WRL::ComPtr&lt;{{ISurfaceImageSourceNativeWithD2D}}&gt; m_sisD2DNative; // ... {{IInspectable}}* sisInspectable = ({{IInspectable}}*) reinterpret_cast&lt;{{IInspectable}}*&gt;(surfaceImageSource); sisInspectable-&gt;QueryInterface(__uuidof({{ISurfaceImageSourceNative}}), (void **)&amp;m_sisD2DNative) </pre><p>The <strong>{{ISurfaceImageSourceNativeWithD2D}}</strong> interface provides high-performance batched Direct2D drawing, which enables drawing to multiple different <strong>SurfaceImageSource</strong> or <strong>VirtualSurfaceImageSource</strong> objects in the same batch, as long as they share the same Direct2D device. Batching can improve performance when updating multiple surfaces at the same time. </p><p>The <strong>{{ISurfaceImageSourceNativeWithD2D}}</strong> interface enables drawing to a <strong>SurfaceImageSource</strong> or <strong>VirtualSurfaceImageSource</strong> from one or more background threads, which allows high-performance DirectX rendering off the {{UI}} thread.</p><p>Only call the <strong>SetDevice</strong>, <strong>BeginDraw</strong>, and <strong>EndDraw</strong> methods on <strong>{{ISurfaceImageSourceNativeWithD2D}}</strong> interface, not on the <strong>{{ISurfaceImageSourceNative}}</strong> or <strong>{{IVirtualSurfaceImageSourceNative}}</strong> interfaces. </p><p>In order to support batching updates to multiple surfaces to improve performance, you can pass an <strong>{{ID2D1Device}}</strong> to the <strong>SetDevice</strong> method, instead of an <strong>{{ID3D11Device}}</strong>. The <strong>BeginDraw</strong> method can then optionally return a shared <strong>{{ID2D1DeviceContext}}</strong>, which the app uses to draw all content for that update.</p><p>To draw to the surface from a background thread, you must set any DirectX resources, including the Microsoft Direct3D device, Direct3D device context, Direct2D device, and Direct2D device context, to enable multithreading support. </p><p>You can call the <strong>BeginDraw</strong>, <strong>SuspendDraw</strong>, and <strong>ResumeDraw</strong> methods from any background thread to enable high-performance multithreaded drawing.</p><p>Always call the <strong>EndDraw</strong> method on the {{UI}} thread in order to synchronize updating the DirectX content with the current {{XAML}} {{UI}} thread frame. You can call <strong>BeginDraw</strong> on a background thread, call <strong>SuspendDraw</strong> when you're done drawing on the background thread, and call <strong>EndDraw</strong> on the {{UI}} thread.</p><p>Use <strong>SuspendDraw</strong> and <strong>ResumeDraw</strong> to suspend and resume drawing on any background or {{UI}} thread. </p><p>Handle the <strong>SurfaceContentsLost</strong> event to determine when you need to recreate content which may be lost if the system resets the {{GPU}}.</p> <p>Sets the Microsoft DirectX Graphics Infrastructure ({{DXGI}}) or Direct2D device, created with <strong>{{D3D11_CREATE_DEVICE_BGRA_SUPPORT}}</strong>, that will draw the surface.</p> <p>This method fails when the SurfaceImageSource is larger than the maximum texture size supported by the Direct3D device. Apps should use VirtualSurfaceImageSource for surfaces larger than the maximum texture size supported by the Direct3D device.</p> <dd> <p>Pointer to the {{DXGI}} device interface. You can pass an <strong>{{ID2D1Device}}</strong> to signal that this surface participates in Direct2D batching to improve performance when updating Direct2D content across multiple surfaces. The device must have multithreading supported enabled if the app draws to the surface from a background thread. </p> </dd> <p>Initiates an update to the associated <strong>SurfaceImageSource</strong> or <strong>VirtualSurfaceImageSource</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Closes the surface draw operation.</p> <p>Always call the <strong>EndDraw</strong> method on the {{UI}} thread in order to synchronize updating the Microsoft DirectX content with the current {{XAML}} {{UI}} thread frame. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Suspends the drawing operation.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Resume the drawing operation.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Provides interoperation between {{XAML}} and a DirectX swap chain. Unlike <strong>SwapChainBackgroundPanel</strong>, a <strong>SwapChainPanel</strong> can appear at any level in the {{XAML}} display tree, and more than 1 can be present in any given tree.</p> <p>This interface provides the native implementation of the <strong>Windows::UI::XAML::Control::SwapChainPanel</strong> Windows Runtime type. To obtain a reference to <strong>{{ISwapChainPanelNative}}</strong>, you must cast a <strong>SwapChainPanel</strong> instance to <strong>{{IInspectable}}</strong> or <strong>{{IUnknown}}</strong>, and call <strong>QueryInterface</strong>.</p><pre> Microsoft::WRL::ComPtr&lt;{{ISwapChainPanelNative}}&gt; m_swapChainNative; // ... {{IInspectable}}* panelInspectable = ({{IInspectable}}*) reinterpret_cast&lt;{{IInspectable}}*&gt;(swapChainPanel); panelInspectable-&gt;QueryInterface(__uuidof({{ISwapChainPanelNative}}), (void **)&amp;m_swapChainNative); </pre> <p>Sets the DirectX swap chain for <strong>SwapChainPanel</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Provides interoperation between {{XAML}} and a DirectX swap chain. Unlike <strong>SwapChainBackgroundPanel</strong>, a <strong>SwapChainPanel</strong> can appear at any level in the {{XAML}} display tree, and more than 1 can be present in any given tree.</p> <p>This interface provides the native implementation of the <strong>Windows::UI::XAML::Control::SwapChainPanel</strong> Windows Runtime type. To obtain a reference to <strong>{{ISwapChainPanelNative}}</strong>, you must cast a <strong>SwapChainPanel</strong> instance to <strong>{{IInspectable}}</strong> or <strong>{{IUnknown}}</strong>, and call <strong>QueryInterface</strong>.</p><pre> Microsoft::WRL::ComPtr&lt;{{ISwapChainPanelNative2}}&gt; m_swapChainNative2; // ... {{IInspectable}}* panelInspectable = ({{IInspectable}}*) reinterpret_cast&lt;{{IInspectable}}*&gt;(swapChainPanel); panelInspectable-&gt;QueryInterface(__uuidof({{ISwapChainPanelNative2}}), (void **)&amp;m_swapChainNative2); </pre> <p>Sets the DirectX swap chain for <strong>SwapChainPanel</strong> using a handle to the swap chain.</p> <p>SetSwapChain({{HANDLE}} swapChainHandle) allows a swap chain to be rendered by referencing a shared handle to the swap chain. This enables scenarios where a swap chain is created in one process and needs to be passed to another process.</p><p>{{XAML}} supports setting a {{DXGI}} swap chain as the content of a SwapChainPanel element. Apps accomplish this by querying for the <strong>{{ISwapChainPanelNative}}</strong> interface from a SwapChainPanel instance and calling <strong>SetSwapChain({{IDXGISwapChain}} *swapChain)</strong>. </p><p>This process works for references to in process swap chains. However, this doesn?t work for VoIP apps, which use a two-process model to enable continuing calls on a background process when a foreground process is suspended or shut down. This two-process implementation requires the ability to pass a shared handle to a swap chain, rather than a reference, created on the background process to the foreground process to be rendered in a {{XAML}} SwapChainPanel in the foreground app.</p><pre> &lt;!-- {{XAML}} markup --&gt; &lt;Page&gt; &lt;SwapChainPanel x:Name=?captureStreamDisplayPanel? /&gt; &lt;/Page&gt; // Definitions ComPtr&lt;{{IDXGISwapChain1}}&gt; m_swapChain; {{HANDLE}} m_swapChainHandle; ComPtr&lt;{{ID3D11Device}}&gt; m_d3dDevice; ComPtr&lt;{{IDXGIAdapter}}&gt; dxgiAdapter; ComPtr&lt;{{IDXGIFactory2}}&gt; dxgiFactory; ComPtr&lt;{{IDXGIFactoryMedia}}&gt; dxgiFactoryMedia; ComPtr&lt;{{IDXGIDevice}}&gt; dxgiDevice; {{DXGI_SWAP_CHAIN_DESC1}} swapChainDesc = {0}; // Get {{DXGI}} factory (assume standard boilerplate has created {{D3D11Device}}) m_d3dDevice.As(&amp;dxgiDevice); dxgiDevice-&gt;GetAdapter(&amp;dxgiAdapter); dxgiAdapter-&gt;GetParent(__uuidof({{IDXGIFactory2}}), &amp;dxgiFactory); // Create swap chain and get handle {{DCompositionCreateSurfaceHandle}}({{GENERIC_ALL}}, nullptr, &amp;m_swapChainHandle); dxgiFactory.As(&amp;dxgiFactoryMedia); dxgiFactoryMedia-&gt;CreateSwapChainForCompositionSurfaceHandle( m_d3dDevice.Get(), m_swapChainHandle, &amp;swapChainDesc, nullptr, &amp;m_swapChain ); // Set swap chain to display in a SwapChainPanel ComPtr&lt;{{ISwapChainPanelNative2}}&gt; panelNative; reinterpret_cast&lt;{{IUnknown}}*&gt;(captureStreamDisplayPanel)-&gt;QueryInterface({{IID_PPV_ARGS}}(&amp;panelNative))); panelNative-&gt;SetSwapChainHandle(m_swapChainHandle); </pre> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Options for swap-chain color space.</p> <p>This enum is used by <strong>SetColorSpace</strong>.</p> <dd> <p>Specifies nominal range {{YCbCr}}, which isn't an absolute color space, but a way of encoding {{RGB}} info.</p> </dd> <dd> <p>Specifies {{BT}}.709, which standardizes the format of high-definition television and has 16:9 (widescreen) aspect ratio.</p> </dd> <dd> <p>Specifies xvYCC or extended-gamut {{YCC}} (also x.v.Color) color space that can be used in the video electronics of television sets to support a gamut 1.8 times as large as that of the sRGB color space.</p> </dd> <p> Indicates options for presenting frames to the swap chain. </p> <p>This enum is used by the <strong>{{DXGI_FRAME_STATISTICS_MEDIA}}</strong> structure.</p> <dd> <p> Specifies that the presentation mode is a composition surface, meaning that the conversion from {{YUV}} to {{RGB}} is happening once per output refresh (for example, 60 Hz). When this value is returned, the media app should discontinue use of the decode swap chain and perform {{YUV}} to {{RGB}} conversion itself, reducing the frequency of {{YUV}} to {{RGB}} conversion to once per video frame. </p> </dd> <dd> <p> Specifies that the presentation mode is an overlay surface, meaning that the {{YUV}} to {{RGB}} conversion is happening efficiently in hardware (once per video frame). When this value is returned, the media app can continue to use the decode swap chain. See <strong>{{IDXGIDecodeSwapChain}}</strong>. </p> </dd> <dd> <p> No presentation is specified. </p> </dd> <dd> <p>An issue occurred that caused content protection to be invalidated in a swap-chain with hardware content protection, and is usually because the system ran out of hardware protected memory. The app will need to do one of the following:</p> <ul> <li>Drastically reduce the amount of hardware protected memory used. For example, media applications might be able to reduce their buffering. </li> <li>Stop using hardware protection if possible.</li> </ul> <p>Note that simply re-creating the swap chain or the device will usually have no impact as the {{DWM}} will continue to run out of memory and will return the same failure. </p> </dd> <p>Specifies overlay support to check for in a call to <strong>{{IDXGIOutput3::CheckOverlaySupport}}</strong>.</p> <p>Represents a 3x2 matrix. Used with <strong>GetMatrixTransform</strong> and <strong>SetMatrixTransform</strong> to indicate the scaling and translation transform for <strong>SwapChainPanel</strong> swap chains.</p> <p>Used with <strong>{{IDXGIFactoryMedia}}</strong>::<strong>CreateDecodeSwapChainForCompositionSurfaceHandle</strong> to describe a decode swap chain.</p> <p>Used to verify system approval for the app's custom present duration (custom refresh rate). Approval should be continuously verified on a frame-by-frame basis.</p> <p>This structure is used with the <strong>GetFrameStatisticsMedia</strong> method.</p> <dd> <p>A value that represents the running total count of times that an image was presented to the monitor since the computer booted.</p> <strong>Note</strong>??The number of times that an image was presented to the monitor is not necessarily the same as the number of times that you called <strong>{{IDXGISwapChain::Present}}</strong> or <strong>{{IDXGISwapChain1::Present1}}</strong>. ? </dd> <dd> <p>A value that represents the running total count of v-blanks at which the last image was presented to the monitor and that have happened since the computer booted (for windowed mode, since the swap chain was created).</p> </dd> <dd> <p>A value that represents the running total count of v-blanks when the scheduler last sampled the machine time by calling <strong>QueryPerformanceCounter</strong> and that have happened since the computer booted (for windowed mode, since the swap chain was created).</p> </dd> <dd> <p>A value that represents the high-resolution performance counter timer. This value is the same as the value returned by the <strong>QueryPerformanceCounter</strong> function.</p> </dd> <dd> <p>Reserved. Always returns 0.</p> </dd> <dd> <p>A value indicating the composition presentation mode. This value is used to determine whether the app should continue to use the decode swap chain. See <strong>{{DXGI_FRAME_PRESENTATION_MODE}}</strong>.</p> </dd> <dd> <p>If the system approves an app's custom present duration request, this field is set to the approved custom present duration.</p> <p>If the app's custom present duration request is not approved, this field is set to zero.</p> </dd> <p> The <strong>{{IDXGIDevice3}}</strong> interface implements a derived class for {{DXGI}} objects that produce image data. The interface exposes a method to trim graphics memory usage by the {{DXGI}} device. </p> <p> The <strong>{{IDXGIDevice3}}</strong> interface is designed for use by {{DXGI}} objects that need access to other {{DXGI}} objects. This interface is useful to applications that do not use Direct3D to communicate with {{DXGI}}. </p><p> The Direct3D create device functions return a Direct3D device object. This Direct3D device object implements the <strong>{{IUnknown}}</strong> interface. You can query this Direct3D device object for the device's corresponding <strong>{{IDXGIDevice3}}</strong> interface. To retrieve the <strong>{{IDXGIDevice3}}</strong> interface of a Direct3D device, use the following code: </p><pre>{{IDXGIDevice3}} * pDXGIDevice; hr = g_pd3dDevice-&gt;QueryInterface(__uuidof({{IDXGIDevice3}}), (void **)&amp;pDXGIDevice);</pre><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Trims the graphics memory allocated by the <strong>{{IDXGIDevice3}}</strong> {{DXGI}} device on the app's behalf.</p><p>For apps that render with DirectX, graphics drivers periodically allocate internal memory buffers in order to speed up subsequent rendering requests. These memory allocations count against the app's memory usage for {{PLM}} and in general lead to increased memory usage by the overall system.</p><p>Starting in Windows?8.1, apps that render with Direct2D and/or Direct3D (including <strong>CoreWindow</strong> and {{XAML}} interop) must call <strong>Trim</strong> in response to the {{PLM}} suspend callback. The Direct3D runtime and the graphics driver will discard internal memory buffers allocated for the app, reducing its memory footprint.</p><p>Calling this method does not change the rendering state of the graphics device and it has no effect on rendering operations. There is a brief performance hit when internal buffers are reallocated during the first rendering operations after the <strong>Trim</strong> call, therefore apps should only call <strong>Trim</strong> when going idle for a period of time (in response to {{PLM}} suspend, for example).</p><p>Apps should ensure that they call <strong>Trim</strong> as one of the last {{D3D}} operations done before going idle. Direct3D will normally defer the destruction of {{D3D}} objects. Calling <strong>Trim</strong>, however, forces Direct3D to destroy objects immediately. For this reason, it is not guaranteed that releasing the final reference on Direct3D objects after calling <strong>Trim</strong> will cause the object to be destroyed and memory to be deallocated before the app suspends.</p><p>Similar to <strong>{{ID3D11DeviceContext::Flush}}</strong>, apps should call <strong>{{ID3D11DeviceContext::ClearState}}</strong> before calling <strong>Trim</strong>. <strong>ClearState</strong> clears the Direct3D pipeline bindings, ensuring that Direct3D does not hold any references to the Direct3D objects you are trying to release.</p><p>It is also prudent to release references on middleware before calling <strong>Trim</strong>, as that middleware may also need to release references to Direct3D objects.</p> <p>This method does not return a value.</p> <p>Extends <strong>{{IDXGISwapChain1}}</strong> with methods to support swap back buffer scaling and lower-latency swap chains.</p> <p>You can create a swap chain by calling <strong>{{IDXGIFactory2::CreateSwapChainForHwnd}}</strong>, <strong>{{IDXGIFactory2::CreateSwapChainForCoreWindow}}</strong>, or <strong>{{IDXGIFactory2::CreateSwapChainForComposition}}</strong>.</p> <p>Sets the source region to be used for the swap chain.</p><p>Use <strong>SetSourceSize</strong> to specify the portion of the swap chain from which the operating system presents. This allows an effective resize without calling the more-expensive <strong>{{IDXGISwapChain::ResizeBuffers}}</strong> method. Prior to Windows?8.1, calling <strong>{{IDXGISwapChain::ResizeBuffers}}</strong> was the only way to resize the swap chain. The source rectangle is always defined by the region [0, 0, Width, Height].</p> <p>This method can return:</p><ul> <li>{{E_INVALIDARG}} if one or more parameters exceed the size of the back buffer.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul> <p>Gets the source region used for the swap chain.</p><p>Use <strong>GetSourceSize</strong> to get the portion of the swap chain from which the operating system presents. The source rectangle is always defined by the region [0, 0, Width, Height]. Use <strong>SetSourceSize</strong> to set this portion of the swap chain. </p> <p> This method can return error codes that are described in the {{DXGI_ERROR}} topic.</p> <p>Sets the number of frames that the swap chain is allowed to queue for rendering.</p> <p>This method is only valid for use on swap chains created with <strong>{{DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT}}</strong>. Otherwise, the result will be {{DXGI_ERROR_INVALID_CALL}}.</p> <p>Returns {{S_OK}} if successful; otherwise, {{DXGI_ERROR_DEVICE_REMOVED}} if the device was removed.</p> <dd> <p>The maximum number of back buffer frames that will be queued for the swap chain. This value is 3 by default.</p> </dd> <p>Gets the number of frames that the swap chain is allowed to queue for rendering.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the following members of the {{D3DERR}} enumerated type:</p><ul> <li><strong>{{D3DERR_DEVICELOST}}</strong></li> <li><strong>{{D3DERR_DEVICEREMOVED}}</strong></li> <li><strong>{{D3DERR_DRIVERINTERNALERROR}}</strong></li> <li><strong>{{D3DERR_INVALIDCALL}}</strong></li> <li><strong>{{D3DERR_OUTOFVIDEOMEMORY}}</strong></li> </ul> <dd> <p>The maximum number of back buffer frames that will be queued for the swap chain. This value is 1 by default, but should be set to 2 if the scene takes longer than it takes for one vertical refresh (typically about 16ms) to draw.</p> </dd> <p>Returns a waitable handle that signals when the {{DXGI}} adapter has finished presenting a new frame.</p><p>Windows?8.1 introduces new {{APIs}} that allow lower-latency rendering by waiting until the previous frame is presented to the display before drawing the next frame. To use this method, first create the {{DXGI}} swap chain with the <strong>{{DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT}}</strong> flag set, then call <strong>GetFrameLatencyWaitableObject</strong> to retrieve the waitable handle. Use the waitable handle with <strong>WaitForSingleObjectEx</strong> to synchronize rendering of each new frame with the end of the previous frame. For every frame it renders, the app should wait on this handle before starting any rendering operations. Note that this requirement includes the first frame the app renders with the swap chain. See the DirectXLatency sample.</p> <p>A handle to the waitable object, or {{NULL}} if the swap chain was not created with <strong>{{DXGI_SWAP_CHAIN_FLAG_FRAME_LATENCY_WAITABLE_OBJECT}}</strong>.</p> <p>Sets the transform matrix that will be applied to a composition swap chain upon the next present. </p><p>Starting with Windows?8.1, Windows Store apps are able to place DirectX swap chain visuals in {{XAML}} pages using the <strong>SwapChainPanel</strong> element, which can be placed and sized arbitrarily. This exposes the DirectX swap chain visuals to touch scaling and translation scenarios using touch {{UI}}. The <strong>GetMatrixTransform</strong> and <strong>SetMatrixTransform</strong> methods are used to synchronize scaling of the DirectX swap chain with its associated <strong>SwapChainPanel</strong> element. Only simple scale/translation elements in the matrix are allowed ? the call will fail if the matrix contains skew/rotation elements.</p> <p><strong>SetMatrixTransform</strong> returns: </p><ul> <li>{{S_OK}} if it successfully retrieves the transform matrix.</li> <li>{{E_INVALIDARG}} if the <em>pMatrix</em> parameter is incorrect, for example, <em>pMatrix</em> is {{NULL}} or the matrix represented by <strong>{{DXGI_MATRIX_3X2_F}}</strong> includes components other than scale and translation.</li> <li>{{DXGI_ERROR_INVALID_CALL}} if the method is called on a swap chain that was not created with <strong>CreateSwapChainForComposition</strong>.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul> <p>Gets the transform matrix that will be applied to a composition swap chain upon the next present. </p><p>Starting with Windows?8.1, Windows Store apps are able to place DirectX swap chain visuals in {{XAML}} pages using the <strong>SwapChainPanel</strong> element, which can be placed and sized arbitrarily. This exposes the DirectX swap chain visuals to touch scaling and translation scenarios using touch {{UI}}. The <strong>GetMatrixTransform</strong> and <strong>SetMatrixTransform</strong> methods are used to synchronize scaling of the DirectX swap chain with its associated <strong>SwapChainPanel</strong> element. Only simple scale/translation elements in the matrix are allowed ? the call will fail if the matrix contains skew/rotation elements.</p> <p><strong>GetMatrixTransform</strong> returns: </p><ul> <li>{{S_OK}} if it successfully retrieves the transform matrix.</li> <li>{{DXGI_ERROR_INVALID_CALL}} if the method is called on a swap chain that was not created with <strong>CreateSwapChainForComposition</strong>.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic.</li> </ul> <p>An <strong>{{IDXGIOutput}}</strong> interface represents an adapter output (such as a monitor).</p> <p>To see the outputs available, use <strong>{{IDXGIAdapter::EnumOutputs}}</strong>. To see the specific output that the swap chain will update, use <strong>{{IDXGISwapChain::GetContainingOutput}}</strong>.</p> <p>Queries an adapter output for multiplane overlay support. If this {{API}} returns ?{{TRUE}}?, multiple swap chain composition takes place in a performant manner using overlay hardware. If this {{API}} returns false, apps should avoid using foreground swap chains (that is, avoid using swap chains created with the <strong>{{DXGI_SWAP_CHAIN_FLAG_FOREGROUND_LAYER}}</strong> flag).</p> <p>See <strong>CreateSwapChainForCoreWindow</strong> for info on creating a foreground swap chain.</p> <p>{{TRUE}} if the output adapter is the primary adapter and it supports multiplane overlays, otherwise returns {{FALSE}}.</p> <p> Enables creating Microsoft DirectX Graphics Infrastructure ({{DXGI}}) objects. </p> <p>Gets the flags that were used when a Microsoft DirectX Graphics Infrastructure ({{DXGI}}) object was created.</p> <p>The <strong>GetCreationFlags</strong> method returns flags that were passed to the <strong>CreateDXGIFactory2</strong> function, or were implicitly constructed by <strong>CreateDXGIFactory</strong>, <strong>CreateDXGIFactory1</strong>, <strong>{{D3D11CreateDevice}}</strong>, or <strong>{{D3D11CreateDeviceAndSwapChain}}</strong>.</p> <p>The creation flags.</p> <p> Represents a swap chain that is used by desktop media apps to decode video data and show it on a DirectComposition surface. </p> <p> Decode swap chains are intended for use primarily with {{YUV}} surface formats. When using decode buffers created with an {{RGB}} surface format, the <em>TargetRect</em> and <em>DestSize</em> must be set equal to the buffer dimensions. <em>SourceRect</em> cannot exceed the buffer dimensions. </p><p> In clone mode, the decode swap chain is only guaranteed to be shown on the primary output. </p><p> Decode swap chains cannot be used with dirty rects. </p> <p>Presents a frame on the output adapter. The frame is a subresource of the <strong>{{IDXGIResource}}</strong> object that was used to create the decode swap chain.</p> <p>This method returns <strong>{{S_OK}}</strong> on success, or it returns one of the following error codes:</p><ul> <li>{{DXGI_ERROR_DEVICE_REMOVED}}</li> <li>{{DXGI_STATUS_OCCLUDED}}</li> <li>{{DXGI_ERROR_INVALID_CALL}}</li> <li><strong>{{E_OUTOFMEMORY}}</strong></li> </ul> <p>Sets the rectangle that defines the source region for the video processing blit operation.</p><p>The source rectangle is the portion of the input surface that is blitted to the destination surface. The source rectangle is given in pixel coordinates, relative to the input surface.</p> <p>This method returns {{S_OK}} on success, or it returns one of the error codes that are described in the {{DXGI_ERROR}} topic.</p> <dd> <p>A reference to a <strong>{{RECT}}</strong> structure that contains the source region to set for the swap chain.</p> </dd> <p>Sets the rectangle that defines the target region for the video processing blit operation.</p><p>The target rectangle is the area within the destination surface where the output will be drawn. The target rectangle is given in pixel coordinates, relative to the destination surface.</p> <p>This method returns {{S_OK}} on success, or it returns one of the error codes that are described in the {{DXGI_ERROR}} topic.</p> <dd> <p>A reference to a <strong>{{RECT}}</strong> structure that contains the target region to set for the swap chain.</p> </dd> <p>Sets the size of the destination surface to use for the video processing blit operation.</p><p>The destination rectangle is the portion of the output surface that receives the blit for this stream. The destination rectangle is given in pixel coordinates, relative to the output surface.</p> <p>This method returns {{S_OK}} on success, or it returns one of the error codes that are described in the {{DXGI_ERROR}} topic.</p> <dd> <p>The width of the destination size, in pixels.</p> </dd> <dd> <p>The height of the destination size, in pixels.</p> </dd> <p>Gets the source region that is used for the swap chain.</p> <p>This method returns {{S_OK}} on success, or it returns one of the error codes that are described in the {{DXGI_ERROR}} topic.</p> <dd> <p>A reference to a <strong>{{RECT}}</strong> structure that receives the source region for the swap chain.</p> </dd> <p>Gets the rectangle that defines the target region for the video processing blit operation.</p> <p>This method returns {{S_OK}} on success, or it returns one of the error codes that are described in the {{DXGI_ERROR}} topic.</p> <dd> <p>A reference to a <strong>{{RECT}}</strong> structure that receives the target region for the swap chain.</p> </dd> <p>Gets the size of the destination surface to use for the video processing blit operation.</p> <p>This method returns {{S_OK}} on success, or it returns one of the error codes that are described in the {{DXGI_ERROR}} topic.</p> <dd> <p>A reference to a variable that receives the width in pixels.</p> </dd> <dd> <p>A reference to a variable that receives the height in pixels.</p> </dd> <p>Sets the color space used by the swap chain.</p> <p>This method returns {{S_OK}} on success, or it returns one of the error codes that are described in the {{DXGI_ERROR}} topic.</p> <dd> <p>A reference to a combination of <strong>{{DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies the color space to set for the swap chain.</p> </dd> <p>Gets the color space used by the swap chain.</p> <p>A combination of <strong>{{DXGI_MULTIPLANE_OVERLAY_YCbCr_FLAGS}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies the color space for the swap chain.</p> <p> Creates swap chains for desktop media apps that use DirectComposition surfaces to decode and display video. </p> <p> To create a Microsoft DirectX Graphics Infrastructure ({{DXGI}}) media factory interface, pass <strong>{{IDXGIFactoryMedia}}</strong> into either the <strong>CreateDXGIFactory</strong> or <strong>CreateDXGIFactory1</strong> function or call <strong>QueryInterface</strong> from a factory object returned by <strong>CreateDXGIFactory</strong>, <strong>CreateDXGIFactory1</strong>, or <strong>CreateDXGIFactory2</strong>. </p><p> Because you can create a Direct3D device without creating a swap chain, you might need to retrieve the factory that is used to create the device in order to create a swap chain. You can request the <strong>{{IDXGIDevice}}</strong>, <strong>{{IDXGIDevice1}}</strong>, <strong>{{IDXGIDevice2}}</strong>, or <strong>{{IDXGIDevice3}}</strong> interface from the Direct3D device and then use the <strong>{{IDXGIObject::GetParent}}</strong> method to locate the factory. The following code shows how. </p><pre>{{IDXGIDevice2}} * pDXGIDevice; hr = g_pd3dDevice-&gt;QueryInterface(__uuidof({{IDXGIDevice2}}), (void **)&amp;pDXGIDevice); {{IDXGIAdapter}} * pDXGIAdapter; hr = pDXGIDevice-&gt;GetParent(__uuidof({{IDXGIAdapter}}), (void **)&amp;pDXGIAdapter); {{IDXGIFactoryMedia}} * pIDXGIFactory; pDXGIAdapter-&gt;GetParent(__uuidof({{IDXGIFactoryMedia}}), (void **)&amp;pIDXGIFactory);</pre> <p>Creates a {{YUV}} swap chain for an existing DirectComposition surface handle.</p> <p><strong>CreateSwapChainForCompositionSurfaceHandle</strong> returns: </p><ul> <li>{{S_OK}} if it successfully created a swap chain.</li> <li>{{E_OUTOFMEMORY}} if memory is unavailable to complete the operation.</li> <li> {{DXGI_ERROR_INVALID_CALL}} if the calling application provided invalid data, for example, if <em>pDesc</em>, <em>pYuvDecodeBuffers</em>, or <em>ppSwapChain</em> is <strong>{{NULL}}</strong>.</li> <li>Possibly other error codes that are described in the {{DXGI_ERROR}} topic that are defined by the type of device that you pass to <em>pDevice</em>.</li> </ul> <p> Creates a {{YUV}} swap chain for an existing DirectComposition surface handle. The swap chain is created with pre-existing buffers and very few descriptive elements are required. Instead, this method requires a DirectComposition surface handle and an <strong>{{IDXGIResource}}</strong> buffer to hold decoded frame data. The swap chain format is determined by the format of the subresources of the <strong>{{IDXGIResource}}</strong>. </p> <p>The <strong>{{IDXGIResource}}</strong> provided via the <em>pYuvDecodeBuffers</em> parameter must point to at least one subresource, and all subresources must be created with the <strong>{{D3D11_BIND_DECODER}}</strong> flag.</p> <p><strong>CreateDecodeSwapChainForCompositionSurfaceHandle</strong> returns: </p><ul> <li>{{S_OK}} if it successfully created a swap chain.</li> <li>{{E_OUTOFMEMORY}} if memory is unavailable to complete the operation.</li> <li> {{DXGI_ERROR_INVALID_CALL}} if the calling application provided invalid data, for example, if <em>pDesc</em>, <em>pYuvDecodeBuffers</em>, or <em>ppSwapChain</em> is <strong>{{NULL}}</strong>. </li> <li> Possibly other error codes that are described in the {{DXGI_ERROR}} topic that are defined by the type of device that you pass to <em>pDevice</em>. </li> </ul> <p>This swap chain interface allows desktop media applications to request a seamless change to a specific refresh rate.</p><p> For example, a media application presenting video at a typical framerate of 23.997 frames per second can request a custom refresh rate of 24 or 48 Hz to eliminate jitter. If the request is approved, the app starts presenting frames at the custom refresh rate immediately - without the typical 'mode switch' a user would experience when changing the refresh rate themselves by using the control panel. </p> <p> Seamless changes to custom framerates can only be done on integrated panels. Custom frame rates cannot be applied to external displays. If the {{DXGI}} output adapter is attached to an external display then <strong>CheckPresentDurationSupport</strong> will return (0, 0) for upper and lower bounds, indicating that the device does not support seamless refresh rate changes. </p><p> Custom refresh rates can be used when displaying video with a dynamic framerate. However, the refresh rate change should be kept imperceptible to the user. A best practice for keeping the refresh rate transition imperceptible is to only set the custom framerate if the app determines it can present at that rate for least 5 seconds. </p> <p>Queries the system for a <strong>{{DXGI_FRAME_STATISTICS_MEDIA}}</strong> structure that indicates whether a custom refresh rate is currently approved by the system.</p> <p>This method returns {{S_OK}} on success, or a {{DXGI}} error code on failure.</p> <p>Requests a custom presentation duration (custom refresh rate).</p> <p>This method returns {{S_OK}} on success, or a {{DXGI}} error code on failure.</p> <dd> <p>The custom presentation duration, specified in hundreds of nanoseconds.</p> </dd> <p>Queries the graphics driver for a supported frame present duration corresponding to a custom refresh rate.</p> <p>If the {{DXGI}} output adapter does not support custom refresh rates (for example, an external display) then the display driver will set upper and lower bounds to (0, 0).</p> <p>This method returns {{S_OK}} on success, or a {{DXGI}} error code on failure.</p> <dd> <p>Indicates the frame duration to check. This value is the duration of one frame at the desired refresh rate, specified in hundreds of nanoseconds. For example, set this field to 167777 to check for 60 Hz refresh rate support.</p> </dd> <dd> <p>A variable that will be set to the closest supported frame present duration that's smaller than the requested value, or zero if the device does not support any lower duration.</p> </dd> <dd> <p>A variable that will be set to the closest supported frame present duration that's larger than the requested value, or zero if the device does not support any higher duration.</p> </dd> <p>Represents an adapter output (such as a monitor). The <strong>{{IDXGIOutput3}}</strong> interface exposes a method to check for overlay support.</p> <p>Checks for overlay support.</p> <p>Returns one of the error codes described in the {{DXGI_ERROR}} topic.</p> <dd> <p>A <strong>{{DXGI_FORMAT}}</strong>-typed value for the color format.</p> </dd> <dd> <p>A reference to the Direct3D device interface. <strong>CheckOverlaySupport</strong> returns only support info about this scan-out device. </p> </dd> <dd> <p>A reference to a variable that receives a combination of <strong>{{DXGI_OVERLAY_SUPPORT_FLAG}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies options for overlay support. </p> </dd> <p>Creates a {{DXGI}} 1.3 factory that you can use to generate other {{DXGI}} objects.</p><p>In Windows?8, any {{DXGI}} factory created while {{DXGIDebug}}.dll was present on the system would load and use it. Starting in Windows?8.1, apps explicitly request that {{DXGIDebug}}.dll be loaded instead. Use <strong>CreateDXGIFactory2</strong> and specify the {{DXGI_CREATE_FACTORY_DEBUG}} flag to request {{DXGIDebug}}.dll; the {{DLL}} will be loaded if it is present on the system.</p> <p>This function accepts a flag indicating whether {{DXGIDebug}}.dll is loaded. The function otherwise behaves identically to <strong>CreateDXGIFactory1</strong>.</p> <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p>Valid values include the <strong>{{DXGI_CREATE_FACTORY_DEBUG}} (0x01)</strong> flag, and zero.</p> <strong>Note</strong>??This flag will be set by the {{D3D}} runtime if:<ul> <li>The system creates an implicit factory during device creation.</li> <li>The {{D3D11_CREATE_DEVICE_DEBUG}} flag is specified during device creation, for example using <strong>{{D3D11CreateDevice}}</strong> (or the swapchain method, or the Direct3D 10 equivalents).</li> </ul> ? </dd> <dd> <p>The globally unique identifier ({{GUID}}) of the <strong>{{IDXGIFactory2}}</strong> object referenced by the <em>ppFactory</em> parameter.</p> </dd> <dd> <p>Address of a reference to an <strong>{{IDXGIFactory2}}</strong> object.</p> </dd> <p>Retrieves an interface that Windows Store apps use for debugging the Microsoft DirectX Graphics Infrastructure ({{DXGI}}).</p> <p>The <strong>{{DXGIGetDebugInterface1}}</strong> function returns <strong>{{E_NOINTERFACE}}</strong> on systems without the Windows Software Development Kit ({{SDK}}) installed, because it's a development-time aid.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Not used.</p> </dd> <dd> <p>The globally unique identifier ({{GUID}}) of the requested interface type, which can be the identifier for the <strong>{{IDXGIDebug}}</strong>, <strong>{{IDXGIDebug1}}</strong>, or <strong>{{IDXGIInfoQueue}}</strong> interfaces.</p> </dd> <dd> <p>A reference to a buffer that receives a reference to the debugging interface.</p> </dd> <p>Specifies color space support for the swap chain.</p> <dd> <p>Color space support is present.</p> </dd> <dd> <p>Overlay color space support is present.</p> </dd> <p>Specifies support for overlay color space.</p> <dd> <p>Overlay color space support is present.</p> </dd> <p>Specifies the memory segment group to use.</p> <p>This enum is used by <strong>QueryVideoMemoryInfo</strong> and <strong>SetVideoMemoryReservation</strong>.</p><p>Refer to the remarks for <strong>{{D3D12_MEMORY_POOL}}</strong>.</p> <dd> <p> The grouping of segments which is considered local to the video adapter, and represents the fastest available memory to the {{GPU}}. Applications should target the local segment group as the target size for their working set.</p> </dd> <dd> <p>The grouping of segments which is considered non-local to the video adapter, and may have slower performance than the local segment group.</p> </dd> <p>Describes the current video memory budgeting parameters.</p> <p>Use this structure with <strong>QueryVideoMemoryInfo</strong>.</p><p>Refer to the remarks for <strong>{{D3D12_MEMORY_POOL}}</strong>.</p> <dd> <p>Specifies the {{OS}}-provided video memory budget, in bytes, that the application should target. If <em>CurrentUsage</em> is greater than <em>Budget</em>, the application may incur stuttering or performance penalties due to background activity by the {{OS}} to provide other applications with a fair usage of video memory.</p> </dd> <dd> <p> Specifies the application?s current video memory usage, in bytes.</p> </dd> <dd> <p> The amount of video memory, in bytes, that the application has available for reservation. To reserve this video memory, the application should call <strong>{{IDXGIAdapter3::SetVideoMemoryReservation}}</strong>.</p> </dd> <dd> <p> The amount of video memory, in bytes, that is reserved by the application. The {{OS}} uses the reservation as a hint to determine the application?s minimum working set. Applications should attempt to ensure that their video memory usage can be trimmed to meet this requirement. </p> </dd> <p>Extends <strong>{{IDXGISwapChain2}}</strong> with methods to support getting the index of the swap chain's current back buffer and support for color space.</p> <p>Gets the index of the swap chain's current back buffer.</p> <p>Returns the index of the current back buffer.</p> <p>Checks the swap chain's support for color space.</p> <p>This method returns <strong>{{S_OK}}</strong> on success, or it returns one of the error codes that are described in the {{DXGI_ERROR}} topic.</p> <dd> <p>A <strong>{{DXGI_COLOR_SPACE_TYPE}}</strong>-typed value that specifies color space type to check support for.</p> </dd> <dd> <p>A reference to a variable that receives a combination of <strong>{{DXGI_SWAP_CHAIN_COLOR_SPACE_SUPPORT_FLAG}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies options for color space support. </p> </dd> <p>Sets the color space used by the swap chain.</p> <p>This method returns <strong>{{S_OK}}</strong> on success, or it returns one of the error codes that are described in the {{DXGI_ERROR}} topic.</p> <dd> <p>A <strong>{{DXGI_COLOR_SPACE_TYPE}}</strong>-typed value that specifies the color space to set.</p> </dd> <p> Changes the swap chain's back buffer size, format, and number of buffers, where the swap chain was created using a {{D3D12}} command queue as an input device. This should be called when the application window is resized. </p> <p> This method is only valid to call when the swapchain was created using a {{D3D12}} command queue (<strong>{{ID3D12CommandQueue}}</strong>) as an input device. </p><p> When a swapchain is created on a multi-{{GPU}} adapter, the backbuffers are all created on node 1 and only a single command queue is supported. <strong>ResizeBuffers1</strong> enables applications to create backbuffers on different nodes, allowing a different command queue to be used with each node. These capabilities enable Alternate Frame Rendering ({{AFR}}) techniques to be used with the swapchain. See Direct3D 12 Multi-Adapters. </p><p> The only difference between <strong>{{IDXGISwapChain::ResizeBuffers}}</strong> in Windows?8 versus Windows?7 is with flip presentation model swap chains that you create with the <strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong> or {{DXGI_SWAP_EFFECT_FLIP_DISCARD}} value set. In Windows?8, you must call <strong>ResizeBuffers</strong> to realize a transition between full-screen mode and windowed mode; otherwise, your next call to the <strong>{{IDXGISwapChain::Present}}</strong> method fails. </p><p> Also see the Remarks section in <strong>{{IDXGISwapChain::ResizeBuffers}}</strong>, all of which is relevant to <strong>ResizeBuffers1</strong>. </p> <p> Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}. </p> <dd> <p> The number of buffers in the swap chain (including all back and front buffers). This number can be different from the number of buffers with which you created the swap chain. This number can't be greater than <strong>{{DXGI_MAX_SWAP_CHAIN_BUFFERS}}</strong>. Set this number to zero to preserve the existing number of buffers in the swap chain. You can't specify less than two buffers for the flip presentation model. </p> </dd> <dd> <p> The new width of the back buffer. If you specify zero, {{DXGI}} will use the width of the client area of the target window. You can't specify the width as zero if you called the <strong>{{IDXGIFactory2::CreateSwapChainForComposition}}</strong> method to create the swap chain for a composition surface. </p> </dd> <dd> <p> The new height of the back buffer. If you specify zero, {{DXGI}} will use the height of the client area of the target window. You can't specify the height as zero if you called the <strong>{{IDXGIFactory2::CreateSwapChainForComposition}}</strong> method to create the swap chain for a composition surface. </p> </dd> <dd> <p> A <strong>{{DXGI_FORMAT}}</strong>-typed value for the new format of the back buffer. Set this value to <strong>{{DXGI_FORMAT_UNKNOWN}}</strong> to preserve the existing format of the back buffer. The flip presentation model supports a more restricted set of formats than the bit-block transfer (bitblt) model. </p> </dd> <dd> <p> A combination of <strong>{{DXGI_SWAP_CHAIN_FLAG}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies options for swap-chain behavior. </p> </dd> <dd> <p> An array of {{UINTs}}, of total size <em>BufferCount</em>, where the value indicates which node the back buffer should be created on. Buffers created using <strong>ResizeBuffers1</strong> with a non-null <em>pCreationNodeMask</em> array are visible to all nodes. </p> </dd> <dd> <p> An array of command queues (<strong>{{ID3D12CommandQueue}}</strong> instances), of total size <em>BufferCount</em>. Each queue provided must match the corresponding creation node mask specified in the <em>pCreationNodeMask</em> array. When <strong>Present()</strong> is called, in addition to rotating to the next buffer for the next frame, the swapchain will also rotate through these command queues. This allows the app to control which queue requires synchronization for a given present operation. </p> </dd> <p>Represents an adapter output (such as a monitor). The <strong>{{IDXGIOutput4}}</strong> interface exposes a method to check for overlay color space support.</p> <p>Checks for overlay color space support.</p> <p>This method returns <strong>{{S_OK}}</strong> on success, or it returns one of the error codes that are described in the {{DXGI_ERROR}} topic.</p> <dd> <p>A <strong>{{DXGI_FORMAT}}</strong>-typed value for the color format.</p> </dd> <dd> <p>A <strong>{{DXGI_COLOR_SPACE_TYPE}}</strong>-typed value that specifies color space type to check overlay support for.</p> </dd> <dd> <p>A reference to the Direct3D device interface. <strong>CheckOverlayColorSpaceSupport</strong> returns only support info about this scan-out device. </p> </dd> <dd> <p>A reference to a variable that receives a combination of <strong>{{DXGI_OVERLAY_COLOR_SPACE_SUPPORT_FLAG}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies options for overlay color space support. </p> </dd> <p> Enables creating Microsoft DirectX Graphics Infrastructure ({{DXGI}}) objects. </p> <p> Outputs the <strong>{{IDXGIAdapter}}</strong> for the specified {{LUID}}. </p> <p> For Direct3D 12, it's no longer possible to backtrack from a device to the <strong>{{IDXGIAdapter}}</strong> that was used to create it. <strong>{{IDXGIFactory4::EnumAdapterByLuid}}</strong> enables an app to retrieve information about the adapter where a {{D3D12}} device was created. <strong>{{IDXGIFactory4::EnumAdapterByLuid}}</strong> is designed to be paired with <strong>{{ID3D12Device::GetAdapterLuid}}</strong>. For more information, see {{DXGI}} 1.4 Improvements. </p> <p> Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}. See also Direct3D 12 Return Codes. </p> <p> Provides an adapter which can be provided to {{D3D12CreateDevice}} to use the {{WARP}} renderer. </p> <p> For more information, see {{DXGI}} 1.4 Improvements. </p> <p> Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}. See also Direct3D 12 Return Codes. </p> <dd> <p> The globally unique identifier ({{GUID}}) of the <strong>{{IDXGIFactory4}}</strong> object referenced by the <em>ppvAdapter</em> parameter. </p> </dd> <dd> <p> The address of an <strong>{{IDXGIAdapter}}</strong> interface reference to the adapter. This parameter must not be {{NULL}}. </p> </dd> <p>This interface adds some memory residency methods, for budgeting and reserving physical memory.</p> <p>For more details, refer to the Residency section of the {{D3D12}} documentation.</p> <p>Registers to receive notification of hardware content protection teardown events.</p> <p>Call <strong>{{ID3D11VideoDevice::GetContentProtectionCaps}}</strong>() to check for the presence of the <strong>{{D3D11_CONTENT_PROTECTION_CAPS_HARDWARE_TEARDOWN}}</strong> capability to know whether the hardware contains an automatic teardown mechanism. After the event is signaled, the application can call <strong>{{ID3D11VideoContext1::CheckCryptoSessionStatus}}</strong> to determine the impact of the hardware teardown for a specific <strong>{{ID3D11CryptoSession}}</strong> interface. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A handle to the event object that the operating system sets when hardware content protection teardown occurs. The <strong>CreateEvent</strong> or <strong>OpenEvent</strong> function returns this handle. </p> </dd> <dd> <p>A reference to a key value that an application can pass to the <strong>{{IDXGIAdapter3::UnregisterHardwareContentProtectionTeardownStatus}}</strong> method to unregister the notification event that <em>hEvent</em> specifies.</p> </dd> <p>Unregisters an event to stop it from receiving notification of hardware content protection teardown events.</p> <p>This method does not return a value.</p> <dd> <p>A key value for the window or event to unregister. The <strong>{{IDXGIAdapter3::RegisterHardwareContentProtectionTeardownStatusEvent}}</strong> method returns this value. </p> </dd> <p> This method informs the process of the current budget and process usage. </p> <p> Applications must explicitly manage their usage of physical memory explicitly and keep usage within the budget assigned to the application process. Processes that cannot kept their usage within their assigned budgets will likely experience stuttering, as they are intermittently frozen and paged-out to allow other processes to run. </p> <p> Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}. </p> <dd> <p> Specifies the device's physical adapter for which the video memory information is queried. For single-{{GPU}} operation, set this to zero. If there are multiple {{GPU}} nodes, set this to the index of the node (the device's physical adapter) for which the video memory information is queried. See Multi-Adapter. </p> </dd> <dd> <p> Specifies a {{DXGI_MEMORY_SEGMENT_GROUP}} that identifies the group as local or non-local. </p> </dd> <dd> <p> Fills in a {{DXGI_QUERY_VIDEO_MEMORY_INFO}} structure with the current values. </p> </dd> <p> This method sends the minimum required physical memory for an application, to the {{OS}}. </p> <p> Applications are encouraged to set a video reservation to denote the amount of physical memory they cannot go without. This value helps the {{OS}} quickly minimize the impact of large memory pressure situations. </p> <p> Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}. </p> <dd> <p> Specifies the device's physical adapter for which the video memory information is being set. For single-{{GPU}} operation, set this to zero. If there are multiple {{GPU}} nodes, set this to the index of the node (the device's physical adapter) for which the video memory information is being set. See Multi-Adapter. </p> </dd> <dd> <p> Specifies a {{DXGI_MEMORY_SEGMENT_GROUP}} that identifies the group as local or non-local. </p> </dd> <dd> <p> Specifies a {{UINT64}} that sets the minimum required physical memory, in bytes. </p> </dd> <p>This method establishes a correlation between a {{CPU}} synchronization object and the budget change event.</p> <p>Instead of calling <strong>QueryVideoMemoryInfo</strong> regularly, applications can use {{CPU}} synchronization objects to efficiently wake threads when budget changes occur. </p> <p>This method returns an {{HRESULT}} success or error code.</p> <dd> <p>Specifies a {{HANDLE}} for the event.</p> </dd> <dd> <p>A key value for the window or event to unregister. The <strong>{{IDXGIAdapter3::RegisterHardwareContentProtectionTeardownStatusEvent}}</strong> method returns this value. </p> </dd> <p>This method stops notifying a {{CPU}} synchronization object whenever a budget change occurs. An application may switch back to polling the information regularly.</p> <p>An application may switch back to polling for the information regularly.</p> <p>This method does not return a value.</p> <dd> <p>A key value for the window or event to unregister. The <strong>{{IDXGIAdapter3::RegisterHardwareContentProtectionTeardownStatusEvent}}</strong> method returns this value. </p> </dd> <p>Specifies the header metadata type.</p> <p>This enum is used by the <strong>SetHDRMetaData</strong> method.</p> <dd> <p>Indicates there is no header metadata.</p> </dd> <dd> <p>Indicates the header metadata is held by a <strong>{{DXGI_HDR_METADATA_HDR10}}</strong> structure.</p> </dd> <p>Specifies flags for the <strong>OfferResources1</strong> method.</p> <p>Specifies result flags for the <strong>ReclaimResources1</strong> method.</p> <p>Specifies a range of hardware features, to be used when checking for feature support.</p> <p>This enum is used by the <strong>CheckFeatureSupport</strong> method.</p> <dd> <p>The display supports tearing, a requirement of variable refresh rate displays.</p> </dd> <p>Describes the 10 bit display metadata, and is usually used for video. This is used to adjust the output to best match a display's capabilities.</p> <p>The X and Y coordinates of the parameters mean the xy chromacity coordinate in the {{CIE1931}} color space. The values are normalized to 50000, so to get a value between 0.0 and 1.0, divide by 50000.</p><p>This structure is used in conjunction with the <strong>SetHDRMetaData</strong> method.</p> <dd> <p>The chromaticity coordinates of the 1.0 red value. Index 0 contains the X coordinate and index 1 contains the Y coordinate. </p> </dd> <dd> <p>The chromaticity coordinates of the 1.0 green value. Index 0 contains the X coordinate and index 1 contains the Y coordinate. </p> </dd> <dd> <p>The chromaticity coordinates of the 1.0 blue value. Index 0 contains the X coordinate and index 1 contains the Y coordinate. </p> </dd> <dd> <p>The chromaticity coordinates of the white point. Index 0 contains the X coordinate and index 1 contains the Y coordinate. </p> </dd> <dd> <p>The maximum number of nits of the display used to master the content. Units are 0.0001 nit, so if the value is 1 nit, the value should be 10,000. </p> </dd> <dd> <p>The minimum number of nits (in units of 0.00001 nit) of the display used to master the content.</p> </dd> <dd> <p>The maximum nit value (in units of 0.00001 nit) used anywhere in the content. </p> </dd> <dd> <p>The per-frame average of the maximum nit values (in units of 0.00001 nit).</p> </dd> <p>An <strong>{{IDXGIOutput}}</strong> interface represents an adapter output (such as a monitor).</p> <p>To see the outputs available, use <strong>{{IDXGIAdapter::EnumOutputs}}</strong>. To see the specific output that the swap chain will update, use <strong>{{IDXGISwapChain::GetContainingOutput}}</strong>.</p> <p>Allows specifying a list of supported formats for fullscreen surfaces that can be returned by the <strong>{{IDXGIOutputDuplication}}</strong> object.</p> <p>This method allows directly receiving the original back buffer format used by a running fullscreen application. For comparison, using the original <strong>DuplicateOutput</strong> function always converts the fullscreen surface to a 32-bit {{BGRA}} format. In cases where the current fullscreen application is using a different buffer format, a conversion to 32-bit {{BGRA}} incurs a performance penalty. Besides the performance benefit of being able to skip format conversion, using <strong>DuplicateOutput1</strong> also allows receiving the full gamut of colors in cases where a high-color format (such as {{R10G10B10A2}}) is being presented. </p><p>The <em>pSupportedFormats</em> array should only contain display scan-out formats. See Format Support for Direct3D Feature Level 11.0 Hardware for required scan-out formats at each feature level. If the current fullscreen buffer format is not contained in the <em>pSupportedFormats</em> array, {{DXGI}} will pick one of the supplied formats and convert the fullscreen buffer to that format before returning from <strong>{{IDXGIOutputDuplication::AcquireNextFrame}}</strong>. The list of supported formats should always contain {{DXGI_FORMAT_B8G8R8A8_UNORM}}, as this is the most common format for the desktop. </p> <p> </p><ul> <li>{{S_OK}} if <strong>DuplicateOutput1</strong> successfully created the desktop duplication interface.</li> <li>{{E_INVALIDARG}} for one of the following reasons: <ul> <li>The specified device (<em>pDevice</em>) is invalid, was not created on the correct adapter, or was not created from <strong>{{IDXGIFactory1}}</strong> (or a later version of a {{DXGI}} factory interface that inherits from <strong>{{IDXGIFactory1}}</strong>).</li> <li>The calling application is already duplicating this desktop output.</li> </ul> </li> <li>{{E_ACCESSDENIED}} if the application does not have access privilege to the current desktop image. For example, only an application that runs at {{LOCAL_SYSTEM}} can access the secure desktop.</li> <li> <p>{{DXGI_ERROR_UNSUPPORTED}} if the created <strong>{{IDXGIOutputDuplication}}</strong> interface does not support the current desktop mode or scenario. For example, 8bpp and non-{{DWM}} desktop modes are not supported.</p> <p>If <strong>DuplicateOutput1</strong> fails with {{DXGI_ERROR_UNSUPPORTED}}, the application can wait for system notification of desktop switches and mode changes and then call <strong>DuplicateOutput1</strong> again after such a notification occurs. For more information, see the desktop switch (<strong>{{EVENT_SYSTEM_DESKTOPSWITCH}}</strong>) and mode change notification (<strong>{{WM_DISPLAYCHANGE}}</strong>). </p> </li> <li>{{DXGI_ERROR_NOT_CURRENTLY_AVAILABLE}} if {{DXGI}} reached the limit on the maximum number of concurrent duplication applications (default of four). Therefore, the calling application cannot create any desktop duplication interfaces until the other applications close.</li> <li>{{DXGI_ERROR_SESSION_DISCONNECTED}} if <strong>DuplicateOutput1</strong> failed because the session is currently disconnected.</li> <li>Other error codes are described in the {{DXGI_ERROR}} topic.</li> </ul> <p>An <strong>{{IDXGISwapChain}}</strong> interface implements one or more <strong>surfaces</strong> for storing rendered data before presenting it to an output.</p> <p>You can create a swap chain by calling <strong>{{IDXGIFactory2::CreateSwapChainForHwnd}}</strong>, <strong>{{IDXGIFactory2::CreateSwapChainForCoreWindow}}</strong>, or <strong>{{IDXGIFactory2::CreateSwapChainForComposition}}</strong>. You can also create a swap chain when you call <strong>{{D3D11CreateDeviceAndSwapChain}}</strong>; however, you can then only access the sub-set of swap-chain functionality that the <strong>{{IDXGISwapChain}}</strong> interface provides.</p> <p>This method sets High Dynamic Range ({{HDR}}) and Wide Color Gamut ({{WCG}}) header metadata.</p> <p>This method sets metadata to enable a monitor's output to be adjusted depending on its capabilities.</p> <p>This method returns an {{HRESULT}} success or error code.</p> <dd> <p>Specifies one member of the <strong>{{DXGI_HDR_METADATA_TYPE}}</strong> enum.</p> </dd> <dd> <p>Specifies the size of <em>pMetaData</em>, in bytes.</p> </dd> <dd> <p>Specifies a void reference that references the metadata, if it exists. Refer to the <strong>{{DXGI_HDR_METADATA_HDR10}}</strong> structure.</p> </dd> <p> An <strong>{{IDXGIDevice}}</strong> interface implements a derived class for {{DXGI}} objects that produce image data. </p> <p> The <strong>{{IDXGIDevice}}</strong> interface is designed for use by {{DXGI}} objects that need access to other {{DXGI}} objects. This interface is useful to applications that do not use Direct3D to communicate with {{DXGI}}. </p><p> The Direct3D create device functions return a Direct3D device object. This Direct3D device object implements the <strong>{{IUnknown}}</strong> interface. You can query this Direct3D device object for the device's corresponding <strong>{{IDXGIDevice}}</strong> interface. To retrieve the <strong>{{IDXGIDevice}}</strong> interface of a Direct3D device, use the following code: </p><pre>{{IDXGIDevice}} * pDXGIDevice; hr = g_pd3dDevice-&gt;QueryInterface(__uuidof({{IDXGIDevice}}), (void **)&amp;pDXGIDevice); </pre><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>Allows the operating system to free the video memory of resources, including both discarding the content and de-committing the memory.</p> <p><strong>OfferResources1</strong> (an extension of the original <strong>{{IDXGIDevice2::OfferResources}}</strong> {{API}}) enables {{D3D}} based applications to allow de-committing of an allocation?s backing store to reduce system commit under low memory conditions. A de-committed allocation cannot be reused, so opting in to the new {{DXGI_OFFER_RESOURCE_FLAG_ALLOW_DECOMMIT}} flag means the new reclaim results must be properly handled. Refer to the flag descriptions in <strong>{{DXGI_RECLAIM_RESOURCE_RESULTS}}</strong> and the Example below.</p><p><strong>OfferResources1</strong> and <strong>ReclaimResources1</strong> may <em>not</em> be used interchangeably with <strong>OfferResources</strong> and <strong>ReclaimResources</strong>. </p><p>The priority value that the <em>Priority</em> parameter specifies describes how valuable the caller considers the content to be. The operating system uses the priority value to discard resources in order of priority. The operating system discards a resource that is offered with low priority before it discards a resource that is offered with a higher priority.</p><p>If you call <strong>OfferResources1</strong> to offer a resource while the resource is bound to the pipeline, the resource is unbound. You cannot call <strong>OfferResources1</strong> on a resource that is mapped. After you offer a resource, the resource cannot be mapped or bound to the pipeline until you call the <strong>ReclaimResources1</strong> method to reclaim the resource. You cannot call <strong>OfferResources1</strong> to offer immutable resources.</p><p>To offer shared resources, call <strong>OfferResources1</strong> on only one of the sharing devices. To ensure exclusive access to the resources, you must use an <strong>{{IDXGIKeyedMutex}}</strong> object and then call <strong>OfferResources1</strong> only while you hold the mutex. In fact, you can't offer shared resources unless you use <strong>{{IDXGIKeyedMutex}}</strong> because offering shared resources without using <strong>{{IDXGIKeyedMutex}}</strong> isn't supported.</p><p>The user mode display driver might not immediately offer the resources that you specified in a call to <strong>OfferResources1</strong>. The driver can postpone offering them until the next call to <strong>{{IDXGISwapChain::Present}}</strong>, <strong>{{IDXGISwapChain1::Present1}}</strong>, or <strong>{{ID3D11DeviceContext::Flush}}</strong>.</p> <p>This method returns an {{HRESULT}} success or error code, which can include {{E_INVALIDARG}} if a resource in the array, or the priority, is invalid.</p> <dd> <p>The number of resources in the <em>ppResources</em> argument array.</p> </dd> <dd> <p>An array of references to <strong>{{IDXGIResource}}</strong> interfaces for the resources to offer.</p> </dd> <dd> <p>A <strong>{{DXGI_OFFER_RESOURCE_PRIORITY}}</strong>-typed value that indicates how valuable data is.</p> </dd> <dd> <p>Specifies the <strong>{{DXGI_OFFER_RESOURCE_FLAGS}}</strong>.</p> </dd> <p>Restores access to resources that were previously offered by calling <strong>{{IDXGIDevice4::OfferResources1}}</strong>.</p> <p>After you call <strong>OfferResources1</strong> to offer one or more resources, you must call <strong>ReclaimResources1</strong> before you can use those resources again.</p><p>To reclaim shared resources, call <strong>ReclaimResources1</strong> only on one of the sharing devices. To ensure exclusive access to the resources, you must use an <strong>{{IDXGIKeyedMutex}}</strong> object and then call <strong>ReclaimResources1</strong> only while you hold the mutex.</p> <p>This method returns an {{HRESULT}} success or error code, including {{E_INVALIDARG}} if the resources are invalid.</p> <p>This interface enables a single method to support variable refresh rate displays.</p> <p>Used to check for hardware feature support.</p> <p>Refer to the description of <strong>{{DXGI_SWAP_CHAIN_FLAG_ALLOW_TEARING}}</strong>.</p> <p>This method returns an {{HRESULT}} success or error code.</p> <dd> <p>Specifies one member of <strong>{{DXGI_FEATURE}}</strong> to query support for.</p> </dd> <dd> <p>Specifies a reference to a buffer that will be filled with data that describes the feature support.</p> </dd> <dd> <p>The size, in bytes, of <em>pFeatureSupportData</em>.</p> </dd> <p>Identifies the type of {{DXGI}} adapter.</p> <p>The <strong>{{DXGI_ADAPTER_FLAG}}</strong> enumerated type is used by the <strong>Flags</strong> member of the <strong>{{DXGI_ADAPTER_DESC1}}</strong> or <strong>{{DXGI_ADAPTER_DESC2}}</strong> structure to identify the type of {{DXGI}} adapter.</p> <dd> <p>Specifies no flags.</p> </dd> <dd> <p>Value always set to 0. This flag is reserved.</p> </dd> <dd> <p>Specifies a software adapter. For more info about this flag, see new info in Windows?8 about enumerating adapters.</p> <p><strong>Direct3D 11:??</strong>This enumeration value is supported starting with Windows?8.</p> </dd> <dd> <p>Forces this enumeration to compile to 32 bits in size. Without this value, some compilers would allow this enumeration to compile to a size other than 32 bits. This value is not used.</p> </dd> <p>Describes an adapter (or video card) by using {{DXGI}} 1.0.</p> <p>The <strong>{{DXGI_ADAPTER_DESC}}</strong> structure provides a description of an adapter. This structure is initialized by using the <strong>{{IDXGIAdapter::GetDesc}}</strong> method.</p> <dd> <p>A string that contains the adapter description. On feature level 9 graphics hardware, <strong>GetDesc</strong> returns ?Software Adapter? for the description string.</p> </dd> <dd> <p>The {{PCI}} {{ID}} of the hardware vendor. On feature level 9 graphics hardware, <strong>GetDesc</strong> returns zeros for the {{PCI}} {{ID}} of the hardware vendor.</p> </dd> <dd> <p>The {{PCI}} {{ID}} of the hardware device. On feature level 9 graphics hardware, <strong>GetDesc</strong> returns zeros for the {{PCI}} {{ID}} of the hardware device.</p> </dd> <dd> <p>The {{PCI}} {{ID}} of the sub system. On feature level 9 graphics hardware, <strong>GetDesc</strong> returns zeros for the {{PCI}} {{ID}} of the sub system.</p> </dd> <dd> <p>The {{PCI}} {{ID}} of the revision number of the adapter. On feature level 9 graphics hardware, <strong>GetDesc</strong> returns zeros for the {{PCI}} {{ID}} of the revision number of the adapter.</p> </dd> <dd> <p>The number of bytes of dedicated video memory that are not shared with the {{CPU}}.</p> </dd> <dd> <p>The number of bytes of dedicated system memory that are not shared with the {{CPU}}. This memory is allocated from available system memory at boot time.</p> </dd> <dd> <p>The number of bytes of shared system memory. This is the maximum value of system memory that may be consumed by the adapter during operation. Any incidental memory consumed by the driver as it manages and uses video memory is additional.</p> </dd> <dd> <p>A unique value that identifies the adapter. See <strong>{{LUID}}</strong> for a definition of the structure. <strong>{{LUID}}</strong> is defined in dxgi.h.</p> </dd> <p>Describes an output or physical connection between the adapter (video card) and a device.</p> <p>The <strong>{{DXGI_OUTPUT_DESC}}</strong> structure is initialized by the <strong>{{IDXGIOutput::GetDesc}}</strong> method.</p> <dd> <p>A string that contains the name of the output device.</p> </dd> <dd> <p>A <strong>{{RECT}}</strong> structure containing the bounds of the output in desktop coordinates. Desktop coordinates depend on the dots per inch ({{DPI}}) of the desktop. For info about writing {{DPI}}-aware Win32 apps, see High {{DPI}}.</p> </dd> <dd> <p>True if the output is attached to the desktop; otherwise, false.</p> </dd> <dd> <p>A member of the <strong>{{DXGI_MODE_ROTATION}}</strong> enumerated type describing on how an image is rotated by the output.</p> </dd> <dd> <p>An <strong>{{HMONITOR}}</strong> handle that represents the display monitor. For more information, see {{HMONITOR}} and the Device Context.</p> </dd> <p> The <strong>{{IDXGIAdapter}}</strong> interface represents a display subsystem (including one or more {{GPUs}}, {{DACs}} and video memory). </p> <p> A display subsystem is often referred to as a video card, however, on some machines the display subsystem is part of the motherboard. </p><p> To enumerate the display subsystems, use <strong>{{IDXGIFactory::EnumAdapters}}</strong>. </p><p> To get an interface to the adapter for a particular device, use <strong>{{IDXGIDevice::GetAdapter}}</strong>. </p><p> To create a software adapter, use <strong>{{IDXGIFactory::CreateSoftwareAdapter}}</strong>. </p><p><strong>Windows?Phone?8: </strong> This {{API}} is supported. </p> <p>An <strong>{{IDXGIOutput}}</strong> interface represents an adapter output (such as a monitor).</p> <p>To see the outputs available, use <strong>{{IDXGIAdapter::EnumOutputs}}</strong>. To see the specific output that the swap chain will update, use <strong>{{IDXGISwapChain::GetContainingOutput}}</strong>.</p> <p> </p><p>Specifies the aspect-ratio mode.</p> <dd> <p>Do not maintain the aspect ratio of the video. Stretch the video to fit the output rectangle.</p> </dd> <dd> <p>Preserve the aspect ratio of the video by letterboxing or within the output rectangle.</p> </dd> <dd> <strong>Note</strong>??Currently the {{EVR}} ignores this flag. ? <p>Correct the aspect ratio if the physical size of the display device does not match the display resolution. For example, if the native resolution of the monitor is 1600 by 1200 (4:3) but the display resolution is 1280 by 1024 (5:4), the monitor will display non-square pixels.</p> <p>If this flag is set, you must also set the <strong>{{MFVideoARMode_PreservePicture}}</strong> flag.</p> </dd> <dd> <p>Apply a non-linear horizontal stretch if the aspect ratio of the destination rectangle does not match the aspect ratio of the source rectangle.</p> <p>The non-linear stretch algorithm preserves the aspect ratio in the middle of the picture and stretches (or shrinks) the image progressively more toward the left and right. This mode is useful when viewing 4:3 content full-screen on a 16:9 display, instead of pillar-boxing. Non-linear vertical stretch is not supported, because the visual results are generally poor.</p> <p>This mode may cause performance degradation.</p> <p>If this flag is set, you must also set the <strong>{{MFVideoARMode_PreservePixel}}</strong> and <strong>{{MFVideoARMode_PreservePicture}}</strong> flags.</p> </dd> <dd> <p>Bitmask to validate flag values. This value is not a valid flag.</p> </dd> <p> </p><p>Contains flags that define how the enhanced video renderer ({{EVR}}) displays the video.</p> <p>To set these flags, call <strong>{{IMFVideoDisplayControl::SetRenderingPrefs}}</strong>.</p><p>The flags named "{{MFVideoRenderPrefs_Allow}}..." cause the {{EVR}} to use lower-quality settings only when requested by the quality manager. (For more information, see <strong>{{IMFQualityAdvise}}</strong>.) The flags named "{{MFVideoRenderPrefs_Force}}..." cause the video mixer to use lower-quality settings regardless of the quality manager. </p> <dd> <p> If this flag is set, the {{EVR}} does not draw the border color. By default, the {{EVR}} draws a border on areas of the destination rectangle that have no video. See <strong>{{IMFVideoDisplayControl::SetBorderColor}}</strong>. </p> </dd> <dd> <p> If this flag is set, the {{EVR}} does not clip the video when the video window straddles two monitors. By default, if the video window straddles two monitors, the {{EVR}} clips the video to the monitor that contains the largest area of video. </p> </dd> <dd> <p> </p><strong>Note</strong>??Requires Windows?7 or later. ? <p>Allow the {{EVR}} to limit its output to match {{GPU}} bandwidth.</p> </dd> <dd> <p> </p><strong>Note</strong>??Requires Windows?7 or later. ? <p>Force the {{EVR}} to limit its output to match {{GPU}} bandwidth.</p> </dd> <dd> <p> </p><strong>Note</strong>??Requires Windows?7 or later. ? <p>Force the {{EVR}} to batch Direct3D <strong>Present</strong> calls. This optimization enables the system to enter to idle states more frequently, which can reduce power consumption. </p> </dd> <dd> <p> </p><strong>Note</strong>??Requires Windows?7 or later. ? <p>Allow the {{EVR}} to batch Direct3D <strong>Present</strong> calls.</p> </dd> <dd> <p> </p><strong>Note</strong>??Requires Windows?7 or later. ? <p>Force the {{EVR}} to mix the video inside a rectangle that is smaller than the output rectangle. The {{EVR}} will then scale the result to the correct output size. The effective resolution will be lower if this setting is applied.</p> </dd> <dd> <p> </p><strong>Note</strong>??Requires Windows?7 or later. ? <p>Allow the {{EVR}} to mix the video inside a rectangle that is smaller than the output rectangle. </p> </dd> <dd> <p> </p><strong>Note</strong>??Requires Windows?7 or later. ? <p>Prevent the {{EVR}} from repainting the video window after a stop command. By default, the {{EVR}} repaints the video window black after a stop command.</p> </dd> <dd> <p> Bitmask to validate flag values. This value is not a valid flag. </p> </dd> <p>Defines messages for an enhanced video renderer ({{EVR}}) presenter. This enumeration is used with the <strong>{{IMFVideoPresenter::ProcessMessage}}</strong> method.</p> <p>Contains flags that are used to configure how the enhanced video renderer ({{EVR}}) performs deinterlacing.</p> <p>To set these flags, call the <strong>{{IMFVideoMixerControl2::SetMixingPrefs}}</strong> method.</p><p>These flags control some trade-offs between video quality and rendering speed. The constants named "{{MFVideoMixPrefs_Allow}}..." enable lower-quality settings, but only when the quality manager requests a drop in quality. The constants named "{{MFVideoMixPrefs_Force}}..." force the {{EVR}} to use lower-quality settings regardless of what the quality manager requests. (For more information about the quality manager, see <strong>{{IMFQualityAdvise}}</strong>.)</p><p>Currently two lower-quality modes are supported, as described in the following table. Either is preferable to dropping an entire frame.</p><p></p><table> <tr><th>Mode</th><th>Description</th></tr> <tr><td> <p>Half interface</p> </td><td> <p>The {{EVR}}'s video mixer skips the second field (relative to temporal order) of each interlaced frame. The video mixer still deinterlaces the first field, and this operation typically interpolates data from the second field. The overall frame rate is unaffected.</p> </td></tr> <tr><td> <p>Bob deinterlacing</p> </td><td> <p>The video mixer uses bob deinterlacing, even if the driver supports a higher-quality deinterlacing algorithm.</p> </td></tr> </table><p>?</p> <dd> <p>Force the {{EVR}} to skip the second field (in temporal order) of every interlaced frame. </p> </dd> <dd> <p>If the {{EVR}} is falling behind, allow it to skip the second field (in temporal order) of every interlaced frame.</p> </dd> <dd> <p>If the {{EVR}} is falling behind, allow it to use bob deinterlacing, even if the driver supports a higher-quality deinterlacing mode.</p> </dd> <dd> <p>Force the {{EVR}} to use bob deinterlacing, even if the driver supports a higher-quality mode.</p> </dd> <dd> <p>The bitmask of valid flag values. This constant is not itself a valid flag. </p> </dd> <p>Contains flags that are used to configure the Microsoft DirectShow enhanced video renderer ({{EVR}}) filter.</p> <dd> <p>Enables dynamic adjustments to video quality during playback.</p> </dd> <dd> <p>The bitmask of valid flag values. This constant is not itself a valid flag.</p> </dd> <p> </p><p>Retrieves an interface from the enhanced video renderer ({{EVR}}), or from the video mixer or video presenter.</p> <p>This method can be called only from inside the <strong>{{IMFTopologyServiceLookupClient::InitServicePointers}}</strong> method. At any other time, the method returns {{MF_E_NOTACCEPTING}}.</p><p>The presenter can use this method to query the {{EVR}} and the mixer. The mixer can use it to query the {{EVR}} and the presenter. Which objects are queried depends on the caller and the service {{GUID}}, as shown in the following table.</p><table> <tr><th>Caller</th><th>Service {{GUID}}</th><th>Objects queried</th></tr> <tr><td>Presenter</td><td>{{MR_VIDEO_RENDER_SERVICE}}</td><td>{{EVR}}</td></tr> <tr><td>Presenter</td><td>{{MR_VIDEO_MIXER_SERVICE}}</td><td>Mixer</td></tr> <tr><td>Mixer</td><td>{{MR_VIDEO_RENDER_SERVICE}}</td><td>Presenter and {{EVR}}</td></tr> </table><p>?</p><p>The following interfaces are available from the {{EVR:}}</p><ul> <li> <p><strong>{{IMediaEventSink}}</strong>. This interface is documented in the DirectShow {{SDK}} documentation.</p> </li> <li> <p> <strong>{{IMFClock}}</strong> interface. This interface is available if the {{EVR}} has access to a clock (reference clock in DirectShow or presentation clock in Media Foundation). This interface might not be available. Presenter and mixers must be able to process data without a clock. If the <strong>{{IMFClock}}</strong> interface is available, you can also get these related interfaces:</p> <ul> <li> <p> <strong>{{IMFTimer}}</strong> </p> </li> <li> <p> <strong>{{IMFPresentationClock}}</strong> (Media Foundation {{EVR}} only)</p> </li> </ul> </li> </ul><p>The following interfaces are available from the mixer:</p><ul> <li> <p> <strong>{{IMFTransform}}</strong> </p> </li> <li> <p> <strong>{{IMFVideoDeviceID}}</strong> </p> </li> </ul> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOINTERFACE}}</strong></dt> </dl> </td><td> <p>The requested interface is not available.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOTACCEPTING}}</strong></dt> </dl> </td><td> <p>The method was not called from inside the <strong>{{IMFTopologyServiceLookupClient::InitServicePointers}}</strong> method. See Remarks.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_SERVICE}}</strong></dt> </dl> </td><td> <p>The object does not support the specified service {{GUID}}.</p> </td></tr> </table><p>?</p> <dd> <p>Specifies the scope of the search. Currently this parameter is ignored. Use the value {{MF_SERVICE_LOOKUP_GLOBAL}}.</p> </dd> <dd> <p>Reserved, must be zero.</p> </dd> <dd> <p>Service {{GUID}} of the requested interface.</p> </dd> <dd> <p>Interface identifier of the requested interface.</p> </dd> <dd> <p>Array of interface references. If the method succeeds, each member of the array contains either a valid interface reference or <strong>{{NULL}}</strong>. The caller must release the interface references when the {{EVR}} calls <strong>{{IMFTopologyServiceLookupClient::ReleaseServicePointers}}</strong> (or earlier). If the method fails, every member of the array is <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Pointer to a value that specifies the size of the <em>ppvObjects</em> array. The value must be at least 1. In the current implementation, there is no reason to specify an array size larger than one element. The value is not changed on output.</p> </dd> <p> </p><p>Defines a normalized rectangle, which is used to specify sub-rectangles in a video rectangle. When a rectangle N is <em>normalized</em> relative to some other rectangle R, it means the following:</p><ul> <li> <p>The coordinate (0.0, 0.0) on N is mapped to the upper-left corner of R.</p> </li> <li> <p>The coordinate (1.0, 1.0) on N is mapped to the lower-right corner of R.</p> </li> </ul><p>Any coordinates of N that fall outside the range [0...1] are mapped to positions outside the rectangle R. A normalized rectangle can be used to specify a region within a video rectangle without knowing the resolution or even the aspect ratio of the video. For example, the upper-left quadrant is defined as {0.0, 0.0, 0.5, 0.5}.</p> <dd> <p>X-coordinate of the upper-left corner of the rectangle.</p> </dd> <dd> <p>Y-coordinate of the upper-left corner of the rectangle.</p> </dd> <dd> <p>X-coordinate of the lower-right corner of the rectangle.</p> </dd> <dd> <p>Y-coordinate of the lower-right corner of the rectangle.</p> </dd> <p>Maps a position on an input video stream to the corresponding position on an output video stream.</p><p>To obtain a reference to this interface, call <strong>{{IMFGetService::GetService}}</strong> on the renderer with the service {{GUID}} {{MR_VIDEO_RENDER_SERVICE}}.</p> <p>Maps output image coordinates to input image coordinates. This method provides the reverse transformation for components that map coordinates on the input image to different coordinates on the output image. </p> <p>In the following diagram, R(dest) is the destination rectangle for the video. You can obtain this rectangle by calling <strong>{{IMFVideoDisplayControl::GetVideoPosition}}</strong>. The rectangle {{R1}} is a substream within the video. The point P has pixel coordinates (x,y) relative to R(dest).</p><p></p><p>The position of P relative to R(dest) in <em>normalized</em> coordinates is calculated as follows:</p><code>float xn = float(x + 0.5) / widthDest; float xy = float(y + 0.5) / heightDest; </code><p>where <em>widthDest</em> and <em>heightDest</em> are the width and height of R(dest) in pixels.</p><p>To calculate the position of P relative to {{R1}}, call <strong>MapOutputCoordinateToInputStream</strong> as follows:</p><code>float x1 = 0, y1 = 0; hr = pMap-&gt;MapOutputCoordinateToInputStream(xn, yn, 0, dwInputStreamIndex, &amp;x1, &amp;y1);</code><p>The values returned in <em>x1</em> and <em>y1</em> are normalized to the range [0...1]. To convert back to pixel coordinates, scale these values by the size of {{R1:}}</p><code>int scaledx = int(floor(x1 * widthR1)); int scaledy = int(floor(xy * heightR1));</code><p>Note that <em>x1</em> and <em>y1</em> might fall outside the range [0...1] if P lies outside of {{R1}}.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p> The video renderer has been shut down. </p> </td></tr> </table><p>?</p> <dd> <p> X-coordinate of the output image, normalized to the range [0...1]. </p> </dd> <dd> <p> Y-coordinate of the output image, normalized to the range [0...1]. </p> </dd> <dd> <p> Output stream index for the coordinate mapping. </p> </dd> <dd> <p> Input stream index for the coordinate mapping. </p> </dd> <dd> <p> Receives the mapped x-coordinate of the input image, normalized to the range [0...1]. </p> </dd> <dd> <p> Receives the mapped y-coordinate of the input image, normalized to the range [0...1]. </p> </dd> <p>Returns the device identifier supported by a video renderer component. This interface is implemented by mixers and presenters for the enhanced video renderer ({{EVR}}). If you replace either of these components, the mixer and presenter must report the same device identifier.</p> <p> </p><p>Returns the identifier of the video device supported by an {{EVR}} mixer or presenter.</p> <p>If a mixer or presenter uses Direct3D 9, it must return the value {{IID_IDirect3DDevice9}} in <em>pDeviceID</em>. The {{EVR}}'s default mixer and presenter both return this value. If you write a custom mixer or presenter, it can return some other value. However, the mixer and presenter must use matching device identifiers.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The video renderer has been shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the device identifier. Generally, the value is {{IID_IDirect3DDevice9}}.</p> </dd> <p>Controls how the Enhanced Video Renderer ({{EVR}}) displays video.</p><p>The {{EVR}} presenter implements this interface. To get a reference to the interface, call <strong>{{IMFGetService::GetService}}</strong>. The service identifier is {{GUID}} {{MR_VIDEO_RENDER_SERVICE}}. Call <strong>GetService</strong> on any of the following objects:</p><ul> <li> The Media Session, if the topology contains an instance of the {{EVR}}. </li> <li>The {{EVR}} media sink. </li> <li>The DirectShow {{EVR}} filter. </li> <li>The {{EVR}} presenter. </li> </ul><p>If you implement a custom presenter for the {{EVR}}, the presenter can optionally expose this interface as a service.</p> <p> Gets the size and aspect ratio of the video, prior to any stretching by the video renderer. </p> <p>If no media types have been set on any video streams, the method succeeds but all parameters are set to zero.</p><p>You can set <em>pszVideo</em> or <em>pszARVideo</em> to <strong>{{NULL}}</strong>, but not both.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>At least one of the parameters must be non-<strong>{{NULL}}</strong>.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The video renderer has been shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the size of the native video rectangle. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Receives the aspect ratio of the video. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <p> Gets the range of sizes that the enhanced video renderer ({{EVR}}) can display without significantly degrading performance or image quality. </p> <p>You can set <em>pszMin</em> or <em>pszMax</em> to <strong>{{NULL}}</strong>, but not both.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>At least one parameter must be non-<strong>{{NULL}}</strong>.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The video renderer has been shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the minimum ideal size. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Receives the maximum ideal size. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <p> </p><p>Sets the source and destination rectangles for the video.</p> <p>The source rectangle defines which portion of the video is displayed. It is specified in <em>normalized</em> coordinates. For more information, see <strong>{{MFVideoNormalizedRect}}</strong> structure. To display the entire video image, set the source rectangle to {0, 0, 1, 1}. The default source rectangle is {0, 0, 1, 1}.</p><p>The destination rectangle defines a rectangle within the clipping window where the video appears. It is specified in pixels, relative to the client area of the window. To fill the entire window, set the destination rectangle to {0, 0, <em>width</em>, <em>height</em>}, where <em>width</em> and <em>height</em> are dimensions of the window client area. The default destination rectangle is {0, 0, 0, 0}.</p><p>To update just one of these rectangles, set the other parameter to <strong>{{NULL}}</strong>. You can set <em>pnrcSource</em> or <em>prcDest</em> to <strong>{{NULL}}</strong>, but not both.</p><p>Before setting the destination rectangle (<em>prcDest</em>), you must set the video window by calling <strong>{{IMFVideoDisplayControl::SetVideoWindow}}</strong>. (For the Media Foundation version of the {{EVR}}, you can also provide the video window in the <strong>{{MFCreateVideoRendererActivate}}</strong> function.) If no video window was provided, <strong>SetVideoPosition</strong> returns {{E_POINTER}}.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>At least one parameter must be non-<strong>{{NULL}}</strong>.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The video renderer has been shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to an <strong>{{MFVideoNormalizedRect}}</strong> structure that specifies the source rectangle. This parameter can be <strong>{{NULL}}</strong>. If this parameter is <strong>{{NULL}}</strong>, the source rectangle does not change.</p> </dd> <dd> <p>Specifies the destination rectangle. This parameter can be <strong>{{NULL}}</strong>. If this parameter is <strong>{{NULL}}</strong>, the destination rectangle does not change.</p> </dd> <p> Gets the source and destination rectangles for the video. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>One or more required parameters are <strong>{{NULL}}</strong>.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The video renderer has been shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to an <strong>{{MFVideoNormalizedRect}}</strong> structure that receives the source rectangle.</p> </dd> <dd> <p>Receives the current destination rectangle.</p> </dd> <p> </p><p>Specifies how the enhanced video renderer ({{EVR}}) handles the aspect ratio of the source video.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid flags.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The video renderer has been shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Bitwise <strong>{{OR}}</strong> of one or more flags from the <strong>{{MFVideoAspectRatioMode}}</strong> enumeration.</p> </dd> <p> Queries how the enhanced video renderer ({{EVR}}) handles the aspect ratio of the source video. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The video renderer has been shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a bitwise <strong>{{OR}}</strong> of one or more flags from the <strong>{{MFVideoAspectRatioMode}}</strong> enumeration.</p> </dd> <p> </p><p>Sets the source and destination rectangles for the video.</p> <p>The source rectangle defines which portion of the video is displayed. It is specified in <em>normalized</em> coordinates. For more information, see <strong>{{MFVideoNormalizedRect}}</strong> structure. To display the entire video image, set the source rectangle to {0, 0, 1, 1}. The default source rectangle is {0, 0, 1, 1}.</p><p>The destination rectangle defines a rectangle within the clipping window where the video appears. It is specified in pixels, relative to the client area of the window. To fill the entire window, set the destination rectangle to {0, 0, <em>width</em>, <em>height</em>}, where <em>width</em> and <em>height</em> are dimensions of the window client area. The default destination rectangle is {0, 0, 0, 0}.</p><p>To update just one of these rectangles, set the other parameter to <strong>{{NULL}}</strong>. You can set <em>pnrcSource</em> or <em>prcDest</em> to <strong>{{NULL}}</strong>, but not both.</p><p>Before setting the destination rectangle (<em>prcDest</em>), you must set the video window by calling <strong>{{IMFVideoDisplayControl::SetVideoWindow}}</strong>. (For the Media Foundation version of the {{EVR}}, you can also provide the video window in the <strong>{{MFCreateVideoRendererActivate}}</strong> function.) If no video window was provided, <strong>SetVideoPosition</strong> returns {{E_POINTER}}.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>At least one parameter must be non-<strong>{{NULL}}</strong>.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The video renderer has been shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to an <strong>{{MFVideoNormalizedRect}}</strong> structure that specifies the source rectangle. This parameter can be <strong>{{NULL}}</strong>. If this parameter is <strong>{{NULL}}</strong>, the source rectangle does not change.</p> </dd> <dd> <p>Specifies the destination rectangle. This parameter can be <strong>{{NULL}}</strong>. If this parameter is <strong>{{NULL}}</strong>, the destination rectangle does not change.</p> </dd> <p> Gets the clipping window for the video. </p> <p>There is no default clipping window. The application must set the clipping window.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The video renderer has been shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a handle to the window where the enhanced video renderer ({{EVR}}) will draw the video.</p> </dd> <p> </p><p>Repaints the current video frame. Call this method whenever the application receives a {{WM_PAINT}} message.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The {{EVR}} cannot repaint the frame at this time. This error can occur while the {{EVR}} is switching between full-screen and windowed mode. The caller can safely ignore this error.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The video renderer has been shut down.</p> </td></tr> </table><p>?</p> <p> Gets a copy of the current image being displayed by the video renderer. </p> <p>This method can be called at any time. However, calling the method too frequently degrades the video playback performance.</p><p>This method retrieves a copy of the final composited image, which includes any substreams, alpha-blended bitmap, aspect ratio correction, background color, and so forth.</p><p>In windowed mode, the bitmap is the size of the destination rectangle specified in <strong>{{IMFVideoDisplayControl::SetVideoPosition}}</strong>. In full-screen mode, the bitmap is the size of the display.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_LICENSE_INCORRECT_RIGHTS}}</strong></dt> </dl> </td><td> <p>The content is protected and the license does not permit capturing the image.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The video renderer has been shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to a <strong>{{BITMAPINFOHEADER}}</strong> structure that receives a description of the bitmap. Set the <strong>biSize</strong> member of the structure to <code>sizeof({{BITMAPINFOHEADER}})</code> before calling the method.</p> </dd> <dd> <p>Receives a reference to a buffer that contains a packed Windows device-independent bitmap ({{DIB}}). The caller must free the memory for the bitmap by calling <strong>CoTaskMemFree</strong>.</p> </dd> <dd> <p>Receives the size of the buffer returned in <em>pDib</em>, in bytes.</p> </dd> <dd> <p>Receives the time stamp of the captured image.</p> </dd> <p> </p><p>Sets the border color for the video.</p> <p>By default, if the video window straddles two monitors, the enhanced video renderer ({{EVR}}) clips the video to one monitor and draws the border color on the remaining portion of the window. (To change the clipping behavior, call <strong>{{IMFVideoDisplayControl::SetRenderingPrefs}}</strong>.)</p><p>The border color is not used for letterboxing. To change the letterbox color, call <strong>{{IMFVideoProcessor::SetBackgroundColor}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The video renderer has been shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Specifies the border color as a <strong>{{COLORREF}}</strong> value.</p> </dd> <p> Gets the border color for the video. </p> <p>The border color is used for areas where the enhanced video renderer ({{EVR}}) does not draw any video.</p><p>The border color is not used for letterboxing. To get the letterbox color, call <strong>{{IMFVideoProcessor::GetBackgroundColor}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The video renderer has been shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the border color, as a <strong>{{COLORREF}}</strong> value.</p> </dd> <p> </p><p>Sets various preferences related to video rendering.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid flags.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The video renderer has been shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MFVideoRenderPrefs}}</strong> enumeration.</p> </dd> <p> Gets various video rendering settings. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The video renderer has been shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MFVideoRenderPrefs}}</strong> enumeration.</p> </dd> <p>[This {{API}} is not supported and may be altered or unavailable in the future. ]</p><p> Sets or unsets full-screen rendering mode.</p><p>To implement full-screen playback, an application should simply resize the video window to cover the entire area of the monitor. Also set the window to be a topmost window, so that the application receives all mouse-click messages. For more information about topmost windows, see the documentation for the <strong>SetWindowPos</strong> function.</p> <p> The default {{EVR}} presenter implements full-screen mode using Direct3D exclusive mode. </p><p> If you use this method to switch to full-screen mode, set the application window to be a topmost window and resize the window to cover the entire monitor. This ensures that the application window receives all mouse-click messages. Also set the keyboard focus to the application window. When you switch out of full-screen mode, restore the window's original size and position. </p><p> By default, the cursor is still visible in full-screen mode. To hide the cursor, call <strong>ShowCursor</strong>. </p><p>The transition to and from full-screen mode occurs asynchronously. To get the current mode, call <strong>{{IMFVideoDisplayControl::GetFullscreen}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p> The video renderer has been shut down. </p> </td></tr> </table><p>?</p> <p> Queries whether the enhanced video renderer ({{EVR}}) is currently in full-screen mode. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The {{EVR}} is currently switching between full-screen and windowed mode.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a Boolean value. If <strong>{{TRUE}}</strong>, the {{EVR}} is in full-screen mode. If <strong>{{FALSE}}</strong>, the {{EVR}} will display the video inside the application-provided clipping window.</p> </dd> <p>Represents a video presenter. A <em>video presenter</em> is an object that receives video frames, typically from a video mixer, and presents them in some way, typically by rendering them to the display. The enhanced video renderer ({{EVR}}) provides a default video presenter, and applications can implement custom presenters.</p><p>The video presenter receives video frames as soon as they are available from upstream. The video presenter is responsible for presenting frames at the correct time and for synchronizing with the presentation clock.</p> <p> </p><p>Sends a message to the video presenter. Messages are used to signal the presenter that it must perform some action, or that some event has occurred.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The video renderer has been shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Specifies the message as a member of the <strong>{{MFVP_MESSAGE_TYPE}}</strong> enumeration.</p> </dd> <dd> <p>Message parameter. The meaning of this parameter depends on the message type.</p> </dd> <p> </p><p>Retrieves the presenter's media type.</p> <p>This method returns the media type that the presenter sets for the mixer's output type. It describes the format of the composited image.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_INITIALIZED}}</strong></dt> </dl> </td><td> <p>The media type is not set.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The video renderer has been shut down</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFVideoMediaType}}</strong> interface. The caller must release the interface.</p> </dd> <p>Enables the presenter for the enhanced video renderer ({{EVR}}) to request a specific frame from the video mixer.</p><p>The sample objects created by the <strong>{{MFCreateVideoSampleFromSurface}}</strong> function implement this interface. To retrieve a reference to this interface, call <strong>QueryInterface</strong> on the sample.</p> <p> </p><p>Called by the mixer to get the time and duration of the sample requested by the presenter.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_AVAILABLE}}</strong></dt> </dl> </td><td> <p>No time stamp was set for this sample. See <strong>{{IMFDesiredSample::Clear}}</strong>.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the desired sample time that should be mixed.</p> </dd> <dd> <p>Receives the sample duration that should be mixed.</p> </dd> <p> </p><p>Called by the presenter to set the time and duration of the sample that it requests from the mixer.</p> <p>This value should be set prior to passing the buffer to the mixer for a Mix operation. The mixer sets the actual start and duration times on the sample before sending it back.</p> <p>This method does not return a value.</p> <dd> <p>The time of the requested sample.</p> </dd> <dd> <p>The duration of the requested sample.</p> </dd> <p> </p><p>Clears the time stamps previously set by a call to <strong>{{IMFDesiredSample::SetDesiredSampleTimeAndDuration}}</strong>.</p> <p>After this method is called, the <strong>{{IMFDesiredSample::GetDesiredSampleTimeAndDuration}}</strong> method returns {{MF_E_NOT_AVAILABLE}}.</p><p>This method also clears the time stamp and duration and removes all attributes from the sample.</p> <p>This method does not return a value.</p> <p>Controls how the Enhanced Video Renderer ({{EVR}}) mixes video substreams. Applications can use this interface to control video mixing during playback.</p><p>The {{EVR}} mixer implements this interface. To get a reference to the interface, call <strong>{{IMFGetService::GetService}}</strong>. The service identifier {{GUID}} is {{MR_VIDEO_MIXER_SERVICE}}. Call <strong>GetService</strong> on any of the following objects:</p><ul> <li> The Media Session, if the topology contains an instance of the {{EVR}}. </li> <li> The {{EVR}} media sink. </li> <li> The DirectShow {{EVR}} filter. </li> <li> The {{EVR}} mixer. </li> </ul><p>If you implement a custom mixer for the {{EVR}}, the mixer can optionally expose this interface as a service.</p> <p> </p><p>Sets the z-order of a video stream.</p> <p>The {{EVR}} draws the video streams in the order of their z-order values, starting with zero. The reference stream must be first in the z-order, and the remaining streams can be in any order.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>The value of <em>dwZ</em> is larger than the maximum z-order value.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>Invalid z-order for this stream. For the reference stream, <em>dwZ</em> must be zero. For all other streams, <em>dwZ</em> must be greater than zero.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>Invalid stream identifier.</p> </td></tr> </table><p>?</p> <dd> <p>Identifier of the stream. For the {{EVR}} media sink, the stream identifier is defined when the <strong>{{IMFMediaSink::AddStreamSink}}</strong> method is called. For the DirectShow {{EVR}} filter, the stream identifier corresponds to the pin index. The reference stream is always stream 0.</p> </dd> <dd> <p>Z-order value. The z-order of the reference stream must be zero. The maximum z-order value is the number of streams minus one.</p> </dd> <p> </p><p>Retrieves the z-order of a video stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>Invalid stream identifier.</p> </td></tr> </table><p>?</p> <dd> <p>Identifier of the stream. For the {{EVR}} media sink, the stream identifier is defined when the <strong>{{IMFMediaSink::AddStreamSink}}</strong> method is called. For the DirectShow {{EVR}} filter, the stream identifier corresponds to the pin index. The reference stream is always stream 0.</p> </dd> <dd> <p>Receives the z-order value.</p> </dd> <p> Sets the position of a video stream within the composition rectangle. </p> <p> The mixer draws each video stream inside a bounding rectangle that is specified relative to the final video image. This bounding rectangle is given in <em>normalized</em> coordinates. For more information, see <strong>{{MFVideoNormalizedRect}}</strong> structure. </p><p> The coordinates of the bounding rectangle must fall within the range [0.0, 1.0]. Also, the X and Y coordinates of the upper-left corner cannot exceed the X and Y coordinates of the lower-right corner. In other words, the bounding rectangle must fit entirely within the composition rectangle and cannot be flipped vertically or horizontally. </p><p>The following diagram shows how the {{EVR}} mixes substreams.</p><p>The output rectangle for the stream is specified by calling <strong>SetStreamOutputRect</strong>. The source rectangle is specified by calling <strong>{{IMFVideoDisplayControl::SetVideoPosition}}</strong>. The mixer applies the output rectangle first, when it mixes the streams into a single bounding rectangle. This bounding rectangle is called <em>composition space</em>. Then the presenter applies the source rectangle to the composited image.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p> The coordinates of the bounding rectangle given in <em>pnrcOutput</em> are not valid. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> Invalid stream identifier. </p> </td></tr> </table><p>?</p> <dd> <p>Identifier of the stream. For the {{EVR}} media sink, the stream identifier is defined when the <strong>{{IMFMediaSink::AddStreamSink}}</strong> method is called. For the DirectShow {{EVR}} filter, the stream identifier corresponds to the pin index. The reference stream is always stream 0.</p> </dd> <dd> <p>Pointer to an <strong>{{MFVideoNormalizedRect}}</strong> structure that defines the bounding rectangle for the video stream.</p> </dd> <p> </p><p>Retrieves the position of a video stream within the composition rectangle.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>Invalid stream identifier.</p> </td></tr> </table><p>?</p> <dd> <p>The identifier of the stream. For the {{EVR}} media sink, the stream identifier is defined when the <strong>{{IMFMediaSink::AddStreamSink}}</strong> method is called. For the DirectShow {{EVR}} filter, the stream identifier corresponds to the pin index. The reference stream is always stream 0.</p> </dd> <dd> <p>Pointer to an <strong>{{MFVideoNormalizedRect}}</strong> structure that receives the bounding rectangle, in normalized coordinates.</p> </dd> <p>Controls preferences for video deinterlacing.</p><p> The default video mixer for the Enhanced Video Renderer ({{EVR}}) implements this interface.</p><p>To get a reference to the interface, call <strong>{{IMFGetService::GetService}}</strong> on any of the following objects, using the <strong>{{MR_VIDEO_MIXER_SERVICE}}</strong> service identifier:</p><ul> <li>The Media Session, if the topology contains an instance of the {{EVR}}.</li> <li>The {{EVR}} media sink.</li> <li>The DirectShow {{EVR}} filter.</li> <li>The {{EVR}} mixer.</li> </ul> <p>Sets the preferences for video deinterlacing.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MFVideoMixPrefs}}</strong> enumeration. </p> </dd> <p>Gets the current preferences for video deinterlacing.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MFVideoMixPrefs}}</strong> enumeration.</p> </dd> <p>Sets a new mixer or presenter for the Enhanced Video Renderer ({{EVR}}).</p><p>Both the {{EVR}} media sink and the DirectShow {{EVR}} filter implement this interface. To get a reference to the interface, call <strong>QueryInterface</strong> on the media sink or the filter. Do not use <strong>{{IMFGetService}}</strong> to get a reference to this interface.</p> <p>The {{EVR}} activation object returned by the <strong>{{MFCreateVideoRendererActivate}}</strong> function does not expose this interface. Instead, the activation object supports attributes that specify a custom mixer or presenter. For more information, see Enhanced Video Renderer Attributes.</p> <p> </p><p>Sets a new mixer or presenter for the enhanced video renderer ({{EVR}}).</p> <p>Call this method directly after creating the {{EVR}}, before you do any of the following:</p><ul> <li> <p>Call <strong>{{IMFGetService::GetService}}</strong> on the {{EVR}}.</p> </li> <li> <p>Call <strong>{{IEVRFilterConfig::SetNumberOfStreams}}</strong> on the {{EVR}}.</p> </li> <li> <p>Connect any pins on the {{EVR}} filter, or set any media types on {{EVR}} media sink.</p> </li> </ul><p>The {{EVR}} filter returns {{VFW_E_WRONG_STATE}} if any of the filter's pins are connected. The {{EVR}} media sink returns {{MF_E_INVALIDREQUEST}} if a media type is set on any of the streams, or the presentation clock is running or paused.</p><p>The device identifiers for the mixer and the presenter must match. The <strong>{{IMFVideoDeviceID::GetDeviceID}}</strong> method returns the device identifier. If they do not match, the method returns {{E_INVALIDARG}}.</p><p>If the video renderer is in the protected media path ({{PMP}}), the mixer and presenter objects must be certified safe components and pass any trust authority verification that is being enforced. Otherwise, this method will fail.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Either the mixer or the presenter is invalid.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The mixer and presenter cannot be replaced in the current state. ({{EVR}} media sink.)</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The video renderer has been shut down.</p> </td></tr> <tr><td> <dl> <dt><strong>{{VFW_E_WRONG_STATE}}</strong></dt> </dl> </td><td> <p>One or more input pins are connected. (DirectShow {{EVR}} filter.)</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFTransform}}</strong> interface of the mixer to use. This parameter can be <strong>{{NULL}}</strong>. If this parameter is <strong>{{NULL}}</strong>, the {{EVR}} uses its default mixer.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFVideoPresenter}}</strong> interface of the presenter to use. This parameter can be <strong>{{NULL}}</strong>. If this parameter is <strong>{{NULL}}</strong>, the {{EVR}} uses its default presenter.</p> </dd> <p> </p><p>Retrieves the number of input pins on the {{EVR}} filter. The {{EVR}} filter always has at least one input pin, which corresponds to the reference stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of streams.</p> </dd> <p> </p><p>Sets the number of input pins on the {{EVR}} filter.</p> <p>After this method has been called, it cannot be called a second time on the same instance of the {{EVR}} filter. Also, the method fails if any input pins are connected.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid number of streams. The minimum is one, and the maximum is 16.</p> </td></tr> <tr><td> <dl> <dt><strong>{{VFW_E_WRONG_STATE}}</strong></dt> </dl> </td><td> <p>This method has already been called, or at least one pin is already connected.</p> </td></tr> </table><p>?</p> <dd> <p>Specifies the total number of input pins on the {{EVR}} filter. This value includes the input pin for the reference stream, which is created by default. For example, to mix one substream plus the reference stream, set this parameter to 2.</p> </dd> <p> </p><p>Retrieves the number of input pins on the {{EVR}} filter. The {{EVR}} filter always has at least one input pin, which corresponds to the reference stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of streams.</p> </dd> <p>Configures the DirectShow <strong>Enhanced Video Renderer</strong> ({{EVR}}) filter. To get a reference to this interface, call <strong>QueryInterface</strong> on the {{EVR}} filter.</p> <p>Sets the configuration parameters for the Microsoft DirectShow <strong>Enhanced Video Renderer Filter</strong> ({{EVR}}).</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> </table><p>?</p> <p>Gets the configuration parameters for the Microsoft DirectShow <strong>Enhanced Video Renderer Filter</strong> filter.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Enables a custom video mixer or video presenter to get interface references from the Enhanced Video Renderer ({{EVR}}). The mixer can also use this interface to get interface references from the presenter, and the presenter can use it to get interface references from the mixer.</p><p>To use this interface, implement the <strong>{{IMFTopologyServiceLookupClient}}</strong> interface on your custom mixer or presenter. The {{EVR}} calls <strong>{{IMFTopologyServiceLookupClient::InitServicePointers}}</strong> with a reference to the {{EVR}}'s <strong>{{IMFTopologyServiceLookup}}</strong> interface.</p> <p> </p><p>Retrieves an interface from the enhanced video renderer ({{EVR}}), or from the video mixer or video presenter.</p> <p>This method can be called only from inside the <strong>{{IMFTopologyServiceLookupClient::InitServicePointers}}</strong> method. At any other time, the method returns {{MF_E_NOTACCEPTING}}.</p><p>The presenter can use this method to query the {{EVR}} and the mixer. The mixer can use it to query the {{EVR}} and the presenter. Which objects are queried depends on the caller and the service {{GUID}}, as shown in the following table.</p><table> <tr><th>Caller</th><th>Service {{GUID}}</th><th>Objects queried</th></tr> <tr><td>Presenter</td><td>{{MR_VIDEO_RENDER_SERVICE}}</td><td>{{EVR}}</td></tr> <tr><td>Presenter</td><td>{{MR_VIDEO_MIXER_SERVICE}}</td><td>Mixer</td></tr> <tr><td>Mixer</td><td>{{MR_VIDEO_RENDER_SERVICE}}</td><td>Presenter and {{EVR}}</td></tr> </table><p>?</p><p>The following interfaces are available from the {{EVR:}}</p><ul> <li> <p><strong>{{IMediaEventSink}}</strong>. This interface is documented in the DirectShow {{SDK}} documentation.</p> </li> <li> <p> <strong>{{IMFClock}}</strong> interface. This interface is available if the {{EVR}} has access to a clock (reference clock in DirectShow or presentation clock in Media Foundation). This interface might not be available. Presenter and mixers must be able to process data without a clock. If the <strong>{{IMFClock}}</strong> interface is available, you can also get these related interfaces:</p> <ul> <li> <p> <strong>{{IMFTimer}}</strong> </p> </li> <li> <p> <strong>{{IMFPresentationClock}}</strong> (Media Foundation {{EVR}} only)</p> </li> </ul> </li> </ul><p>The following interfaces are available from the mixer:</p><ul> <li> <p> <strong>{{IMFTransform}}</strong> </p> </li> <li> <p> <strong>{{IMFVideoDeviceID}}</strong> </p> </li> </ul> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOINTERFACE}}</strong></dt> </dl> </td><td> <p>The requested interface is not available.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOTACCEPTING}}</strong></dt> </dl> </td><td> <p>The method was not called from inside the <strong>{{IMFTopologyServiceLookupClient::InitServicePointers}}</strong> method. See Remarks.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_SERVICE}}</strong></dt> </dl> </td><td> <p>The object does not support the specified service {{GUID}}.</p> </td></tr> </table><p>?</p> <dd> <p>Specifies the scope of the search. Currently this parameter is ignored. Use the value {{MF_SERVICE_LOOKUP_GLOBAL}}.</p> </dd> <dd> <p>Reserved, must be zero.</p> </dd> <dd> <p>Service {{GUID}} of the requested interface.</p> </dd> <dd> <p>Interface identifier of the requested interface.</p> </dd> <dd> <p>Array of interface references. If the method succeeds, each member of the array contains either a valid interface reference or <strong>{{NULL}}</strong>. The caller must release the interface references when the {{EVR}} calls <strong>{{IMFTopologyServiceLookupClient::ReleaseServicePointers}}</strong> (or earlier). If the method fails, every member of the array is <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Pointer to a value that specifies the size of the <em>ppvObjects</em> array. The value must be at least 1. In the current implementation, there is no reason to specify an array size larger than one element. The value is not changed on output.</p> </dd> <p>Initializes a video mixer or presenter. This interface is implemented by mixers and presenters, and enables them to query the enhanced video renderer ({{EVR}}) for interface references.</p> <p>When the {{EVR}} loads the video mixer and the video presenter, the {{EVR}} queries the object for this interface and calls <strong>InitServicePointers</strong>. Inside the <strong>InitServicePointers</strong> method, the object can query the {{EVR}} for interface references.</p> <p> </p><p>Signals the mixer or presenter to query the enhanced video renderer ({{EVR}}) for interface references.</p> <p>The <strong>{{IMFTopologyServiceLookup}}</strong> reference is guaranteed to be valid only during the call to <strong>InitServicePointers</strong>. The mixer or presenter should not store a reference to this interface after the method returns.</p><p>When the {{EVR}} calls <strong>{{IMFTopologyServiceLookupClient::ReleaseServicePointers}}</strong>, the mixer or presenter should release any references it obtained from the {{EVR}}.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFTopologyServiceLookup}}</strong> interface. To query the {{EVR}} for an interface, call <strong>{{IMFTopologyServiceLookup::LookupService}}</strong>.</p> </dd> <p> </p><p>Signals the object to release the interface references obtained from the enhanced video renderer ({{EVR}}).</p> <p>After this method is called, any interface references obtained during the previous call to <strong>{{IMFTopologyServiceLookupClient::InitServicePointers}}</strong> are no longer valid. The object must release them.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> Limits the effective video resolution. </p> <p>This method limits the effective resolution of the video image. The actual resolution on the target device might be higher, due to stretching the image.</p><p>The {{EVR}} might call this method at any time if the <strong>{{IEVRTrustedVideoPlugin::CanConstrict}}</strong> method returns <strong>{{TRUE}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Maximum number of source pixels that may appear in the final video image, in thousands of pixels. If the value is zero, the video is disabled. If the value is {{MAXDWORD}} (0xFFFFFFFF), video constriction is removed and the video may be rendered at full resolution.</p> </dd> <p> Queries whether the plug-in has any transient vulnerabilities at this time. </p> <p>This method provides a way for the plug-in to report temporary conditions that would cause the input trust authority ({{ITA}}) to distrust the plug-in. For example, if an {{EVR}} presenter is in windowed mode, it is vulnerable to {{GDI}} screen captures.</p><p>To disable screen capture in Direct3D, the plug-in must do the following:</p><ul> <li> <p>Create the Direct3D device in full-screen exlusive mode.</p> </li> <li> <p>Specify the {{D3DCREATE_DISABLE_PRINTSCREEN}} flag when you create the device. For more information, see <strong>{{IDirect3D9::CreateDevice}}</strong> in the DirectX documentation.</p> </li> </ul><p>In addition, the graphics adapter must support the Windows Vista Display Driver Model ({{WDDM}}) and the Direct3D extensions for Windows Vista (sometimes called {{D3D9Ex}} or {{D3D9L}}).</p><p>If these conditions are met, the presenter can return <strong>{{TRUE}}</strong> in the <em>pYes</em> parameter. Otherwise, it should return <strong>{{FALSE}}</strong>.</p><p>The {{EVR}} calls this method whenever the device changes. If the plug-in returns <strong>{{FALSE}}</strong>, the {{EVR}} treats this condition as if the plug-in had a new output connector of unknown type. The policy object can then allow or block playback, depending on the {{ITA}}'s policy.</p><p>This method should be used only to report transient conditions. A plug-in that is never in a trusted state should not implement the <strong>{{IEVRTrustedVideoPlugin}}</strong> interface at all.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a Boolean value. If <strong>{{TRUE}}</strong>, the plug-in has no transient vulnerabilities at the moment and can receive protected content. If <strong>{{FALSE}}</strong>, the plug-in has a transient vulnerability. If the method fails, the {{EVR}} treats the value as <strong>{{FALSE}}</strong> (untrusted).</p> </dd> <p> Queries whether the plug-in can limit the effective video resolution. </p> <p>Constriction is a protection mechanism that limits the effective resolution of the video frame to a specified maximum number of pixels.</p><p>Video constriction can be implemented by either the mixer or the presenter.</p><p>If the method returns <strong>{{TRUE}}</strong>, the {{EVR}} might call <strong>{{IEVRTrustedVideoPlugin::SetConstriction}}</strong> at any time.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a Boolean value. If <strong>{{TRUE}}</strong>, the plug-in can limit the effective video resolution. Otherwise, the plug-in cannot limit the video resolution. If the method fails, the {{EVR}} treats the value as <strong>{{FALSE}}</strong> (not supported).</p> </dd> <p> Limits the effective video resolution. </p> <p>This method limits the effective resolution of the video image. The actual resolution on the target device might be higher, due to stretching the image.</p><p>The {{EVR}} might call this method at any time if the <strong>{{IEVRTrustedVideoPlugin::CanConstrict}}</strong> method returns <strong>{{TRUE}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Maximum number of source pixels that may appear in the final video image, in thousands of pixels. If the value is zero, the video is disabled. If the value is {{MAXDWORD}} (0xFFFFFFFF), video constriction is removed and the video may be rendered at full resolution.</p> </dd> <p> Enables or disables the ability of the plug-in to export the video image. </p> <p>An {{EVR}} plug-in might expose a way for the application to get a copy of the video frames. For example, the standard {{EVR}} presenter implements <strong>{{IMFVideoDisplayControl::GetCurrentImage}}</strong>.</p><p>If the plug-in supports image exporting, this method enables or disables it. Before this method has been called for the first time, the {{EVR}} assumes that the mechanism is enabled.</p><p>If the plug-in does not support image exporting, this method should return {{S_OK}} and ignore the value of <em>bDisable</em>. If the method fails, the {{EVR}} treats it as a failure to enforce the policy, which will probably cause playback to stop.</p><p>While image exporting is disabled, any associated export method, such as <strong>GetCurrentImage</strong>, should return {{MF_E_LICENSE_INCORRECT_RIGHTS}}.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Boolean value. Specify <strong>{{TRUE}}</strong> to disable image exporting, or <strong>{{FALSE}}</strong> to enable it.</p> </dd> <p> </p><p>Creates the default video presenter for the enhanced video renderer ({{EVR}}).</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the owner of the object. If the object is aggregated, pass a reference to the aggregating object's <strong>{{IUnknown}}</strong> interface. Otherwise, set this parameter to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Interface identifier ({{IID}}) of the video device interface that will be used for processing the video. Currently the only supported value is {{IID_IDirect3DDevice9}}.</p> </dd> <dd> <p>{{IID}} of the requested interface on the video presenter. The video presenter exposes the <strong>{{IMFVideoPresenter}}</strong> interface.</p> </dd> <dd> <p>Receives a reference to the requested interface on the video presenter. The caller must release the interface.</p> </dd> <p> </p><p>Creates the default video mixer for the enhanced video renderer ({{EVR}}).</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the owner of this object. If the object is aggregated, pass a reference to the aggregating object's <strong>{{IUnknown}}</strong> interface. Otherwise, set this parameter to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Interface identifier ({{IID}}) of the video device interface that will be used for processing the video. Currently the only supported value is {{IID_IDirect3DDevice9}}.</p> </dd> <dd> <p>{{IID}} of the requested interface on the video mixer. The video mixer exposes the <strong>{{IMFTransform}}</strong> interface.</p> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface.</p> </dd> <p> </p><p>Creates the default video mixer and video presenter for the enhanced video renderer ({{EVR}}).</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the owner of the video mixer. If the mixer is aggregated, pass a reference to the aggregating object's <strong>{{IUnknown}}</strong> interface. Otherwise, set this parameter to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Pointer to the owner of the video presenter. If the presenter is aggregated, pass a reference to the aggregating object's <strong>{{IUnknown}}</strong> interface. Otherwise, set this parameter to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Interface identifier ({{IID}}) of the requested interface on the video mixer. The video mixer exposes the <strong>{{IMFTransform}}</strong> interface.</p> </dd> <dd> <p>Receives a reference to the requested interface on the video mixer. The caller must release the interface.</p> </dd> <dd> <p>{{IID}} of the requested interface on the video presenter. The video presenter exposes the <strong>{{IMFVideoPresenter}}</strong> interface.</p> </dd> <dd> <p>Receives a reference to the requested interface on the video presenter. The caller must release the interface.</p> </dd> <p> </p><p>Creates an instance of the enhanced video renderer ({{EVR}}) media sink.</p> <p>This function creates the Media Foundation version of the {{EVR}}. To create the DirectShow {{EVR}} filter, call <strong>CoCreateInstance</strong> with the class identifier {{CLSID_EnhancedVideoRenderer}}.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Interface identifier ({{IID}}) of the requested interface on the {{EVR}}.</p> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface.</p> </dd> <p> Creates a media sample that manages a Direct3D surface. </p> <p>The media sample created by this function exposes the following interfaces in addition to <strong>{{IMFSample}}</strong>:</p><ul> <li> <strong>{{IMFDesiredSample}}</strong> </li> <li> <strong>{{IMFTrackedSample}}</strong> </li> </ul><p>If <em>pUnkSurface</em> is non-<strong>{{NULL}}</strong>, the sample contains a single media buffer, which holds a reference to the Direct3D surface. To get the Direct3D surface from the media buffer, call <strong>{{IMFGetService::GetService}}</strong> on the buffer, using the service identifier {{MR_BUFFER_SERVICE}}. The media buffer does not implement <strong>{{IMF2DBuffer}}</strong>, nor does it implement the <strong>{{IMFMediaBuffer::Lock}}</strong> and <strong>Unlock</strong> methods.</p><p>Alternatively, you can set <em>pUnkSurface</em> to <strong>{{NULL}}</strong>, and later add a DirectX surface buffer to the sample by calling <strong>{{IMFSample::AddBuffer}}</strong>. To create a DirectX surface buffer, call <strong>{{MFCreateDXSurfaceBuffer}}</strong>.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A reference to the <strong>{{IUnknown}}</strong> interface of the Direct3D surface. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <dd> <p> Receives a reference to the sample's <strong>{{IMFSample}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates an object that allocates video samples.</p> <p>If the function succeeds, it returns {{S_OK}}. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The identifier of the interface to retrieve. Specify one of the following values:</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong><strong>{{IID_IUnknown}}</strong></strong></dt> </dl> </td><td> <p>Retrieve an <strong>{{IUnknown}}</strong> reference.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{IID_IMFVideoSampleAllocator}}</strong></strong></dt> </dl> </td><td> <p>Retrieve an <strong>{{IMFVideoSampleAllocator}}</strong> reference.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{IID_IMFVideoSampleAllocatorCallback}}</strong></strong></dt> </dl> </td><td> <p>Retrieve an <strong>{{IMFVideoSampleAllocatorCallback}}</strong> reference.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface.</p> </dd> <p>Contains encoding statistics from the Digital Living Network Alliance ({{DLNA}}) media sink.</p><p>This structure is used with the {{MF_MP2DLNA_STATISTICS}} attribute.</p> <p>Initializes the Digital Living Network Alliance ({{DLNA}}) media sink. </p><p>The {{DLNA}} media sink exposes this interface. To get a reference to this interface, call <strong>CoCreateInstance</strong>. The {{CLSID}} is <strong>{{CLSID_MPEG2DLNASink}}</strong>.</p> <p>Initializes the Digital Living Network Alliance ({{DLNA}}) media sink.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_ALREADY_INITIALIZED}}</strong></strong></dt> </dl> </td><td> <p>The method was already called.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p>The media sink's <strong>{{IMFMediaSink::Shutdown}}</strong> method was called.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to a byte stream. The {{DLNA}} media sink writes data to this byte stream. The byte stream must be writable.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, the {{DLNA}} media sink accepts {{PAL}} video formats. Otherwise, it accepts {{NTSC}} video formats.</p> </dd> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Specifies options for the <strong>{{MFPCreateMediaPlayer}}</strong> function.</p> <p>The following <strong>typedef</strong> is defined for combining flags from this enumeration.</p><code>typedef {{UINT32}} {{MFP_CREATION_OPTIONS}};</code> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Specifies the current playback state.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Contains flags that describe a media item.</p> <p>The following <strong>typedef</strong> is defined for combining flags from this enumeration.</p><code>typedef {{UINT32}} {{MFP_MEDIAITEM_CHARACTERISTICS}};</code> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Contains flags for the <strong>{{MFP_ACQUIRE_USER_CREDENTIAL_EVENT}}</strong> structure.</p><p>Some of these flags, marked [out], convey information back to the {{MFPlay}} player object. The application should set or clear these flags as appropriate, before returning from the <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> callback method.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Defines event types for the <strong>{{IMFPMediaPlayerCallback}}</strong> interface.</p> <p>For each event type, the <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> callback receives a reference to a data structure. The first part of the data structure is always an <strong>{{MFP_EVENT_HEADER}}</strong> structure. The following table lists the data structure for each event type.</p><p>In your implementation of <strong>OnMediaPlayerEvent</strong>, you must cast the <em>pEventHeader</em> parameter to the correct structure type. A set of macros is defined for this purpose. These macros check the value of the event type and return <strong>{{NULL}}</strong> if there is a mismatch; otherwise they return a reference to the correct structure type.</p><table> <tr><td><strong>Event type</strong></td><td> <p><strong>Event structure</strong></p> <p><strong>Pointer cast macro</strong></p> </td></tr> <tr><td>{{MFP_EVENT_TYPE_PLAY}}</td><td> <p> <strong>{{MFP_PLAY_EVENT}}</strong> </p> <p> <strong>{{MFP_GET_PLAY_EVENT}}</strong> </p> </td></tr> <tr><td>{{MFP_EVENT_TYPE_PAUSE}}</td><td> <p> <strong>{{MFP_PAUSE_EVENT}}</strong> </p> <p> <strong>{{MFP_GET_PAUSE_EVENT}}</strong> </p> </td></tr> <tr><td>{{MFP_EVENT_TYPE_STOP}}</td><td> <p> <strong>{{MFP_STOP_EVENT}}</strong> </p> <p> <strong>{{MFP_GET_STOP_EVENT}}</strong> </p> </td></tr> <tr><td>{{MFP_EVENT_TYPE_POSITION_SET}}</td><td> <p> <strong>{{MFP_POSITION_SET_EVENT}}</strong> </p> <p> <strong>{{MFP_GET_POSITION_SET_EVENT}}</strong> </p> </td></tr> <tr><td>{{MFP_EVENT_TYPE_RATE_SET}}</td><td> <p> <strong>{{MFP_RATE_SET_EVENT}}</strong> </p> <p> <strong>{{MFP_GET_RATE_SET_EVENT}}</strong> </p> </td></tr> <tr><td>{{MFP_EVENT_TYPE_MEDIAITEM_CREATED}}</td><td> <p> <strong>{{MFP_MEDIAITEM_CREATED_EVENT}}</strong> </p> <p> <strong>{{MFP_GET_MEDIAITEM_CREATED_EVENT}}</strong> </p> </td></tr> <tr><td>{{MFP_EVENT_TYPE_MEDIAITEM_SET}}</td><td> <p> <strong>{{MFP_MEDIAITEM_SET_EVENT}}</strong> </p> <p> <strong>{{MFP_GET_MEDIAITEM_SET_EVENT}}</strong> </p> </td></tr> <tr><td>{{MFP_EVENT_TYPE_FRAME_STEP}}</td><td> <p> <strong>{{MFP_FRAME_STEP_EVENT}}</strong> </p> <p> <strong>{{MFP_GET_FRAME_STEP_EVENT}}</strong> </p> </td></tr> <tr><td>{{MFP_EVENT_TYPE_MEDIAITEM_CLEARED}}</td><td> <p> <strong>{{MFP_MEDIAITEM_CLEARED_EVENT}}</strong> </p> <p> <strong>{{MFP_GET_MEDIAITEM_CLEARED_EVENT}}</strong> </p> </td></tr> <tr><td>{{MFP_EVENT_TYPE_MF}}</td><td> <p> <strong>{{MFP_MF_EVENT}}</strong> </p> <p> <strong>{{MFP_GET_MF_EVENT}}</strong> </p> </td></tr> <tr><td>{{MFP_EVENT_TYPE_ERROR}}</td><td> <p> <strong>{{MFP_ERROR_EVENT}}</strong> </p> <p> <strong>{{MFP_GET_ERROR_EVENT}}</strong> </p> </td></tr> <tr><td>{{MFP_EVENT_TYPE_PLAYBACK_ENDED}}</td><td> <p> <strong>{{MFP_PLAYBACK_ENDED_EVENT}}</strong> </p> <p> <strong>{{MFP_GET_PLAYBACK_ENDED_EVENT}}</strong> </p> </td></tr> <tr><td>{{MFP_EVENT_TYPE_ACQUIRE_USER_CREDENTIAL}}</td><td> <p> <strong>{{MFP_ACQUIRE_USER_CREDENTIAL_EVENT}}</strong> </p> <p> <strong>{{MFP_GET_ACQUIRE_USER_CREDENTIAL_EVENT}}</strong> </p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Contains information that is common to every type of {{MFPlay}} event.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Event structure for the <strong>{{MFP_EVENT_TYPE_PLAY}}</strong> event. This event is sent when the <strong>{{IMFPMediaPlayer::Play}}</strong> method completes.</p> <p>To get a reference to this structure, cast the <em>pEventHeader</em> parameter of the <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> method. You can use the <strong>{{MFP_GET_PLAY_EVENT}}</strong> macro for this purpose.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Event structure for the <strong>{{MFP_EVENT_TYPE_PAUSE}}</strong> event. This event is sent when the <strong>{{IMFPMediaPlayer::Pause}}</strong> method completes.</p> <p>To get a reference to this structure, cast the <em>pEventHeader</em> parameter of the <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> method. You can use the <strong>{{MFP_GET_PAUSE_EVENT}}</strong> macro for this purpose.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Event structure for the <strong>{{MFP_EVENT_TYPE_STOP}}</strong> event. This event is sent when the <strong>{{IMFPMediaPlayer::Stop}}</strong> method completes.</p> <p>To get a reference to this structure, cast the <em>pEventHeader</em> parameter of the <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> method. You can use the <strong>{{MFP_GET_STOP_EVENT}}</strong> macro for this purpose.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Event structure for the <strong>{{MFP_EVENT_TYPE_POSITION_SET}}</strong> event. This event is sent when the <strong>{{IMFPMediaPlayer::SetPosition}}</strong> method completes.</p> <p>To get a reference to this structure, cast the <em>pEventHeader</em> parameter of the <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> method. You can use the <strong>{{MFP_GET_POSITION_SET_EVENT}}</strong> macro for this purpose.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Event structure for the {{MFP_EVENT_TYPE_RATE_SET}} event. This event is sent when the <strong>{{IMFPMediaPlayer::SetRate}}</strong> method completes.</p> <p>To get a reference to this structure, cast the <em>pEventHeader</em> parameter of the <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> method. You can use the <strong>{{MFP_GET_RATE_SET_EVENT}}</strong> macro for this purpose.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Event structure for the <strong>{{MFP_EVENT_TYPE_MEDIAITEM_CREATED}}</strong> event. This event is sent when the <strong>{{IMFPMediaPlayer::CreateMediaItemFromURL}}</strong> or <strong>{{IMFPMediaPlayer::CreateMediaItemFromObject}}</strong> method completes.</p> <p>To get a reference to this structure, cast the <em>pEventHeader</em> parameter of the <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> method. You can use the <strong>{{MFP_GET_MEDIAITEM_CREATED_EVENT}}</strong> macro for this purpose.</p><p>Media items are created asynchronously. If multiple items are created, the operations can complete in any order, not necessarily in the same order as the method calls. You can use the <strong>dwUserData</strong> member to identify the items, if you have simultaneous requests pending. </p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Event structure for the <strong>{{MFP_EVENT_TYPE_MEDIAITEM_SET}}</strong> event. This event is sent when the <strong>{{IMFPMediaPlayer::SetMediaItem}}</strong> method completes.</p> <p>To get a reference to this structure, cast the <em>pEventHeader</em> parameter of the <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> method. You can use the <strong>{{MFP_GET_MEDIAITEM_SET_EVENT}}</strong> macro for this purpose.</p><p>If one or more streams could not be connected to a media sink, the event property store contains the {{MFP_PKEY_StreamRenderingResults}} property. The value of the property is an array of <strong>{{HRESULT}}</strong> values, indicating which streams were connected successfully. The event property store can be accessed through the <strong>header.pPropertyStore</strong> member.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Event structure for the <strong>{{MFP_EVENT_TYPE_FRAME_STEP}}</strong> event. This event is sent when the <strong>{{IMFPMediaPlayer::FrameStep}}</strong> method completes.</p> <p>To get a reference to this structure, cast the <em>pEventHeader</em> parameter of the <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> method. You can use the <strong>{{MFP_GET_FRAME_STEP_EVENT}}</strong> macro for this purpose.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Event structure for the <strong>{{MFP_EVENT_TYPE_MEDIAITEM_CLEARED}}</strong> event. This event is sent when the <strong>{{IMFPMediaPlayer::ClearMediaItem}}</strong> method completes.</p> <p>To get a reference to this structure, cast the <em>pEventHeader</em> parameter of the <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> method. You can use the <strong>{{MFP_GET_MEDIAITEM_CLEARED_EVENT}}</strong> macro for this purpose.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Event structure for the <strong>{{MFP_EVENT_TYPE_MF}}</strong> event. The {{MFPlay}} player object uses this event to forward certain events from the Media Foundation pipeline to the application.</p> <p> To get a reference to this structure, cast the <em>pEventHeader</em> parameter of the <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> method. You can use the <strong>{{MFP_GET_MF_EVENT}}</strong> macro for this purpose.</p><p>If <strong>{{MFEventType}}</strong> is {{MEStreamSinkFormatChanged}}, the following property may be stored in the event property store, which can be accessed through the <strong>header.pPropertyStore</strong> member.</p><table> <tr><th>Property</th><th>Description</th></tr> <tr><td> {{MFP_PKEY_StreamIndex}} </td><td>The index of the stream whose format changed. </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Event structure for the <strong>{{MFP_EVENT_TYPE_ERROR}}</strong> event. This event is sent if an error occurs during playback. </p> <p>To get a reference to this structure, cast the <em>pEventHeader</em> parameter of the <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> method. You can use the <strong>{{MFP_GET_ERROR_EVENT}}</strong> macro for this purpose.</p><p>This event is not used to signal the failure of an asynchronous <strong>{{IMFPMediaPlayer}}</strong> method. If an asynchronous method fails, the error is reported in the standard event listed for that method. The <strong>{{MFP_EVENT_TYPE_ERROR}}</strong> event is used for errors that happen outside the context of an asynchronous method call.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Event structure for the <strong>{{MFP_EVENT_TYPE_PLAYBACK_ENDED}}</strong> event. This event is sent when the current media item finishes playing.</p> <p>To get a reference to this structure, cast the <em>pEventHeader</em> parameter of the <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> method. You can use the <strong>{{MFP_GET_PLAYBACK_ENDED_EVENT}}</strong> macro for this purpose.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Event structure for the <strong>{{MFP_EVENT_TYPE_ACQUIRE_USER_CREDENTIAL}}</strong> event. This event is sent if the application plays a media file from a server that requires authentication. The application can respond by providing the user credentials.</p> <p>To get a reference to this structure, cast the <em>pEventHeader</em> parameter of the <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> callback method. You can use the <strong>{{MFP_GET_ACQUIRE_USER_CREDENTIAL_EVENT}}</strong> macro for this purpose.</p><p>If the <strong>flags</strong> member contains the <strong>{{MFP_CREDENTIAL_PROMPT}}</strong> flag, the application should do the following:</p><ol> <li>Prompt the user to enter a user name and password.</li> <li>Store the user name in the credentials object by calling <strong>{{IMFNetCredential::SetUser}}</strong> on the <strong>pCredential</strong> reference.</li> <li>Store the password by calling <strong>{{IMFNetCredential::SetPassword}}</strong> on the <strong>pCredential</strong> reference.</li> </ol><p>To cancel authentication, set <strong>fProceedWithAuthentication</strong> equal to <strong>{{FALSE}}</strong>.</p><p>By default, {{MFPlay}} uses the network source's implementation of <strong>{{IMFNetCredentialManager}}</strong> to manage credentials. An application can provide its own implementation of this interface as follows:</p><ol> <li>Call <strong>QueryInterface</strong> on the <strong>{{IMFPMediaPlayer}}</strong> reference to get the <strong>{{IPropertyStore}}</strong> interface.</li> <li>Call <strong>{{IPropertyStore::SetValue}}</strong> to set the <strong>{{MFNETSOURCE_CREDENTIAL_MANAGER}}</strong> property.</li> </ol> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p> Contains methods to play media files.</p><p>The {{MFPlay}} player object exposes this interface. To get a reference to this interface, call <strong>{{MFPCreateMediaPlayer}}</strong>.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Starts playback.</p> <p>This method completes asynchronously. When the operation completes, the application's <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> callback method is invoked. The event type is <strong>{{MFP_EVENT_TYPE_PLAY}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Pauses playback. While playback is paused, the most recent video frame is displayed, and audio is silent.</p> <p>This method completes asynchronously. When the operation completes, the application's <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> callback method is invoked. The event type is <strong>{{MFP_EVENT_TYPE_PAUSE}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Stops playback.</p> <p>This method completes asynchronously. When the operation completes, the application's <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> callback method is invoked. The event type is <strong>{{MFP_EVENT_TYPE_STOP}}</strong>.</p><p>The current media item is still valid. After playback stops, the playback position resets to the beginning of the current media item. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Steps forward one video frame.</p> <p> This method completes asynchronously. When the operation completes, the application's <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> callback method is invoked. The event type is <strong>{{MFP_EVENT_TYPE_FRAME_STEP}}</strong>.</p><p>The player object does not support frame stepping during reverse playback (that is, while the playback rate is negative).</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>Cannot frame step. Reasons for this error code include:</p> <ul> <li>There is no media item queued for playback.</li> <li>The current media item does not contain video.</li> </ul> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_RATE}}</strong></dt> </dl> </td><td> <p>The media source does not support frame stepping, or the current playback rate is negative.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Sets the playback position.</p> <p>If you call this method while playback is stopped, the new position takes effect after playback resumes.</p><p>This method completes asynchronously. When the operation completes, the application's <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> callback method is invoked. The event type is <strong>{{MFP_EVENT_TYPE_POSITION_SET}}</strong>.</p><p>If playback was started before <strong>SetPosition</strong> is called, playback resumes at the new position. If playback was paused, the video is refreshed to display the current frame at the new position. </p><p>If you make two consecutive calls to <strong>SetPosition</strong> with <em>guidPositionType</em> equal to <strong>{{MFP_POSITIONTYPE_100NS}}</strong>, and the second call is made before the first call has completed, the second call supersedes the first. The status code for the superseded call is set to <strong>{{S_FALSE}}</strong> in the event data for that call. This behavior prevents excessive latency from repeated calls to <strong>SetPosition</strong>, as each call may force the media source to perform a relatively lengthy seek operation. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{E_INVALIDARG}}</strong></strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{HRESULT_FROM_WIN32}}( {{ERROR_SEEK}} )</strong></strong></dt> </dl> </td><td> <p>The value of <em>pvPositionValue</em> is not valid.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDREQUEST}}</strong></strong></dt> </dl> </td><td> <p>No media item has been queued.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the current playback position.</p> <p>The playback position is calculated relative to the start time of the media item, which can be specified by calling <strong>{{IMFPMediaItem::SetStartStopPosition}}</strong>. For example, if you set the start time to 20 seconds and the source duration is 60 seconds, the range of values returned by <strong>GetPosition</strong> is 0?40 seconds.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{E_INVALIDARG}}</strong></strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDREQUEST}}</strong></strong></dt> </dl> </td><td> <p>No media item has been queued.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the playback duration of the current media item.</p> <p>This method calculates the playback duration, taking into account the start and stop times for the media item. To set the start and stop times, call <strong>{{IMFPMediaItem::SetStartStopPosition}}</strong> on the media item. To get the actual duration of the underlying media file, regardless of start and stop times, call <strong>{{IMFPMediaItem::GetDuration}}</strong>.</p><p>For example, suppose that you load a 30-second audio file and set the start time equal to 2 seconds and stop time equal to 10 seconds. The <strong>{{IMFPMediaItem::GetDuration}}</strong> method will return 30 seconds, but the <strong>{{IMFPMediaPlayer::GetDuration}}</strong> method will return 8 seconds.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></dt> </dl> </td><td> <p>The media source does not have a duration. This error can occur with a live source, such as a video camera.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>There is no current media item.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Sets the playback rate.</p> <p>This method completes asynchronously. When the operation completes, the application's <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> callback method is invoked. The event type is <strong>{{MFP_EVENT_TYPE_RATE_SET}}</strong>.</p><p>The method sets the nearest supported rate, which will depend on the underlying media source. For example, if <em>flRate</em> is 50 and the source's maximum rate is 8? normal rate, the method will set the rate to 8.0. The actual rate is indicated in the event data for the <strong>{{MFP_EVENT_TYPE_RATE_SET}}</strong> event.</p><p>To find the range of supported rates, call <strong>{{IMFPMediaPlayer::GetSupportedRates}}</strong>.</p><p>This method does not support playback rates of zero, although Media Foundation defines a meaning for zero rates in some other contexts.</p><p>The new rate applies only to the current media item. Setting a new media item resets the playback rate to 1.0.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_OUT_OF_RANGE}}</strong></strong></dt> </dl> </td><td> <p>The <em>flRate</em> parameter is zero.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the current playback rate.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the range of supported playback rates.</p> <p>Playback rates are expressed as a ratio of the current rate to the normal rate. For example, 1.0 indicates normal playback speed, 0.5 indicates half speed, and 2.0 indicates twice speed. Positive values indicate forward playback, and negative values indicate reverse playback. </p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_UNSUPPORTED_RATE}}</strong></strong></dt> </dl> </td><td> <p>The current media item does not support playback in the requested direction (either forward or reverse).</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the current playback state of the {{MFPlay}} player object.</p> <p>This method can be called after the player object has been shut down.</p><p>Many of the <strong>{{IMFPMediaPlayer}}</strong> methods complete asynchronously. While an asynchronous operation is pending, the current state is not updated until the operation completes. When the operation completes, the application receives an event callback, and the new state is given in the <strong>{{MFP_EVENT_HEADER}}</strong> structure that is passed to the callback.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Creates a media item from a {{URL}}.</p> <p>This method does not queue the media item for playback. To queue the item for playback, call <strong>{{IMFPMediaPlayer::SetMediaItem}}</strong>.</p><p>The <strong>CreateMediaItemFromURL</strong> method can be called either synchronously or asynchronously: </p><ul> <li>If <em>fSync</em> is <strong>{{TRUE}}</strong>, the method completes synchronously. The <strong>{{IMFPMediaItem}}</strong> reference is returned in the <em>ppMediaItem</em> parameter. </li> <li>If <em>fSync</em> is <strong>{{FALSE}}</strong>, the method completes asynchronously. When the operation completes, the application's <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> callback method is invoked. The event type is <strong>{{MFP_EVENT_TYPE_MEDIAITEM_CREATED}}</strong>. The event data contains the <strong>{{IMFPMediaItem}}</strong> reference for the new media item.</li> </ul><p>The callback interface is set when you first call <strong>{{MFPCreateMediaPlayer}}</strong> to create the {{MFPlay}} player object. If you do not provide a callback interface, the <em>fSync</em> parameter must be <strong>{{TRUE}}</strong>. Otherwise, <strong>CreateMediaItemFromURL</strong> returns <strong>{{MF_E_INVALIDREQUEST}}</strong>. </p><p>If you make multiple asynchronous calls to <strong>CreateMediaItemFromURL</strong>, they are not guaranteed to complete in the same order. Use the <em>dwUserData</em> parameter to match created media items with pending requests.</p><p>Currently, this method returns <strong>{{MF_E_UNSUPPORTED_SCHEME}}</strong> if the {{URL}} specifies any of the following protocols: rtsp*, mms*, or mcast. If you want to use the Media Foundation network source with {{MFPlay}}, first use the Source Resolver to create the source, and then call <strong>{{IMFPMediaPlayer::CreateMediaItemFromObject}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{E_INVALIDARG}}</strong></strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDREQUEST}}</strong></strong></dt> </dl> </td><td> <p>Invalid request. This error can occur when <em>fSync</em> is <strong>{{FALSE}}</strong> and the application did not provide a callback interface. See Remarks.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_UNSUPPORTED_SCHEME}}</strong></strong></dt> </dl> </td><td> <p>Unsupported protocol. </p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Creates a media item from an object.</p> <p>The <em>pIUnknownObj</em> parameter must specify one of the following:</p><ul> <li>A reference to a media source. Media sources expose the <strong>{{IMFMediaSource}}</strong> interface. It is the caller's responsibility to call <strong>{{IMFMediaSource::Shutdown}}</strong> on the media source.</li> <li>A reference to a byte stream. Byte streams expose the <strong>{{IMFByteStream}}</strong> interface. Internally, the method calls the <strong>{{IMFSourceResolver::CreateObjectFromByteStream}}</strong> method to create a media source from the byte stream. Therefore, a byte-stream handler must be registered for the byte stream. For more information about byte-stream handlers, see Scheme Handlers and Byte-Stream Handlers. </li> </ul><p>This method does not queue the media item for playback. To queue the item for playback, call <strong>{{IMFPMediaPlayer::SetMediaItem}}</strong>.</p><p>The <strong>CreateMediaItemFromObject</strong> method can be called either synchronously or asynchronously: </p><ul> <li>If <em>fSync</em> is <strong>{{TRUE}}</strong>, the method completes synchronously. The <strong>{{IMFPMediaItem}}</strong> reference is returned in the <em>ppMediaItem</em> parameter. </li> <li>If <em>fSync</em> is <strong>{{FALSE}}</strong>, the method completes asynchronously. When the operation completes, the application's <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> callback method is invoked. The event type is <strong>{{MFP_EVENT_TYPE_MEDIAITEM_CREATED}}</strong>. The event data contains the <strong>{{IMFPMediaItem}}</strong> reference for the new media item.</li> </ul><p>The callback interface is set when you first call <strong>{{MFPCreateMediaPlayer}}</strong> to create the {{MFPlay}} player object. If you do not provide a callback interface, the <em>fSync</em> parameter must be <strong>{{TRUE}}</strong>. Otherwise, <strong>CreateMediaItemFromObject</strong> returns <strong>{{MF_E_INVALIDREQUEST}}</strong>. </p><p>If you make multiple asynchronous calls to <strong>CreateMediaItemFromObject</strong>, they are not guaranteed to complete in the same order. Use the <em>dwUserData</em> parameter to match created media items with pending requests.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{E_INVALIDARG}}</strong></strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDREQUEST}}</strong></strong></dt> </dl> </td><td> <p>Invalid request. This error can occur when <em>fSync</em> is <strong>{{FALSE}}</strong> and the application did not provide a callback interface. See Remarks.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Queues a media item for playback.</p> <p>This method completes asynchronously. When the operation completes, the application's <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> callback method is invoked. The event type is <strong>{{MFP_EVENT_TYPE_MEDIAITEM_SET}}</strong>.</p><p>To create a media item, call <strong>{{IMFPMediaPlayer::CreateMediaItemFromObject}}</strong> or <strong>{{IMFPMediaPlayer::CreateMediaItemFromURL}}</strong>. A media item must be used with the same {{MFPlay}} player object that created that item. If the media item was created by a different instance of the player object, <strong>SetMediaItem</strong> returns <strong>{{E_INVALIDARG}}</strong>. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{E_INVALIDARG}}</strong></strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_DRM_UNSUPPORTED}}</strong></strong></dt> </dl> </td><td> <p>The media item contains protected content. {{MFPlay}} currently does not support protected content.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_NO_AUDIO_PLAYBACK_DEVICE}}</strong></strong></dt> </dl> </td><td> <p>No audio playback device was found. This error can occur if the media source contains audio, but no audio playback devices are available on the system.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Clears the current media item.</p><strong>Note</strong>??This method is currently not implemented.? <p>This method stops playback and releases the player object's references to the current media item.</p><p>This method completes asynchronously. When the operation completes, the application's <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong> callback method is invoked. The event type is <strong>{{MFP_EVENT_TYPE_MEDIAITEM_CLEARED}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets a reference to the current media item.</p> <p>The <strong>{{IMFPMediaPlayer::SetMediaItem}}</strong> method is asynchronous. Therefore, while <strong>SetMediaItem</strong> is pending, <strong>GetMediaItem</strong> will not return the media item that was just set. Instead, the application should implement <strong>{{IMFPMediaPlayerCallback}}</strong> interface and handle the <strong>{{MFP_EVENT_TYPE_MEDIAITEM_SET}}</strong> event. For more information, see Receiving Events From the Player.</p><p>The previous remark also applies to setting the media item in the <strong>{{MFPCreateMediaPlayer}}</strong> function.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{E_FAIL}}</strong></strong></dt> </dl> </td><td> <p>There is no current media item.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_NOT_FOUND}}</strong></strong></dt> </dl> </td><td> <p>There is no current media item.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the current audio volume.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Sets the audio volume.</p> <p>If you call this method before playback starts, the setting is applied after playback starts.</p><p>This method does not change the master volume level for the player's audio session. Instead, it adjusts the per-channel volume levels for audio stream(s) that belong to the current media item. Other streams in the audio session are not affected. For more information, see Managing the Audio Session.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_OUT_OF_RANGE}}</strong></dt> </dl> </td><td> <p>The <em>flVolume</em> parameter is invalid.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the current audio balance.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Sets the audio balance.</p> <p>If you call this method before playback starts, the setting is applied when playback starts.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_OUT_OF_RANGE}}</strong></strong></dt> </dl> </td><td> <p>The <em>flBalance</em> parameter is invalid.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Queries whether the audio is muted.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Mutes or unmutes the audio.</p> <p>If you call this method before playback starts, the setting is applied after playback starts.</p><p> This method does not mute the entire audio session to which the player belongs. It mutes only the streams from the current media item. Other streams in the audio session are not affected. For more information, see Managing the Audio Session. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the size and aspect ratio of the video. These values are computed before any scaling is done to fit the video into the destination window.</p> <p>At least one parameter must be non-<strong>{{NULL}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDREQUEST}}</strong></strong></dt> </dl> </td><td> <p>The current media item does not contain video.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the range of video sizes that can be displayed without significantly degrading performance or image quality.</p> <p>At least one parameter must be non-<strong>{{NULL}}</strong>. Sizes are given in pixels.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDREQUEST}}</strong></strong></dt> </dl> </td><td> <p>The current media item does not contain video.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Sets the video source rectangle.</p><p>{{MFPlay}} clips the video to this rectangle and stretches the rectangle to fill the video window.</p> <p>{{MFPlay}} stretches the source rectangle to fill the entire video window. By default, {{MFPlay}} maintains the source's correct aspect ratio, letterboxing if needed. The letterbox color is controlled by the <strong>{{IMFPMediaPlayer::SetBorderColor}}</strong> method.</p><p>This method fails if no media item is currently set, or if the current media item does not contain video.</p><p> To set the video position before playback starts, call this method inside your event handler for the <strong>{{MFP_EVENT_TYPE_MEDIAITEM_SET}}</strong> event. For more information, see <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong>. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The current media item does not contain video.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the video source rectangle.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDREQUEST}}</strong></strong></dt> </dl> </td><td> <p>The current media item does not contain video.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Specifies whether the aspect ratio of the video is preserved during playback.</p> <p>This method fails if no media item is currently set, or if the current media item does not contain video.</p><p>To set the aspect-ratio mode before playback starts, call this method inside your event handler for the <strong>{{MFP_EVENT_TYPE_MEDIAITEM_SET}}</strong> event. For more information, see <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDREQUEST}}</strong></strong></dt> </dl> </td><td> <p>The current media item does not contain video.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the current aspect-ratio correction mode. This mode controls whether the aspect ratio of the video is preserved during playback.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The current media item does not contain video.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the window where the video is displayed.</p> <p>The video window is specified when you first call <strong>{{MFPCreateMediaPlayer}}</strong> to create the {{MFPlay}} player object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Updates the video frame.</p> <p>Call this method when your application's video playback window receives either a <strong>{{WM_PAINT}}</strong> or <strong>{{WM_SIZE}}</strong> message. This method performs two functions: </p><ul> <li>Ensures that the video frame is repainted while playback is paused or stopped. </li> <li>Adjusts the displayed video to match the current size of the video window.</li> </ul><strong>Important</strong>??Call the {{GDI}} <strong>BeginPaint</strong> function before calling <strong>UpdateVideo</strong>.? <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDREQUEST}}</strong></strong></dt> </dl> </td><td> <p>The current media item does not contain video.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Sets the color for the video border. The border color is used to letterbox the video.</p> <p>This method fails if no media item is currently set, or if the current media item does not contain video.</p><p>To set the border color before playback starts, call this method inside your event handler for the <strong>{{MFP_EVENT_TYPE_MEDIAITEM_SET}}</strong> event. For more information, see <strong>{{IMFPMediaPlayerCallback::OnMediaPlayerEvent}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDREQUEST}}</strong></strong></dt> </dl> </td><td> <p>The current media item does not contain video.</p> </td></tr> <tr><td> <dl> <dt><strong>M<strong>{{F_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the current color of the video border. The border color is used to letterbox the video.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The current media item does not contain video.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Applies an audio or video effect to playback.</p> <p>The object specified in the <em>pEffect</em> parameter can implement either a video effect or an audio effect. The effect is applied to any media items set after the method is called. It is not applied to the current media item. </p><p>For each media item, the effect is applied to the first selected stream of the matching type (audio or video). If a media item has two selected streams of the same type, the second stream does not receive the effect. The effect is ignored if the media item does not contain a stream that matches the effect type. For example, if you set a video effect and play a file that contains just audio, the video effect is ignored, although no error is raised.</p><p>The effect is applied to all subsequent media items, until the application removes the effect. To remove an effect, call <strong>{{IMFPMediaPlayer::RemoveEffect}}</strong> or <strong>{{IMFPMediaPlayer::RemoveAllEffects}}</strong>.</p><p>If you set multiple effects of the same type (audio or video), they are applied in the same order in which you call <strong>InsertEffect</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDINDEX}}</strong></strong></dt> </dl> </td><td> <p>This effect was already added.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Removes an effect that was added with the <strong>{{IMFPMediaPlayer::InsertEffect}}</strong> method.</p> <p>The change applies to the next media item that is set on the player. The effect is not removed from the current media item.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_FOUND}}</strong></dt> </dl> </td><td> <p>The effect was not found.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Removes all effects that were added with the <strong>{{IMFPMediaPlayer::InsertEffect}}</strong> method.</p> <p>The change applies to the next media item that is set on the player. The effects are not removed from the current media item.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Shuts down the {{MFPlay}} player object and releases any resources the object is using.</p> <p>After this method is called, most <strong>{{IMFPMediaPlayer}}</strong> methods return <strong>{{MF_E_SHUTDOWN}}</strong>. Also, any media items created from this instance of the player object are invalidated and most <strong>{{IMFPMediaItem}}</strong> methods also return <strong>{{MF_E_SHUTDOWN}}</strong>.</p><p>The player object automatically shuts itself down when its reference count reaches zero. You can use the <strong>Shutdown</strong> method to shut down the player before all of the references have been released.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Note</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p> Represents a media item. A <em>media item</em> is an abstraction for a source of media data, such as a video file. Use this interface to get information about the source, or to change certain playback settings, such as the start and stop times. To get a reference to this interface, call one of the following methods:</p><ul> <li> <strong>{{IMFPMediaPlayer::CreateMediaItemFromObject}}</strong> </li> <li> <strong>{{IMFPMediaPlayer::CreateMediaItemFromURL}}</strong> </li> </ul> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets a reference to the {{MFPlay}} player object that created the media item.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the {{URL}} that was used to create the media item.</p> <p>This method applies when the application calls <strong>{{IMFPMediaPlayer::CreateMediaItemFromURL}}</strong> to create a media item. If the application calls <strong>{{IMFPMediaPlayer::CreateMediaItemFromObject}}</strong> to create a media item, the <strong>GetURL</strong> method for that media item returns <strong>{{MF_E_NOTFOUND}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOTFOUND}}</strong></dt> </dl> </td><td> <p>No {{URL}} is associated with this media item.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The <strong>{{IMFPMediaPlayer::Shutdown}}</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the object that was used to create the media item.</p> <p>The object reference is set if the application uses <strong>{{IMFPMediaPlayer::CreateMediaItemFromObject}}</strong> to create the media item. Otherwise, <strong>GetObject</strong> returns {{MF_E_NOTFOUND}}.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOTFOUND}}</strong></dt> </dl> </td><td> <p>The media item was created from a {{URL}}, not from an object.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The <strong>{{IMFPMediaPlayer::Shutdown}}</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the application-defined value stored in the media item.</p> <p>You can assign this value when you first create the media item, by specifying it in the <em>dwUserData</em> parameter of the <strong>{{IMFPMediaPlayer::CreateMediaItemFromURL}}</strong> or <strong>{{IMFPMediaPlayer::CreateMediaItemFromObject}}</strong> method. To update the value, call <strong>{{IMFPMediaItem::SetUserData}}</strong>.</p><p>This method can be called after the player object is shut down.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Stores an application-defined value in the media item.</p> <p>This method can be called after the player object is shut down.</p> <p>This method can return one of these values.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the start and stop times for the media item.</p> <p>The <em>pguidStartPositionType</em> and <em>pguidStopPositionType</em> parameters receive the units of time that are used. Currently, the only supported value is <strong>{{MFP_POSITIONTYPE_100NS}}</strong>.</p><table> <tr><th>Value</th><th>Description</th></tr> <tr><td>{{MFP_POSITIONTYPE_100NS}}</td><td>100-nanosecond units. The time parameter (<em>pvStartValue</em> or <em>pvStopValue</em>) uses the following data type:<ul> <li>Variant type (<strong>vt</strong>): {{VT_I8}}</li> <li>Variant member: <strong>hVal</strong></li> </ul> </td></tr> </table><p>?</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Sets the start and stop time for the media item.</p> <p>By default, a media item plays from the beginning to the end of the file. This method adjusts the start time and/or the stop time:</p><ul> <li>To set the start time, pass non-<strong>{{NULL}}</strong> values for <em>pguidStartPositionType</em> and <em>pvStartValue</em>.</li> <li>To set the stop time, pass non-<strong>{{NULL}}</strong> values for <em>pguidStopPositionType</em> and <em>pvStopValue</em>.</li> </ul><p>The <em>pguidStartPositionType</em> and <em>pguidStopPositionType</em> parameters give the units of time that are used. Currently, the only supported value is <strong>{{MFP_POSITIONTYPE_100NS}}</strong>.</p><table> <tr><th>Value</th><th>Description</th></tr> <tr><td><strong>{{MFP_POSITIONTYPE_100NS}}</strong></td><td>100-nanosecond units. The time parameter (<em>pvStartValue</em> or <em>pvStopValue</em>) uses the following data type:<ul> <li>Variant type (<strong>vt</strong>): <strong>{{VT_I8}}</strong></li> <li>Variant member: <strong>hVal</strong></li> </ul> <p>To clear a previously set time, use an empty <strong>{{PROPVARIANT}}</strong> (<strong>{{VT_EMPTY}}</strong>).</p> </td></tr> </table><p>?</p><p>The adjusted start and stop times are used the next time that <strong>{{IMFPMediaPlayer::SetMediaItem}}</strong> is called with this media item. If the media item is already set on the player, the change does not happen unless you call <strong>SetMediaItem</strong> again.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_OUT_OF_RANGE}}</strong></dt> </dl> </td><td> <p>Invalid start or stop time. Any of the following can cause this error:</p> <ul> <li>Time less than zero.</li> <li>Time greater than the total duration of the media item.</li> <li>Stop time less than start time.</li> </ul> </td></tr> </table><p>?</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Queries whether the media item contains a video stream.</p> <p> To select or deselect streams before playback starts, call <strong>{{IMFPMediaItem::SetStreamSelection}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Queries whether the media item contains an audio stream.</p> <p> To select or deselect streams before playback starts, call <strong>{{IMFPMediaItem::SetStreamSelection}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Queries whether the media item contains protected content.</p><strong>Note</strong>??Currently <strong>{{IMFPMediaPlayer}}</strong> does not support playing protected content.? <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the duration of the media item.</p> <p>The method returns the total duration of the content, regardless of any values set through <strong>{{IMFPMediaItem::SetStartStopPosition}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets the number of streams (audio, video, and other) in the media item.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Queries whether a stream is selected to play.</p> <p> To select or deselect a stream, call <strong>{{IMFPMediaItem::SetStreamSelection}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Selects or deselects a stream.</p> <p>You can use this method to change which streams are selected. The change goes into effect the next time that <strong>{{IMFPMediaPlayer::SetMediaItem}}</strong> is called with this media item. If the media item is already set on the player, the change does not happen unless you call <strong>SetMediaItem</strong> again with this media item.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Queries the media item for a stream attribute.</p> <p>Stream attributes describe an individual stream (audio, video, or other) within the presentation. To get an attribute that applies to the entire presentation, call <strong>{{IMFPMediaItem::GetPresentationAttribute}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Queries the media item for a presentation attribute.</p> <p>Presentation attributes describe the presentation as a whole. To get an attribute that applies to an individual stream within the presentation, call <strong>{{IMFPMediaItem::GetStreamAttribute}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets various flags that describe the media item.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p> Sets a media sink for the media item. A <em>media sink</em> is an object that consumes the data from one or more streams. </p> <p>By default, the {{MFPlay}} player object renders audio streams to the Streaming Audio Renderer ({{SAR}}) and video streams to the Enhanced Video Renderer ({{EVR}}). You can use the <strong>SetStreamSink</strong> method to provide a different media sink for an audio or video stream; or to support other stream types besides audio and video. You can also use it to configure the {{SAR}} or {{EVR}} before they are used.</p><p>Call this method before calling <strong>{{IMFPMediaPlayer::SetMediaItem}}</strong>. Calling this method after <strong>SetMediaItem</strong> has no effect, unless you stop playback and call <strong>SetMediaItem</strong> again.</p><p>To reset the media item to use the default media sink, set <em>pMediaSink</em> to <strong>{{NULL}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Gets a property store that contains metadata for the source, such as author or title.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Callback interface for the <strong>{{IMFPMediaPlayer}}</strong> interface.</p><p>To set the callback, pass an <strong>{{IMFPMediaPlayerCallback}}</strong> reference to the <strong>{{MFPCreateMediaPlayer}}</strong> function in the <em>pCallback</em> parameter. The application implements the <strong>{{IMFPMediaPlayerCallback}}</strong> interface.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Called by the {{MFPlay}} player object to notify the application of a playback event.</p> <p> The specific type of playback event is given in the <strong>eEventType</strong> member of the <strong>{{MFP_EVENT_HEADER}}</strong> structure. This structure contains information that is common to all of the event types. Some event types use extended structures. A set of macros is defined for casting the <em>pEventHeader</em> reference to the correct structure type. For more information, see <strong>{{MFP_EVENT_TYPE}}</strong>. </p><p>It is safe to call <strong>{{IMFPMediaPlayer}}</strong> and <strong>{{IMFPMediaItem}}</strong> methods inside the <strong>OnMediaPlayer</strong> method. {{MFPlay}} is guaranteed not to reenter the <strong>OnMediaPlayer</strong> method. That is, calls to <strong>OnMediaPlayer</strong> are serialized, and the method will not be invoked again from inside <strong>OnMediaPlayer</strong>. </p> <p>This method does not return a value.</p> <p> </p><strong>Important</strong>??Deprecated. This {{API}} may be removed from future releases of Windows. Applications should use the Media Session for playback.?<p>Creates a new instance of the {{MFPlay}} player object.</p> <p>Before calling this function, call <strong>CoIntialize(Ex)</strong> from the same thread to initialize the {{COM}} library.</p><p>Internally, <strong>{{MFPCreateMediaPlayer}}</strong> calls <strong>{{MFStartup}}</strong> to initialize the Microsoft Media Foundation platform. When the player object is destroyed, it calls <strong>{{MFShutdown}}</strong> to shut down the platform. It is not necessary for an application to call <strong>{{MFStartup}}</strong> or <strong>{{MFShutdown}}</strong> when using {{MFPlay}}.</p><strong>Note</strong>??If you use other Media Foundation {{APIs}} outside the life time of the player object, then your application should call <strong>{{MFStartup}}</strong> and <strong>{{MFShutdown}}</strong>.? <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><p>Defines the {{ASF}} splitter options.</p> <dd> <p>The splitter delivers samples for the {{ASF}} content in reverse order to accommodate reverse playback.</p> </dd> <dd> <p>The splitter delivers samples for streams that are protected with Windows Media Digital Rights Management.</p> </dd> <p> </p><p>Defines status conditions for the <strong>{{IMFASFSplitter::GetNextSample}}</strong> method.</p> <p> </p><p>Defines the {{ASF}} multiplexer options.</p> <dd> <p>The multiplexer automatically adjusts the bit rate of the {{ASF}} content in response to the characteristics of the streams being multiplexed.</p> </dd> <p> </p><p>Defines the {{ASF}} indexer options.</p> <dd> <p>The indexer creates a new index object.</p> </dd> <dd> <p>The indexer returns values for reverse playback.</p> </dd> <dd> <p>The indexer creates an index object for a live {{ASF}} stream.</p> </dd> <p> </p><p>Defines the {{ASF}} stream selector options.</p> <dd> <p>The stream selector will not set thinning. Thinning is the process of removing samples from a stream to reduce the bit rate.</p> </dd> <dd> <p>The stream selector will use the average bit rate of streams when selecting streams.</p> </dd> <p> </p><p>Defines the selection options for an {{ASF}} stream.</p> <dd> <p>No samples from the stream are delivered.</p> </dd> <dd> <p>Only samples from the stream that are clean points are delivered.</p> </dd> <dd> <p>All samples from the stream are delivered.</p> </dd> <p> </p><p>Specifies how the {{ASF}} file sink should apply Windows Media {{DRM}}.</p> <dd> <p>Undefined action.</p> </dd> <dd> <p>Encode the content using Windows Media {{DRM}}. Use this flag if the source content does not have {{DRM}} protection.</p> </dd> <dd> <p>Transcode the content using Windows Media {{DRM}}. Use this flag if the source content has Windows Media {{DRM}} protection and you want to change the encoding parameters but not the {{DRM}} protection.</p> </dd> <dd> <p>Transcrypt the content. Use this flag if the source content has {{DRM}} protection and you want to change the {{DRM}} protection; for example, if you want to convert from Windows Media {{DRM}} version 1 to Windows Media {{DRM}} version 7 or later.</p> </dd> <dd> <p>Reserved. Do not use.</p> </dd> <p> </p><p>Contains statistics about the progress of the {{ASF}} multiplexer.</p> <p>Use <strong>{{IMFASFMultiplexer::GetStatistics}}</strong> to retrieve this structure.</p> <dd> <p>Number of frames written by the {{ASF}} multiplexer.</p> </dd> <dd> <p>Number of frames dropped by the {{ASF}} multiplexer.</p> </dd> <p> Specifies an index for the {{ASF}} indexer object. </p> <p> The index object of an {{ASF}} file can contain a number of distinct indexes. Each index is identified by the type of index and the stream number. No {{ASF}} index object can contain more than one index for a particular combination of stream number and index type.</p> <dd> <p> The type of index. Currently this value must be {{GUID_NULL}}, which specifies time-based indexing. </p> </dd> <dd> <p> The stream number to which this structure applies. </p> </dd> <p> </p><p>Describes the indexing configuration for a stream and type of index.</p> <dd> <p> <strong>{{ASF_INDEX_IDENTIFIER}}</strong> structure that identifies the stream number and the type of index.</p> </dd> <dd> <p>Number of bytes used for each index entry. If the value is {{MFASFINDEXER_PER_ENTRY_BYTES_DYNAMIC}}, the index entries have variable size.</p> </dd> <dd> <p>Optional text description of the index.</p> </dd> <dd> <p>Indexing interval. The units of this value depend on the index type. A value of {{MFASFINDEXER_NO_FIXED_INTERVAL}} indicates that there is no fixed indexing interval.</p> </dd> <p> </p><p>Uses profile data from a profile object to configure settings in the ContentInfo object.</p> <p>If there is already information in the ContentInfo object when this method is called, it is replaced by the information from the profile object.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The <strong>{{IMFASFProfile}}</strong> interface of the profile object.</p> </dd> <p> Retrieves the size of the header section of an Advanced Systems Format ({{ASF}}) file. </p> <p>The header of an {{ASF}} file or stream can be passed to the <strong>{{IMFASFContentInfo::ParseHeader}}</strong> method to populate the ContentInfo object with the header information.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ASF_INVALIDDATA}}</strong></dt> </dl> </td><td> <p> The buffer does not contain valid {{ASF}} data. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_BUFFERTOOSMALL}}</strong></dt> </dl> </td><td> <p> The buffer does not contain enough valid data. </p> </td></tr> </table><p>?</p> <dd> <p>The <strong>{{IMFMediaBuffer}}</strong> interface of a buffer object containing the beginning of {{ASF}} content. The size of the valid data in the buffer must be at least {{MFASF_MIN_HEADER_BYTES}} in bytes.</p> </dd> <dd> <p>Receives the size, in bytes, of the header section of the content. The value includes the size of the {{ASF}} Header Object plus the size of the header section of the Data Object. Therefore, the resulting value is the offset to the start of the data packets in the {{ASF}} Data Object.</p> </dd> <p> </p><p>Parses the information in an {{ASF}} header and uses that information to set values in the ContentInfo object. You can pass the entire header in a single buffer or send it in several pieces.</p> <p>If you pass the header in pieces, the ContentInfo object will keep references to the buffer objects until the entire header is parsed. Therefore, do not write over the buffers passed into this method.</p><p>The start of the Header object has the following layout in memory:</p><table> <tr><th>Field Name</th><th>Size in bytes</th></tr> <tr><td>Object {{ID}}</td><td>16</td></tr> <tr><td>Object Size</td><td>8</td></tr> <tr><td>Number of Header Objects</td><td>4</td></tr> <tr><td>Reserved1</td><td>1</td></tr> <tr><td>Reserved2</td><td>1</td></tr> </table><p>?</p><p>The first call to <strong>ParseHeader</strong> reads everything up to and including Rerserved2, so it requires a minimum of 30 bytes. (Note that the <strong>{{IMFASFContentInfo::GetHeaderSize}}</strong> method reads only the Object {{ID}} and Object Size fields, so that method requires a minimum of 24 bytes.)</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The header is completely parsed and validated.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ASF_INVALIDDATA}}</strong></dt> </dl> </td><td> <p>The input buffer does not contain valid {{ASF}} data.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_BUFFERTOOSMALL}}</strong></dt> </dl> </td><td> <p>The input buffer is to small.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_S_ASF_PARSEINPROGRESS}}</strong></dt> </dl> </td><td> <p>The method succeeded, but the header passed was incomplete. This is the successful return code for all calls but the last one when passing the header in pieces.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFMediaBuffer}}</strong> interface of a buffer object containing some or all of the header. The buffer must contain at least 30 bytes, which is the size of the Header Object, not including the objects contained in the Header Object (that is, everything up to and including the Reserved2 field in the Header Object).</p> </dd> <dd> <p>Offset, in bytes, of the first byte in the buffer relative to the beginning of the header.</p> </dd> <p> </p><p>Encodes the data in the <strong>{{MFASFContentInfo}}</strong> object into a binary Advanced Systems Format ({{ASF}}) header.</p> <p>The size received in the <em>pcbHeader</em> parameter includes the padding size. The content information shrinks or expands the padding data depending on the size of the {{ASF}} Header Objects.</p><p>During this call, the stream properties are set based on the encoding properties of the profile. These properties are available through the <strong>{{IMFMetadata}}</strong> interface.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p> The {{ASF}} Header Objects do not exist for the media that the ContentInfo object holds reference to. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ASF_INVALIDDATA}}</strong></dt> </dl> </td><td> <p> The {{ASF}} Header Object size exceeds 10 {{MB}}. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_BUFFERTOOSMALL}}</strong></dt> </dl> </td><td> <p> The buffer passed in <em>pIHeader</em> is not large enough to hold the {{ASF}} Header Object information. </p> </td></tr> </table><p>?</p> <dd> <p> A reference to the <strong>{{IMFMediaBuffer}}</strong> interface of the buffer object that will receive the encoded header. Set to <strong>{{NULL}}</strong> to retrieve the size of the header. </p> </dd> <dd> <p> Size of the encoded {{ASF}} header in bytes. If <em>pIHeader</em> is <strong>{{NULL}}</strong>, this value is set to the buffer size required to hold the encoded header. </p> </dd> <p> </p><p>Retrieves an Advanced Systems Format ({{ASF}}) profile that describes the {{ASF}} content.</p> <p>The profile is set by calling either <strong>{{IMFASFContentInfo::SetProfile}}</strong> or <strong>{{IMFASFContentInfo::ParseHeader}}</strong>.</p><p>The {{ASF}} profile object returned by this method does not include any of the <strong>{{MF_PD_ASF_xxx}}</strong> attributes (see Presentation Descriptor Attributes). To get these attributes, do the following:</p><ol> <li> <p>Call <strong>{{IMFASFContentInfo::GeneratePresentationDescriptor}}</strong> to get the {{ASF}} presentation descriptor. You can query the presentation descriptor for the <strong>{{MF_PD_ASF_xxx}}</strong> attributes.</p> </li> <li> <p>(Optional.) Call <strong>{{MFCreateASFProfileFromPresentationDescriptor}}</strong> to convert the presentation descriptor into an {{ASF}} profile. The profile object created by this function contains the <strong>{{MF_PD_ASF_xxx}}</strong> attributes.</p> </li> </ol><p>An {{ASF}} profile is a template for file encoding, and is intended mainly for creating {{ASF}} content. If you are reading an existing {{ASF}} file, it is recommended that you use the presentation descriptor to get information about the file. One exception is that the profile contains the mutual exclusion and stream prioritization objects, which are not exposed directly from the presentation descriptor.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives an <strong>{{IMFASFProfile}}</strong> interface reference. The caller must release the interface. If the object does not have an {{ASF}} profile, this parameter receives the value <strong>{{NULL}}</strong>.</p> </dd> <p> </p><p>Uses profile data from a profile object to configure settings in the ContentInfo object.</p> <p>If there is already information in the ContentInfo object when this method is called, it is replaced by the information from the profile object.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The <strong>{{IMFASFProfile}}</strong> interface of the profile object.</p> </dd> <p> </p><p>Creates a presentation descriptor for {{ASF}} content.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFPresentationDescriptor}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Retrieves a property store that can be used to set encoding properties.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Stream number to configure. Set to zero to configure file-level encoding properties.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IPropertyStore}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Retrieves the number of streams in the profile.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of streams in the profile.</p> </dd> <p> </p><p>Retrieves the number of streams in the profile.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of streams in the profile.</p> </dd> <p> </p><p>Retrieves a stream from the profile by stream index, and/or retrieves the stream number for a stream index.</p> <p>This method does not create a copy of the stream configuration object. The reference that is retrieved points to the object within the profile object. You must not make any changes to the stream configuration object using this reference, because doing so can affect the profile object in unexpected ways.</p><p>To change the configuration of the stream configuration object in the profile, you must first clone the stream configuration object by calling <strong>{{IMFASFStreamConfig::Clone}}</strong>. Make whatever changes are required to the clone of the object and then add the updated object by calling the <strong>{{IMFASFProfile::SetStream}}</strong> method.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The index of the stream to retrieve. Stream indexes are sequential and zero-based. You can get the number of streams that are in the profile by calling the <strong>{{IMFASFProfile::GetStreamCount}}</strong> method.</p> </dd> <dd> <p>Receives the stream number of the requested stream. Stream numbers are one-based and are not necessarily sequential. This parameter can be set to <strong>{{NULL}}</strong> if the stream number is not required.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFASFStreamConfig}}</strong> interface of the {{ASF}} stream configuration object. The caller must release the interface. This parameter can be <strong>{{NULL}}</strong> if you want to retrieve the stream number without accessing the stream configuration.</p> </dd> <p> </p><p>Retrieves an Advanced Systems Format ({{ASF}}) stream configuration object for a stream in the profile. This method references the stream by stream number instead of stream index.</p> <p>This method does not create a copy of the stream configuration object. The reference that is retrieved points to the object within the profile object. You must not make any changes to the stream configuration object using this reference, because doing so can affect the profile object in unexpected ways.</p><p>To change the configuration of the stream configuration object in the profile, you must first clone the stream configuration object by calling <strong>{{IMFASFStreamConfig::Clone}}</strong>. Make whatever changes are required to the clone of the object and then add the updated object by calling the <strong>{{IMFASFProfile::SetStream}}</strong> method.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The stream number for which to obtain the interface reference.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFASFStreamConfig}}</strong> interface of the {{ASF}} stream configuration object. The caller must release the interface.</p> </dd> <p> </p><p>Adds a stream to the profile or reconfigures an existing stream.</p> <p>If the stream number in the {{ASF}} stream configuration object is already included in the profile, the information in the new object replaces the old one. If the profile does not contain a stream for the stream number, the {{ASF}} stream configuration object is added as a new stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFASFStreamConfig}}</strong> interface of a configured {{ASF}} stream configuration object.</p> </dd> <p> </p><p>Removes a stream from the Advanced Systems Format ({{ASF}}) profile object.</p> <p>After a stream is removed, the {{ASF}} profile object reassigns stream indexes so that the index values are sequential starting from zero. Any previously stored stream index numbers are no longer valid after deleting a stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Stream number of the stream to remove.</p> </dd> <p> </p><p>Creates an Advanced Systems Format ({{ASF}}) stream configuration object.</p> <p>The {{ASF}} stream configuration object created by this method is not included in the profile. To include the stream, you must first configure the stream configuration and then call <strong>{{IMFASFProfile::SetStream}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p><em>ppIStream</em> is <strong>{{NULL}}</strong>.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_OUTOFMEMORY}}</strong></dt> </dl> </td><td> <p>stream configuration object could not be created due to insufficient memory.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFMediaType}}</strong> interface of a configured media type.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFASFStreamConfig}}</strong> interface of the new {{ASF}} stream configuration object. The caller must release the interface.</p> </dd> <p> </p><p>Retrieves the number of Advanced Systems Format ({{ASF}}) mutual exclusion objects that are associated with the profile.</p> <p>Multiple mutual exclusion objects may be required for streams that are mutually exclusive in more than one way. For more information, see <strong>{{IMFASFMutualExclusion::AddRecord}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of mutual exclusion objects.</p> </dd> <p> </p><p>Retrieves an Advanced Systems Format ({{ASF}}) mutual exclusion object from the profile.</p> <p>This method does not create a copy of the mutual exclusion object. The returned reference refers to the mutual exclusion contained in the profile object. You must not make any changes to the mutual exclusion object using this reference, because doing so can affect the profile object in unexpected ways.</p><p>To change the configuration of the mutual exclusion object in the profile, you must first clone the mutual exclusion object by calling <strong>{{IMFASFMutualExclusion::Clone}}</strong>. Make whatever changes are required to the clone of the object, remove the old mutual exclusion object from the profile by calling the <strong>{{IMFASFProfile::RemoveMutualExclusion}}</strong> method, and then add the updated object by calling the <strong>{{IMFASFProfile::AddMutualExclusion}}</strong> method.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Index of the mutual exclusion object in the profile.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFASFMutualExclusion}}</strong> interface of the {{ASF}} mutual exclusion object. The caller must release the interface.</p> </dd> <p> </p><p>Adds a configured Advanced Systems Format ({{ASF}}) mutual exclusion object to the profile.</p> <p>You can create a mutual exclusion object by calling the <strong>{{IMFASFProfile::CreateMutualExclusion}}</strong> method.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFASFMutualExclusion}}</strong> interface of a configured {{ASF}} mutual exclusion object.</p> </dd> <p> </p><p>Removes an Advanced Systems Format ({{ASF}}) mutual exclusion object from the profile.</p> <p>When a mutual exclusion object is removed from the profile, the {{ASF}} profile object reassigns the mutual exclusion indexes so that they are sequential starting with zero. Any previously stored indexes are no longer valid after calling this method.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The index of the mutual exclusion object to remove from the profile.</p> </dd> <p> </p><p>Creates a new Advanced Systems Format ({{ASF}}) mutual exclusion object. Mutual exclusion objects can be added to a profile by calling the <strong>AddMutualExclusion</strong> method.</p> <p>The {{ASF}} mutual exclusion object created by this method is not associated with the profile. Call <strong>{{IMFASFProfile::AddMutualExclusion}}</strong> after configuring the object to make this association.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <strong>Note</strong>??This method is not supported.? <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Reserved.</p> </dd> <strong>Note</strong>??This method is not supported.? <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Reserved. </p> </dd> <strong>Note</strong>??This method is not supported.? <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <strong>Note</strong>??This method is not implemented.? <p> Returns <strong>{{E_NOTIMPL}}</strong>. </p> <dd> <p>Reserved. </p> </dd> <p> </p><p>Creates a copy of the Advanced Systems Format profile object.</p> <p>The cloned object is completely independent of the original.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the <strong>{{IMFASFProfile}}</strong> interface of the new object. The caller must release the interface.</p> </dd> <p> </p><p>Retrieves information about an existing payload extension.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_BUFFERTOOSMALL}}</strong></dt> </dl> </td><td> <p>The buffer specified in <em>pbExtensionSystemInfo</em> is too small.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDINDEX}}</strong></dt> </dl> </td><td> <p>The <em>wPayloadExtensionNumber</em> parameter is out of range.</p> </td></tr> </table><p>?</p> <dd> <p>The payload extension index. Valid indexes range from 0, to one less than the number of extensions obtained by calling <strong>{{IMFASFStreamConfig::GetPayloadExtensionCount}}</strong>.</p> </dd> <dd> <p>Receives a {{GUID}} that identifies the payload extension. For a list of predefined payload extensions, see {{ASF}} Payload Extension {{GUIDs}}. Applications can also define custom payload extensions.</p> </dd> <dd> <p>Receives the number of bytes added to each sample for the extension.</p> </dd> <dd> <p>Pointer to a buffer that receives information about this extension system. This information is the same for all samples and is stored in the content header (not in each sample). This parameter can be <strong>{{NULL}}</strong>. To find the required size of the buffer, set this parameter to <strong>{{NULL}}</strong>; the size is returned in <em>pcbExtensionSystemInfo</em>.</p> </dd> <dd> <p>On input, specifies the size of the buffer pointed to by <em>pbExtensionSystemInfo</em>. On output, receives the required size of the <em>pbExtensionSystemInfo</em> buffer in bytes.</p> </dd> <p>Gets the major media type of the stream. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the major media type for the stream. For a list of possible values, see Major Media Types. </p> </dd> <p> </p><p>Retrieves the stream number of the stream.</p> <p>The method returns the stream number.</p> <p> </p><p>Assigns a stream number to the stream.</p> <p>Stream numbers start from 1 and do not need to be sequential.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The number to assign to the stream.</p> </dd> <p> </p><p>Retrieves the media type of the stream.</p> <p>To reduce unnecessary copying, the method returns a reference to the media type that is stored internally by the object. Do not modify the returned media type, as the results are not defined.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFMediaType}}</strong> interface of the media type object associated with the stream. The caller must release the interface.</p> </dd> <p> </p><p>Sets the media type for the Advanced Systems Format ({{ASF}}) stream configuration object.</p> <p>Some validation of the media type is performed by this method. However, a media type can be successfully set, but cause an error when the stream is added to the profile.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFMediaType}}</strong> interface of a configured media type object.</p> </dd> <p> </p><p>Retrieves the number of payload extensions that are configured for the stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of payload extensions.</p> </dd> <p> </p><p>Retrieves information about an existing payload extension.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_BUFFERTOOSMALL}}</strong></dt> </dl> </td><td> <p>The buffer specified in <em>pbExtensionSystemInfo</em> is too small.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDINDEX}}</strong></dt> </dl> </td><td> <p>The <em>wPayloadExtensionNumber</em> parameter is out of range.</p> </td></tr> </table><p>?</p> <dd> <p>The payload extension index. Valid indexes range from 0, to one less than the number of extensions obtained by calling <strong>{{IMFASFStreamConfig::GetPayloadExtensionCount}}</strong>.</p> </dd> <dd> <p>Receives a {{GUID}} that identifies the payload extension. For a list of predefined payload extensions, see {{ASF}} Payload Extension {{GUIDs}}. Applications can also define custom payload extensions.</p> </dd> <dd> <p>Receives the number of bytes added to each sample for the extension.</p> </dd> <dd> <p>Pointer to a buffer that receives information about this extension system. This information is the same for all samples and is stored in the content header (not in each sample). This parameter can be <strong>{{NULL}}</strong>. To find the required size of the buffer, set this parameter to <strong>{{NULL}}</strong>; the size is returned in <em>pcbExtensionSystemInfo</em>.</p> </dd> <dd> <p>On input, specifies the size of the buffer pointed to by <em>pbExtensionSystemInfo</em>. On output, receives the required size of the <em>pbExtensionSystemInfo</em> buffer in bytes.</p> </dd> <p> </p><p>Configures a payload extension for the stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to a {{GUID}} that identifies the payload extension. For a list of predefined payload extensions, see {{ASF}} Payload Extension {{GUIDs}}. Applications can also define custom payload extensions.</p> </dd> <dd> <p>Number of bytes added to each sample for the extension.</p> </dd> <dd> <p>A reference to a buffer that contains information about this extension system. This information is the same for all samples and is stored in the content header (not with each sample). This parameter can be <strong>{{NULL}}</strong> if <em>cbExtensionSystemInfo</em> is 0.</p> </dd> <dd> <p>Amount of data, in bytes, that describes this extension system. If this value is 0, then <em>pbExtensionSystemInfo</em> can be <strong>{{NULL}}</strong>.</p> </dd> <p> </p><p>Removes all payload extensions that are configured for the stream.</p> <p>None.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Creates a copy of the Advanced Systems Format ({{ASF}}) stream configuration object.</p> <p>The cloned object is completely independent of the original.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFASFStreamConfig}}</strong> interface of the new object. The caller must release the interface.</p> </dd> <p>Configures an Advanced Systems Format ({{ASF}}) mutual exclusion object, which manages information about a group of streams in an {{ASF}} profile that are mutually exclusive. When streams or groups of streams are mutually exclusive, only one of them is read at a time, they are not read concurrently.</p><p>A common example of mutual exclusion is a set of streams that each include the same content encoded at a different bit rate. The stream that is used is determined by the available bandwidth to the reader.</p><p>An <strong>{{IMFASFMutualExclusion}}</strong> interface exists for every {{ASF}} mutual exclusion object. A reference to this interface is obtained when you create the object using the <strong>{{IMFASFProfile::CreateMutualExclusion}}</strong> method.</p> <p>An {{ASF}} profile object can support multiple mutual exclusions. Each must be configured using a separate {{ASF}} mutual exclusion object.</p> <p> </p><p>Retrieves the type of mutual exclusion represented by the Advanced Systems Format ({{ASF}}) mutual exclusion object.</p> <p>Sometimes, content must be made mutually exclusive in more than one way. For example, a video file might contain audio streams of several bit rates for each of several languages. To handle this type of complex mutual exclusion, you must configure more than one {{ASF}} mutual exclusion object. For more information, see <strong>{{IMFASFMutualExclusion::AddRecord}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>A variable that receives the type identifier. For a list of predefined mutual exclusion type constants, see {{ASF}} Mutual Exclusion Type {{GUIDs}}.</p> </dd> <p> </p><p>Sets the type of mutual exclusion that is represented by the Advanced Systems Format ({{ASF}}) mutual exclusion object.</p> <p>Sometimes, content must be made mutually exclusive in more than one way. For example, a video file might contain audio streams in several bit rates for each of several languages. To handle this type of complex mutual exclusion, you must configure more than one {{ASF}} mutual exclusion object. For more information, see <strong>{{IMFASFMutualExclusion::AddRecord}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The type of mutual exclusion that is represented by the {{ASF}} mutual exclusion object. For a list of predefined mutual exclusion type constants, see {{ASF}} Mutual Exclusion Type {{GUIDs}}.</p> </dd> <p> </p><p>Retrieves the number of records in the Advanced Systems Format mutual exclusion object.</p> <p>Each record includes one or more streams. Every stream in a record is mutually exclusive of streams in every other record.</p><p>Use this method in conjunction with <strong>{{IMFASFMutualExclusion::GetStreamsForRecord}}</strong> to retrieve the streams that are included in each record.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the count of records.</p> </dd> <p> </p><p>Retrieves the stream numbers contained in a record in the Advanced Systems Format mutual exclusion object.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The number of the record for which to retrieve the stream numbers.</p> </dd> <dd> <p>An array that receives the stream numbers. Set to <strong>{{NULL}}</strong> to get the number of elements required, which is indicated by the value of <em>pcStreams</em> on return. If this parameter is not <strong>{{NULL}}</strong>, the method will copy as many stream numbers to the array as there are elements indicated by the value of <em>pcStreams</em>.</p> </dd> <dd> <p>On input, the number of elements in the array referenced by <em>pwStreamNumArray</em>. On output, the method sets this value to the count of stream numbers in the record. You can call <strong>GetStreamsForRecord</strong> with <em>pwStreamNumArray</em> set to <strong>{{NULL}}</strong> to retrieve the number of elements required to hold all of the stream numbers.</p> </dd> <p> </p><p>Adds a stream number to a record in the Advanced Systems Format mutual exclusion object.</p> <p>Each record includes one or more streams. Every stream in a record is mutually exclusive of all streams in every other record.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The specified stream number is already associated with the record.</p> </td></tr> </table><p>?</p> <dd> <p>The record number to which the stream is added. A record number is set by the <strong>{{IMFASFMutualExclusion::AddRecord}}</strong> method.</p> </dd> <dd> <p>The stream number to add to the record.</p> </dd> <p> </p><p>Removes a stream number from a record in the Advanced Systems Format mutual exclusion object.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The stream number is not listed for the specified record.</p> </td></tr> </table><p>?</p> <dd> <p>The record number from which to remove the stream number.</p> </dd> <dd> <p>The stream number to remove from the record.</p> </dd> <p> </p><p>Removes a record from the Advanced Systems Format ({{ASF}}) mutual exclusion object.</p> <p>When a record is removed, the {{ASF}} mutual exclusion object indexes the remaining records so that they are sequential starting with zero. You should enumerate the records to ensure that you have the correct index for each record. If the record removed is the one with the highest index, removing it has no effect on the other indexes.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The index of the record to remove.</p> </dd> <p> </p><p>Adds a record to the mutual exclusion object. A record specifies streams that are mutually exclusive with the streams in all other records.</p> <p>A record can include one or more stream numbers. All of the streams in a record are mutually exclusive with all the streams in all other records in the {{ASF}} mutual exclusion object.</p><p>You can use records to create complex mutual exclusion scenarios by using multiple {{ASF}} mutual exclusion objects.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the index assigned to the new record. Record indexes are zero-based and sequential.</p> </dd> <p> </p><p>Creates a copy of the Advanced Systems Format mutual exclusion object.</p> <p>The cloned object is a new object, completely independent of the object from which it was cloned.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFASFMutualExclusion}}</strong> interface of the new object. The caller must release the interface.</p> </dd> <p> </p><strong>Note</strong>??This interface is not implemented in this version of Media Foundation.?<p>Adds a stream to the stream priority list.</p> <p>The stream priority list is built by appending entries to the list with each call to <strong>AddStream</strong>. The list is evaluated in descending order of importance. The most important stream should be added first, and the least important should be added last.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>Invalid stream number.</p> </td></tr> </table><p>?</p> <dd> <p>Stream number of the stream to add.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, the stream is mandatory.</p> </dd> <p> </p><strong>Note</strong>??This interface is not implemented in this version of Media Foundation.?<p>Retrieves the number of entries in the stream priority list.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of streams in the stream priority list.</p> </dd> <p> </p><strong>Note</strong>??This interface is not implemented in this version of Media Foundation.?<p>Retrieves the stream number of a stream in the stream priority list.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p><strong>{{NULL}}</strong> reference argument or the <em>dwStreamIndex</em> parameter is out of range.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of the entry to retrieve from the stream priority list. To get the number of entries in the priority list, call <strong>{{IMFASFStreamPrioritization::GetStreamCount}}</strong>.</p> </dd> <dd> <p>Receives the stream number of the stream priority entry.</p> </dd> <dd> <p>Receives a Boolean value. If <strong>{{TRUE}}</strong>, the stream is mandatory.</p> </dd> <p> </p><strong>Note</strong>??This interface is not implemented in this version of Media Foundation.?<p>Adds a stream to the stream priority list.</p> <p>The stream priority list is built by appending entries to the list with each call to <strong>AddStream</strong>. The list is evaluated in descending order of importance. The most important stream should be added first, and the least important should be added last.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>Invalid stream number.</p> </td></tr> </table><p>?</p> <dd> <p>Stream number of the stream to add.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, the stream is mandatory.</p> </dd> <p> </p><strong>Note</strong>??This interface is not implemented in this version of Media Foundation.?<p>Removes a stream from the stream priority list.</p> <p>When a stream is removed from the stream priority list, the index values of all streams that follow it in the list are decremented.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Index of the entry in the stream priority list to remove. Values range from zero, to one less than the stream count retrieved by calling <strong>{{IMFASFStreamPrioritization::GetStreamCount}}</strong>.</p> </dd> <p> </p><strong>Note</strong>??This interface is not implemented in this version of Media Foundation.?<p>Creates a copy of the {{ASF}} stream prioritization object.</p> <p>The new object is completely independent of the original.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFASFStreamPrioritization}}</strong> interface of the new object. The caller must release the interface.</p> </dd> <p> </p><p>Retrieves the option flags that are set on the {{ASF}} splitter.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p><em>pdwFlags</em> is <strong>{{NULL}}</strong>.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the option flags. This value is a bitwise <strong>{{OR}}</strong> of zero or more members of the <strong>{{MFASF_SPLITTERFLAGS}}</strong> enumeration.</p> </dd> <p> </p><p>Resets the Advanced Systems Format ({{ASF}}) splitter and configures it to parse data from an {{ASF}} data section.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>The <em>pIContentInfo</em> parameter is <strong>{{NULL}}</strong>.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFASFContentInfo}}</strong> interface of a ContentInfo object that describes the data to be parsed.</p> </dd> <p> </p><p>Sets option flags on the Advanced Systems Format ({{ASF}}) splitter.</p> <p>This method can only be called after the splitter is initialized.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_INITIALIZED}}</strong></dt> </dl> </td><td> <p>The splitter is not initialized.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>The <em>dwFlags</em> parameter does not contain a valid flag.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The {{MFASF_SPLITTER_REVERSE}} flag is set, but the content cannot be parsed in reverse.</p> </td></tr> </table><p>?</p> <dd> <p>A bitwise combination of zero or more members of the <strong>{{MFASF_SPLITTERFLAGS}}</strong> enumeration.</p> </dd> <p> </p><p>Retrieves the option flags that are set on the {{ASF}} splitter.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p><em>pdwFlags</em> is <strong>{{NULL}}</strong>.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the option flags. This value is a bitwise <strong>{{OR}}</strong> of zero or more members of the <strong>{{MFASF_SPLITTERFLAGS}}</strong> enumeration.</p> </dd> <p> </p><p>Sets the streams to be parsed by the Advanced Systems Format ({{ASF}}) splitter.</p> <p>Calling this method supersedes any previous stream selections; only the streams specified in the <em>pwStreamNumbers</em> array will be selected.</p><p>By default, no streams are selected by the splitter.</p><p>You can obtain a list of the currently selected streams by calling the <strong>{{IMFASFSplitter::GetSelectedStreams}}</strong> method.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p><em>pwStreamNumbers</em> is <strong>{{NULL}}</strong> and <em>wNumStreams</em> contains a value greater than zero.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>Invalid stream number was passed in the array.</p> </td></tr> </table><p>?</p> <dd> <p>An array of variables containing the list of stream numbers to select.</p> </dd> <dd> <p>The number of valid elements in the stream number array.</p> </dd> <p> Gets a list of currently selected streams. </p> <p>To get the number of selected streams, set <em>pwStreamNumbers</em> to <strong>{{NULL}}</strong>. The method will return <strong>{{MF_E_BUFFERTOSMALL}}</strong> but will also set the value of <code>*pwNumStreams</code> equal to the number of selected streams. Then allocate an array of that size and call the method again, passing the array in the <em>pwStreamNumbers</em> parameter.</p><p>The following code shows these steps:</p><pre>{{HRESULT}} DisplaySelectedStreams({{IMFASFSplitter}} *pSplitter) { {{WORD}} count = 0; {{HRESULT}} hr = pSplitter-&gt;GetSelectedStreams({{NULL}}, &amp;count); if (hr == {{MF_E_BUFFERTOOSMALL}}) { {{WORD}} *pStreamIds = new (std::nothrow) {{WORD}}[count]; if (pStreamIds) { hr = pSplitter-&gt;GetSelectedStreams(pStreamIds, &amp;count); if ({{SUCCEEDED}}(hr)) { for ({{WORD}} i = 0; i &lt; count; i++) { printf("Selected stream {{ID:}} %d\n", pStreamIds[i]); } } delete [] pStreamIds; } else { hr = {{E_OUTOFMEMORY}}; } } return hr; } </pre><p>Alternatively, you can allocate an array that is equal to the total number of streams and pass that to <em>pwStreamNumbers</em>.</p><p>Before calling this method, initialize <code>*pwNumStreams</code> to the number of elements in <em>pwStreamNumbers</em>. If <em>pwStreamNumbers</em> is <strong>{{NULL}}</strong>, set <code>*pwNumStreams</code> to zero.</p><p> By default, no streams are selected by the splitter. Select streams by calling the <strong>{{IMFASFSplitter::SelectStreams}}</strong> method. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p> Invalid argument. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_BUFFERTOOSMALL}}</strong></dt> </dl> </td><td> <p> The <em>pwStreamNumbers</em> array is smaller than the number of selected streams. See Remarks.</p> </td></tr> </table><p>?</p> <dd> <p> The address of an array of <strong>{{WORDs}}</strong>. This array receives the stream numbers of the selected streams. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>On input, points to a variable that contains the number of elements in the <em>pwStreamNumbers</em> array. Set the variable to zero if <em>pwStreamNumbers</em> is <strong>{{NULL}}</strong>. </p> <p>On output, receives the number of elements that were copied into <em>pwStreamNumbers</em>. Each element is the identifier of a selected stream.</p> </dd> <p> </p><p>Sends packetized Advanced Systems Format ({{ASF}}) data to the {{ASF}} splitter for processing.</p> <p>After using this method to parse data, you must call <strong>{{IMFASFSplitter::GetNextSample}}</strong> to retrieve parsed media samples.</p><p>If your {{ASF}} data contains variable-sized packets, you must set the <strong>{{MFASFSPLITTER_PACKET_BOUNDARY}}</strong> attribute on the buffers to indicate the sample boundaries, and the buffers cannot span multiple packets.</p><p>If the method returns {{ME_E_NOTACCEPTING}}, call <strong>GetNextSample</strong> to get the output samples, or call <strong>{{IMFASFSplitter::Flush}}</strong> to clear the splitter.</p><p>The splitter might hold a reference count on the input buffer. Therefore, do not write over the valid data in the buffer after calling this method.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>The <em>pIBuffer</em> parameter is <strong>{{NULL}}</strong>.</p> <p>The specified offset value in <em>cbBufferOffset</em> is greater than the length of the buffer.</p> <p>The total value of <em>cbBufferOffset</em> and <em>cbLength</em> is greater than the length of the buffer.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_INITIALIZED}}</strong></dt> </dl> </td><td> <p>The <strong>{{IMFASFSplitter::Initialize}}</strong> method was not called or the call failed.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOTACCEPTING}}</strong></dt> </dl> </td><td> <p>The splitter cannot process more input at this time.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFMediaBuffer}}</strong> interface of a buffer object containing data to be parsed.</p> </dd> <dd> <p>The offset into the data buffer where the splitter should begin parsing. This value is typically set to 0.</p> </dd> <dd> <p>The length, in bytes, of the data to parse. This value is measured from the offset specified by <em>cbBufferOffset</em>. Set to 0 to process to the end of the buffer.</p> </dd> <p> </p><p>Retrieves a sample from the Advanced Systems Format ({{ASF}}) splitter after the data has been parsed.</p> <p>Before calling this method, call <strong>{{IMFASFSplitter::ParseData}}</strong> to give input data to the splitter. If the input does not contain enough data for a complete sample, the <strong>GetNextSample</strong> method succeeds but returns <strong>{{NULL}}</strong> in the <em>ppISample</em> parameter.</p><p>The {{ASF}} splitter skips samples for unselected streams. To select streams, call <strong>{{IMFASFSplitter::SelectStreams}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ASF_INVALIDDATA}}</strong></dt> </dl> </td><td> <p>The {{ASF}} data in the buffer is invalid.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ASF_MISSINGDATA}}</strong></dt> </dl> </td><td> <p>There is a gap in the {{ASF}} data.</p> </td></tr> </table><p>?</p> <dd> <p>Receives one of the following values.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{ASF_STATUSFLAGS_INCOMPLETE}}</strong></dt> </dl> </td><td> <p>More samples are ready to be retrieved. Call <strong>GetNextSample</strong> in a loop until the <em>pdwStatusFlags</em> parameter receives the value zero.</p> </td></tr> <tr><td><dl> <dt><strong>Zero</strong></dt> </dl> </td><td> <p>No additional samples are ready. Call <strong>{{IMFASFSplitter::ParseData}}</strong> to give more input data to the splitter.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>If the method returns a sample in the <em>ppISample</em> parameter, this parameter receives the number of the stream to which the sample belongs.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFSample}}</strong> interface of the parsed sample. The caller must release the interface. If no samples are ready, this parameter receives the value <strong>{{NULL}}</strong>.</p> </dd> <p> </p><p>Resets the Advanced Systems Format ({{ASF}}) splitter and releases all pending samples.</p> <p>Any samples waiting to be retrieved when <strong>Flush</strong> is called are lost.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Retrieves the send time of the last sample received.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p><em>pdwLastSendTime</em> is <strong>{{NULL}}</strong>.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the send time of the last sample received.</p> </dd> <p>Provides methods to create Advanced Systems Format ({{ASF}}) data packets. The methods of this interface process input samples into the packets that make up an {{ASF}} data section. The {{ASF}} multiplexer exposes this interface. To create the {{ASF}} multiplexer, call <strong>{{MFCreateASFMultiplexer}}</strong>.</p> <p> </p><p>Initializes the multiplexer with the data from an {{ASF}} ContentInfo object.</p> <p>This call must be made once at the beginning of encoding, with <em>pIContentInfo</em> pointing to the {{ASF}} ContentInfo object that describes the content to be encoded. This enables the {{ASF}} multiplexer to see, among other things, which streams will be present in the encoding session. This call typically does not affect the data in the {{ASF}} ContentInfo object.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFASFContentInfo}}</strong> interface of the <strong>{{MFASFContentInfo}}</strong> object that contains the header information of the new {{ASF}} file. The multiplexer will generate data packets for this file.</p> </dd> <p> </p><p>Sets multiplexer options.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Bitwise <strong>{{OR}}</strong> of zero or more members of the <strong>{{MFASF_MULTIPLEXERFLAGS}}</strong> enumeration. These flags specify which multiplexer options to use. For more information, see "Multiplexer Initialization and Leaky Bucket Settings" in Creating the Multiplexer Object.</p> </dd> <p> </p><p>Retrieves flags indicating the configured multiplexer options.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a bitwise <strong>{{OR}}</strong> of zero or more values from the <strong>{{MFASF_MULTIPLEXERFLAGS}}</strong> enumeration. To set these flags, call <strong>{{IMFASFMultiplexer::SetFlags}}</strong>.</p> </dd> <p> Delivers input samples to the multiplexer. </p> <p> The application passes samples to <strong>ProcessSample</strong>, and the {{ASF}} multiplexer queues them internally until they are ready to be placed into {{ASF}} packets. Call <strong>{{IMFASFMultiplexer::GetNextPacket}}</strong> to get the {{ASF}} data packet. </p><p>After each call to <strong>ProcessSample</strong>, call <strong>GetNextPacket</strong> in a loop to get all of the available data packets. For a code example, see Generating New {{ASF}} Data Packets.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOTACCEPTING}}</strong></dt> </dl> </td><td> <p> There are too many packets waiting to be retrieved from the multiplexer. Call <strong>{{IMFASFMultiplexer::GetNextPacket}}</strong> to get the packets.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_BANDWIDTH_OVERRUN}}</strong></dt> </dl> </td><td> <p> The sample that was processed violates the bandwidth limitations specified for the stream in the {{ASF}} ContentInfo object. When this error is generated, the sample is dropped. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> The value passed in <em>wStreamNumber</em> is invalid. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_LATE_SAMPLE}}</strong></dt> </dl> </td><td> <p> The presentation time of the input media sample is earlier than the send time. </p> </td></tr> </table><p>?</p> <dd> <p> The stream number of the stream to which the sample belongs. </p> </dd> <dd> <p> Pointer to the <strong>{{IMFSample}}</strong> interface of the input sample. The input sample contains the media data to be converted to {{ASF}} data packets. When possible, the time stamp of this sample should be accurate. </p> </dd> <dd> <p> The adjustment to apply to the time stamp of the sample. This parameter is used if the caller wants to shift the sample time on <em>pISample</em>. This value should be positive if the time stamp should be pushed ahead and negative if the time stamp should be pushed back. This time stamp is added to sample time on <em>pISample</em>, and the resulting time is used by the multiplexer instead of the original sample time. If no adjustment is needed, set this value to 0. </p> </dd> <p> </p><p>Retrieves the next output {{ASF}} packet from the multiplexer.</p> <p> The client needs to call this method, ideally after every call to <strong>{{IMFASFMultiplexer::ProcessSample}}</strong>, to get the output {{ASF}} packets. Call this method in a loop as long as the <strong>{{ASF_STATUSFLAGS_INCOMPLETE}}</strong> flag is received. </p><p>If no packets are ready, the method returns <strong>{{S_OK}}</strong> but does not return a sample in <em>ppIPacket</em>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> </table><p>?</p> <dd> <p> Receives zero or more status flags. If more than one packet is waiting, the method sets the <strong>{{ASF_STATUSFLAGS_INCOMPLETE}}</strong> flag. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFSample}}</strong> interface of the first output sample of the data packet. The caller must release the interface. </p> </dd> <p> </p><p>Signals the multiplexer to process all queued output media samples. Call this method after passing the last sample to the multiplexer.</p> <p>You must call <strong>Flush</strong> after the last sample has been passed into the {{ASF}} multiplexer and before you call <strong>{{IMFASFMultiplexer::End}}</strong>. This causes all output media samples in progress to be completed. After calling <strong>Flush</strong>, call <strong>{{IMFASFMultiplexer::GetNextPacket}}</strong> in a loop until all the pending media samples have been packetized.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Collects data from the multiplexer and updates the {{ASF}} ContentInfo object to include that information in the {{ASF}} Header Object.</p> <p>For non-live encoding scenarios (such as encoding to a file), the user should call <strong>End</strong> to update the specified ContentInfo object, adding data that the multiplexer has collected during the packet generation process. The user should then call <strong>{{IMFASFContentInfo::GenerateHeader}}</strong> and write the output header at the beginning of the {{ASF}} file (overwriting the header obtained at the beginning of the encoding session). For more information, see Writing an {{ASF}} Header Object for a New File.</p><p>During live encoding, it is usually not possible to rewrite the header, so this call is not required for live encoding. (The header in those cases will simply lack some of the information that was not available until the end of the encoding session.)</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_FLUSH_NEEDED}}</strong></dt> </dl> </td><td> <p>There are pending output media samples waiting in the multiplexer. Call <strong>{{IMFASFMultiplexer::Flush}}</strong> to force the media samples to be packetized.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFASFContentInfo}}</strong> interface of the ContentInfo object. This must be the same object that was used to initialize the multiplexer. The ContentInfo object represents the {{ASF}} Header Object of the file for which the multiplexer generated data packets.</p> </dd> <p> </p><p>Retrieves multiplexer statistics.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The stream number for which to obtain statistics.</p> </dd> <dd> <p>Pointer to an <strong>{{ASF_MUX_STATISTICS}}</strong> structure that receives the statistics.</p> </dd> <p> </p><p>Sets the maximum time by which samples from various streams can be out of synchronization. The multiplexer will not accept a sample with a time stamp that is out of synchronization with the latest samples from any other stream by an amount that exceeds the synchronization tolerance.</p> <p>The synchronization tolerance is the maximum difference in presentation times at any given point between samples of different streams that the {{ASF}} multiplexer can accommodate. That is, if the synchronization tolerance is 3 seconds, no stream can be more than 3 seconds behind any other stream in the time stamps passed to the multiplexer. The multiplexer determines a default synchronization tolerance to use, but this method overrides it (usually to increase it). More tolerance means the potential for greater latency in the multiplexer. If the time stamps are synchronized among the streams, actual latency will be much lower than <em>msSyncTolerance</em>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Synchronization tolerance in milliseconds.</p> </dd> <p> </p><p>Retrieves the flags that indicate the selected indexer options.</p> <p>You must call this method before initializing the indexer object with <strong>{{IMFASFIndexer::Initialize}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p><em>pdwFlags</em> is <strong>{{NULL}}</strong>.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a bitwise {{OR}} of zero or more flags from the <strong>{{MFASF_INDEXER_FLAGS}}</strong> enumeration.</p> </dd> <p> </p><p>Sets indexer options.</p> <p><strong>{{IMFASFIndexer::SetFlags}}</strong> must be called before <strong>{{IMFASFIndexer::Initialize}}</strong>. Attempting to call <strong>SetFlags</strong> after <strong>Initialize</strong> will return {{MF_E_INVALIDREQUEST}} as a result.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The indexer object was initialized before setting flags for it. For more information, see Remarks.</p> </td></tr> </table><p>?</p> <dd> <p>Bitwise {{OR}} of zero or more flags from the <strong>{{MFASF_INDEXER_FLAGS}}</strong> enumeration specifying the indexer options to use.</p> </dd> <p> </p><p>Retrieves the flags that indicate the selected indexer options.</p> <p>You must call this method before initializing the indexer object with <strong>{{IMFASFIndexer::Initialize}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p><em>pdwFlags</em> is <strong>{{NULL}}</strong>.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a bitwise {{OR}} of zero or more flags from the <strong>{{MFASF_INDEXER_FLAGS}}</strong> enumeration.</p> </dd> <p> </p><p>Initializes the indexer object. This method reads information in a ContentInfo object about the configuration of the content and the properties of the existing index, if present. Use this method before using the indexer for either writing or reading an index. You must make this call before using any of the other methods of the <strong>{{IMFASFIndexer}}</strong> interface.</p> <p>The indexer needs to examine the data in the ContentInfo object to properly write or read the index for the content. The indexer will not make changes to the content information and will not hold any references to the <strong>{{IMFASFContentInfo}}</strong> interface.</p><p>In the {{ASF}} header, the maximum data-packet size must equal the minimum data-packet size. Otherwise, the method returns <strong>{{MF_E_UNEXPECTED}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ASF_INVALIDDATA}}</strong></dt> </dl> </td><td> <p>Invalid {{ASF}} data.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNEXPECTED}}</strong></dt> </dl> </td><td> <p>Unexpected error.</p> </td></tr> </table><p>?</p> <p> </p><p>Retrieves the offset of the index object from the start of the content.</p> <p>The index continues from the offset retrieved by this method to the end of the file.</p><p>You must call <strong>{{IMFASFIndexer::Initialize}}</strong> to set up the indexer before calling this method.</p><p>If the index is retrieved by using more than one call to <strong>{{IMFASFIndexer::GetCompletedIndex}}</strong>, the position of individual index portions is equal to the index offset plus the offset of the portion within the index.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p><em>pIContentInfo</em> is <strong>{{NULL}}</strong> or <em>pcbIndexOffset</em> is <strong>{{NULL}}</strong></p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFASFContentInfo}}</strong> interface of the ContentInfo object that describes the content.</p> </dd> <dd> <p>Receives the offset of the index relative to the beginning of the content described by the ContentInfo object. This is the position relative to the beginning of the {{ASF}} file.</p> </dd> <p> </p><p>Adds byte streams to be indexed.</p> <p>For a reading scenario, only one byte stream should be used by the indexer object. For an index generating scenario, it depends how many index objects are needed to be generated. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ALREADY_INITIALIZED}}</strong></dt> </dl> </td><td> <p>The indexer object has already been initialized and it has packets which have been indexed.</p> </td></tr> </table><p>?</p> <dd> <p>An array of <strong>{{IMFByteStream}}</strong> interface references. To get the byte stream, call <strong>{{MFCreateASFIndexerByteStream}}</strong>.</p> </dd> <dd> <p>The number of references in the <em>ppIByteStreams</em> array.</p> </dd> <p> </p><p>Retrieves the number of byte streams that are in use by the indexer object.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p><em>pcByteStreams</em> is <strong>{{NULL}}</strong>.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of byte streams that are in use by the indexer object.</p> </dd> <p> </p><p>Retrieves the index settings for a specified stream and index type.</p> <p>To read an existing {{ASF}} index, call <strong>{{IMFASFIndexer::SetIndexByteStreams}}</strong> before calling this method.</p><p>If an index exists for the stream and the value passed into <em>pcbIndexDescriptor</em> is smaller than the required size of the <em>pbIndexDescriptor</em> buffer, the method returns {{MF_E_BUFFERTOOSMALL}}. The required buffer size is returned in the <em>pcbIndexDescriptor</em> parameter.</p><p>If there is no index for the specified stream, the method returns <strong>{{FALSE}}</strong> in the <em>pfIsIndexed</em> parameter.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_BUFFERTOOSMALL}}</strong></dt> </dl> </td><td> <p>The buffer size specified in <em>pcbIndexDescriptor</em> is too small.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to an <strong>{{ASF_INDEX_IDENTIFIER}}</strong> structure that contains the stream number and index type for which to get the status.</p> </dd> <dd> <p>A variable that retrieves a Boolean value specifying whether the index described by <em>pIndexIdentifier</em> has been created.</p> </dd> <dd> <p>A buffer that receives the index descriptor. The index descriptor consists of an <strong>{{ASF_INDEX_DESCRIPTOR}}</strong> structure, optionally followed by index-specific data.</p> </dd> <dd> <p>On input, specifies the size, in bytes, of the buffer that <em>pbIndexDescriptor</em> points to. The value can be zero if <em>pbIndexDescriptor</em> is <strong>{{NULL}}</strong>. On output, receives the size of the index descriptor, in bytes.</p> </dd> <p> </p><p>Configures the index for a stream.</p> <p>You must make all calls to <strong>SetIndexStatus</strong> before making any calls to <strong>{{IMFASFIndexer::GenerateIndexEntries}}</strong>.</p><p>The indexer object is configured to create temporal indexes for each stream by default. Call this method only if you want to override the default settings.</p><p>You cannot use this method in an index reading scenario. You can only use this method when writing indexes.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>At attempt was made to change the index status in a seek-only scenario. For more information, see Remarks.</p> </td></tr> </table><p>?</p> <dd> <p>The index descriptor to set. The index descriptor is an <strong>{{ASF_INDEX_DESCRIPTOR}}</strong> structure, optionally followed by index-specific data.</p> </dd> <dd> <p>The size, in bytes, of the index descriptor.</p> </dd> <dd> <p>A Boolean value. Set to <strong>{{TRUE}}</strong> to have the indexer create an index of the type specified for the stream specified in the index descriptor.</p> </dd> <p> Given a desired seek time, gets the offset from which the client should start reading data. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ASF_OUTOFRANGE}}</strong></dt> </dl> </td><td> <p> The requested seek time is out of range. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NO_INDEX}}</strong></dt> </dl> </td><td> <p> No index exists of the specified type for the specified stream. </p> </td></tr> </table><p>?</p> <dd> <p> The value of the index entry for which to get the position. The format of this value varies depending on the type of index, which is specified in the index identifier. For time-based indexing, the variant type is <strong>{{VT_I8}}</strong> and the value is the desired seek time, in 100-nanosecond units. </p> </dd> <dd> <p> Pointer to an <strong>{{ASF_INDEX_IDENTIFIER}}</strong> structure that identifies the stream number and index type. </p> </dd> <dd> <p> Receives the offset within the data segment of the {{ASF}} Data Object. The offset is in bytes, and is relative to the start of packet 0. The offset gives the starting location from which the client should begin reading from the stream. This location might not correspond exactly to the requested seek time. </p> <p> For reverse playback, if no key frame exists after the desired seek position, this parameter receives the value <strong>{{MFASFINDEXER_READ_FOR_REVERSEPLAYBACK_OUTOFDATASEGMENT}}</strong>. In that case, the seek position should be 1 byte pass the end of the data segment. </p> </dd> <dd> <p> Receives the approximate time stamp of the data that is located at the offset returned in the <em>pcbOffsetWithinData</em> parameter. The accuracy of this value is equal to the indexing interval of the {{ASF}} index, typically about 1 second. </p> <ul> <li> If the index type specified in <em>pIndexIdentifier</em> is <strong>{{GUID_NULL}}</strong> (time indexing), this parameter can be <strong>{{NULL}}</strong>. </li> <li> For all other index types, this parameter must be <strong>{{NULL}}</strong>. </li> </ul> <p> If the approximate time stamp cannot be determined, this parameter receives the value <strong>{{MFASFINDEXER_APPROX_SEEK_TIME_UNKNOWN}}</strong>. </p> </dd> <dd> <p> Receives the payload number of the payload that contains the information for the specified stream. Packets can contain multiple payloads, each containing data for a different stream. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <p> Accepts an {{ASF}} packet for the file and creates index entries for them.</p> <p>The {{ASF}} indexer creates indexes for a file internally. You can get the completed index for all data packets sent to the indexer by committing the index with <strong>{{IMFASFIndexer::CommitIndex}}</strong> and then calling <strong>{{IMFASFIndexer::GetCompletedIndex}}</strong> to write the index entries into a media buffer. To determine the size of the index so you can allocate a buffer large enough to hold the index, call <strong>{{IMFASFIndexer::GetIndexWriteSpace}}</strong>.</p><p> When this method creates index entries, they are immediately available for use by <strong>{{IMFASFIndexer::GetSeekPositionForValue}}</strong>. </p><p> The media sample specified in <em>pIASFPacketSample</em> must hold a buffer that contains a single {{ASF}} packet. Get the sample from the {{ASF}} multiplexer by calling the <strong>{{IMFASFMultiplexer::GetNextPacket}}</strong> method. </p><p>You cannot use this method while reading an index, only when writing an index.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>The argument passed in is <strong>{{NULL}}</strong>.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_INITIALIZED}}</strong></dt> </dl> </td><td> <p>The indexer is not initialized.</p> </td></tr> </table><p>?</p> <dd> <p> Pointer to the <strong>{{IMFSample}}</strong> interface of a media sample that contains the {{ASF}} packet. </p> </dd> <p> </p><p>Adds information about a new index to the ContentInfo object associated with {{ASF}} content. You must call this method before copying the index to the content so that the index will be readable by the indexer later.</p> <p>For the index to function properly, you must call this method after all {{ASF}} packets in the file have been passed to the indexer by using the <strong>{{IMFASFIndexer::GenerateIndexEntries}}</strong> method. After you call this method, you must retrieve the indexes by calling <strong>GetCompletedIndex</strong> and write them to the appropriate location in the file. Finally, you must generate a new {{ASF}} header by calling the <strong>{{IMFASFContentInfo::GenerateHeader}}</strong> method of the {{ASF}} ContentInfo object.</p><p> An application must use the <strong>CommitIndex</strong> method only when writing a new index otherwise <strong>CommitIndex</strong> may return {{MF_E_INVALIDREQUEST}} as a result. For example, {{MF_E_INVALIDREQUEST}} is returned if the application has flags other than {{MFASF_INDEXER_WRITE_NEW_INDEX}} set on the indexer object. <strong>CommitIndex</strong> can also return {{MFASF_INDEXER_WRITE_NEW_INDEX}} if the index entries have already been committed through an earlier <strong>CommitIndex</strong> call.</p><p>You cannot use this method in an index reading scenario. You can only use this method when writing indexes.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The caller made an invalid request. For more information, see Remarks.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFASFContentInfo}}</strong> interface of the ContentInfo object that describes the content.</p> </dd> <p> </p><p>Retrieves the size, in bytes, of the buffer required to store the completed index.</p> <p>Use this method to get the size of the index and then allocate a buffer big enough to hold it. </p><p>The index must be committed with a call to<strong>{{IMFASFIndexer::CommitIndex}}</strong> before calling <strong>{{IMFASFIndexer::GetIndexWriteSpace}}</strong>. If the index is not committed before <strong>GetIndexWriteSpace</strong> is called, then {{MF_E_INDEX_NOT_COMMITTED}} will be returned as a result. </p><p>Call <strong>{{IMFASFIndexer::GetCompletedIndex}}</strong> to write the completed index into a media buffer.</p><p>You cannot use this method in a reading scenario. You can only use this method when writing indexes.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INDEX_NOT_COMMITTED}}</strong></dt> </dl> </td><td> <p>The index has not been committed. For more information; see Remarks.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the size of the index, in bytes</p> </dd> <p> </p><p>Retrieves the completed index from the {{ASF}} indexer object.</p> <p>This method uses as much of the buffer as possible, and updates the length of the buffer appropriately.</p><p>If <em>pIIndexBuffer</em> is large enough to contain the entire buffer, <em>cbOffsetWithinIndex</em> should be 0, and the call needs to be made only once. Otherwise, there should be no gaps between successive buffers.</p><p>The user must write this data to the content at <em>cbOffsetFromIndexStart</em> bytes after the end of the {{ASF}} data object. You can call <strong>{{IMFASFIndexer::GetIndexPosition}}</strong> to determine the start position of the {{ASF}} index.</p><p>This call will not succeed unless <strong>{{IMFASFIndexer::CommitIndex}}</strong> has been called. After calling <strong>GetCompletedIndex</strong>, the caller must call <strong>{{IMFASFContentInfo::GenerateHeader}}</strong> and overwrite the existing {{ASF}} header with the new header; otherwise, the {{ASF}} header will not match the content, and the file is not guaranteed to play correctly.</p><p>You cannot use this method in an index reading scenario. You can only use this method when writing indexes.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INDEX_NOT_COMMITTED}}</strong></dt> </dl> </td><td> <p>The index was not committed before attempting to get the completed index. For more information, see Remarks.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFMediaBuffer}}</strong> interface of a media buffer that receives the index data.</p> </dd> <dd> <p>The offset of the data to be retrieved, in bytes from the start of the index data. Set to 0 for the first call. If subsequent calls are needed (the buffer is not large enough to hold the entire index), set to the byte following the last one retrieved.</p> </dd> <p> </p><p>Retrieves the number of bandwidth steps that exist for the content. This method is used for multiple bit rate ({{MBR}}) content.</p> <p>Bandwidth steps are bandwidth levels used for multiple bit rate ({{MBR}}) content. If you stream {{MBR}} content, you can choose the bandwidth step that matches the network conditions to avoid interruptions during playback.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of bandwidth steps.</p> </dd> <p> </p><p>Retrieves the number of streams that are in the Advanced Systems Format ({{ASF}}) content.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of streams in the content.</p> </dd> <p> </p><p>Retrieves the number of outputs for the Advanced Systems Format ({{ASF}}) content.</p> <p>Outputs are streams in the {{ASF}} data section that will be parsed.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of outputs.</p> </dd> <p> </p><p>Retrieves the number of streams associated with an output.</p> <p>An output is a stream in an {{ASF}} data section that will be parsed. If mutual exclusion is used, mutually exclusive streams share the same output.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>Invalid output number.</p> </td></tr> </table><p>?</p> <dd> <p>The output number for which to retrieve the stream count.</p> </dd> <dd> <p>Receives the number of streams associated with the output.</p> </dd> <p> </p><p>Retrieves the stream numbers for all of the streams that are associated with an output.</p> <p>An output is a stream in an {{ASF}} data section that will be parsed. If mutual exclusion is used, mutually exclusive streams share the same output.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>Invalid output number.</p> </td></tr> </table><p>?</p> <dd> <p>The output number for which to retrieve stream numbers.</p> </dd> <dd> <p>Address of an array that receives the stream numbers associated with the output. The caller allocates the array. The array size must be at least as large as the value returned by the <strong>{{IMFASFStreamSelector::GetOutputStreamCount}}</strong> method.</p> </dd> <p> </p><p>Retrieves the output number associated with a stream.</p> <p>Outputs are streams in the {{ASF}} data section that will be parsed.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>Invalid stream number.</p> </td></tr> </table><p>?</p> <dd> <p>The stream number for which to retrieve an output number.</p> </dd> <dd> <p>Receives the output number.</p> </dd> <p> </p><p>Retrieves the manual output override selection that is set for a stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Stream number for which to retrieve the output override selection.</p> </dd> <dd> <p>Receives the output override selection. The value is a member of the <strong>{{ASF_SELECTION_STATUS}}</strong> enumeration.</p> </dd> <p> </p><p>Sets the selection status of an output, overriding other selection criteria.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Output number for which to set selection.</p> </dd> <dd> <p>Member of the <strong>{{ASF_SELECTION_STATUS}}</strong> enumeration specifying the level of selection for the output.</p> </dd> <p> </p><p>Retrieves the number of mutual exclusion objects associated with an output.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Output number for which to retrieve the count of mutually exclusive relationships.</p> </dd> <dd> <p>Receives the number of mutual exclusions.</p> </dd> <p> </p><p>Retrieves a mutual exclusion object for an output.</p> <p>Outputs are streams in the {{ASF}} data section that will be parsed.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Output number for which to retrieve a mutual exclusion object.</p> </dd> <dd> <p>Mutual exclusion number. This is an index of mutually exclusive relationships associated with the output. Set to a number between 0, and 1 less than the number of mutual exclusion objects retrieved by calling <strong>{{IMFASFStreamSelector::GetOutputMutexCount}}</strong>.</p> </dd> <dd> <p>Receives a reference to the mutual exclusion object's <strong>{{IUnknown}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Selects a mutual exclusion record to use for a mutual exclusion object associated with an output.</p> <p>An output is a stream in an Advanced Systems Format ({{ASF}}) data section that will be parsed. If mutual exclusion is used, mutually exclusive streams share the same output.</p><p>An {{ASF}} file can contain multiple mutually exclusive relationships, such as a file with both language based and bit-rate based mutual exclusion. If an output is involved in multiple mutually exclusive relationships, a record from each must be selected.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The output number for which to set a stream.</p> </dd> <dd> <p>Index of the mutual exclusion for which to select.</p> </dd> <dd> <p>Record of the specified mutual exclusion to select.</p> </dd> <p> </p><p>Retrieves the number of bandwidth steps that exist for the content. This method is used for multiple bit rate ({{MBR}}) content.</p> <p>Bandwidth steps are bandwidth levels used for multiple bit rate ({{MBR}}) content. If you stream {{MBR}} content, you can choose the bandwidth step that matches the network conditions to avoid interruptions during playback.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of bandwidth steps.</p> </dd> <p> </p><p>Retrieves the stream numbers that apply to a bandwidth step. This method is used for multiple bit rate ({{MBR}}) content.</p> <p>Bandwidth steps are bandwidth levels used for {{MBR}} content. If you stream {{MBR}} content, you can choose the bandwidth step that matches the network conditions to avoid interruptions during playback.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Bandwidth step number for which to retrieve information. Set this value to a number between 0, and 1 less than the number of bandwidth steps returned by <strong>{{IMFASFStreamSelector::GetBandwidthStepCount}}</strong>.</p> </dd> <dd> <p>Receives the bit rate associated with the bandwidth step.</p> </dd> <dd> <p>Address of an array that receives the stream numbers. The caller allocates the array. The array size must be at least as large as the value returned by the <strong>{{IMFASFStreamSelector::GetStreamCount}}</strong> method. </p> </dd> <dd> <p>Address of an array that receives the selection status of each stream, as an <strong>{{ASF_SELECTION_STATUS}}</strong> value. The members of this array correspond to the members of the <em>rgwStreamNumbers</em> array by index. The caller allocates the array. The array size must be at least as large as the value returned by the <strong>{{IMFASFStreamSelector::GetStreamCount}}</strong> method. </p> </dd> <p> </p><p>Retrieves the index of a bandwidth step that is appropriate for a specified bit rate. This method is used for multiple bit rate ({{MBR}}) content.</p> <p>In a streaming multiple bit rate ({{MBR}}) scenario, call this method with the current data rate of the network connection to determine the correct step to use. You can also call this method periodically throughout streaming to ensure that the best step is used.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The bit rate to find a bandwidth step for.</p> </dd> <dd> <p>Receives the step number. Use this number to retrieve information about the step by calling <strong>{{IMFASFStreamSelector::GetBandwidthStep}}</strong>.</p> </dd> <p> </p><p>Sets options for the stream selector.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Bitwise <strong>{{OR}}</strong> of zero or more members of the <strong>{{MFASF_STREAMSELECTOR_FLAGS}}</strong> enumeration specifying the options to use.</p> </dd> <p>Configures Windows Media Digital Rights Management ({{DRM}}) for Network Devices on a network sink.</p><p> The Advanced Systems Format ({{ASF}}) streaming media sink exposes this interface. To get a reference to the <strong>{{IMFDRMNetHelper}}</strong> interface, perform the following tasks.</p><ol> <li>Get the activation object for the {{ASF}} streaming media sink by calling <strong>{{MFCreateASFStreamingMediaSinkActivate}}</strong>.</li> <li>Create the media sink by calling the activation object <strong>ActivateObject</strong> method.</li> <li>Get an <strong>{{IMFDRMNetHelper}}</strong> reference by calling <strong>QueryInterface</strong> on the media sink.</li> </ol><p>For more information, see Remarks.</p> <p>To stream protected content over a network, the <em>{{ASF}} streaming media sink</em> provides an output trust authority ({{OTA}}) that supports Windows Media {{DRM}} for Network Devices and implements the <strong>{{IMFDRMNetHelper}}</strong> interface. For this {{OTA}}, encryption occurs on each frame before multiplexing. The license request and response process takes place in the media sink.</p><p>The application gets a reference to <strong>{{IMFDRMNetHelper}}</strong> and uses the methods to handle the license request and response. The application is also responsible for sending the license to the client.</p><p>To stream the content, the application does the following:</p><ol> <li>Provide the {{HTTP}} byte stream to which the media sink writes the streamed content. <p>To stream {{DRM}}-protected content over a network from a server to a client, an application must use the Microsoft Media Foundation Protected Media Path ({{PMP}}). The media sink and the application-provided {{HTTP}} byte stream exist in mfpmp.exe. Therefore, the byte stream must expose the <strong>{{IMFActivate}}</strong> interface so that it can be created out-of-process.</p><strong>Note</strong>??This might affect how the code is packaged. The {{DLL}} that contains the {{HTTP}} byte stream and other dependent {{DLLs}} must be signed for the Protected Environment ({{PE}}-signed). ? </li> <li>Set the <strong>{{MFPKEY_ASFMEDIASINK_DRMACTION}}</strong> property to <strong>{{MFSINK_WMDRMACTION_TRANSCRYPT}}</strong>. The media sink's property store is available to the application through the {{ASF}} ContentInfo. To get the property store, call <strong>{{IMFASFContentInfo::GetEncodingConfigurationPropertyStore}}</strong>.</li> <li>Get a reference to the <strong>{{IMFDRMNetHelper}}</strong> interface by querying the media sink.</li> <li>To make a license request, call <strong>{{IMFDRMNetHelper::ProcessLicenseRequest}}</strong>. This method calls into the {{OTA}} implementation and retrieves the license.<p>When the clock starts for the first time or restarts , the encrypter that is used for encrypting samples is retrieved, and the license response is cached.</p> </li> <li>To get the cached license response, call <strong>{{IMFDRMNetHelper::GetChainedLicenseResponse}}</strong>.</li> </ol> <p>Gets the license response for the specified request.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media sink was shut down. </p> </td></tr> </table><p>?</p> <dd> <p>Pointer to a byte array that contains the license request.</p> </dd> <dd> <p>Size, in bytes, of the license request.</p> </dd> <dd> <p>Receives a reference to a byte array that contains the license response. The caller must free the array by calling <strong>CoTaskMemFree</strong>.</p> </dd> <dd> <p>Receives the size, in bytes, of the license response.</p> </dd> <dd> <p>Receives the key identifier. The caller must release the string by calling <strong>SysFreeString</strong>.</p> </dd> <p>Not implemented in this release.</p> <p>The method returns <strong>{{E_NOTIMPL}}</strong>.</p> <dd> <p>Receives a reference to a byte array that contains the license response. The caller must free the array by calling <strong>CoTaskMemFree</strong>.</p> </dd> <dd> <p>Receives the size, in bytes, of the license response.</p> </dd> <p> </p><p>Creates the {{ASF}} Header Object object.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Creates the {{ASF}} profile object.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFASFProfile}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Creates an {{ASF}} profile object from a presentation descriptor.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFPresentationDescriptor}}</strong> interface of the presentation descriptor that contains the profile information.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFASFProfile}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Creates a presentation descriptor from an {{ASF}} profile object.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The function succeeded. </p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFASFProfile}}</strong> interface of the {{ASF}} profile object.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFPresentationDescriptor}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Creates the {{ASF}} Splitter.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Creates the {{ASF}} Multiplexer.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFASFMultiplexer}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Creates the {{ASF}} Indexer object.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFASFIndexer}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Creates a byte stream to access the index in an {{ASF}} stream.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table:</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The call succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNEXPECTED}}</strong></dt> </dl> </td><td> <p>The offset specified in <em>cbIndexStartOffset</em> is invalid.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFByteStream}}</strong> interface of a byte stream that contains the {{ASF}} stream.</p> </dd> <dd> <p>Byte offset of the index within the {{ASF}} stream. To get this value, call <strong>{{IMFASFIndexer::GetIndexPosition}}</strong>.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFByteStream}}</strong> interface. Use this interface to read from the index or write to the index. The caller must release the interface.</p> </dd> <p> </p><p>Creates the {{ASF}} stream selector.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The function succeeded. </p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFASFProfile}}</strong> interface.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFASFStreamSelector}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Creates the {{ASF}} media sink.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to a byte stream that will be used to write the {{ASF}} stream.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaSink}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Creates an activation object that can be used to create the {{ASF}} media sink.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Null-terminated wide-character string that contains the output file name.</p> </dd> <dd> <p>A reference to the <strong>{{IMFASFContentInfo}}</strong> interface of an initialized {{ASF}} Header Object object. Use this interface to configure the {{ASF}} media sink.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFActivate}}</strong> interface. The caller must release the interface.</p> </dd> <p> Creates an activation object that can be used to create a Windows Media Video ({{WMV}}) encoder. </p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFMediaType}}</strong> interface. This parameter specifies the encoded output format.</p> </dd> <dd> <p> A reference to the <strong>{{IPropertyStore}}</strong> interface of a property store that contains encoding parameters. Encoding parameters for the {{WMV}} encoder are defined in the header file wmcodecdsp.h. If you have an {{ASF}} ContentInfo object that contains an {{ASF}} profile object with all the streams for the output file, you can get the property store by calling <strong>{{IMFASFContentInfo::GetEncodingConfigurationPropertyStore}}</strong>. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFActivate}}</strong> interface. Use this interface to create the encoder. The caller must release the interface. </p> </dd> <p> Creates an activation object that can be used to create a Windows Media Audio ({{WMA}}) encoder. </p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A reference to the <strong>{{IMFMediaType}}</strong> interface. This parameter specifies the encoded output format.</p> </dd> <dd> <p> A reference to the <strong>{{IPropertyStore}}</strong> interface of a property store that contains encoding parameters. Encoding parameters for the {{WMV}} encoder are defined in the header file wmcodecdsp.h. If you have an {{ASF}} ContentInfo object that contains an {{ASF}} profile object with all the streams for the output file, you can get the property store by calling <strong>{{IMFASFContentInfo::GetEncodingConfigurationPropertyStore}}</strong>. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFActivate}}</strong> interface. Use this interface to create the encoder. The caller must release the interface. </p> </dd> <p>Creates an activation object for the {{ASF}} streaming sink.</p><p>The {{ASF}} streaming sink enables an application to write streaming Advanced Systems Format ({{ASF}}) packets to an {{HTTP}} byte stream. </p> <p>To create the {{ASF}} streaming sink in another process, call <strong>{{MFCreateASFStreamingMediaSinkActivate}}</strong>. </p><p>An application can get a reference to the {{ASF}} ContentInfo Object by calling <strong>{{IUnknown::QueryInterface}}</strong> on the media sink object received in the <em>ppIMediaSink</em> parameter. The ContentInfo object is used to set the encoder configuration settings, provide stream properties supplied by an {{ASF}} profile, and add metadata information. These configuration settings populate the various {{ASF}} header objects of the encoded {{ASF}} file. For more information, see Setting Properties in the ContentInfo Object.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A reference to a byte stream object in which the {{ASF}} media sink writes the streamed content.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaSink}}</strong> interface of the {{ASF}} streaming-media sink object. To create the media sink, the application must call <strong>{{IMFActivate::ActivateObject}}</strong> on the received reference. The caller must release the interface reference.</p> </dd> <p>Creates an activation object for the {{ASF}} streaming sink.</p><p>The {{ASF}} streaming sink enables an application to write streaming Advanced Systems Format ({{ASF}}) packets to an {{HTTP}} byte stream. The activation object can be used to create the {{ASF}} streaming sink in another process.</p> <p>Starting in Windows?7, Media Foundation provides an {{ASF}} streaming sink that writes the content in a live streaming scenario. This function should be used in secure transcode scenarios where this media sink needs to be created and configured in the remote process. Like the {{ASF}} file sink, the new media sink performs {{ASF}} related tasks such as writing the {{ASF}} header, generating data packets (muxing). The content is written to a caller-implemented byte stream such as an {{HTTP}} byte stream. The caller must also provide an activation object that media sink can use to create the byte stream remotely. </p><p>In addition, it performs transcryption for streaming protected content. It hosts the Windows Media Digital Rights Management ({{DRM}}) for Network Devices Output Trust Authority ({{OTA}}) that handles the license request and response. For more information, see <strong>{{IMFDRMNetHelper}}</strong> interface.</p><p>The new media sink does not perform any time adjustments. If the clock seeks, the timestamps are not changed.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFActivate}}</strong> interface of an activation object. The caller implements this interface. The <strong>{{IMFActivate::ActivateObject}}</strong> method of the activation object must create a byte-stream object. The byte stream exposes the <strong>{{IMFByteStream}}</strong> interface. The {{ASF}} streaming sink will write data to this byte stream.</p> </dd> <dd> <p>A reference to an {{ASF}} ContentInfo Object that contains the properties that describe the {{ASF}} content. These settings can contain stream settings, encoding properties, and metadata. For more information about these properties, see Setting Properties in the ContentInfo Object.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFActivate}}</strong> interface of the activation object that is used to create the {{ASF}} streaming-media sink. To create the media sink, the application must call <strong>{{IMFActivate::ActivateObject}}</strong> by using the received reference. The <strong>ActivateObject</strong> method also calls <strong>{{IMFActivate::Activate}}</strong> on the byte stream activate object specified by <em>pByteStreamActivate</em>, to create it so that the media sink can write streamed content in the byte stream. The caller must release the <strong>{{IMFActivate}}</strong> interface reference of the media sink activation object received in <em>ppIActivate</em>.</p> </dd> <p>Specifies the type of work queue for the <strong>{{MFAllocateWorkQueueEx}}</strong> function to create.</p> <p> Specifies the status of a topology during playback. </p> <p> This enumeration is used with the {{MESessionTopologyStatus}} event. The {{MESessionTopologyStatus}} event always has an <strong>{{MF_EVENT_TOPOLOGY_STATUS}}</strong> attribute whose value is a member of this enumeration. </p><p> For a single topology, the Media Session sends these status flags in numerical order, starting with <strong>{{MF_TOPOSTATUS_READY}}</strong>. However, there is no guarantee about the ordering of the events across two different topologies. For example, you might get <strong>{{MF_TOPOSTATUS_READY}}</strong> for a topology before you get <strong>{{MF_TOPOSTATUS_ENDED}}</strong> for the previous topology. </p> <dd> <p> This value is not used. </p> </dd> <dd> <p> The topology is ready to start. After this status flag is received, you can use the Media Session's <strong>{{IMFGetService::GetService}}</strong> method to query the topology for services, such as rate control. </p> </dd> <dd> <p> The Media Session has started to read data from the media sources in the topology. </p> </dd> <dd> <p>The Media Session modified the topology, because the format of a stream changed.</p> </dd> <dd> <p> The media sinks have switched from the previous topology to this topology. This status value is not sent for the first topology that is played. For the first topology, the {{MESessionStarted}} event indicates that the media sinks have started receiving data. </p> </dd> <dd> <p> Playback of this topology is complete. The Media Session might still use the topology internally. The Media Session does not completely release the topology until it sends the next <strong>{{MF_TOPOSTATUS_STARTED_SOURCE}}</strong> status event or the {{MESessionEnded}} event. </p> </dd> <p>Contains flags for registering and enumeration Media Foundation transforms ({{MFTs}}).</p><p>These flags are used in the following functions:</p><ul> <li> <strong>{{MFTEnumEx}}</strong>: These flags control which Media Foundation transforms ({{MFTs}}) are enumerated, as well as the enumeration order.</li> <li> <strong>{{MFTRegister}}</strong>: A subset of these flags are used when registering an {{MFT}}.</li> </ul> <p>For registration, these flags describe the {{MFT}} that is being registered. Some flags do not apply in that context. For enumeration, these flags control which {{MFTs}} are selected in the enumeration. For more details about the precise meaning of these flags, see the reference topics for <strong>{{MFTRegister}}</strong> and <strong>{{MFTEnumEx}}</strong> </p><p>For registration, the <strong>{{MFT_ENUM_FLAG_SYNCMFT}}</strong>, <strong>{{MFT_ENUM_FLAG_ASYNCMFT}}</strong>, and <strong>{{MFT_ENUM_FLAG_HARDWARE}}</strong> flags are mutually exclusive. For enumeration, these three flags can be combined.</p> <p>Describes the type of data provided by a frame source.</p> <p>The values of this enumeration are used with the {{MF_DEVICESTREAM_ATTRIBUTE_FRAMESOURCE_TYPES}} attribute.</p> <dd> <p>The frame source provides color data.</p> </dd> <dd> <p>The frame source provides infrared data.</p> </dd> <dd> <p>The frame source provides depth data.</p> </dd> <dd> <p>The frame source provides custom data.</p> </dd> <p>Specifies how 3D video frames are stored in memory.</p> <p>This enumeration is used with the {{MF_MT_VIDEO_3D_FORMAT}} attribute.</p> <dd> <p>The base view is stored in a single buffer. The other view is discarded.</p> </dd> <dd> <p>Each media sample contains multiple buffers, one for each view.</p> </dd> <dd> <p>Each media sample contains one buffer, with both views packed side-by-side into a single frame. </p> </dd> <dd> <p>Each media sample contains one buffer, with both views packed top-and-bottom into a single frame. </p> </dd> <p>Specifies how a 3D video frame is stored in a media sample.</p> <p>This enumeration is used with the {{MFSampleExtension_3DVideo_SampleFormat}} attribute.</p><p>The exact layout of the views in memory is specified by the following media type attributes:</p><ul> <li> {{MF_MT_VIDEO_3D_FORMAT}} </li> <li> {{MF_MT_VIDEO_3D_FIRST_IS_LEFT}} </li> <li> {{MF_MT_VIDEO_3D_LEFT_IS_BASE}} </li> <li> {{MF_MT_VIDEO_3D_NUM_VIEWS}} </li> </ul> <dd> <p>Each view is stored in a separate buffer. The sample contains one buffer per view.</p> </dd> <dd> <p>All of the views are stored in the same buffer. The sample contains a single buffer. </p> </dd> <p>Describes the rotation of the video image in the counter-clockwise direction.</p> <p>This enumeration is used with the {{MF_MT_VIDEO_ROTATION}} attribute.</p> <dd> <p>The image is not rotated.</p> </dd> <dd> <p>The image is rotated 90 degrees counter-clockwise.</p> </dd> <dd> <p>The image is rotated 180 degrees.</p> </dd> <dd> <p>The image is rotated 270 degrees counter-clockwise.</p> </dd> <p>Specifies the type of copy protection required for a video stream. </p> <p>Use these flags with the <strong>{{MF_MT_DRM_FLAGS}}</strong> attribute.</p> <dd> <p>No copy protection is required. </p> </dd> <dd> <p>Analog copy protection should be applied. </p> </dd> <dd> <p>Digital copy protection should be applied. </p> </dd> <p> </p><p>Specifies whether to pad a video image so that it fits within a specified aspect ratio.</p> <p>Use these flags with the <strong>{{MF_MT_PAD_CONTROL_FLAGS}}</strong> attribute.</p> <dd> <p>Do not pad the image.</p> </dd> <dd> <p>Pad the image so that it can be displayed in a 4?3 area.</p> </dd> <dd> <p>Pad the image so that it can be displayed in a 16?9 area.</p> </dd> <p> </p><p>Describes the intended aspect ratio for a video stream.</p> <p>Use these flags with the <strong>{{MF_MT_SOURCE_CONTENT_HINT}}</strong> attribute.</p> <dd> <p>The aspect ratio is unknown.</p> </dd> <dd> <p>The source is 16?9 content encoded within a 4?3 area.</p> </dd> <dd> <p>The source is 2.35:1 content encoded within a 16?9 or 4?3 area.</p> </dd> <p> </p><p>Contains flags that specify how to convert an audio media type.</p> <dd> <p>Convert the media type to a <strong>{{WAVEFORMATEX}}</strong> structure if possible, or a <strong>{{WAVEFORMATEXTENSIBLE}}</strong> structure otherwise.</p> </dd> <dd> <p>Convert the media type to a <strong>{{WAVEFORMATEXTENSIBLE}}</strong> structure.</p> </dd> <p>Provides information on a screen-to-screen move and a dirty rectangle copy operation.</p> <dd> <p>A <strong>{{POINT}}</strong> structure that describes the source (<em>x, y</em>) point where the source rectangle is copied from.</p> </dd> <dd> <p>A <strong>{{RECT}}</strong> structure that contains the destination rectangle where the dirty rectangle is copied to.</p> </dd> <p>Defines a regions of interest. </p> <dd> <p>The bounds of the region.</p> </dd> <dd> <p>Specifies the quantization parameter delta for the specified region from the rest of the frame.</p> </dd> <p>The <strong>FaceRectInfoBlobHeader</strong> structure describes the size and count information of the blob format for the <strong>{{MF_CAPTURE_METADATA_FACEROIS}}</strong> attribute.</p> <dd> <p>Size of this header + all following <strong>FaceRectInfo</strong> structures.</p> </dd> <dd> <p>Number of <strong>FaceRectInfo</strong> structures in the blob.</p> </dd> <p>The <strong>FaceRectInfo</strong> structure describes the blob format for the <strong>{{MF_CAPTURE_METADATA_FACEROIS}}</strong> attribute.</p> <p>The <strong>{{MF_CAPTURE_METADATA_FACEROIS}}</strong> attribute contains the face rectangle info detected by the driver. By default driver\{{MFT0}} should provide the face information on preview stream. If the driver advertises the capability on other streams, driver\{{MFT}} must provide the face info on the corresponding streams if the application enables face detection on those streams. When video stabilization is enabled on the driver, the face information should be provided post-video stabilization. The dominate face must be the first <strong>FaceRectInfo</strong> in the blob.</p><p>The <strong>FaceRectInfoBlobHeader</strong> and <strong>FaceRectInfo</strong> structures only describe the blob format for the <strong>{{MF_CAPTURE_METADATA_FACEROIS}}</strong> attribute. The metadata item structure for face {{ROIs}} (<strong>{{KSCAMERA_METADATA_ITEMHEADER}}</strong> + face {{ROIs}} metadata payload) is up to driver and must be 8-byte aligned.</p> <dd> <p>Relative coordinates on the frame that face detection is running ({{Q31}} format).</p> </dd> <dd> <p>Confidence level of the region being a face (0 - 100).</p> </dd> <p>The <strong>FaceCharacterizationBlobHeader</strong> structure describes the size and count information of the blob format for the <strong>{{MF_CAPTURE_METADATA_FACEROICHARACTERIZATIONS}}</strong> attribute.</p> <dd> <p>Size of this header + all following <strong>FaceCharacterization</strong> structures.</p> </dd> <dd> <p>Number of <strong>FaceCharacterization</strong> structures in the blob. Must match the number of <strong>FaceRectInfo</strong> structures in <strong>FaceRectInfoBlobHeader</strong>.</p> </dd> <p>The <strong>FaceCharacterization</strong> structure describes the blob format for the <strong>{{MF_CAPTURE_METADATA_FACEROICHARACTERIZATIONS}}</strong> attribute.</p> <p>The <strong>{{MF_CAPTURE_METADATA_FACEROICHARACTERIZATIONS}}</strong> attribute contains the blink and facial expression state for the face {{ROIs}} identified in <strong>{{MF_CAPTURE_METADATA_FACEROIS}}</strong>. For a device that does not support blink or facial expression detection, this attribute should be omitted.</p><p>The facial expressions that can be detected are defined as follows:</p><pre>#define {{MF_METADATAFACIALEXPRESSION_SMILE}} 0x00000001</pre><p>The <strong>FaceCharacterizationBlobHeader</strong> and <strong>FaceCharacterization</strong> structures only describe the blob format for the <strong>{{MF_CAPTURE_METADATA_FACEROICHARACTERIZATIONS}}</strong> attribute. The metadata item structure for the face characterizations (<strong>{{KSCAMERA_METADATA_ITEMHEADER}}</strong> + face characterizations metadata payload) is up to driver and must be 8-byte aligned. </p> <dd> <p>0 indicates no blink for the left eye, 100 indicates definite blink for the left eye (0 - 100).</p> </dd> <dd> <p>0 indicates no blink for the right eye, 100 indicates definite blink for the right eye (0 - 100).</p> </dd> <dd> <p>A defined facial expression value.</p> </dd> <dd> <p>0 indicates no such facial expression as identified, 100 indicates definite such facial expression as defined (0 - 100).</p> </dd> <p>This structure contains blob information for the {{EV}} compensation feedback for the photo captured.</p> <dd> <p>A {{KSCAMERA_EXTENDEDPROP_EVCOMP_XXX}} step flag.</p> </dd> <dd> <p>The {{EV}} compensation value in units of the step specified.</p> </dd> <p>The CapturedMetadataISOGains structure describes the blob format for <strong>{{MF_CAPTURE_METADATA_ISO_GAINS}}</strong>.</p> <p>The <strong>CapturedMetadataISOGains</strong> structure only describes the blob format for the <strong>{{MF_CAPTURE_METADATA_ISO_GAINS}}</strong> attribute. The metadata item structure for {{ISO}} gains (<strong>{{KSCAMERA_METADATA_ITEMHEADER}}</strong> + {{ISO}} gains metadata payload) is up to driver and must be 8-byte aligned.</p> <dd></dd> <dd></dd> <p>This structure describes the blob format for the <strong>{{MF_CAPTURE_METADATA_WHITEBALANCE_GAINS}}</strong> attribute. </p> <p>The <strong>{{MF_CAPTURE_METADATA_WHITEBALANCE_GAINS}}</strong> attribute contains the white balance gains applied to R, G, B by the sensor or {{ISP}} when the preview frame was captured. This is a unitless.</p><p>The <strong>CapturedMetadataWhiteBalanceGains</strong> structure only describes the blob format for the <strong>{{MF_CAPTURE_METADATA_WHITEBALANCE_GAINS}}</strong> attribute. The metadata item structure for white balance gains (<strong>{{KSCAMERA_METADATA_ITEMHEADER}}</strong> + white balance gains metadata payload) is up to driver and must be 8-byte aligned.</p> <dd> <p>The <strong>R</strong> value of the blob.</p> </dd> <dd> <p>The <strong>G</strong> value of the blob.</p> </dd> <dd> <p>The <strong>B</strong> value of the blob.</p> </dd> <p>The <strong>MetadataTimeStamps</strong> structure describes the blob format for the <strong>{{MF_CAPTURE_METADATA_FACEROITIMESTAMPS}}</strong> attribute.</p> <p>The <strong>{{MF_CAPTURE_METADATA_FACEROITIMESTAMPS}}</strong> attribute contains the time stamp information for the face {{ROIs}} identified in <strong>{{MF_CAPTURE_METADATA_FACEROIS}}</strong>. For a device that cannot provide the time stamp for face {{ROIs}}, this attribute should be omitted.</p><p>For the <strong>Flags</strong> field, the following bit flags indicate which time stamp is valid:</p><pre>#define {{MF_METADATATIMESTAMPS_DEVICE}} 0x00000001 #define {{MF_METADATATIMESTAMPS_PRESENTATION}} 0x00000002</pre><p>{{MFT0}} must set <strong>Flags</strong> to <strong>{{MF_METADATATIEMSTAMPS_DEVICE}}</strong> and the appropriate {{QPC}} time for <strong>Device</strong>, if the driver provides the timestamp metadata for the face {{ROIs}}.</p><p>The <strong>MetadataTimeStamps</strong> structure only describes the blob format for the <strong>{{MF_CAPTURE_METADATA_FACEROITIMESTAMPS}}</strong> attribute. The metadata item structure for timestamp (<strong>{{KSCAMERA_METADATA_ITEMHEADER}}</strong> + timestamp metadata payload) is up to driver and must be 8-byte aligned.</p> <dd> <p>Bitwise {{OR}} of the <strong>{{MF_METADATATIMESTAMPS_}}*</strong> flags.</p> </dd> <dd> <p>{{QPC}} time for the sample the face rectangle is derived from (in 100ns).</p> </dd> <dd> <p>{{PTS}} for the sample the face rectangle is derived from (in 100ns).</p> </dd> <p>The <strong>HistogramGrid</strong> structure describes the blob format for <strong>{{MF_CAPTURE_METADATA_HISTOGRAM}}</strong>.</p> <dd> <p>Width of the sensor output that histogram is collected from.</p> </dd> <dd> <p>Height of the sensor output that histogram is collected from.</p> </dd> <dd> <p>Absolute coordinates of the region on the sensor output that the histogram is collected for.</p> </dd> <p>The <strong>HistogramBlobHeader</strong> structure describes the blob size and the number of histograms in the blob for the <strong>{{MF_CAPTURE_METADATA_HISTOGRAM}}</strong> attribute.</p> <dd> <p>Size of the entire histogram blob in bytes.</p> </dd> <dd> <p>Number of histograms in the blob. Each histogram is identified by a <strong>HistogramHeader</strong>.</p> </dd> <p>The <strong>HistogramHeader</strong> structure describes the blob format for <strong>{{MF_CAPTURE_METADATA_HISTOGRAM}}</strong>.</p> <p>The <strong>{{MF_CAPTURE_METADATA_HISTOGRAM}}</strong> attribute contains a histogram when a preview frame is captured.</p><p>For the <strong>ChannelMasks</strong> field, the following bitmasks indicate the available channels in the histogram:</p><pre>#define {{MF_HISTOGRAM_CHANNEL_Y}} 0x00000001 #define {{MF_HISTOGRAM_CHANNEL_R}} 0x00000002 #define {{MF_HISTOGRAM_CHANNEL_G}} 0x00000004 #define {{MF_HISTOGRAM_CHANNEL_B}} 0x00000008 #define {{MF_HISTOGRAM_CHANNEL_Cb}} 0x00000010 #define {{MF_HISTOGRAM_CHANNEL_Cr}} 0x00000020</pre><p>Each blob can contain multiple histograms collected from different regions or different color spaces of the same frame. Each histogram in the blob is identified by its own <strong>HistogramHeader</strong>. Each histogram has its own region and sensor output size associated. For full frame histogram, the region will match the sensor output size specified in <strong>HistogramGrid</strong>.</p><p>Histogram data for all available channels are grouped under one histogram. Histogram data for each channel is identified by a <strong>HistogramDataHeader</strong> immediate above the data. <strong>ChannelMasks</strong> indicate how many and what channels are having the histogram data, which is the bitwise {{OR}} of the supported <strong>{{MF_HISTOGRAM_CHANNEL_}}*</strong> bitmasks as defined above. <strong>ChannelMask</strong> indicates what channel the data is for, which is identified by any one of the <strong>{{MF_HISTOGRAM_CHANNEL_}}*</strong> bitmasks.</p><p>Histogram data is an array of <strong>{{ULONG}}</strong> with each entry representing the number of pixels falling under a set of tonal values as categorized by the bin. The data in the array should start from bin 0 to bin N-1, where N is the number of bins in the histogram, for example, <strong>HistogramBlobHeader.Bins</strong>.</p><p>For Windows?10, if <strong>{{KSPROPERTY_CAMERACONTROL_EXTENDED_HISTOGRAM}}</strong> is supported, at minimum a full frame histogram with Y channel must be provided which should be the first histogram in the histogram blob. Note that <strong>HistogramBlobHeader</strong>, <strong>HistogramHeader</strong>, <strong>HistogramDataHeader</strong> and Histogram data only describe the blob format for the <strong>{{MF_CAPTURE_METADATA_HISTOGRAM}}</strong> attribute. The metadata item structure for the histogram (<strong>{{KSCAMERA_METADATA_ITEMHEADER}}</strong> + all histogram metadata payload) is up to driver and must be 8-byte aligned.</p> <dd> <p>Size of this header + (<strong>HistogramDataHeader</strong> + histogram data following) * number of channels available.</p> </dd> <dd> <p>Number of bins in the histogram.</p> </dd> <dd> <p>Color space that the histogram is collected from</p> </dd> <dd> <p>Masks of the color channels that the histogram is collected for.</p> </dd> <dd> <p>Grid that the histogram is collected from.</p> </dd> <p>The <strong>HistogramDataHeader</strong> structure describes the blob format for the <strong>{{MF_CAPTURE_METADATA_HISTOGRAM}}</strong> attribute. </p> <dd> <p>Size in bytes of this header + all following histogram data.</p> </dd> <dd> <p>Mask of the color channel for the histogram data.</p> </dd> <dd> <p>1 if linear, 0 if nonlinear.</p> </dd> <p> </p><p>Contains coefficients used to transform multichannel audio into a smaller number of audio channels. This process is called <em>fold-down</em>.</p> <p>To specify this information in the media type, set the <strong>{{MF_MT_AUDIO_FOLDDOWN_MATRIX}}</strong> attribute.</p><p>The {{ASF}} media source supports fold-down from six channels (5.1 audio) to two channels (stereo). It gets the information from the g_wszFold6To2Channels3 attribute in the {{ASF}} header. This attribute is documented in the Windows Media Format {{SDK}} documentation.</p> <dd> <p>Size of the structure, in bytes.</p> </dd> <dd> <p>Number of source channels.</p> </dd> <dd> <p>Number of destination channels.</p> </dd> <dd> <p>Specifies the assignment of audio channels to speaker positions in the transformed audio. This member is a bitwise <strong>{{OR}}</strong> of flags that define the speaker positions. For a list of valid flags, see <strong>{{MF_MT_AUDIO_CHANNEL_MASK}}</strong> attribute.</p> </dd> <dd> <p>Array that contains the fold-down coefficients. The number of coefficients is <strong>cSrcChannels</strong>?<strong>cDstChannels</strong>. If the number of coefficients is less than the size of the array, the remaining elements in the array are ignored. For more information about how the coefficients are applied, see Windows Media Audio Professional Codec Features.</p> </dd> <p> </p><p>Defines custom color primaries for a video source. The color primaries define how to convert colors from {{RGB}} color space to {{CIE}} {{XYZ}} color space.</p> <p>This structure is used with the <strong>{{MF_MT_CUSTOM_VIDEO_PRIMARIES}}</strong> attribute.</p> <dd> <p>Red x-coordinate.</p> </dd> <dd> <p>Red y-coordinate.</p> </dd> <dd> <p>Green x-coordinate.</p> </dd> <dd> <p>Green y-coordinate.</p> </dd> <dd> <p>Blue x-coordinate.</p> </dd> <dd> <p>Blue y-coordinate.</p> </dd> <dd> <p>White point x-coordinate.</p> </dd> <dd> <p>White point y-coordinate.</p> </dd> <p>Contains format data for a binary stream in an Advanced Streaming Format ({{ASF}}) file.</p> <p>This structure is used with the {{MF_MT_ARBITRARY_HEADER}} media type attribute.</p><p>This structure corresponds to the first 60 bytes of the Type-Specific Data field of the Stream Properties Object, in files where the stream type is {{ASF_Binary_Media}}. For more information, see the {{ASF}} specification.</p><p>The Format Data field of the Type-Specific Data field is contained in the {{MF_MT_ARBITRARY_FORMAT}} attribute of the media type.</p> <dd> <p>Major media type. This value is the {{GUID}} stored in the Major Media Type field of the Type-Specific Data field of the {{ASF}} file. It might not match the major type {{GUID}} from the Media Foundation media type. </p> </dd> <dd> <p>Media subtype. </p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, samples have a fixed size in bytes. Otherwise, samples have variable size.</p> </dd> <dd> <p> If <strong>{{TRUE}}</strong>, the data in this stream uses temporal compression. Otherwise, samples are independent of each other.</p> </dd> <dd> <p>If <strong>bFixedSizeSamples</strong> is <strong>{{TRUE}}</strong>, this member specifies the sample size in bytes. Otherwise, the value is ignored and should be 0.</p> </dd> <dd> <p>Format type {{GUID}}. This {{GUID}} identifies the structure of the additional format data, which is stored in the {{MF_MT_ARBITRARY_FORMAT}} attribute of the media type. If no additional format data is present, <strong>formattype</strong> equals {{GUID_NULL}}.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>A vector with two components.</p> <dd> <p>X component of the vector.</p> </dd> <dd> <p>Y component of the vector.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>A vector with three components.</p> <dd> <p>X component of the vector.</p> </dd> <dd> <p>Y component of the vector.</p> </dd> <dd> <p>Z component of the vector.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>A four dimensional vector, used to represent a rotation.</p> <dd> <p>X component of the vector.</p> </dd> <dd> <p>Y component of the vector.</p> </dd> <dd> <p>Z component of the vector.</p> </dd> <dd> <p>W component of the vector.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>A transform describing the location of a camera relative to other cameras or an established external reference.</p> <p>The <strong>Position</strong> value should be expressed in real-world coordinates in units of meters. The coordinate system of both position and orientation should be right-handed Cartesian as shown in the following diagram. </p><strong>Important</strong>??<p>The position and orientation are expressed as transforms toward the reference frame or origin. For example, a <strong>Position</strong> value of {-5, 0, 0} means that the origin is 5 meters to the left of the sensor, and therefore the sensor is 5 meters to the right of the origin. A sensor that is positioned 2 meters above the origin should specify a <strong>Position</strong> of {0, -2, 0} because that is the translation from the sensor to the origin.</p> <p>If the sensor is aligned with the origin, the rotation is the identity quaternion and the forward vector is along the -Z axis {0, 0, -1}. If the sensor is rotated +30 degrees around the Y axis from the origin, then the <strong>Orientation</strong> value should be a rotation of -30 degrees around the Y axis, because it represents the rotation from the sensor to the origin.</p>? <dd> <p>A reference {{GUID}} identifying the calibration process for the data, allowing different consumers to identify calibration data from the same process.</p> </dd> <dd> <p>The transform position.</p> </dd> <dd> <p>The transform rotation.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Describes the location of a camera relative to other cameras or an established external reference. </p> <dd> <p>The number of transforms in the <em>CalibratedTransforms</em> array.</p> </dd> <dd> <p>The array of transforms in the extrinsic data.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Represents a pinhole camera model. </p> <p>For square pixels, the X and Y fields of the <strong>FocalLength</strong> should be the same.</p><p>The <strong>PrincipalPoint</strong> field is expressed in pixels, not in normalized coordinates. The origin [0,0] is the bottom, left corner of the image.</p> <dd> <p>The focal length of the camera.</p> </dd> <dd> <p>The principal point of the camera.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Represents a polynomial lens distortion model.</p> <dd> <p>The first radial distortion coefficient.</p> </dd> <dd> <p>The second radial distortion coefficient.</p> </dd> <dd> <p>The third radial distortion coefficient.</p> </dd> <dd> <p>The first tangential distortion coefficient.</p> </dd> <dd> <p>The second tangential distortion coefficient.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Represents a pinhole camera intrinsic model for a specified resolution.</p> <dd> <p>The width for the pinhole camera intrinsic model.</p> </dd> <dd> <p>The height for the pinhole camera intrinsic model.</p> </dd> <dd> <p> The pinhole camera model.</p> </dd> <dd> <p> The lens distortion model.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Contains zero or 1 pinhole camera intrinsic models that describe how to project a 3D point in physical world onto the 2D image frame of a camera.</p> <dd> <p>The number of camera intrinsic models in the <em>IntrinsicModels</em> array.</p> </dd> <dd> <p>The array of camera intrinsic models in the intrinsic data.</p> </dd> <p> Contains data that is needed to implement the <strong>{{IMFAsyncResult}}</strong> interface. </p> <p> Any custom implementation of the <strong>{{IMFAsyncResult}}</strong> interface must inherit this structure. For more information, see Custom Asynchronous Result Objects. </p> <p>Initializes Microsoft Media Foundation.</p> <p> An application must call this function before using Media Foundation. Before your application quits, call <strong>{{MFShutdown}}</strong> once for every previous call to <strong>{{MFStartup}}</strong>. </p><p> Do not call <strong>{{MFStartup}}</strong> or <strong>{{MFShutdown}}</strong> from work queue threads. For more information about work queues, see Work Queues. </p><p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_BAD_STARTUP_VERSION}}</strong></dt> </dl> </td><td> <p> The <em>Version</em> parameter requires a newer version of Media Foundation than the version that is running.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_DISABLED_IN_SAFEMODE}}</strong></dt> </dl> </td><td> <p> The Media Foundation platform is disabled because the system was started in "Safe Mode" (fail-safe boot). </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p>Media Foundation is not implemented on the system. This error can occur if the media components are not present (See {{KB2703761}} for more info). </p> </td></tr> </table><p>?</p> <dd> <p>Version number. Use the value <strong>{{MF_VERSION}}</strong>, defined in mfapi.h.</p> </dd> <dd> <p>This parameter is optional when using C++ but required in C. The value must be one of the following flags: </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>{{MFSTARTUP_NOSOCKET}}</dt> </dl> </td><td> <p> Do not initialize the sockets library. </p> </td></tr> <tr><td> <dl> <dt>{{MFSTARTUP_LITE}}</dt> </dl> </td><td> <p> Equivalent to {{MFSTARTUP_NOSOCKET}}. </p> </td></tr> <tr><td> <dl> <dt>{{MFSTARTUP_FULL}}</dt> </dl> </td><td> <p> Initialize the entire Media Foundation platform. This is the default value when <em>dwFlags</em> is not specified. </p> </td></tr> </table> <p>?</p> </dd> <p>Shuts down the Microsoft Media Foundation platform. Call this function once for every call to <strong>{{MFStartup}}</strong>. Do not call this function from work queue threads.</p> <p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><p>Blocks the <strong>{{MFShutdown}}</strong> function.</p> <p>This function prevents work queue threads from being shut down when <strong>{{MFShutdown}}</strong> is called. Use this function to ensure that asynchronous operations complete gracefully before the platform shuts down.</p><p>This function holds a lock on the Media Foundation platform. To unlock the platform, call <strong>{{MFUnlockPlatform}}</strong>. The application must call <strong>{{MFUnlockPlatform}}</strong> once for every call to <strong>{{MFLockPlatform}}</strong>.</p><p>The <strong>{{MFShutdown}}</strong> function blocks until the platform is unlocked, or until a fixed wait period has elapsed. (The wait period is a few seconds.) To avoid memory leaks, the application should unlock the platform before the wait period ends. For example, cancel any asynchronous operations that are waiting to complete and are holding a lock on the platform.</p><p>The default implementation of the <strong>{{IMFAsyncResult}}</strong> interface automatically locks the Media Foundation platform when the result object is created. Releasing the interface unlocks the platform. Therefore, in most cases your application does not need to lock the platform directly. For more information, see Work Queues.</p><p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Unlocks the Media Foundation platform after it was locked by a call to the <strong>{{MFLockPlatform}}</strong> function.</p> <p>The application must call <strong>{{MFUnlockPlatform}}</strong> once for every call to <strong>{{MFLockPlatform}}</strong>.</p><p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <p> Puts an asynchronous operation on a work queue.</p> <p> This function creates an asynchronous result object and puts the result object on the work queue. The work queue calls the <strong>{{IMFAsyncCallback::Invoke}}</strong> method specified by <em>pCallback</em>. </p> <p>Returns an <strong>{{HRESULT}}</strong> value. Possible values include the following.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALID_WORKQUEUE}}</strong></strong></dt> </dl> </td><td> <p>Invalid work queue. For more information, see <strong>{{IMFAsyncCallback::GetParameters}}</strong>.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The <strong>{{MFStartup}}</strong> function was not called, or <strong>{{MFShutdown}}</strong> was called.</p> </td></tr> </table><p>?</p> <dd> <p> The identifier for the work queue. This value can specify one of the standard Media Foundation work queues, or a work queue created by the application. For list of standard Media Foundation work queues, see <strong>Work Queue Identifiers</strong>. To create a new work queue, call <strong>{{MFAllocateWorkQueue}}</strong> or <strong>{{MFAllocateWorkQueueEx}}</strong>. </p> </dd> <dd> <p> A reference to the <strong>{{IMFAsyncCallback}}</strong> interface. The caller must implement this interface. </p> </dd> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked. </p> </dd> <p> Puts an asynchronous operation on a work queue, with a specified priority.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Possible values include the following.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALID_WORKQUEUE}}</strong></strong></dt> </dl> </td><td> <p>Invalid work queue identifier.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The <strong>{{MFStartup}}</strong> function was not called, or <strong>{{MFShutdown}}</strong> was called.</p> </td></tr> </table><p>?</p> <dd> <p> The identifier for the work queue. This value can specify one of the standard Media Foundation work queues, or a work queue created by the application. For list of standard Media Foundation work queues, see <strong>Work Queue Identifiers</strong>. To create a new work queue, call <strong>{{MFAllocateWorkQueue}}</strong> or {{MFAllocateWorkQueueEx}}. </p> </dd> <dd> <p>The priority of the work item. Work items are performed in order of priority.</p> </dd> <dd> <p> A reference to the <strong>{{IMFAsyncCallback}}</strong> interface. The caller must implement this interface. </p> </dd> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked. </p> </dd> <p> Puts an asynchronous operation on a work queue. </p> <p> To invoke the work-item, this function passes <em>pResult</em> to the <strong>{{MFInvokeCallback}}</strong> function. The callback is specified when you create the result object specified by <em>pResult</em>. </p><p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p> Returns an <strong>{{HRESULT}}</strong> value. Possible values include the following.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p> Success.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALID_WORKQUEUE}}</strong></strong></dt> </dl> </td><td> <p>Invalid work queue identifier. For more information, see <strong>{{IMFAsyncCallback::GetParameters}}</strong>.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The <strong>{{MFStartup}}</strong> function was not called, or <strong>{{MFShutdown}}</strong> was called.</p> </td></tr> </table><p>?</p> <dd> <p>The identifier for the work queue. This value can specify one of the standard Media Foundation work queues, or a work queue created by the application. For list of standard Media Foundation work queues, see <strong>Work Queue Identifiers</strong>. To create a new work queue, call <strong>{{MFAllocateWorkQueue}}</strong> or <strong>{{MFAllocateWorkQueueEx}}</strong>. </p> </dd> <dd> <p>A reference to the <strong>{{IMFAsyncResult}}</strong> interface of an asynchronous result object. To create the result object, call <strong>{{MFCreateAsyncResult}}</strong>. </p> </dd> <p>Puts an asynchronous operation on a work queue, with a specified priority.</p> <p> To invoke the work item, this function passes <em>pResult</em> to the <strong>{{MFInvokeCallback}}</strong> function. The callback is specified when you create the result object specified by <em>pResult</em>. </p> <p> Returns an <strong>{{HRESULT}}</strong> value. Possible values include the following.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p> Success.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALID_WORKQUEUE}}</strong></strong></dt> </dl> </td><td> <p>Invalid work queue identifier.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The <strong>{{MFStartup}}</strong> function was not called, or <strong>{{MFShutdown}}</strong> was called.</p> </td></tr> </table><p>?</p> <dd> <p> The identifier for the work queue. This value can specify one of the standard Media Foundation work queues, or a work queue created by the application. For list of standard Media Foundation work queues, see <strong>Work Queue Identifiers</strong>. To create a new work queue, call <strong>{{MFAllocateWorkQueue}}</strong> or <strong>{{MFAllocateWorkQueueEx}}</strong>.</p> </dd> <dd> <p>The priority of the work item. Work items are performed in order of priority.</p> </dd> <dd> <p>A reference to the <strong>{{IMFAsyncResult}}</strong> interface of an asynchronous result object. To create the result object, call <strong>{{MFCreateAsyncResult}}</strong>.</p> </dd> <p>Queues a work item that waits for an event to be signaled.</p> <p>This function enables a component to wait for an event without blocking the current thread. </p><p>The function puts a work item on the specified work queue. This work item waits for the event given in <em>hEvent</em> to be signaled. When the event is signaled, the work item invokes a callback. (The callback is contained in the result object given in <em>pResult</em>. For more information, see <strong>{{MFCreateAsyncResult}}</strong>).</p><p>The work item is dispatched on a work queue by the <strong>{{IMFAsyncCallback::GetParameters}}</strong> method of the callback. The work queue can be any of the following:</p><ul> <li>The default work queue (<strong>{{MFASYNC_CALLBACK_QUEUE_STANDARD}}</strong>).</li> <li>The platform multithreaded queue (<strong>{{MFASYNC_CALLBACK_QUEUE_MULTITHREADED}}</strong>).</li> <li>A multithreaded queue returned by the <strong>{{MFLockSharedWorkQueue}}</strong> function.</li> <li>A serial queue created by the <strong>{{MFAllocateSerialWorkQueue}}</strong> function.</li> </ul><p>Do not use any of the following work queues: <strong>{{MFASYNC_CALLBACK_QUEUE_IO}}</strong>, <strong>{{MFASYNC_CALLBACK_QUEUE_LONG_FUNCTION}}</strong>, <strong>{{MFASYNC_CALLBACK_QUEUE_RT}}</strong>, or <strong>{{MFASYNC_CALLBACK_QUEUE_TIMER}}</strong>.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A handle to an event object. To create an event object, call <strong>CreateEvent</strong> or <strong>CreateEventEx</strong>.</p> </dd> <dd> <p>The priority of the work item. Work items are performed in order of priority.</p> </dd> <dd> <p>A reference to the <strong>{{IMFAsyncResult}}</strong> interface of an asynchronous result object. To create the result object, call <strong>{{MFCreateAsyncResult}}</strong>.</p> </dd> <dd> <p>Receives a key that can be used to cancel the wait. To cancel the wait, call <strong>{{MFCancelWorkItem}}</strong> and pass this key in the <em>Key</em> parameter. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <p>Creates a work queue that is guaranteed to serialize work items. The serial work queue wraps an existing multithreaded work queue. The serial work queue enforces a first-in, first-out ({{FIFO}}) execution order.</p> <p>When you are done using the work queue, call <strong>{{MFUnlockWorkQueue}}</strong>.</p><p>Multithreaded queues use a thread pool, which can reduce the total number of threads in the pipeline. However, they do not serialize work items. A serial work queue enables the application to get the benefits of the thread pool, without needing to perform manual serialization of its own work items.</p> <p>This function can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The function succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_FAIL}}</strong></dt> </dl> </td><td> <p> The application exceeded the maximum number of work queues. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p> The application did not call <strong>{{MFStartup}}</strong>, or the application has already called <strong>{{MFShutdown}}</strong>. </p> </td></tr> </table><p>?</p> <dd> <p> The identifier of an existing work queue. This must be either a multithreaded queue or another serial work queue. Any of the following can be used:</p> <ul> <li>The default work queue (<strong>{{MFASYNC_CALLBACK_QUEUE_STANDARD}}</strong>)</li> <li>The platform multithreaded queue (<strong>{{MFASYNC_CALLBACK_QUEUE_MULTITHREADED}}</strong>)</li> <li>A multithreaded queue returned by the <strong>{{MFLockSharedWorkQueue}}</strong> function.</li> <li>A serial queue created by the <strong>{{MFAllocateSerialWorkQueue}}</strong> function.</li> </ul> </dd> <dd> <p>Receives an identifier for the new serial work queue. Use this identifier when queuing work items.</p> </dd> <p> </p><p>Schedules an asynchronous operation to be completed after a specified interval.</p> <p>When the timer interval elapses, the timer calls <strong>{{MFInvokeCallback}}</strong> with the <em>pResult</em> reference to invoke the asynchronous callback. The callback is specified when you create the result object.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncResult}}</strong> interface of an asynchronous result object. To create the result object, call <strong>{{MFCreateAsyncResult}}</strong>.</p> </dd> <dd> <p>Time-out interval, in milliseconds. Set this parameter to a negative value. The callback is invoked after ?<em>Timeout</em> milliseconds. For example, if <em>Timeout</em> is ?5000, the callback is invoked after 5000 milliseconds.</p> </dd> <dd> <p>Receives a key that can be used to cancel the timer. To cancel the timer, call <strong>{{MFCancelWorkItem}}</strong> and pass this key in the <em>Key</em> parameter.</p> </dd> <p> </p><p>Schedules an asynchronous operation to be completed after a specified interval.</p> <p>This function creates an asynchronous result object. When the timer interval elapses, the <strong>{{IMFAsyncCallback::Invoke}}</strong> method specified by <em>pCallback</em> is called.</p><p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface. The caller must implement this interface.</p> </dd> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.</p> </dd> <dd> <p>Time-out interval, in milliseconds. Set this parameter to a negative value. The callback is invoked after ?<em>Timeout</em> milliseconds. For example, if <em>Timeout</em> is ?5000, the callback is invoked after 5000 milliseconds.</p> </dd> <dd> <p>Receives a key that can be used to cancel the timer. To cancel the timer, call <strong>{{MFCancelWorkItem}}</strong> and pass this key in the <em>Key</em> parameter.</p> </dd> <p> Attempts to cancel an asynchronous operation that was scheduled with <strong>{{MFScheduleWorkItem}}</strong> or <strong>{{MFScheduleWorkItemEx}}</strong>.</p> <p>Because work items are asynchronous, the work-item callback might still be invoked after <strong>{{MFCancelWorkItem}}</strong> is called.</p><p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><p>Retrieves the timer interval for the <strong>{{MFAddPeriodicCallback}}</strong> function.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The function succeeded. </p> </td></tr> </table><p>?</p> <p> </p><p>Sets a callback function to be called at a fixed interval.</p> <p>To get the timer interval for the periodic callback, call <strong>{{MFGetTimerPeriodicity}}</strong>.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the callback function, of type <strong>{{MFPERIODICCALLBACK}}</strong>.</p> </dd> <dd> <p>Pointer to a caller-provided object that implements <strong>{{IUnknown}}</strong>, or <strong>{{NULL}}</strong>. This parameter is passed to the callback function.</p> </dd> <dd> <p>Receives a key that can be used to cancel the callback. To cancel the callback, call <strong>{{MFRemovePeriodicCallback}}</strong> and pass this key as the <em>dwKey</em> parameter.</p> </dd> <p> </p><p>Cancels a callback function that was set by the <strong>{{MFAddPeriodicCallback}}</strong> function.</p> <p>The callback is dispatched on another thread, and this function does not attempt to synchronize with the callback thread. Therefore, it is possible for the callback to be invoked after this function returns.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <p>Creates a new work queue. This function extends the capabilities of the <strong>{{MFAllocateWorkQueue}}</strong> function by making it possible to create a work queue that has a message loop.</p> <p>When you are done using the work queue, call <strong>{{MFUnlockWorkQueue}}</strong>.</p><p>The <strong>{{MFAllocateWorkQueue}}</strong> function is equivalent to calling <strong>{{MFAllocateWorkQueueEx}}</strong> with the value {{MF_STANDARD_WORKQUEUE}} for the <em>WorkQueueType</em> parameter.</p><p>This function is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_FAIL}}</strong></dt> </dl> </td><td> <p>The application exceeded the maximum number of work queues.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The application did not call <strong>{{MFStartup}}</strong>, or the application has already called <strong>{{MFShutdown}}</strong>.</p> </td></tr> </table><p>?</p> <p> Creates a new work queue.</p> <p>When you are done using the work queue, call <strong>{{MFUnlockWorkQueue}}</strong>.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The function succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_FAIL}}</strong></dt> </dl> </td><td> <p> The application exceeded the maximum number of work queues. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p> The application did not call <strong>{{MFStartup}}</strong>, or the application has already called <strong>{{MFShutdown}}</strong>. </p> </td></tr> </table><p>?</p> <dd> <p>Receives an identifier for the work queue.</p> </dd> <p> Locks a work queue.</p> <p>This function prevents the <strong>{{MFShutdown}}</strong> function from shutting down the work queue. Use this function to ensure that asynchronous operations on the work queue complete gracefully before the platform shuts down. The <strong>{{MFShutdown}}</strong> function blocks until the work queue is unlocked, or until a fixed wait period has elapsed. (The wait period is a few seconds.)</p><p>Call <strong>{{MFUnlockWorkQueue}}</strong> to unlock the work queue. Each call to <strong>{{MFLockWorkQueue}}</strong> must be matched by a corresponding call to <strong>{{MFUnlockWorkQueue}}</strong>.</p><p> </p><strong>Note</strong>??The <strong>{{MFAllocateWorkQueue}}</strong> function implicitly locks the work queue that it creates.? <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The identifier for the work queue. The identifier is returned by the <strong>{{MFAllocateWorkQueue}}</strong> function. </p> </dd> <p> </p><p>Unlocks a work queue.</p> <p>The application must call <strong>{{MFUnlockWorkQueue}}</strong> once for every call to <strong>{{MFAllocateWorkQueue}}</strong> and then once for every call to <strong>{{MFLockWorkQueue}}</strong>.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Identifier for the work queue to be unlocked. The identifier is returned by the <strong>{{MFAllocateWorkQueue}}</strong> function.</p> </dd> <p> Associates a work queue with a Multimedia Class Scheduler Service ({{MMCSS}}) task.</p> <p>This function is asynchronous. When the operation completes, the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method is called. At that point, the application should call <strong>{{MFEndRegisterWorkQueueWithMMCSS}}</strong> to complete the asynchronous request.</p><p>To unregister the work queue from the {{MMCSS}} task, call <strong>{{MFBeginUnregisterWorkQueueWithMMCSS}}</strong>.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The identifier of the work queue. For private work queues, the identifier is returned by the <strong>{{MFAllocateWorkQueue}}</strong> function. For platform work queues, see <strong>Work Queue Identifiers</strong>.</p> </dd> <dd> <p> The name of the {{MMCSS}} task.For more information, see Multimedia Class Scheduler Service. </p> </dd> <dd> <p>The unique task identifier. To obtain a new task identifier, set this value to zero. </p> </dd> <dd> <p>A reference to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface. </p> </dd> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.</p> </dd> <p> Associates a work queue with a Multimedia Class Scheduler Service ({{MMCSS}}) task.</p> <p>This function extends the <strong>{{MFBeginRegisterWorkQueueWithMMCSS}}</strong> function by adding the <em>lPriority</em> parameter.</p><p>This function is asynchronous. When the operation completes, the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method is called. At that point, call <strong>{{MFEndRegisterWorkQueueWithMMCSS}}</strong> to complete the asynchronous request. </p><p>To unregister the work queue from the {{MMCSS}} task, call <strong>{{MFBeginUnregisterWorkQueueWithMMCSS}}</strong>.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The identifier of the work queue. For private work queues, the identifier is returned by the <strong>{{MFAllocateWorkQueue}}</strong> function. For platform work queues, see <strong>Work Queue Identifiers</strong>.</p> </dd> <dd> <p> The name of the {{MMCSS}} task. For more information, see Multimedia Class Scheduler Service. </p> </dd> <dd> <p>The unique task identifier. To obtain a new task identifier, set this value to zero. </p> </dd> <dd> <p>The base relative priority for the work-queue threads. For more information, see <strong>AvSetMmThreadPriority</strong>.</p> </dd> <dd> <p>A reference to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface. </p> </dd> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.</p> </dd> <p> </p><p>Completes an asynchronous request to associate a work queue with a Multimedia Class Scheduler Service ({{MMCSS}}) task.</p> <p>Call this function when the <strong>{{MFBeginRegisterWorkQueueWithMMCSS}}</strong> function completes asynchronously.</p><p>To unregister the work queue from the {{MMCSS}} class, call <strong>{{MFBeginUnregisterWorkQueueWithMMCSS}}</strong>.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>{{IMFAsyncCallback::Invoke}}</strong> method.</p> </dd> <dd> <p>The unique task identifier.</p> </dd> <p> </p><p>Unregisters a work queue from a Multimedia Class Scheduler Service ({{MMCSS}}) task.</p> <p>This function unregisters a work queue that was associated with an {{MMCSS}} class through the <strong>{{MFBeginRegisterWorkQueueWithMMCSS}}</strong> function.</p><p>This function is asynchronous. When the operation completes, the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method is called. At that point, the application should call <strong>{{MFEndUnregisterWorkQueueWithMMCSS}}</strong> to complete the asynchronous request.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The identifier of the work queue. For private work queues, the identifier is returned by the <strong>{{MFAllocateWorkQueue}}</strong> function. For platform work queues, see <strong>Work Queue Identifiers</strong>.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface.</p> </dd> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.</p> </dd> <p> </p><p>Completes an asynchronous request to unregister a work queue from a Multimedia Class Scheduler Service ({{MMCSS}}) task.</p> <p>Call this function when the <strong>{{MFBeginUnregisterWorkQueueWithMMCSS}}</strong> function completes asynchronously.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>{{IMFAsyncCallback::Invoke}}</strong> method.</p> </dd> <p> </p><p>Retrieves the Multimedia Class Scheduler Service ({{MMCSS}}) class currently associated with this work queue.</p> <p>If the work queue is not associated with an {{MMCSS}} task, the function retrieves an empty string.</p><p>To associate a work queue with an {{MMCSS}} task, call <strong>{{MFBeginRegisterWorkQueueWithMMCSS}}</strong>.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_BUFFERTOOSMALL}}</strong></dt> </dl> </td><td> <p>The <em>pwszClass</em> buffer is too small to receive the task name.</p> </td></tr> </table><p>?</p> <dd> <p>Identifier for the work queue. The identifier is retrieved by the <strong>{{MFAllocateWorkQueue}}</strong> function.</p> </dd> <dd> <p>Pointer to a buffer that receives the name of the {{MMCSS}} class. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>On input, specifies the size of the <em>pwszClass</em> buffer, in characters. On output, receives the required size of the buffer, in characters. The size includes the terminating null character.</p> </dd> <p> </p><p>Retrieves the Multimedia Class Scheduler Service ({{MMCSS}}) task identifier currently associated with this work queue.</p> <p>To associate a work queue with an {{MMCSS}} task, call <strong>{{MFBeginRegisterWorkQueueWithMMCSS}}</strong>.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Identifier for the work queue. The identifier is retrieved by the <strong>{{MFAllocateWorkQueue}}</strong> function.</p> </dd> <dd> <p>Receives the task identifier.</p> </dd> <p>Registers the standard Microsoft Media Foundation platform work queues with the Multimedia Class Scheduler Service ({{MMCSS}}). </p> <p>To unregister the platform work queues from the {{MMCSS}} class, call <strong>{{MFUnregisterPlatformFromMMCSS}}</strong>.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The name of the {{MMCSS}} task. </p> </dd> <dd> <p>The {{MMCSS}} task identifier. On input, specify an existing {{MCCSS}} task group {{ID}}, or use the value zero to create a new task group. On output, receives the actual task group {{ID}}.</p> </dd> <dd> <p>The base priority of the work-queue threads. </p> </dd> <p>Unregisters the Microsoft Media Foundation platform work queues from a Multimedia Class Scheduler Service ({{MMCSS}}) task.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Obtains and locks a shared work queue.</p> <p>A <em>multithreaded work queue</em> uses a thread pool to dispatch work items. Whenever a thread becomes available, it dequeues the next work item from the queue. Work items are dequeued in first-in-first-out order, but work items are not serialized. In other words, the work queue does not wait for a work item to complete before it starts the next work item. </p><p>Within a single process, the Microsoft Media Foundation platform creates up to one multithreaded queue for each Multimedia Class Scheduler Service ({{MMCSS}}) task. The <strong>{{MFLockSharedWorkQueue}}</strong> function checks whether a matching work queue already exists. If not, the function creates a new work queue and registers the work queue with {{MMCSS}}. The function returns the {{MMCSS}} task identifier (<em>pdwTaskId</em>) and the work queue identifier (<em>pID</em>). To queue a work item, pass the work queue identifier to any of the following functions: </p><ul> <li> <strong>{{MFPutWorkItem}}</strong> </li> <li> <strong>{{MFPutWorkItem2}}</strong> </li> <li> <strong>{{MFPutWorkItemEx}}</strong> </li> <li> <strong>{{MFPutWorkItemEx2}}</strong> </li> </ul><p>The <strong>{{MFLockSharedWorkQueue}}</strong> function also locks the queue. Before the process exits, call <strong>{{MFUnlockWorkQueue}}</strong> to unlock the work queue.</p><p>If the regular priority queue is being used (<em>wszClass</em>=""), then {{NULL}} must be passed in to <em>pdwTaskId</em> and the value 0 must be passed into <em>BasePriority</em>.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The name of the {{MMCSS}} task. </p> </dd> <dd> <p>The base priority of the work-queue threads. If the regular-priority queue is being used (<em>wszClass</em>=""), then the value 0 must be passed in.</p> </dd> <dd> <p>The {{MMCSS}} task identifier. On input, specify an existing {{MCCSS}} task group {{ID}} , or use the value zero to create a new task group. If the regular priority queue is being used (<em>wszClass</em>=""), then <strong>{{NULL}}</strong> must be passed in. On output, receives the actual task group {{ID}}. </p> </dd> <dd> <p>Receives an identifier for the new work queue. Use this identifier when queuing work items.</p> </dd> <p>Gets the relative thread priority of a work queue.</p> <p>This function returns the relative thread priority set by the <strong>{{MFBeginRegisterWorkQueueWithMMCSSEx}}</strong> function.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The identifier of the work queue. For private work queues, the identifier is returned by the <strong>{{MFAllocateWorkQueue}}</strong> function. For platform work queues, see <strong>Work Queue Identifiers</strong>.</p> </dd> <dd> <p>Receives the relative thread priority.</p> </dd> <p> </p><p>Creates an asynchronous result object. Use this function if you are implementing an asynchronous method.</p> <p>To invoke the callback specified in <em>pCallback</em>, call the <strong>{{MFInvokeCallback}}</strong> function.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the object stored in the asynchronous result. This reference is returned by the <strong>{{IMFAsyncResult::GetObject}}</strong> method. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface. This interface is implemented by the caller of the asynchronous method.</p> </dd> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface of a state object. This value is provided by the caller of the asynchronous method. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFAsyncResult}}</strong> interface. The caller must release the interface.</p> </dd> <p> Invokes a callback method to complete an asynchronous operation. </p> <p> If you are implementing an asynchronous method, use this function to invoke the caller's <strong>{{IMFAsyncCallback::Invoke}}</strong> method.</p><p>The callback is invoked from a Media Foundation work queue. For more information, see Writing an Asynchronous Method.</p><p>The <strong>{{MFShutdown}}</strong> function shuts down the work queue threads, so the callback is not guaranteed to be invoked after <strong>{{MFShutdown}}</strong> is called.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p> The function succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALID_WORKQUEUE}}</strong></strong></dt> </dl> </td><td> <p>Invalid work queue. For more information, see <strong>{{IMFAsyncCallback::GetParameters}}</strong>.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p>The <strong>{{MFShutdown}}</strong> function was called to shut down the Media Foundation platform.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. To create this object, call <strong>{{MFCreateAsyncResult}}</strong>.</p> </dd> <p> Creates a byte stream from a file. </p> <p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The requested access mode, specified as a member of the <strong>{{MF_FILE_ACCESSMODE}}</strong> enumeration. </p> </dd> <dd> <p> The behavior of the function if the file already exists or does not exist, specified as a member of the <strong>{{MF_FILE_OPENMODE}}</strong> enumeration. </p> </dd> <dd> <p> Bitwise <strong>{{OR}}</strong> of values from the <strong>{{MF_FILE_FLAGS}}</strong> enumeration. </p> </dd> <dd> <p> Pointer to a null-terminated string that contains the file name. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFByteStream}}</strong> interface of the byte stream. The caller must release the interface. </p> </dd> <p> Creates a byte stream that is backed by a temporary local file. </p> <p> This function creates a file in the system temporary folder, and then returns a byte stream object for that file. The full path name of the file is storted in the <strong>{{MF_BYTESTREAM_ORIGIN_NAME}}</strong> attribute. The file is created with the <strong>{{FILE_FLAG_DELETE_ON_CLOSE}}</strong> flag, and is deleted after the byte stream is released.</p><p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The requested access mode, specified as a member of the <strong>{{MF_FILE_ACCESSMODE}}</strong> enumeration. </p> </dd> <dd> <p> The behavior of the function if the file already exists or does not exist, specified as a member of the <strong>{{MF_FILE_OPENMODE}}</strong> enumeration. </p> </dd> <dd> <p> Bitwise <strong>{{OR}}</strong> of values from the <strong>{{MF_FILE_FLAGS}}</strong> enumeration. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFByteStream}}</strong> interface of the byte stream. The caller must release the interface. </p> </dd> <p> </p><p>Begins an asynchronous request to create a byte stream from a file.</p> <p>When the request is completed, the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method is called. The callback object should then call the <strong>{{MFEndCreateFile}}</strong> function to get a reference to the byte stream.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The requested access mode, specified as a member of the <strong>{{MF_FILE_ACCESSMODE}}</strong> enumeration.</p> </dd> <dd> <p>The behavior of the function if the file already exists or does not exist, specified as a member of the <strong>{{MF_FILE_OPENMODE}}</strong> enumeration.</p> </dd> <dd> <p>Bitwise <strong>{{OR}}</strong> of values from the <strong>{{MF_FILE_FLAGS}}</strong> enumeration.</p> </dd> <dd> <p>Pointer to a null-terminated string containing the file name.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface</p> </dd> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.</p> </dd> <dd> <p>Receives an <strong>{{IUnknown}}</strong> reference or the value <strong>{{NULL}}</strong>. If the value is not <strong>{{NULL}}</strong>, you can cancel the asynchronous operation by passing this reference to the <strong>{{MFCancelCreateFile}}</strong> function. The caller must release the interface. This parameter is optional and can be <strong>{{NULL}}</strong>.</p> </dd> <p> </p><p>Completes an asynchronous request to create a byte stream from a file.</p> <p>Call this function when the <strong>{{MFBeginCreateFile}}</strong> function completes asynchronously.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>Invoke</strong> method.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFByteStream}}</strong> interface of the byte stream. The caller must release the interface.</p> </dd> <p> </p><p>Cancels an asynchronous request to create a byte stream from a file.</p> <p>You can use this function to cancel a previous call to <strong>{{MFBeginCreateFile}}</strong>. Because that function is asynchronous, however, it might complete before the operation can be canceled. Therefore, your callback might still be invoked after you call this function.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of the cancellation object. This reference is received in the <em>ppCancelCookie</em> parameter of the <strong>{{MFBeginCreateFile}}</strong> function.</p> </dd> <p> </p><p>Allocates system memory and creates a media buffer to manage it.</p> <p>The function allocates a buffer with a 1-byte memory alignment. To allocate a buffer that is aligned to a larger memory boundary, call <strong>{{MFCreateAlignedMemoryBuffer}}</strong>.</p><p>When the media buffer object is destroyed, it releases the allocated memory.</p><p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_OUTOFMEMORY}}</strong></dt> </dl> </td><td> <p>Insufficient memory.</p> </td></tr> </table><p>?</p> <dd> <p>Size of the buffer, in bytes.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaBuffer}}</strong> interface of the media buffer. The caller must release the interface.</p> </dd> <p>Creates a media buffer that wraps an existing media buffer. The new media buffer points to the same memory as the original media buffer, or to an offset from the start of the memory.</p> <p>The maximum size of the wrapper buffer is limited to the size of the valid data in the original buffer. This might be less than the allocated size of the original buffer. To set the size of the valid data, call <strong>{{IMFMediaBuffer::SetCurrentLength}}</strong>.</p><p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The function succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p> The requested offset or the requested length is not valid. </p> </td></tr> </table><p>?</p> <dd> <p>A reference to the <strong>{{IMFMediaBuffer}}</strong> interface of the original media buffer. </p> </dd> <dd> <p>The start of the new buffer, as an offset in bytes from the start of the original buffer. </p> </dd> <dd> <p>The size of the new buffer. The value of <em>cbOffset</em> + <em>dwLength</em> must be less than or equal to the size of valid data the original buffer. (The size of the valid data is returned by the <strong>{{IMFMediaBuffer::GetCurrentLength}}</strong> method.) </p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaBuffer}}</strong> interface. The caller must release the interface. </p> </dd> <p> </p><p>Converts a Media Foundation media buffer into a buffer that is compatible with DirectX Media Objects ({{DMOs}}).</p> <p>The {{DMO}} buffer created by this function also exposes the <strong>{{IMFSample}}</strong> interface. If <em>pIMFSample</em> is <strong>{{NULL}}</strong>, all of the <strong>{{IMFSample}}</strong> methods return {{MF_E_NOT_INITIALIZED}}. Otherwise, they call through to the <em>pIMFSample</em> reference.</p><p>If the Media Foundation buffer specified by <em>pIMFMediaBuffer</em> exposes the <strong>{{IMF2DBuffer}}</strong> interface, the {{DMO}} buffer also exposes <strong>{{IMF2DBuffer}}</strong>.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid argument. The <em>pIMFMediaBuffer</em> parameter must not be <strong>{{NULL}}</strong>.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFSample}}</strong> interface of the sample that contains the Media Foundation buffer. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFMediaBuffer}}</strong> interface of the Media Foundation buffer.</p> </dd> <dd> <p>Offset in bytes from the start of the Media Foundation buffer. This offset defines where the {{DMO}} buffer starts. If this parameter is zero, the {{DMO}} buffer starts at the beginning of the Media Foundation buffer.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMediaBuffer}}</strong> interface. This interface is documented in the DirectShow {{SDK}} documentation. The caller must release the interface.</p> </dd> <p>Converts a Microsoft Direct3D?9 format identifier to a Microsoft DirectX Graphics Infrastructure ({{DXGI}}) format identifier.</p> <p>Returns a <strong>{{DXGI_FORMAT}}</strong> value.</p> <dd> <p>The <strong>{{D3DFORMAT}}</strong> value or {{FOURCC}} code to convert.</p> </dd> <p>Converts a Microsoft DirectX Graphics Infrastructure ({{DXGI}}) format identifier to a Microsoft Direct3D?9 format identifier.</p> <p>Returns a <strong>{{D3DFORMAT}}</strong> value or {{FOURCC}} code.</p> <dd> <p>The <strong>{{DXGI_FORMAT}}</strong> value to convert.</p> </dd> <p>Locks the shared Microsoft DirectX Graphics Infrastructure ({{DXGI}}) Device Manager.</p> <p>This function obtains a reference to a {{DXGI}} Device Manager instance that can be shared between components. The Microsoft Media Foundation platform creates this instance of the {{DXGI}} Device Manager as a singleton object. Alternatively, you can create a new {{DXGI}} Device Manager by calling <strong>{{MFCreateDXGIDeviceManager}}</strong>.</p><p>The first time this function is called, the Media Foundation platform creates the shared {{DXGI}} Device Manager. </p><p>When you are done use the <strong>{{IMFDXGIDeviceManager}}</strong> reference, call the <strong>{{MFUnlockDXGIDeviceManager}}</strong>.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a token that identifies this instance of the {{DXGI}} Device Manager. Use this token when calling <strong>{{IMFDXGIDeviceManager::ResetDevice}}</strong>. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFDXGIDeviceManager}}</strong> interface. The caller must release the interface.</p> </dd> <p>Unlocks the shared Microsoft DirectX Graphics Infrastructure ({{DXGI}}) Device Manager.</p> <p>Call this function after a successful call to the <strong>{{MFLockDXGIDeviceManager}}</strong> function.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Creates a media buffer object that manages a Direct3D 9 surface. </p> <p>This function creates a media buffer object that holds a reference to the Direct3D surface specified in <em>punkSurface</em>. Locking the buffer gives the caller access to the surface memory. When the buffer object is destroyed, it releases the surface. For more information about media buffers, see Media Buffers.</p><strong>Note</strong>??This function does not allocate the Direct3D surface itself.?<p> The buffer object created by this function also exposes the <strong>{{IMF2DBuffer}}</strong> interface. For more information, see DirectX Surface Buffer. </p><p>This function does not support {{DXGI}} surfaces.</p> <p> The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> </table><p>?</p> <dd> <p> Identifies the type of Direct3D 9 surface. Currently this value must be <strong>{{IID_IDirect3DSurface9}}</strong>. </p> </dd> <dd> <p> A reference to the <strong>{{IUnknown}}</strong> interface of the DirectX surface. </p> </dd> <dd> <p> If <strong>{{TRUE}}</strong>, the buffer's <strong>{{IMF2DBuffer::ContiguousCopyTo}}</strong> method copies the buffer into a bottom-up format. The bottom-up format is compatible with {{GDI}} for uncompressed {{RGB}} images. If this parameter is <strong>{{FALSE}}</strong>, the <strong>ContiguousCopyTo</strong> method copies the buffer into a top-down format, which is compatible with DirectX. </p> <p>For more information about top-down versus bottom-up images, see Image Stride.</p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFMediaBuffer}}</strong> interface. The caller must release the buffer. </p> </dd> <p>Creates a media buffer object that manages a Windows Imaging Component ({{WIC}}) bitmap.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Set this parameter to <code>__uuidof({{IWICBitmap}})</code>.</p> </dd> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of the bitmap surface. The bitmap surface must be a {{WIC}} bitmap that exposes the <strong>{{IWICBitmap}}</strong> interface.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaBuffer}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates a media buffer to manage a Microsoft DirectX Graphics Infrastructure ({{DXGI}}) surface.</p> <p>The returned buffer object supports the following interfaces:</p><ul> <li> <strong>{{IMF2DBuffer}}</strong> </li> <li> <strong>{{IMF2DBuffer2}}</strong> </li> <li> <strong>{{IMFDXGIBuffer}}</strong> </li> <li> <strong>{{IMFMediaBuffer}}</strong> </li> </ul> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Identifies the type of {{DXGI}} surface. This value must be <strong>{{IID_ID3D11Texture2D}}</strong>. </p> </dd> <dd> <p> A reference to the <strong>{{IUnknown}}</strong> interface of the {{DXGI}} surface. </p> </dd> <dd> <p>The zero-based index of a subresource of the surface. The media buffer object is associated with this subresource.</p> </dd> <dd> <p> If <strong>{{TRUE}}</strong>, the buffer's <strong>{{IMF2DBuffer::ContiguousCopyTo}}</strong> method copies the buffer into a bottom-up format. The bottom-up format is compatible with {{GDI}} for uncompressed {{RGB}} images. If this parameter is <strong>{{FALSE}}</strong>, the <strong>ContiguousCopyTo</strong> method copies the buffer into a top-down format, which is compatible with Direct3D. </p> <p>For more information about top-down versus bottom-up images, see Image Stride.</p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFMediaBuffer}}</strong> interface. The caller must release the buffer. </p> </dd> <p>Creates an object that allocates video samples that are compatible with Microsoft DirectX Graphics Infrastructure ({{DXGI}}).</p> <p>This function creates an allocator for {{DXGI}} video surfaces. The buffers created by this allocator expose the <strong>{{IMFDXGIBuffer}}</strong> interface. To create an allocator for Microsoft Direct3D?9 video surfaces, call <strong>{{MFCreateVideoSampleAllocator}}</strong>.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The identifier of the interface to retrieve. Specify one of the following values.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong><strong>{{IID_IUnknown}}</strong></strong></dt> </dl> </td><td> <p>Retrieve an <strong>{{IUnknown}}</strong> reference.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{IID_IMFVideoSampleAllocator}}</strong></strong></dt> </dl> </td><td> <p>Retrieve an <strong>{{IMFVideoSampleAllocator}}</strong> reference.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{IID_IMFVideoSampleAllocatorEx}}</strong></strong></dt> </dl> </td><td> <p>Retrieve an <strong>{{IMFVideoSampleAllocatorEx}}</strong> reference.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{IID_IMFVideoSampleAllocatorCallback}}</strong></strong></dt> </dl> </td><td> <p>Retrieve an <strong>{{IMFVideoSampleAllocatorCallback}}</strong> reference.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface.</p> </dd> <p>Creates an instance of the Microsoft DirectX Graphics Infrastructure ({{DXGI}}) Device Manager.</p> <p>When you create an <strong>{{IMFDXGIDeviceManager}}</strong> with <strong>{{MFCreateDXGIDeviceManager}}</strong>, a Microsoft Direct3D?11 device is not associated with the device manager. To associate a Direct3D?11 device with the device manager, call <strong>{{IMFDXGIDeviceManager::ResetDevice}}</strong>, passing in the reference to the Direct3D?11 device. To create a Direct3D?11 device, call <strong>{{D3D11CreateDevice}}</strong>. The device should be created with the <strong>{{D3D11_CREATE_DEVICE_VIDEO_SUPPORT}}</strong> device creation flag which is defined in the <strong>{{D3D11_CREATE_DEVICE_FLAG}}</strong> enumeration.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Receives a token that identifies this instance of the {{DXGI}} Device Manager. Use this token when calling <strong>{{IMFDXGIDeviceManager::ResetDevice}}</strong>. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFDXGIDeviceManager}}</strong> interface. The caller must release the interface. </p> </dd> <p> Allocates system memory with a specified byte alignment and creates a media buffer to manage the memory. </p> <p> When the media buffer object is destroyed, it releases the allocated memory. </p> <p> The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p> The function succeeded. </p> </td></tr> </table><p>?</p> <dd> <p>Size of the buffer, in bytes.</p> </dd> <dd> <p> Specifies the memory alignment for the buffer. Use one of the following constants. </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{MF_1_BYTE_ALIGNMENT}}</strong></dt> <dt>0x00000000</dt> </dl> </td><td> <p> Align to 1 bytes. </p> </td></tr> <tr><td><dl> <dt><strong>{{MF_2_BYTE_ALIGNMENT}}</strong></dt> <dt>0x00000001</dt> </dl> </td><td> <p> Align to 2 bytes. </p> </td></tr> <tr><td><dl> <dt><strong>{{MF_4_BYTE_ALIGNMENT}}</strong></dt> <dt>0x00000003</dt> </dl> </td><td> <p> Align to 4 bytes. </p> </td></tr> <tr><td><dl> <dt><strong>{{MF_8_BYTE_ALIGNMENT}}</strong></dt> <dt>0x00000007</dt> </dl> </td><td> <p> Align to 8 bytes. </p> </td></tr> <tr><td><dl> <dt><strong>{{MF_16_BYTE_ALIGNMENT}}</strong></dt> <dt>0x0000000F</dt> </dl> </td><td> <p> Align to 16 bytes. </p> </td></tr> <tr><td><dl> <dt><strong>{{MF_32_BYTE_ALIGNMENT}}</strong></dt> <dt>0x0000001F</dt> </dl> </td><td> <p> Align to 32 bytes. </p> </td></tr> <tr><td><dl> <dt><strong>{{MF_64_BYTE_ALIGNMENT}}</strong></dt> <dt>0x0000003F</dt> </dl> </td><td> <p> Align to 64 bytes. </p> </td></tr> <tr><td><dl> <dt><strong>{{MF_128_BYTE_ALIGNMENT}}</strong></dt> <dt>0x0000007F</dt> </dl> </td><td> <p> Align to 128 bytes. </p> </td></tr> <tr><td><dl> <dt><strong>{{MF_256_BYTE_ALIGNMENT}}</strong></dt> <dt>0x000000FF</dt> </dl> </td><td> <p> Align to 256 bytes. </p> </td></tr> <tr><td><dl> <dt><strong>{{MF_512_BYTE_ALIGNMENT}}</strong></dt> <dt>0x000001FF</dt> </dl> </td><td> <p> Align to 512 bytes. </p> </td></tr> </table> <p>?</p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFMediaBuffer}}</strong> interface of the media buffer. The caller must release the interface. </p> </dd> <p> </p><p>Creates a media event object.</p> <p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The event type. See <strong>{{IMFMediaEvent::GetType}}</strong>. For a list of event types, see Media Foundation Events.</p> </dd> <dd> <p>The extended type. See <strong>{{IMFMediaEvent::GetExtendedType}}</strong>. If the event type does not have an extended type, use the value {{GUID_NULL}}.</p> </dd> <dd> <p>The event status. See <strong>{{IMFMediaEvent::GetStatus}}</strong> </p> </dd> <dd> <p>The value associated with the event, if any. See <strong>{{IMFMediaEvent::GetValue}}</strong>. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaEvent}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Creates an event queue.</p> <p>This function creates a helper object that you can use to implement the <strong>{{IMFMediaEventGenerator}}</strong> interface.</p><p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFMediaEventQueue}}</strong> interface of the event queue. The caller must release the interface.</p> </dd> <p> </p><p>Creates an empty media sample.</p> <p>Initially the sample does not contain any media buffers.</p><p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFSample}}</strong> interface of the media sample. The caller must release the interface.</p> </dd> <p> Creates an empty attribute store. </p> <p>Attributes are used throughout Microsoft Media Foundation to configure objects, describe media formats, query object properties, and other purposes. For more information, see Attributes in Media Foundation.</p><p>For a complete list of all the defined attribute {{GUIDs}} in Media Foundation, see Media Foundation Attributes.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the <strong>{{IMFAttributes}}</strong> interface. The caller must release the interface. </p> </dd> <dd> <p>The initial number of elements allocated for the attribute store. The attribute store grows as needed. </p> </dd> <p> </p><p>Initializes the contents of an attribute store from a byte array.</p> <p>Use this function to deserialize an attribute store that was serialized with the <strong>{{MFGetAttributesAsBlob}}</strong> function.</p><p>This function deletes any attributes that were previously stored in <em>pAttributes</em>.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>The buffer is not valid.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAttributes}}</strong> interface of the attribute store.</p> </dd> <dd> <p>Pointer to the array that contains the initialization data.</p> </dd> <dd> <p>Size of the <em>pBuf</em> array, in bytes.</p> </dd> <p> </p><p>Retrieves the size of the buffer needed for the <strong>{{MFGetAttributesAsBlob}}</strong> function.</p> <p>Use this function to find the size of the array that is needed for the <strong>{{MFGetAttributesAsBlob}}</strong> function.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Converts the contents of an attribute store to a byte array.</p> <p>The function skips any attributes with <strong>{{IUnknown}}</strong> reference values ({{MF_ATTRIBUTE_IUNKNOWN}}); they are not stored in the array.</p><p>To convert the byte array back into an attribute store, call <strong>{{MFInitAttributesFromBlob}}</strong>.</p><p>To write an attribute store to a stream, call the <strong>{{MFSerializeAttributesToStream}}</strong> function.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_BUFFERTOOSMALL}}</strong></dt> </dl> </td><td> <p>The buffer given in <em>pBuf</em> is too small.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAttributes}}</strong> interface of the attribute store.</p> </dd> <dd> <p>Pointer to an array that receives the attribute data.</p> </dd> <dd> <p>Size of the <em>pBuf</em> array, in bytes. To get the required size of the buffer, call <strong>{{MFGetAttributesAsBlobSize}}</strong>.</p> </dd> <p> Adds information about a Media Foundation transform ({{MFT}}) to the registry. </p><p>Applications can enumerate the {{MFT}} by calling the <strong>{{MFTEnum}}</strong> or <strong>{{MFTEnumEx}}</strong> function.</p> <p> The registry entries created by this function are read by the following functions: </p><table> <tr><th>Function</th><th>Description</th></tr> <tr><td> <strong>{{MFTEnum}}</strong> </td><td>Enumerates {{MFTs}} by media type and category.</td></tr> <tr><td> <strong>{{MFTEnumEx}}</strong> </td><td>Extended version of <strong>{{MFTEnum}}</strong>.</td></tr> <tr><td> <strong>{{MFTGetInfo}}</strong> </td><td>Looks up an {{MFT}} by {{CLSID}} and retrieves the registry information.</td></tr> </table><p>?</p><p>This function does not register the {{CLSID}} of the {{MFT}} for the <strong>CoCreateInstance</strong> or <strong>CoGetClassObject</strong> functions. </p><p> To remove the entries from the registry, call <strong>{{MFTUnregister}}</strong>. If you remove an {{MFT}} from the system, you should always call <strong>{{MFTUnregister}}</strong>.</p><p> The formats given in the <em>pInputTypes</em> and <em>pOutputTypes</em> parameters are intended to help applications search for {{MFTs}} by format. Applications can use the <strong>{{MFTEnum}}</strong> or <strong>{{MFTEnumEx}}</strong> functions to enumerate {{MFTs}} that match a particular set of formats.</p><p>It is recommended to specify at least one input type in <em>pInputTypes</em> and one output type in the <em>pOutputTypes</em> parameter. Otherwise, the {{MFT}} might be skipped in the enumeration.</p><p>On 64-bit Windows, the 32-bit version of this function registers the {{MFT}} in the 32-bit node of the registry. For more information, see 32-bit and 64-bit Application Data in the Registry.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Unregisters a Media Foundation transform ({{MFT}}). </p> <p> This function removes the registry entries created by the <strong>{{MFTRegister}}</strong> function.</p><p>It is safe to call <strong>{{MFTUnregister}}</strong> twice with the same {{CLSID}}. If the {{CLSID}} is not found in the registry, the function succeeds and does nothing.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The {{CLSID}} of the {{MFT}}. </p> </dd> <p>Registers a Media Foundation transform ({{MFT}}) in the caller's process.</p> <p>The primary purpose of this function is to make an {{MFT}} available for automatic topology resolution without making the {{MFT}} available to other processes or applications.</p><p>After you call this function, the {{MFT}} can be enumerated by calling the <strong>{{MFTEnumEx}}</strong> function with the <strong>{{MFT_ENUM_FLAG_LOCALMFT}}</strong> flag. The {{MFT}} can be enumerated from within the same process, but is not visible to other processes.</p><p>The <em>pClassFactory</em> parameter specifies a class factory object that creates the {{MFT}}. The class factory's <strong>{{IClassFactory::CreateInstance}}</strong> method must return an object that supports the <strong>{{IMFTransform}}</strong> interface.</p><strong>Note</strong>??The <strong>{{MFTEnumEx}}</strong> function retrieves a list of <strong>{{IMFActivate}}</strong> references. However, the class factory does not need to support the <strong>{{IMFActivate}}</strong> interface. Instead, the <strong>{{MFTEnumEx}}</strong> function provides an implementation of <strong>{{IMFActivate}}</strong> that wraps the class factory.?<p>To unregister the {{MFT}} from the current process, call <strong>{{MFTUnregisterLocal}}</strong>.</p><p>If you need to register an {{MFT}} in the Protected Media Path ({{PMP}}) process, use the <strong>{{IMFLocalMFTRegistration}}</strong> interface.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IClassFactory}}</strong> interface of a class factory object. The class factory creates the {{MFT}}.</p> </dd> <dd> <p>A {{GUID}} that specifies the category of the {{MFT}}. For a list of {{MFT}} categories, see <strong>{{MFT_CATEGORY}}</strong>.</p> </dd> <dd> <p>A wide-character null-terminated string that contains the friendly name of the {{MFT}}.</p> </dd> <dd> <p>A bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>_MFT_ENUM_FLAG</strong> enumeration.</p> </dd> <dd> <p>The number of elements in the <em>pInputTypes</em> array.</p> </dd> <dd> <p>A reference to an array of <strong>{{MFT_REGISTER_TYPE_INFO}}</strong> structures. Each member of the array specifies an input format that the {{MFT}} supports. This parameter can be <strong>{{NULL}}</strong> if <em>cInputTypes</em> is zero.</p> </dd> <dd> <p>The number of elements in the <em>pOutputTypes</em> array.</p> </dd> <dd> <p>A reference to an array of <strong>{{MFT_REGISTER_TYPE_INFO}}</strong> structures. Each member of the array defines an output format that the {{MFT}} supports. This parameter can be <strong>{{NULL}}</strong> if <em>cOutputTypes</em> is zero.</p> </dd> <p>Unregisters one or more Media Foundation transforms ({{MFTs}}) from the caller's process.</p> <p>Use this function to unregister a local {{MFT}} that was previously registered through the <strong>{{MFTRegisterLocal}}</strong> function.</p><p>If the <em>pClassFactory</em> parameter is <strong>{{NULL}}</strong>, all local {{MFTs}} in the process are unregistered. Otherwise, the function unregisters the {{MFT}} associated with the class factory specified by the <em>pClassFactory</em> parameter. In that case, the <em>pClassFactory</em> parameter should equal a reference value that was previously passed to the <strong>{{MFTRegisterLocal}}</strong> function.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{HRESULT_FROM_WIN32}}(<strong>{{ERROR_NOT_FOUND}}</strong>)</strong></dt> </dl> </td><td> <p>The {{MFT}} specified by the <em>pClassFactory</em> parameter was not registered in this process.</p> </td></tr> </table><p>?</p> <dd> <p>A reference to the <strong>{{IClassFactory}}</strong> interface of a class factory object. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <p>Registers a Media Foundation transform ({{MFT}}) in the caller's process.</p> <p>The primary purpose of this function is to make an {{MFT}} available for automatic topology resolution without making the {{MFT}} available to other processes or applications.</p><p>After you call this function, the {{MFT}} can be enumerated by calling the <strong>{{MFTEnumEx}}</strong> function with the <strong>{{MFT_ENUM_FLAG_LOCALMFT}}</strong> flag. The {{MFT}} can be enumerated from within the same process, but is not visible to other processes.</p><p>To unregister the {{MFT}} from the current process, call <strong>{{MFTUnregisterLocalByCLSID}}</strong>.</p><p>If you need to register an {{MFT}} in the Protected Media Path ({{PMP}}) process, use the <strong>{{IMFLocalMFTRegistration}}</strong> interface.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The class identifier ({{CLSID}}) of the {{MFT}}.</p> </dd> <dd> <p>A {{GUID}} that specifies the category of the {{MFT}}. For a list of {{MFT}} categories, see <strong>{{MFT_CATEGORY}}</strong>.</p> </dd> <dd> <p>A wide-character null-terminated string that contains the friendly name of the {{MFT}}.</p> </dd> <dd> <p>A bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>_MFT_ENUM_FLAG</strong> enumeration.</p> </dd> <dd> <p>The number of elements in the <em>pInputTypes</em> array.</p> </dd> <dd> <p>A reference to an array of <strong>{{MFT_REGISTER_TYPE_INFO}}</strong> structures. Each member of the array specifies an input format that the {{MFT}} supports. This parameter can be <strong>{{NULL}}</strong> if <em>cInputTypes</em> is zero.</p> </dd> <dd> <p>The number of elements in the <em>pOutputTypes</em> array.</p> </dd> <dd> <p>A reference to an array of <strong>{{MFT_REGISTER_TYPE_INFO}}</strong> structures. Each member of the array defines an output format that the {{MFT}} supports. This parameter can be <strong>{{NULL}}</strong> if <em>cOutputTypes</em> is zero.</p> </dd> <p>Unregisters a Media Foundation transform ({{MFT}}) from the caller's process.</p> <p>Use this function to unregister a local {{MFT}} that was previously registered through the <strong>{{MFTRegisterLocalByCLSID}}</strong> function.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{HRESULT_FROM_WIN32}}(<strong>{{ERROR_NOT_FOUND}}</strong>)</strong></dt> </dl> </td><td> <p>The {{MFT}} specified by the <em>clsidMFT</em> parameter was not registered in this process.</p> </td></tr> </table><p>?</p> <dd> <p>The class identifier ({{CLSID}}) of the {{MFT}}.</p> </dd> <p> Enumerates Media Foundation transforms ({{MFTs}}) in the registry. </p><p>Starting in Windows?7, applications should use the <strong>{{MFTEnumEx}}</strong> function instead.</p> <p> This function returns a list of all the {{MFTs}} in the specified category that match the search criteria given by the <em>pInputType</em>, <em>pOutputType</em>, and <em>pAttributes</em> parameters. Any of those parameters can be <strong>{{NULL}}</strong>. </p><p> If no {{MFTs}} match the criteria, the method succeeds but returns the value zero in <em>pcMFTs</em>. </p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets a list of Microsoft Media Foundation transforms ({{MFTs}}) that match specified search criteria. This function extends the <strong>{{MFTEnum}}</strong> function.</p> <p>The <em>Flags</em> parameter controls which {{MFTs}} are enumerated, and the order in which they are returned. The flags for this parameter fall into several groups.</p><p> </p><p>The first set of flags specifies how an {{MFT}} processes data.</p><table> <tr><th>Flag</th><th>Description</th></tr> <tr><td> <p>{{MFT_ENUM_FLAG_SYNCMFT}}</p> </td><td> <p>The {{MFT}} performs synchronous data processing in software. This is the original {{MFT}} processing model, and is compatible with Windows?Vista.</p> </td></tr> <tr><td> <p>{{MFT_ENUM_FLAG_ASYNCMFT}}</p> </td><td> <p>The {{MFT}} performs asynchronous data processing in software. This processing model requires Windows?7. For more information, see Asynchronous {{MFTs}}.</p> </td></tr> <tr><td> <p>{{MFT_ENUM_FLAG_HARDWARE}}</p> </td><td> <p>The {{MFT}} performs hardware-based data processing, using either the {{AVStream}} driver or a {{GPU}}-based proxy {{MFT}}. {{MFTs}} in this category always process data asynchronously. For more information, see Hardware {{MFTs}}.</p> </td></tr> </table><p>?</p><p>Every {{MFT}} falls into exactly one of these categories. To enumerate a category, set the corresponding flag in the <em>Flags</em> parameter. You can combine these flags to enumerate more than one category. If none of these flags is specified, the default category is synchronous {{MFTs}} (<strong>{{MFT_ENUM_FLAG_SYNCMFT}}</strong>).</p><p> </p><p> </p><p>Next, the following flags include {{MFTs}} that are otherwise excluded from the results. By default, flags that match these criteria are excluded from the results. Use any these flags to include them.</p><table> <tr><th>Flag</th><th>Description</th></tr> <tr><td> <p><strong>{{MFT_ENUM_FLAG_FIELDOFUSE}}</strong></p> </td><td> <p>Include {{MFTs}} that must be unlocked by the application.</p> </td></tr> <tr><td> <p><strong>{{MFT_ENUM_FLAG_LOCALMFT}}</strong></p> </td><td> <p>Include {{MFTs}} that are registered in the caller's process through either the <strong>{{MFTRegisterLocal}}</strong> or <strong>{{MFTRegisterLocalByCLSID}}</strong> function.</p> </td></tr> <tr><td> <p><strong>{{MFT_ENUM_FLAG_TRANSCODE_ONLY}}</strong></p> </td><td> <p>Include {{MFTs}} that are optimized for transcoding rather than playback.</p> </td></tr> </table><p>?</p><p> </p><p> </p><p>The last flag is used to sort and filter the results:</p><table> <tr><th>Flag</th><th>Description</th></tr> <tr><td> <p><strong>{{MFT_ENUM_FLAG_SORTANDFILTER}}</strong></p> </td><td> <p>Sort and filter the results.</p> </td></tr> </table><p>?</p><p>If the <strong>{{MFT_ENUM_FLAG_SORTANDFILTER}}</strong> flag is set, the <strong>{{MFTEnumEx}}</strong> function sorts the results as follows:</p><ul> <li>Local: If the <strong>{{MFT_ENUM_FLAG_LOCALMFT}}</strong> flag is set, local {{MFTs}} appear first in the list. To register a local {{MFT}}, call the <strong>{{MFTRegisterLocal}}</strong> or <strong>{{MFTRegisterLocalByCLSID}}</strong> function.</li> <li>Merit: {{MFTs}} with a merit value appear next on the list, in order of merit value (highest to lowest). For more information about merit, see {{MFT_CODEC_MERIT_Attribute}}. </li> <li>Preferred: If an {{MFT}} is listed in the plug-in control's preferred list, it appears next in the list. For more information about the plug-in control, see <strong>{{IMFPluginControl}}</strong>.</li> <li>If an {{MFT}} appears on the blocked list, it is excluded from the results. For more information about the blocked list, see <strong>{{IMFPluginControl::IsDisabled}}</strong>.</li> <li>Any other {{MFTs}} that match the search criteria appear at the end of the list, unsorted.</li> </ul><p>If you do not set the <strong>{{MFT_ENUM_FLAG_SORTANDFILTER}}</strong> flag, the <strong>{{MFTEnumEx}}</strong> function returns an unsorted list.</p><p>Setting the <em>Flags</em> parameter to zero is equivalent to using the value <strong>{{MFT_ENUM_FLAG_SYNCMFT}}</strong> | <strong>{{MFT_ENUM_FLAG_LOCALMFT}}</strong> | <strong>{{MFT_ENUM_FLAG_SORTANDFILTER}}</strong>.</p><p>Setting <em>Flags</em> to <strong>{{MFT_ENUM_FLAG_SYNCMFT}}</strong> is equivalent to calling the <strong>{{MFTEnum}}</strong> function.</p><p>If no {{MFTs}} match the search criteria, the function returns <strong>{{S_OK}}</strong>, unless some other error occurs. Therefore, always check the count received in the <em>pcMFTActivate</em> parameter before you dereference the <em>pppMFTActivate</em> reference.</p><strong>Note</strong>??There is no way to enumerate just local {{MFTs}} and nothing else. Setting <em>Flags</em> equal to <strong>{{MFT_ENUM_FLAG_LOCALMFT}}</strong> is equivalent to including the <strong>{{MFT_ENUM_FLAG_SYNCMFT}}</strong> flag. However, if you also sort the results by specifying the <strong>{{MFT_ENUM_FLAG_SORTANDFILTER}}</strong> flag, local {{MFTs}} appear first in the list.? <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Gets a list of Microsoft Media Foundation transforms ({{MFTs}}) that match specified search criteria. This function extends the <strong>{{MFTEnumEx}}</strong> function to allow external applications and internal components to discover the hardware {{MFTs}} that correspond to a specific video adapter. </p> <p>The <em>Flags</em> parameter controls which {{MFTs}} are enumerated, and the order in which they are returned. The flags for this parameter fall into several groups.</p><p> </p><p>The first set of flags specifies how an {{MFT}} processes data.</p><table> <tr><th>Flag</th><th>Description</th></tr> <tr><td> <p>{{MFT_ENUM_FLAG_SYNCMFT}}</p> </td><td> <p>The {{MFT}} performs synchronous data processing in software. This is the original {{MFT}} processing model, and is compatible with Windows?Vista.</p> </td></tr> <tr><td> <p>{{MFT_ENUM_FLAG_ASYNCMFT}}</p> </td><td> <p>The {{MFT}} performs asynchronous data processing in software. This processing model requires Windows?7. For more information, see Asynchronous {{MFTs}}.</p> </td></tr> <tr><td> <p>{{MFT_ENUM_FLAG_HARDWARE}}</p> </td><td> <p>The {{MFT}} performs hardware-based data processing, using either the {{AVStream}} driver or a {{GPU}}-based proxy {{MFT}}. {{MFTs}} in this category always process data asynchronously. For more information, see Hardware {{MFTs}}.</p> </td></tr> </table><p>?</p><p>Every {{MFT}} falls into exactly one of these categories. To enumerate a category, set the corresponding flag in the <em>Flags</em> parameter. You can combine these flags to enumerate more than one category. If none of these flags is specified, the default category is synchronous {{MFTs}} (<strong>{{MFT_ENUM_FLAG_SYNCMFT}}</strong>).</p><p> </p><p> </p><p>Next, the following flags include {{MFTs}} that are otherwise excluded from the results. By default, flags that match these criteria are excluded from the results. Use any these flags to include them.</p><table> <tr><th>Flag</th><th>Description</th></tr> <tr><td> <p><strong>{{MFT_ENUM_FLAG_FIELDOFUSE}}</strong></p> </td><td> <p>Include {{MFTs}} that must be unlocked by the application.</p> </td></tr> <tr><td> <p><strong>{{MFT_ENUM_FLAG_LOCALMFT}}</strong></p> </td><td> <p>Include {{MFTs}} that are registered in the caller's process through either the <strong>{{MFTRegisterLocal}}</strong> or <strong>{{MFTRegisterLocalByCLSID}}</strong> function.</p> </td></tr> <tr><td> <p><strong>{{MFT_ENUM_FLAG_TRANSCODE_ONLY}}</strong></p> </td><td> <p>Include {{MFTs}} that are optimized for transcoding rather than playback.</p> </td></tr> </table><p>?</p><p> </p><p> </p><p>The last flag is used to sort and filter the results:</p><table> <tr><th>Flag</th><th>Description</th></tr> <tr><td> <p><strong>{{MFT_ENUM_FLAG_SORTANDFILTER}}</strong></p> </td><td> <p>Sort and filter the results.</p> </td></tr> </table><p>?</p><p>If the <strong>{{MFT_ENUM_FLAG_SORTANDFILTER}}</strong> flag is set, the <strong>{{MFTEnum2}}</strong> function sorts the results as follows:</p><ul> <li>Local: If the <strong>{{MFT_ENUM_FLAG_LOCALMFT}}</strong> flag is set, local {{MFTs}} appear first in the list. To register a local {{MFT}}, call the <strong>{{MFTRegisterLocal}}</strong> or <strong>{{MFTRegisterLocalByCLSID}}</strong> function.</li> <li>Merit: {{MFTs}} with a merit value appear next on the list, in order of merit value (highest to lowest). For more information about merit, see {{MFT_CODEC_MERIT_Attribute}}. </li> <li>Preferred: If an {{MFT}} is listed in the plug-in control's preferred list, it appears next in the list. For more information about the plug-in control, see <strong>{{IMFPluginControl}}</strong>.</li> <li>If an {{MFT}} appears on the blocked list, it is excluded from the results. For more information about the blocked list, see <strong>{{IMFPluginControl::IsDisabled}}</strong>.</li> <li>Any other {{MFTs}} that match the search criteria appear at the end of the list, unsorted.</li> </ul><p>If you do not set the <strong>{{MFT_ENUM_FLAG_SORTANDFILTER}}</strong> flag, the <strong>{{MFTEnum2}}</strong> function returns an unsorted list.</p><p>Setting the <em>Flags</em> parameter to zero is equivalent to using the value <strong>{{MFT_ENUM_FLAG_SYNCMFT}}</strong> | <strong>{{MFT_ENUM_FLAG_LOCALMFT}}</strong> | <strong>{{MFT_ENUM_FLAG_SORTANDFILTER}}</strong>.</p><p>Setting <em>Flags</em> to <strong>{{MFT_ENUM_FLAG_SYNCMFT}}</strong> is equivalent to calling the <strong>{{MFTEnum}}</strong> function.</p><p>If no {{MFTs}} match the search criteria, the function returns <strong>{{S_OK}}</strong>, unless some other error occurs. Therefore, always check the count received in the <em>pcMFTActivate</em> parameter before you dereference the <em>pppMFTActivate</em> reference.</p><strong>Note</strong>??There is no way to enumerate just local {{MFTs}} and nothing else. Setting <em>Flags</em> equal to <strong>{{MFT_ENUM_FLAG_LOCALMFT}}</strong> is equivalent to including the <strong>{{MFT_ENUM_FLAG_SYNCMFT}}</strong> flag. However, if you also sort the results by specifying the <strong>{{MFT_ENUM_FLAG_SORTANDFILTER}}</strong> flag, local {{MFTs}} appear first in the list.? <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Gets information from the registry about a Media Foundation transform ({{MFT}}). </p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The {{CLSID}} of the {{MFT}}. </p> </dd> <dd> <p> Receives a reference to a wide-character string containing the friendly name of the {{MFT}}. The caller must free the string by calling <strong>CoTaskMemFree</strong>. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <dd> <p> Receives a reference to an array of <strong>{{MFT_REGISTER_TYPE_INFO}}</strong> structures. Each member of the array describes an input format that the {{MFT}} supports. The caller must free the array by calling <strong>CoTaskMemFree</strong>. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <dd> <p> Receives the number of elements in the <em>ppInputTypes</em> array. If <em>ppInputTypes</em> is <strong>{{NULL}}</strong>, this parameter is ignored and can be <strong>{{NULL}}</strong>. </p> </dd> <dd> <p> Receives a reference to an array of <strong>{{MFT_REGISTER_TYPE_INFO}}</strong> structures. Each member of the array describes an output format that the {{MFT}} supports. The caller must free the array by calling <strong>CoTaskMemFree</strong>. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <dd> <p> Receives the number of elements in the <em>ppOutputType</em> array. If <em>ppOutputTypes</em> is <strong>{{NULL}}</strong>, this parameter is ignored and can be <strong>{{NULL}}</strong>. </p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFAttributes}}</strong> interface of an attribute store. The caller must release the interface. The attribute store might contain attributes that are stored in the registry for the specified {{MFT}}. (For more information, see <strong>{{MFTRegister}}</strong>.) If no attributes are stored in the registry for this {{MFT}}, the attribute store is empty. </p> <p>This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <p>Gets a reference to the Microsoft Media Foundation plug-in manager.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the <strong>{{IMFPluginControl}}</strong> interface. The caller must release the interface.</p> </dd> <p>Gets the merit value of a hardware codec.</p> <p> The function fails if the {{MFT}} does not represent a hardware device with a valid Output Protection Manager ({{OPM}}) certificate. </p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of the Media Foundation transform ({{MFT}}) that represents the codec.</p> </dd> <dd> <p>The size, in bytes, of the <em>verifier</em> array.</p> </dd> <dd> <p>The address of a buffer that contains one of the following:</p> <ul> <li>The class identifier ({{CLSID}}) of the {{MFT}}.</li> <li>A null-terminated wide-character string that contains the symbol link for the underlying hardware device. Include the size of the terminating null in the value of <em>cbVerifier</em>.</li> </ul> </dd> <dd> <p>Receives the merit value.</p> </dd> <p>Registers a scheme handler in the caller's process.</p> <p>Scheme handlers are used in Microsoft Media Foundation during the source resolution process, which creates a media source from a {{URL}}. For more information, see Scheme Handlers and Byte-Stream Handlers.</p><p>Within a process, local scheme handlers take precedence over scheme handlers that are registered in the registry. Local scheme handlers are not visible to other processes.</p><p>Use this function if you want to register a custom scheme handler for your application, but do not want the handler available to other applications.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A string that contains the scheme. The scheme includes the trailing ':' character; for example, "http:".</p> </dd> <dd> <p>A reference to the <strong>{{IMFActivate}}</strong> interface of an activation object. The caller implements this interface. The <strong>{{IMFActivate::ActivateObject}}</strong> method of the activation object must create a scheme handler object. The scheme handler exposes the <strong>{{IMFSchemeHandler}}</strong> interface.</p> </dd> <p>Registers a byte-stream handler in the caller's process.</p> <p>Byte-stream handlers are used in Microsoft Media Foundation during the source resolution process, which creates a media source from a {{URL}}. For more information, see Scheme Handlers and Byte-Stream Handlers.</p><p>Within a process, local byte-stream handlers take precedence over byte-stream handlers that are registered in the registry. Local byte-stream handlers are not visible to other processes.</p><p>Use this function if you want to register a custom byte-stream handler for your application, but do not want the handler available to other applications.</p><p>Either <em>szFileExtension</em> or <em>szMimeType</em> can be <strong>{{NULL}}</strong>; at least one must be non-<strong>{{NULL}}</strong>.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A string that contains the file name extension for this handler.</p> </dd> <dd> <p>A string that contains the {{MIME}} type for this handler.</p> </dd> <dd> <p>A reference to the <strong>{{IMFActivate}}</strong> interface of an activation object. The caller implements this interface. The <strong>{{IMFActivate::ActivateObject}}</strong> method of the activation object must create a byte-stream handler. The byte-stream handler exposes the <strong>{{IMFByteStreamHandler}}</strong> interface.</p> </dd> <p>Creates a wrapper for a byte stream.</p> <p>The <strong>{{IMFByteStream}}</strong> methods on the wrapper call directly through to the original byte stream, except for the <strong>{{IMFByteStream::Close}}</strong> method. Calling <strong>Close</strong> on the wrapper closes the wrapper object, but leaves the original byte stream open.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFByteStream}}</strong> interface of the original byte stream.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFByteStream}}</strong> interface of the wrapper. The caller must release the interface.</p> </dd> <p>Creates an activation object for a Windows Runtime class.</p> <p>To create the Windows Runtime object, call <strong>{{IMFActivate::ActivateObject}}</strong> or <strong>{{IClassFactory::CreateInstance}}</strong>.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The class identifier that is associated with the activatable runtime class.</p> </dd> <dd> <p>A reference to an optional <strong>{{IPropertySet}}</strong> object, which is used to configure the Windows Runtime class. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>The interface identifier ({{IID}}) of the interface being requested. The activation object created by this function supports the following interfaces:</p> <ul> <li> <strong>{{IClassFactory}}</strong> </li> <li> <strong>{{IMFActivate}}</strong> </li> <li> <strong>{{IPersistStream}}</strong> </li> </ul> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface.</p> </dd> <p> Validates the size of a buffer for a video format block. </p> <p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The buffer that contains the format block is large enough. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDMEDIATYPE}}</strong></dt> </dl> </td><td> <p> The buffer that contains the format block is too small, or the format block is not valid. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_FORMAT}}</strong></dt> </dl> </td><td> <p> This function does not support the specified format type. </p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that specifies the type of format block. It must be one of the following values:</p> <dl><dt><strong>{{FORMAT_DvInfo}}</strong></dt><dt><strong>{{FORMAT_MFVideoFormat}}</strong></dt><dt><strong>{{FORMAT_MPEG2Video}}</strong></dt><dt><strong>{{FORMAT_MPEGStreams}}</strong></dt><dt><strong>{{FORMAT_MPEGVideo}}</strong></dt><dt><strong>{{FORMAT_VideoInfo}}</strong></dt><dt><strong>{{FORMAT_VideoInfo2}}</strong></dt><dt><strong>{{FORMAT_WaveFormatEx}}</strong></dt> </dl> </dd> <dd> <p> Pointer to a buffer that contains the format block. </p> </dd> <dd> <p> Size of the <em>pBlock</em> buffer, in bytes. </p> </dd> <p> </p><p>Creates an empty media type.</p> <p> The media type is created without any attributes. </p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Receives a reference to the <strong>{{IMFMediaType}}</strong> interface. The caller must release the interface. </p> </dd> <p>[This {{API}} is not supported and may be altered or unavailable in the future. Applications should avoid using the <strong>{{MFVIDEOFORMAT}}</strong> structure, and use media type attributes instead. For more information, see Video Media Types.]</p><p> Creates an <strong>{{MFVIDEOFORMAT}}</strong> structure from a video media type.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><p>Converts a Media Foundation audio media type to a <strong>{{WAVEFORMATEX}}</strong> structure.</p> <p>If the <strong>wFormatTag</strong> member of the returned structure is <strong>{{WAVE_FORMAT_EXTENSIBLE}}</strong>, you can cast the reference to a <strong>{{WAVEFORMATEXTENSIBLE}}</strong> structure.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFMediaType}}</strong> interface of the media type.</p> </dd> <dd> <p>Receives a reference to the <strong>{{WAVEFORMATEX}}</strong> structure. The caller must release the memory allocated for the structure by calling <strong>CoTaskMemFree</strong>.</p> </dd> <dd> <p>Receives the size of the <strong>{{WAVEFORMATEX}}</strong> structure.</p> </dd> <dd> <p>Contains a flag from the <strong>{{MFWaveFormatExConvertFlags}}</strong> enumeration.</p> </dd> <p> </p><p>Initializes a media type from a DirectShow <strong>{{VIDEOINFOHEADER}}</strong> structure.</p> <p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to the <strong>{{IMFMediaType}}</strong> interface of the media type to initialize. To create the uninitialized media type object, call <strong>{{MFCreateMediaType}}</strong>.</p> </dd> <dd> <p>Pointer to a <strong>{{VIDEOINFOHEADER}}</strong> structure that describes the media type. The caller must fill in the structure members before calling this function.</p> </dd> <dd> <p>Size of the <strong>{{VIDEOINFOHEADER}}</strong> structure, in bytes.</p> </dd> <dd> <p>Pointer to a subtype {{GUID}}. This parameter can be <strong>{{NULL}}</strong>. If the subtype {{GUID}} is specified, the function uses it to set the media subtype. Otherwise, the function attempts to deduce the subtype from the <strong>biCompression</strong> field contained in the <strong>{{VIDEOINFOHEADER}}</strong> structure.</p> </dd> <p> </p><p>Initializes a media type from a DirectShow <strong>{{VIDEOINFOHEADER2}}</strong> structure.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFMediaType}}</strong> interface of the media type to initialize. To create the uninitialized media type object, call <strong>{{MFCreateMediaType}}</strong>.</p> </dd> <dd> <p>Pointer to a <strong>{{VIDEOINFOHEADER2}}</strong> structure that describes the media type. The caller must fill in the structure members before calling this function.</p> </dd> <dd> <p>Size of the <strong>{{VIDEOINFOHEADER2}}</strong> structure, in bytes.</p> </dd> <dd> <p>Pointer to a subtype {{GUID}}. This parameter can be <strong>{{NULL}}</strong>. If the subtype {{GUID}} is specified, the function uses it to set the media subtype. Otherwise, the function attempts to deduce the subtype from the <strong>biCompression</strong> field contained in the <strong>{{VIDEOINFOHEADER2}}</strong> structure.</p> </dd> <p> </p><p>Initializes a media type from a DirectShow <strong>{{MPEG1VIDEOINFO}}</strong> structure.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFMediaType}}</strong> interface of the media type to initialize. To create the uninitialized media type object, call <strong>{{MFCreateMediaType}}</strong>.</p> </dd> <dd> <p>Pointer to a <strong>{{MPEG1VIDEOINFO}}</strong> structure that describes the media type. The caller must fill in the structure members before calling this function.</p> </dd> <dd> <p>Size of the <strong>{{MPEG1VIDEOINFO}}</strong> structure, in bytes.</p> </dd> <dd> <p>Pointer to a subtype {{GUID}}. This parameter can be <strong>{{NULL}}</strong>. If the subtype {{GUID}} is specified, the function uses it to set the media subtype. Otherwise, the function attempts to deduce the subtype from the <strong>biCompression</strong> field contained in the <strong>{{MPEG1VIDEOINFO}}</strong> structure.</p> </dd> <p> </p><p>Initializes a media type from a DirectShow <strong>{{MPEG2VIDEOINFO}}</strong> structure.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFMediaType}}</strong> interface of the media type to initialize. To create the uninitialized media type object, call <strong>{{MFCreateMediaType}}</strong>.</p> </dd> <dd> <p>Pointer to a <strong>{{MPEG2VIDEOINFO}}</strong> structure that describes the media type. The caller must fill in the structure members before calling this function.</p> </dd> <dd> <p>Size of the <strong>{{MPEG2VIDEOINFO}}</strong> structure, in bytes.</p> </dd> <dd> <p>Pointer to a subtype {{GUID}}. This parameter can be <strong>{{NULL}}</strong>. If the subtype {{GUID}} is specified, the function uses it to set the media subtype. Otherwise, the function attempts to deduce the subtype from the <strong>biCompression</strong> field contained in the <strong>{{MPEG2VIDEOINFO}}</strong> structure.</p> </dd> <p>Retrieves the image size for a video format. Given a <strong>{{BITMAPINFOHEADER}}</strong> structure, this function calculates the correct value of the <strong>biSizeImage</strong> member. </p> <p> Before calling this function, you must set at least the following members of the <strong>{{BITMAPINFOHEADER}}</strong> structure:</p><ul> <li><strong>biCompression</strong></li> <li><strong>biBitCount</strong></li> <li><strong>biWidth</strong></li> <li><strong>biHeight</strong></li> </ul><p>Also, if <strong>biCompression</strong> is <strong>{{BI_BITFIELDS}}</strong>, the <strong>{{BITMAPINFOHEADER}}</strong> structure must be followed by an array of color masks. </p><p> This function fails if the <strong>{{BITMAPINFOHEADER}}</strong> structure describes a format that is not a video format. For example, it fails if <strong>biCompresson</strong> is <strong>{{BI_JPEG}}</strong> or <strong>{{BI_PNG}}</strong> .</p><p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The function succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p> The <strong>{{BITMAPINFOHEADER}}</strong> structure is not valid, or the value of <em>cbBufSize</em> is too small. </p> </td></tr> </table><p>?</p> <p> </p><p>Retrieves the image size, in bytes, for an uncompressed video format.</p> <p>The function returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Media subtype for the video format. For a list of subtypes, see Media Type {{GUIDs}}.</p> </dd> <dd> <p>Width of the image, in pixels.</p> </dd> <dd> <p>Height of the image, in pixels.</p> </dd> <dd> <p>Receives the size of each frame, in bytes. If the format is compressed or is not recognized, the value is zero.</p> </dd> <p> Converts a video frame rate into a frame duration.</p> <p>This function is useful for calculating time stamps on a sample, given the frame rate.</p><p>Also, average time per frame is used in the older <strong>{{VIDEOINFOHEADER}}</strong> and <strong>{{VIDEOINFOHEADER2}}</strong> format structures. This function provides a standard conversion so that all components in the pipeline can use consistent values, if they need to translate between the older format structures and the media type attributes used in Media Foundation.</p><p> For certain common frame rates, the function gets the frame duration from a look-up table:</p><table> <tr><th>Frames per second (floating point)</th><th>Frames per second (fractional)</th><th>Average time per frame</th></tr> <tr><td>59.94</td><td>60000/1001</td><td>166833</td></tr> <tr><td>29.97</td><td>30000/1001</td><td>333667</td></tr> <tr><td>23.976</td><td>24000/1001</td><td>417188</td></tr> <tr><td>60</td><td>60/1</td><td>166667</td></tr> <tr><td>30</td><td>30/1</td><td>333333</td></tr> <tr><td>50</td><td>50/1</td><td>200000</td></tr> <tr><td>25</td><td>25/1</td><td>400000</td></tr> <tr><td>24</td><td>24/1</td><td>416667</td></tr> </table><p>?</p><p> Most video content uses one of the frame rates listed here. For other frame rates, the function calculates the duration.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The numerator of the frame rate. </p> </dd> <dd> <p> The denominator of the frame rate. </p> </dd> <dd> <p> Receives the average duration of a video frame, in 100-nanosecond units. </p> </dd> <p> </p><p>Calculates the frame rate, in frames per second, from the average duration of a video frame.</p> <p>Average time per frame is used in the older <strong>{{VIDEOINFOHEADER}}</strong> and <strong>{{VIDEOINFOHEADER2}}</strong> format structures. This function provides a standard conversion so that all components in the pipeline can use consistent values, if they need to translate between the older format structures and the media type attributes used in Media Foundation.</p><p>This function uses a look-up table for certain common durations. The table is listed in the Remarks section for the <strong>{{MFFrameRateToAverageTimePerFrame}}</strong> function.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The average duration of a video frame, in 100-nanosecond units.</p> </dd> <dd> <p>Receives the numerator of the frame rate.</p> </dd> <dd> <p>Receives the denominator of the frame rate.</p> </dd> <p>[This {{API}} is not supported and may be altered or unavailable in the future. Applications should avoid using the <strong>{{MFVIDEOFORMAT}}</strong> structure, and use media type attributes instead. For more information, see Video Media Types.]</p><p>Initializes a media type from an <strong>{{MFVIDEOFORMAT}}</strong> structure.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Initializes a media type from a <strong>{{WAVEFORMATEX}}</strong> structure. </p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFMediaType}}</strong> interface of the media type to initialize. To create the uninitialized media type object, call <strong>{{MFCreateMediaType}}</strong>.</p> </dd> <dd> <p>Pointer to a <strong>{{WAVEFORMATEX}}</strong> structure that describes the media type. The caller must fill in the structure members before calling this function.</p> </dd> <dd> <p>Size of the <strong>{{WAVEFORMATEX}}</strong> structure, in bytes.</p> </dd> <p> </p><p>Initializes a media type from a DirectShow <strong>{{AM_MEDIA_TYPE}}</strong> structure.</p> <p>This function can also be used with the following format structures that are equivalent to <strong>{{AM_MEDIA_TYPE}}</strong>:</p><ul> <li> <p><strong>{{DMO_MEDIA_TYPE}}</strong> (DirectX Media Objects)</p> </li> <li> <p><strong>{{WM_MEDIA_TYPE}}</strong> (Windows Media Format {{SDK}})</p> </li> </ul> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFMediaType}}</strong> interface of the media type to initialize. To create the uninitialized media type object, call <strong>{{MFCreateMediaType}}</strong>.</p> </dd> <dd> <p>Pointer to an <strong>{{AM_MEDIA_TYPE}}</strong> structure that describes the media type. The caller must fill in the structure members before calling this function.</p> </dd> <p> </p><p>Initializes a DirectShow <strong>{{AM_MEDIA_TYPE}}</strong> structure from a Media Foundation media type.</p> <p>This function can also be used with the following format structures that are equivalent to <strong>{{AM_MEDIA_TYPE}}</strong>:</p><ul> <li><strong>{{DMO_MEDIA_TYPE}}</strong> (DirectX Media Objects)</li> <li><strong>{{WM_MEDIA_TYPE}}</strong> (Windows Media Format {{SDK}})</li> </ul> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDMEDIATYPE}}</strong></dt> </dl> </td><td> <p>The media type is not valid.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFMediaType}}</strong> interface of the media type to convert.</p> </dd> <dd> <p>Format type {{GUID}}. This value corresponds to the <strong>formattype</strong> member of the <strong>{{AM_MEDIA_TYPE}}</strong> structure and specifies the type of format block to allocate. If the value is {{GUID_NULL}}, the function attempts to deduce the correct format block, based on the major type and subtype.</p> </dd> <dd> <p>Pointer to an <strong>{{AM_MEDIA_TYPE}}</strong> structure. The function allocates memory for the format block. The caller must release the format block by calling <strong>CoTaskMemFree</strong> on the <strong>pbFormat</strong> member.</p> </dd> <p> </p><p>Creates a DirectShow <strong>{{AM_MEDIA_TYPE}}</strong> structure from a Media Foundation media type.</p> <p>This function can also be used with the following format structures that are equivalent to <strong>{{AM_MEDIA_TYPE}}</strong>:</p><ul> <li> <p><strong>{{DMO_MEDIA_TYPE}}</strong> (DirectX Media Objects)</p> </li> <li> <p><strong>{{WM_MEDIA_TYPE}}</strong> (Windows Media Format {{SDK}})</p> </li> </ul> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFMediaType}}</strong> interface of the media type to convert.</p> </dd> <dd> <p>Format type {{GUID}}. This value corresponds to the <strong>formattype</strong> member of the <strong>{{AM_MEDIA_TYPE}}</strong> structure and specifies the type of format block to allocate. If the value is {{GUID_NULL}}, the function attempts to deduce the correct format block, based on the major type and subtype.</p> </dd> <dd> <p>Receives a reference to an <strong>{{AM_MEDIA_TYPE}}</strong> structure. The caller must release the memory allocated for the structure by calling <strong>CoTaskMemFree</strong>. The function also allocates memory for the format block, which the caller must release by calling <strong>CoTaskMemFree</strong> on the <strong>pbFormat</strong> member.</p> </dd> <p> </p><p>Compares a full media type to a partial media type.</p> <p>A pipeline component can return a partial media type to describe a range of possible formats the component might accept. A partial media type has at least a major type {{GUID}}, but might be missing some of the other attributes that are needed to fully describe the type. The missing attributes represent "don't care" values for the partial type. For example, a partial video type might be missing the attributes for the width and height of the video.</p><p>This function returns <strong>{{TRUE}}</strong> if the following conditions are both true:</p><ul> <li> The partial media type contains a major type {{GUID}}. </li> <li> All of the attributes in the partial type exist in the full type and are set to the same value. </li> </ul><p> Otherwise, the function returns <strong>{{FALSE}}</strong>. </p> <p>If the full media type is compatible with the partial media type, the function returns <strong>{{TRUE}}</strong>. Otherwise, the function returns <strong>{{FALSE}}</strong>.</p> <dd> <p>Pointer to the <strong>{{IMFMediaType}}</strong> interface of the full media type.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFMediaType}}</strong> interface of the partial media type.</p> </dd> <p> Creates a media type that wraps another media type. </p> <p> The original media type (<em>pOrig</em>) is stored in the new media type under the <strong>{{MF_MT_WRAPPED_TYPE}}</strong> attribute. To extract the original media type, call <strong>{{MFUnwrapMediaType}}</strong>. </p><p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A reference to the <strong>{{IMFMediaType}}</strong> interface of the media type to wrap in a new media type. </p> </dd> <dd> <p>A {{GUID}} that specifies the major type for the new media type. For a list of possible values, see Major Media Types. </p> </dd> <dd> <p>A {{GUID}} that specifies the subtype for the new media type. For possible values, see:</p> <ul> <li> <strong>Audio Subtypes</strong> </li> <li> Video Subtypes </li> </ul> <p>Applications can define custom subtype {{GUIDs}}.</p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFMediaType}}</strong> interface of the new media type that wraps the original media type. The caller must release the interface. </p> </dd> <p> Retrieves a media type that was wrapped in another media type by the <strong>{{MFWrapMediaType}}</strong> function. </p> <p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>[This {{API}} is not supported and may be altered or unavailable in the future. Applications should avoid using the <strong>{{MFVIDEOFORMAT}}</strong> structure, and use media type attributes instead. For more information, see Video Media Types.]</p><p> Creates a video media type from an <strong>{{MFVIDEOFORMAT}}</strong> structure. </p> <p> Instead of using the <strong>{{MFVIDEOFORMAT}}</strong> structure to initialize a video media type, you can call <strong>{{MFCreateMediaType}}</strong> and set the media type attributes directly. </p><strong>Note</strong>??Prior to Windows?7, this function was exported from evr.dll. Starting in Windows?7, this function is exported from mfplat.dll, and evr.dll exports a stub function that calls into mfplat.dll. For more information, see Library Changes in Windows?7.? <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Creates a partial video media type with a specified subtype. </p> <p> This function creates a media type and sets the major type equal to <strong>{{MFMediaType_Video}}</strong> and the subtype equal to the value specified in <em>pAMSubtype</em>. </p><p>You can get the same result with the following steps:</p><ol> <li> Call <strong>{{MFCreateMediaType}}</strong>. This function returns a reference to the <strong>{{IMFMediaType}}</strong> interface. </li> <li> Set the <strong>{{MF_MT_MAJOR_TYPE}}</strong> attribute to <strong>{{MFMediaType_Video}}</strong>. </li> <li> Set the <strong>{{MF_MT_SUBTYPE}}</strong> attribute to the subtype. </li> </ol><strong>Note</strong>??Prior to Windows?7, this function was exported from evr.dll. Starting in Windows?7, this function is exported from mfplat.dll, and evr.dll exports a stub function that calls into mfplat.dll. For more information, see Library Changes in Windows?7.? <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Pointer to a {{GUID}} that specifies the subtype. See Video Subtype {{GUIDs}}. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFVideoMediaType}}</strong> interface. The caller must release the interface. </p> </dd> <p> </p><p>Queries whether a {{FOURCC}} code or <strong>{{D3DFORMAT}}</strong> value is a {{YUV}} format.</p> <p>This function checks whether <em>Format</em> specifies a {{YUV}} format. Not every {{YUV}} format is recognized by this function. However, if a {{YUV}} format is not recognized by this function, it is probably not supported for video rendering or DirectX video acceleration ({{DXVA}}).</p> <p>The function returns one of the following values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{TRUE}}</strong></dt> </dl> </td><td> <p>The value specifies a {{YUV}} format.</p> </td></tr> <tr><td> <dl> <dt><strong>{{FALSE}}</strong></dt> </dl> </td><td> <p>The value does not specify a recognized {{YUV}} format.</p> </td></tr> </table><p>?</p> <dd> <p>{{FOURCC}} code or <strong>{{D3DFORMAT}}</strong> value.</p> </dd> <p> This function is not implemented.</p> <strong>Note</strong>??Prior to Windows?7, this function was exported from evr.dll. Starting in Windows?7, this function is exported from mfplat.dll, and evr.dll exports a stub function that calls into mfplat.dll. For more information, see Library Changes in Windows?7.? <p>Returns <strong>{{E_FAIL}}</strong>.</p> <dd> <p>Reserved.</p> </dd> <dd> <p>Reserved.</p> </dd> <dd> <p>Reserved.</p> </dd> <dd> <p>Reserved.</p> </dd> <dd> <p>Reserved.</p> </dd> <dd> <p>Reserved.</p> </dd> <dd> <p>Reserved.</p> </dd> <dd> <p>Reserved.</p> </dd> <dd> <p>Reserved.</p> </dd> <p> Calculates the minimum surface stride for a video format. </p> <p> This function calculates the minimum stride needed to hold the image in memory. Use this function if you are allocating buffers in system memory. Surfaces allocated in video memory might require a larger stride, depending on the graphics card. </p><p> If you are working with a DirectX surface buffer, use the <strong>{{IMF2DBuffer::Lock2D}}</strong> method to find the surface stride. </p><p> For planar {{YUV}} formats, this function returns the stride for the Y plane. Depending on the format, the chroma planes might have a different stride. </p><strong>Note</strong>??Prior to Windows?7, this function was exported from evr.dll. Starting in Windows?7, this function is exported from mfplat.dll, and evr.dll exports a stub function that calls into mfplat.dll. For more information, see Library Changes in Windows?7.? <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>{{FOURCC}} code or <strong>{{D3DFORMAT}}</strong> value that specifies the video format. If you have a video subtype {{GUID}}, you can use the first <strong>{{DWORD}}</strong> of the subtype.</p> </dd> <dd> <p>Width of the image, in pixels.</p> </dd> <dd> <p>Receives the minimum surface stride, in pixels.</p> </dd> <p> </p><p>Retrieves the image size, in bytes, for an uncompressed video format.</p> <p> This function is equivalent to the <strong>{{MFCalculateImageSize}}</strong> function. </p><strong>Note</strong>??Prior to Windows?7, this function was exported from evr.dll. Starting in Windows?7, this function is exported from mfplat.dll, and evr.dll exports a stub function that calls into mfplat.dll.? <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The function succeeded. </p> </td></tr> </table><p>?</p> <dd> <p>{{FOURCC}} code or <strong>{{D3DFORMAT}}</strong> value that specifies the video format.</p> </dd> <dd> <p>Width of the image, in pixels.</p> </dd> <dd> <p>Height of the image, in pixels.</p> </dd> <dd> <p>Receives the size of one frame, in bytes. If the format is compressed or is not recognized, this value is zero.</p> </dd> <p>Creates a video media type from a <strong>{{BITMAPINFOHEADER}}</strong> structure.</p> <p>If the function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><p>Creates a Media Foundation media type from another format representation.</p> <p>If the original format is a DirectShow audio media type, and the format type is not recognized, the function sets the following attributes on the converted media type.</p><table> <tr><th>Attribute</th><th>Description</th></tr> <tr><td> <strong>{{MF_MT_AM_FORMAT_TYPE}}</strong> </td><td>Contains the format type {{GUID}}.</td></tr> <tr><td> <strong>{{MF_MT_USER_DATA}}</strong> </td><td>Contains the format block.</td></tr> </table><p>?</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_REPRESENTATION}}</strong></dt> </dl> </td><td> <p>The {{GUID}} specified in <em>guidRepresentation</em> is not supported.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that specifies which format representation to convert. The following value is defined.</p> <table> <tr><th>{{GUID}}</th><th>Description</th></tr> <tr><td>{{AM_MEDIA_TYPE_REPRESENTATION}}</td><td>Convert a DirectShow <strong>{{AM_MEDIA_TYPE}}</strong> structure.</td></tr> </table> <p>?</p> </dd> <dd> <p>Pointer to a buffer that contains the format representation to convert. The layout of the buffer depends on the value of <em>guidRepresentation</em>.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaType}}</strong> interface. The caller must release the interface.</p> </dd> <p>[This {{API}} is not supported and may be altered or unavailable in the future.]</p><p>Creates an audio media type from a <strong>{{WAVEFORMATEX}}</strong> structure.</p> <p> The <strong>{{IMFAudioMediaType}}</strong> interface is deprecrated, so applications should avoid using this function. To create a media type from a <strong>{{WAVEFORMATEX}}</strong> structure, do the following: </p><ol> <li> Call <strong>{{MFCreateMediaType}}</strong>. This function returns a reference to the <strong>{{IMFMediaType}}</strong> interface. The returned media type object is initially empty. </li> <li> Call <strong>{{MFInitMediaTypeFromWaveFormatEx}}</strong> to populate the media type from the <strong>{{WAVEFORMATEX}}</strong> structure. </li> </ol><p> Alternatively, you can call <strong>{{MFCreateMediaType}}</strong> and then set the media type attributes directly. </p><p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to a <strong>{{WAVEFORMATEX}}</strong> structure that describes the audio format.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFAudioMediaType}}</strong> interface. The caller must release the interface.</p> </dd> <p>[This {{API}} is not supported and may be altered or unavailable in the future. Applications should avoid using the <strong>{{MFVIDEOFORMAT}}</strong> structure, and use media type attributes instead. For more information, see Video Media Types.]</p><p>Returns the {{FOURCC}} or <strong>{{D3DFORMAT}}</strong> value for an uncompressed video format.</p> <strong>Note</strong>??Prior to Windows?7, this function was exported from evr.dll. Starting in Windows?7, this function is exported from mfplat.dll, and evr.dll exports a stub function that calls into mfplat.dll. For more information, see Library Changes in Windows?7.? <p>Returns a {{FOURCC}} or <strong>{{D3DFORMAT}}</strong> value that identifies the video format. If the video format is compressed or not recognized, the return value is {{D3DFMT_UNKNOWN}}.</p> <p>[This {{API}} is not supported and may be altered or unavailable in the future. Applications should avoid using the <strong>{{MFVIDEOFORMAT}}</strong> structure, and use media type attributes instead. For more information, see Video Media Types.]</p><p> Initializes an <strong>{{MFVIDEOFORMAT}}</strong> structure for a standard video format such as {{DVD}}, analog television, or {{ATSC}} digital television.</p> <strong>Note</strong>??Prior to Windows?7, this function was exported from evr.dll. Starting in Windows?7, this function is exported from mfplat.dll, and evr.dll exports a stub function that calls into mfplat.dll. For more information, see Library Changes in Windows?7.? <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>[This {{API}} is not supported and may be altered or unavailable in the future. Applications should avoid using the <strong>{{MFVIDEOFORMAT}}</strong> structure, and use media type attributes instead. For more information, see Video Media Types.]</p><p> Initializes an <strong>{{MFVIDEOFORMAT}}</strong> structure for an uncompressed {{RGB}} video format.</p> <p> This function fills in some reasonable default values for the specified {{RGB}} format. </p><p> Developers are encouraged to use media type attributes instead of using the <strong>{{MFVIDEOFORMAT}}</strong> structure. See Media Type Attributes. </p><p> In general, you should avoid calling this function. If you know all of the format details, you can fill in the <strong>{{MFVIDEOFORMAT}}</strong> structure without this function. If you do not know all of the format details, attributes are preferable to using the <strong>{{MFVIDEOFORMAT}}</strong> structure. </p><strong>Note</strong>??Prior to Windows?7, this function was exported from evr.dll. Starting in Windows?7, this function is exported from mfplat.dll, and evr.dll exports a stub function that calls into mfplat.dll. For more information, see Library Changes in Windows?7.? <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>[This {{API}} is not supported and may be altered or unavailable in the future. Applications should avoid using the <strong>{{MFVIDEOFORMAT}}</strong> structure, and use media type attributes instead. For more information, see Extended Color Information.]</p><p> Converts the extended color information from an <strong>{{MFVIDEOFORMAT}}</strong> to the equivalent DirectX Video Acceleration ({{DXVA}}) color information. </p> <strong>Note</strong>??Prior to Windows?7, this function was exported from evr.dll. Starting in Windows?7, this function is exported from mfplat.dll, and evr.dll exports a stub function that calls into mfplat.dll. For more information, see Library Changes in Windows?7.? <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>[This {{API}} is not supported and may be altered or unavailable in the future. Applications should avoid using the <strong>{{MFVIDEOFORMAT}}</strong> structure, and use media type attributes instead. For more information, see Extended Color Information.]</p><p> Sets the extended color information in a <strong>{{MFVIDEOFORMAT}}</strong> structure.</p> <p>This function sets the following fields in the <strong>{{MFVIDEOFORMAT}}</strong> structure.</p><ul> <li><strong>videoInfo.{{MFNominalRange}}</strong></li> <li><strong>videoInfo.{{MFVideoLighting}}</strong></li> <li><strong>videoInfo.{{MFVideoPrimaries}}</strong></li> <li><strong>videoInfo.{{MFVideoTransferFunction}}</strong></li> <li><strong>videoInfo.{{MFVideoTransferMatrix}}</strong></li> <li><strong>videoInfo.SourceChromaSubsampling</strong></li> </ul><strong>Note</strong>??Prior to Windows?7, this function was exported from evr.dll. Starting in Windows?7, this function is exported from mfplat.dll, and evr.dll exports a stub function that calls into mfplat.dll. For more information, see Library Changes in Windows?7.? <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Copies an image or image plane from one buffer to another. </p> <p> This function copies a single plane of the image. For planar {{YUV}} formats, you must call the function once for each plane. In this case, <em>pDest</em> and <em>pSrc</em> must point to the start of each plane. </p><p> This function is optimized if the {{MMX}}, {{SSE}}, or {{SSE2}} instruction sets are available on the processor. The function performs a non-temporal store (the data is written to memory directly without polluting the cache). </p><strong>Note</strong>??Prior to Windows?7, this function was exported from evr.dll. Starting in Windows?7, this function is exported from mfplat.dll, and evr.dll exports a stub function that calls into mfplat.dll. For more information, see Library Changes in Windows?7.? <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Pointer to the start of the first row of pixels in the destination buffer. </p> </dd> <dd> <p> Stride of the destination buffer, in bytes. </p> </dd> <dd> <p> Pointer to the start of the first row of pixels in the source image. </p> </dd> <dd> <p> Stride of the source image, in bytes. </p> </dd> <dd> <p> Width of the image, in bytes. </p> </dd> <dd> <p> Number of rows of pixels to copy. </p> </dd> <p> Converts an array of 16-bit floating-point numbers into an array of 32-bit floating-point numbers. </p> <p> The function converts <em>dwCount</em> values in the <em>pSrc</em> array and writes them into the <em>pDest</em> array. </p><strong>Note</strong>??Prior to Windows?7, this function was exported from evr.dll. Starting in Windows?7, this function is exported from mfplat.dll, and evr.dll exports a stub function that calls into mfplat.dll. For more information, see Library Changes in Windows?7.? <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Pointer to an array of <strong>float</strong> values. The array must contain at least <em>dwCount</em> elements. </p> </dd> <dd> <p> Pointer to an array of 16-bit floating-point values, typed as <strong>{{WORD}}</strong> values. The array must contain at least <em>dwCount</em> elements. </p> </dd> <dd> <p> Number of elements in the <em>pSrc</em> array to convert. </p> </dd> <p> Converts an array of 32-bit floating-point numbers into an array of 16-bit floating-point numbers. </p> <p> The function converts the values in the <em>pSrc</em> array and writes them into the <em>pDest</em> array. </p><strong>Note</strong>??Prior to Windows?7, this function was exported from evr.dll. Starting in Windows?7, this function is exported from mfplat.dll, and evr.dll exports a stub function that calls into mfplat.dll. For more information, see Library Changes in Windows?7.? <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to an array of 16-bit floating-point values, typed as <strong>{{WORD}}</strong> values. The array must contain at least <em>dwCount</em> elements.</p> </dd> <dd> <p>Pointer to an array of <strong>float</strong> values. The array must contain at least <em>dwCount</em> elements.</p> </dd> <dd> <p>Number of elements in the <em>pSrc</em> array to convert.</p> </dd> <p>Creates a system-memory buffer object to hold 2D image data.</p> <p>The returned buffer object also exposes the <strong>{{IMF2DBuffer2}}</strong> interface.</p> <p>This function can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDMEDIATYPE}}</strong></dt> </dl> </td><td> <p>Unrecognized video format.</p> </td></tr> </table><p>?</p> <dd> <p>Width of the image, in pixels. </p> </dd> <dd> <p>Height of the image, in pixels.</p> </dd> <dd> <p>A <strong>{{FOURCC}}</strong> code or {{D3DFORMAT}} value that specifies the video format. If you have a video subtype {{GUID}}, you can use the first <strong>{{DWORD}}</strong> of the subtype. </p> </dd> <dd> <p>If <strong>{{TRUE}},</strong> the buffer's <strong>{{IMF2DBuffer::ContiguousCopyTo}}</strong> method copies the buffer into a bottom-up format. The bottom-up format is compatible with {{GDI}} for uncompressed {{RGB}} images. If this parameter is <strong>{{FALSE}}</strong>, the <strong>ContiguousCopyTo</strong> method copies the buffer into a top-down format, which is compatible with DirectX. </p> <p>For more information about top-down versus bottom-up images, see Image Stride. </p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaBuffer}}</strong> interface.</p> </dd> <p>Allocates a system-memory buffer that is optimal for a specified media type.</p> <p>For video formats, if the format is recognized, the function creates a 2-D buffer that implements the <strong>{{IMF2DBuffer2}}</strong> interface. Otherwise it creates a linear buffer. To get the <strong>{{IMF2DBuffer2}}</strong> interface, call <strong>QueryInterface</strong> on the reference returned in <em>ppBuffer</em>. If the <strong>QueryInterface</strong> method fails, use the <strong>{{IMFMediaBuffer}}</strong> interface to access the buffer memory.</p><p>For audio formats, the function allocates a buffer that is large enough to contain <em>llDuration</em> audio samples, or <em>dwMinLength</em>, whichever is larger.</p><p>This function always allocates system memory. For Direct3D surfaces, use the <strong>{{MFCreateDXGISurfaceBuffer}}</strong> or <strong>{{MFCreateDXSurfaceBuffer}}</strong> function.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFMediaType}}</strong> interface of the media type.</p> </dd> <dd> <p>The sample duration. This value is required for audio formats.</p> </dd> <dd> <p>The minimum size of the buffer, in bytes. The actual buffer size might be larger. Specify zero to allocate the default buffer size for the media type.</p> </dd> <dd> <p>The minimum memory alignment for the buffer. Specify zero to use the default memory alignment.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaBuffer}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Creates an empty collection object.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the collection object's <strong>{{IMFCollection}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Allocates a block of memory.</p> <p>In the current version of Media Foundation, this function is equivalent to calling the <strong>HeapAlloc</strong> function and specifying the heap of the calling process.</p><p>To free the allocated memory, call <strong>{{MFHeapFree}}</strong>.</p> <p>If the function succeeds, it returns a reference to the allocated memory block. If the function fails, it returns <strong>{{NULL}}</strong>.</p> <dd> <p>Number of bytes to allocate.</p> </dd> <dd> <p>Zero or more flags. For a list of valid flags, see <strong>HeapAlloc</strong> in the Windows {{SDK}} documentation.</p> </dd> <dd> <p> Reserved. Set to <strong>{{NULL}}</strong>. </p> </dd> <dd> <p> Reserved. Set to zero. </p> </dd> <dd> <p> Reserved. Set to <strong>eAllocationTypeIgnore</strong>. </p> </dd> <p> </p><p>Frees a block of memory that was allocated by calling the <strong>{{MFHeapAlloc}}</strong> function.</p> <p>This function does not return a value.</p> <p>Calculates ((a * b) + d) / c, where each term is a 64-bit signed value.</p> <strong>Note</strong>??A previous version of this topic described the parameters incorrectly. The divisor is <em>c</em> and the rounding factor is <em>d</em>.? <p>Returns the result of the calculation. If numeric overflow occurs, the function returns _I64_MAX (positive overflow) or {{LLONG_MIN}} (negative overflow). If Mfplat.dll cannot be loaded, the function returns _I64_MAX.</p> <dd> <p>A multiplier.</p> </dd> <dd> <p>Another multiplier.</p> </dd> <dd> <p>The divisor.</p> </dd> <dd> <p>The rounding factor.</p> </dd> <p>Gets the class identifier for a content protection system.</p> <p>The class identifier can be used to create the input trust authority ({{ITA}}) for the content protection system. Call <strong>CoCreateInstance</strong> or <strong>{{IMFPMPHost::CreateObjectByCLSID}}</strong> to get an <strong>{{IMFTrustedInput}}</strong> reference.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{GUID}} that identifies the content protection system.</p> </dd> <dd> <p>Receives the class identifier to the content protection system.</p> </dd> <p> </p><p>Defines the behavior of the <strong>{{IMFMediaSession::SetTopology}}</strong> method.</p> <p> These flags are optional, and are not mutually exclusive. If no flags are set, the Media Session resolves the topology and then adds it to the queue of pending presentations. </p> <p> Defines flags for the <strong>{{IMFMediaSession::GetFullTopology}}</strong> method. </p> <p> Contains flags that define the behavior of the <strong>{{MFCreatePMPMediaSession}}</strong> function. </p> <p> </p><p>Defines the object types that are created by the source resolver.</p> <dd> <p>Media source. You can query the object for the <strong>{{IMFMediaSource}}</strong> interface.</p> </dd> <dd> <p>Byte stream. You can query the object for the <strong>{{IMFByteStream}}</strong> interface.</p> </dd> <dd> <p>Invalid type.</p> </dd> <p>Specifies how the topology loader connects a topology node. This enumeration is used with the <strong>{{MF_TOPONODE_CONNECT_METHOD}}</strong> attribute. </p> <p> </p><p>Defines status flags for the <strong>{{MF_TOPOLOGY_RESOLUTION_STATUS}}</strong> attribute.</p> <p>Defines the characteristics of a media source. These flags are retrieved by the <strong>{{IMFMediaSource::GetCharacteristics}}</strong> method.</p> <p>To skip forward or backward in a playlist, call <strong>{{IMFMediaSource::Start}}</strong> or <strong>{{IMFMediaSession::Start}}</strong> with the <strong>{{MF_TIME_FORMAT_ENTRY_RELATIVE}}</strong> time-format {{GUID}}. This capability applies only when the <strong>{{MFMEDIASOURCE_HAS_MULTIPLE_PRESENTATIONS}}</strong> flag is present.</p> <p>Defines stream marker information for the <strong>{{IMFStreamSink::PlaceMarker}}</strong> method. The <strong>PlaceMarker</strong> method places a marker on the stream between samples. The <strong>{{MFSTREAMSINK_MARKER_TYPE}}</strong> enumeration defines the marker type and the type of information associated with the marker.</p> <p>If the Streaming Audio Renderer receives an <strong>{{MFSTREAMSINK_MARKER_TICK}}</strong> marker, it inserts silence to cover the gap in the data. </p> <p>Specifies how to rotate a video image.</p> <dd> <p>Do not rotate the image.</p> </dd> <dd> <p>Rotate the image to the correct viewing orientation.</p> </dd> <p>Specifies how to flip a video image.</p> <dd> <p>Do not flip the image.</p> </dd> <dd> <p>Flip the image horizontally.</p> </dd> <dd> <p>Flip the image vertically.</p> </dd> <p>Specifies whether the topology loader enables Microsoft DirectX Video Acceleration ({{DXVA}}) in the topology.</p> <p>This enumeration is used with the {{MF_TOPOLOGY_DXVA_MODE}} topology attribute.</p><p>If an {{MFT}} supports {{DXVA}}, the {{MFT}} must return <strong>{{TRUE}}</strong> for the <strong>{{MF_SA_D3D_AWARE}}</strong> attribute. To enable {{DXVA}}, the topology loader calls <strong>{{IMFTransform::ProcessMessage}}</strong> on the {{MFT}}, passing the {{MFT}} a reference to the <strong>{{IDirect3DDeviceManager9}}</strong> interface. The topology loader gets the <strong>{{IDirect3DDeviceManager9}}</strong> reference from the media sink for the video stream. Typically the enhanced video renderer ({{EVR}}) is the media sink.</p><p>Previous versions of Microsoft Media Foundation supported {{DXVA}} only for decoders.</p> <dd> <p>The topology loader enables {{DXVA}} on the decoder if possible, and drops optional Media Foundation transforms ({{MFTs}}) that do not support {{DXVA}}.</p> </dd> <dd> <p>The topology loader disables all video acceleration. This setting forces software processing, even when the decoder supports {{DXVA}}.</p> </dd> <dd> <p>The topology loader enables {{DXVA}} on every {{MFT}} that supports it.</p> </dd> <p>Specifies whether the topology loader will insert hardware-based Media Foundation transforms ({{MFTs}}) into the topology.</p> <p> This enumeration is used with the {{MF_TOPOLOGY_HARDWARE_MODE}} topology attribute. </p> <dd> <p>Use only software {{MFTs}}. Do not use hardware-based {{MFTs}}. This mode is the default, for backward compatibility with existing applications.</p> </dd> <dd> <p>Use hardware-based {{MFTs}} when possible, and software {{MFTs}} otherwise. This mode is the recommended one.</p> </dd> <dd> <p>If hardware-based {{MFTs}} are available, the topoloader will insert them. If not, the connection will fail.</p> <p>Supported in Windows?8.1 and later.</p> </dd> <p> </p><p>Defines the type of a topology node.</p> <dd> <p>Output node. Represents a media sink in the topology.</p> </dd> <dd> <p>Source node. Represents a media stream in the topology.</p> </dd> <dd> <p>Transform node. Represents a Media Foundation Transform ({{MFT}}) in the topology.</p> </dd> <dd> <p>Tee node. A tee node does not hold a reference to an object. Instead, it represents a fork in the stream. A tee node has one input and multiple outputs, and samples from the upstream node are delivered to all of the downstream nodes.</p> </dd> <dd> <p>Reserved.</p> </dd> <p> </p><p>Defines when a transform in a topology is flushed.</p> <dd> <p>The transform is flushed whenever the stream changes, including seeks and new segments.</p> </dd> <dd> <p>The transform is flushed when seeking is performed on the stream.</p> </dd> <dd> <p>The transform is never flushed during streaming. It is flushed only when the object is released.</p> </dd> <p> </p><p>Defines at what times a transform in a topology is drained.</p> <dd> <p>The transform is drained when the end of a stream is reached. It is not drained when markout is reached at the end of a segment.</p> </dd> <dd> <p>The transform is drained whenever a topology ends.</p> </dd> <dd> <p>The transform is never drained.</p> </dd> <p>Contains flags that describe the characteristics of a clock. These flags are returned by the <strong>{{IMFClock::GetClockCharacteristics}}</strong> method.</p> <p> </p><p>Defines the state of a clock.</p> <dd> <p>The clock is invalid. A clock might be invalid for several reasons. Some clocks return this state before the first start. This state can also occur if the underlying device is lost.</p> </dd> <dd> <p>The clock is running. While the clock is running, the time advances at the clock's frequency and current rate.</p> </dd> <dd> <p>The clock is stopped. While stopped, the clock reports a time of 0.</p> </dd> <dd> <p>The clock is paused. While paused, the clock reports the time it was paused.</p> </dd> <p> </p><p>Defines properties of a clock.</p> <dd> <p>Jitter values are always negative. In other words, the time returned by <strong>{{IMFClock::GetCorrelatedTime}}</strong> might jitter behind the actual clock time, but will never jitter ahead of the actual time. If this flag is not present, the clock might jitter in either direction.</p> </dd> <p> </p><p>Contains flags for the <strong>{{IMFTimer::SetTimer}}</strong> method.</p> <p> Describes the current status of a call to the <strong>{{IMFShutdown::Shutdown}}</strong> method.</p> <p> </p><p>Indicates whether the {{URL}} is from a trusted source.</p> <dd> <p>The validity of the {{URL}} cannot be guaranteed because it is not signed. The application should warn the user.</p> </dd> <dd> <p>The {{URL}} is the original one provided with the content.</p> </dd> <dd> <p>The {{URL}} was originally signed and has been tampered with. The file should be considered corrupted, and the application should not navigate to the {{URL}} without issuing a strong warning the user.</p> </dd> <p> </p><p>Specifies the direction of playback (forward or reverse).</p> <dd> <p>Forward playback.</p> </dd> <dd> <p>Reverse playback.</p> </dd> <p> </p><p>Specifies how aggressively a pipeline component should drop samples.</p> <p>In drop mode, a component drops samples, more or less aggressively depending on the level of the drop mode. The specific algorithm used depends on the component. Mode 1 is the least aggressive mode, and mode 5 is the most aggressive. A component is not required to implement all five levels.</p><p>For example, suppose an encoded video stream has three B-frames between each pair of P-frames. A decoder might implement the following drop modes:</p><ul> <li> <p>Mode 1: Drop one out of every three B frames.</p> </li> <li> <p>Mode 2: Drop one out of every two B frames.</p> </li> <li> <p>Mode 3: Drop all delta frames.</p> </li> <li> <p>Modes 4 and 5: Unsupported.</p> </li> </ul><p>The enhanced video renderer ({{EVR}}) can drop video frames before sending them to the {{EVR}} mixer.</p> <dd> <p>Normal processing of samples. Drop mode is disabled.</p> </dd> <dd> <p>First drop mode (least aggressive).</p> </dd> <dd> <p>Second drop mode.</p> </dd> <dd> <p>Third drop mode.</p> </dd> <dd> <p>Fourth drop mode.</p> </dd> <dd> <p>Fifth drop mode (most aggressive, if it is supported; see Remarks).</p> </dd> <dd> <p>Maximum number of drop modes. This value is not a valid flag.</p> </dd> <p>Specifies the quality level for a pipeline component. The quality level determines how the component consumes or produces samples.</p> <p> Each successive quality level decreases the amount of processing that is needed, while also reducing the resulting quality of the audio or video. The specific algorithm used to reduce quality depends on the component. Mode 1 is the least aggressive mode, and mode 5 is the most aggressive. A component is not required to implement all five levels. Also, the same quality level might not be comparable between two different components. </p><p> Video decoders can often reduce quality by leaving out certain post-processing steps. The enhanced video renderer ({{EVR}}) can sometimes reduce quality by switching to a different deinterlacing mode. </p> <dd> <p> Normal quality. </p> </dd> <dd> <p> One level below normal quality. </p> </dd> <dd> <p> Two levels below normal quality. </p> </dd> <dd> <p> Three levels below normal quality. </p> </dd> <dd> <p> Four levels below normal quality. </p> </dd> <dd> <p> Five levels below normal quality. </p> </dd> <dd> <p> Maximum number of quality levels. This value is not a valid flag. </p> </dd> <p>Contains flags for the <strong>{{IMFQualityAdvise2::NotifyQualityEvent}}</strong> method.</p> <p>If the decoder sets the <strong>{{MF_QUALITY_CANNOT_KEEP_UP}}</strong> flag, the quality manager tries to reduce latency through the media source and the media sink. For example, it might request the Enhanced Video Renderer ({{EVR}}) to drop frames. During this period, the quality manager stops calling the decoder's <strong>{{IMFQualityAdvise2::NotifyQualityEvent}}</strong> method, until samples are no longer arriving late at the sink. At that point, the quality manager resumes calling <strong>NotifyQualityEvent</strong> on the decoder.</p> <p> </p><p>Contains flags for adding a topology to the sequencer source, or updating a topology already in the queue.</p> <dd> <p>This topology is the last topology in the sequence.</p> </dd> <p> Specifies how the credential manager should obtain user credentials. </p> <p>The application implements the credential manager, which must expose the <strong>{{IMFNetCredentialManager}}</strong> interface. If the <strong>{{REQUIRE_PROMPT}}</strong> flag is set, the credential manager should prompt the user for his or her name and password.</p><p>The credential cache object sets the <strong>{{REQUIRE_PROMPT}}</strong> flag if the cache does not yet contain valid credentials. It also sets this flag if the credentials will be sent as plain text, unless the credential manager previously set the <strong>{{MFNET_CREDENTIAL_ALLOW_CLEAR_TEXT}}</strong> option. (See <strong>{{IMFNetCredentialCache::SetUserOptions}}</strong>.)</p> <dd> <p> The credential manager should prompt the user to provide the credentials. </p> </dd> <dd> <p> </p><strong>Note</strong>??Requires Windows?7 or later. ? <p>The credentials are saved to persistent storage. This flag acts as a hint for the application's {{UI}}. If the application prompts the user for credentials, the {{UI}} can indicate that the credentials have already been saved.</p> </dd> <p> </p><p>Describes options for the caching network credentials.</p> <dd> <p>Allow the credential cache object to save credentials in persistant storage.</p> </dd> <dd> <p>Do not allow the credential cache object to cache the credentials in memory. This flag cannot be combined with the {{MFNET_CREDENTIAL_SAVE}} flag.</p> </dd> <dd> <p>The user allows credentials to be sent over the network in clear text.</p> <p> By default, <strong>{{IMFNetCredentialCache::GetCredential}}</strong> always returns the {{REQUIRE_PROMPT}} flag when the authentication flags include {{MFNET_AUTHENTICATION_CLEAR_TEXT}}, even if cached credentials are available. If you set the {{MFNET_CREDENTIAL_ALLOW_CLEAR_TEXT}} option, the <strong>GetCredential</strong> method will not return {{REQUIRE_PROMPT}} for clear text, if cached credentials are available.</p> <p>Do not set this flag without notifying the user that credentials might be sent in clear text.</p> </dd> <p> </p><p>Specifies how the user's credentials will be used.</p> <dd> <p>The credentials will be used to authenticate with a proxy.</p> </dd> <dd> <p>The credentials will be sent over the network unencrypted.</p> </dd> <dd> <p>The credentials must be from a user who is currently logged on.</p> </dd> <p> Indicates the type of control protocol that is used in streaming or downloading. </p> <dd> <p> The protocol type has not yet been determined. </p> </dd> <dd> <p> The protocol type is {{HTTP}}. This includes {{HTTPv9}}, {{WMSP}}, and {{HTTP}} download. </p> </dd> <dd> <p> The protocol type is Real Time Streaming Protocol ({{RTSP}}). </p> </dd> <dd> <p> The content is read from a file. The file might be local or on a remote share. </p> </dd> <dd> <p>The protocol type is multicast.</p> <strong>Note</strong>??Requires Windows?7 or later. ? </dd> <p> </p><p>Describes the type of transport used in streaming or downloading data ({{TCP}} or {{UDP}}).</p> <dd> <p>The data transport type is {{UDP}}.</p> </dd> <dd> <p>The data transport type is {{TCP}}.</p> </dd> <p> </p><p>Defines the status of the cache for a media file or entry.</p> <dd> <p>The cache for a file or entry does not exist.</p> </dd> <dd> <p>The cache for a file or entry is growing.</p> </dd> <dd> <p>The cache for a file or entry is completed.</p> </dd> <p>Defines statistics collected by the network source. The values in this enumeration define property identifiers ({{PIDs}}) for the <strong>{{MFNETSOURCE_STATISTICS}}</strong> property.</p><p>To retrieve statistics from the network source, call <strong>{{IMFGetService::GetService}}</strong> with the service identifier <strong>{{MFNETSOURCE_STATISTICS_SERVICE}}</strong> and the interface identifier {{IID_IPropertyStore}}. The retrieved reference is an <strong>{{IPropertyStore}}</strong> reference. To get the value of a network statistic, construct a <strong>{{PROPERTYKEY}}</strong> with <strong>fmtid</strong> equal to <strong>{{MFNETSOURCE_STATISTICS}}</strong> and <strong>pid</strong> equal to a value from this enumeration. Then call <strong>{{IPropertyStore::GetValue}}</strong> with the property key to retrieve the value of the statistic as a <strong>{{PROPVARIANT}}</strong>. </p><p>In the descriptions that follow, the data type and value-type tag for the <strong>{{PROPVARIANT}}</strong> are listed in parentheses.</p> <p>Specifies how the default proxy locator will specify the connection settings to a proxy server. The application must set these values in the <strong>{{MFNETSOURCE_PROXYSETTINGS}}</strong> property.</p> <p> </p><p>Defines actions that can be performed on a stream.</p> <dd> <p>No action.</p> </dd> <dd> <p>Play the stream.</p> </dd> <dd> <p>Copy the stream.</p> </dd> <dd> <p>Export the stream to another format.</p> </dd> <dd> <p>Extract the data from the stream and pass it to the application. For example, acoustic echo cancellation requires this action.</p> </dd> <dd> <p>Reserved.</p> </dd> <dd> <p>Reserved.</p> </dd> <dd> <p>Reserved.</p> </dd> <dd> <p>Last member of the enumeration.</p> </dd> <p>Defines protection levels for <strong>{{MFPROTECTION_CGMSA}}</strong>.</p> <p>These flags are equivalent to the {{OPM_CGMSA_Protection_Level}} enumeration constants used in the Output Protection Protocol ({{OPM}}). </p> <dd> <p>{{CGMS}}-A is disabled.</p> </dd> <dd> <p>The protection level is Copy Freely.</p> </dd> <dd> <p>The protection level is Copy No More.</p> </dd> <dd> <p>The protection level is Copy One Generation.</p> </dd> <dd> <p>The protection level is Copy Never.</p> </dd> <dd> <p>Redistribution control (also called the broadcast flag) is required. This flag can be combined with the other flags.</p> </dd> <p>Defines protection levels for <strong>{{MFPROTECTION_ACP}}</strong>.</p> <dd> <p>Specifies {{ACP}} is disabled.</p> </dd> <dd> <p>Specifies {{ACP}} is level one.</p> </dd> <dd> <p>Specifies {{ACP}} is level two.</p> </dd> <dd> <p>Specifies {{ACP}} is level three.</p> </dd> <dd> <p>Reserved.</p> </dd> <p>Specifies values for audio constriction.</p> <p>Values defined by the <strong>{{MFAudioConstriction}}</strong> enumeration matches the <strong>{{EAudioConstriction}}</strong> enumeration defined <strong>audioenginebaseapo.h</strong>.</p> <dd> <p>Audio is not constricted. </p> </dd> <dd> <p>Audio is down sampled to 48 kHz/16-bit.</p> </dd> <dd> <p>Audio is down sampled to 44 kHz/16-bit.</p> </dd> <dd> <p>Audio is down sampled to 14hKz/16-bit.</p> </dd> <dd> <p>Audio is muted.</p> </dd> <p> </p><p>Defines the version number for sample protection.</p> <dd> <p>No sample protection.</p> </dd> <dd> <p>Version 1.</p> </dd> <dd> <p>Version 2.</p> </dd> <dd> <p>Version 3.</p> </dd> <p>Defines flags for the {{MF_TRANSCODE_TOPOLOGYMODE}} attribute.</p> <p>Defines the profile flags that are set in the {{MF_TRANSCODE_ADJUST_PROFILE}} attribute.</p><p>These flags are checked by <strong>{{MFCreateTranscodeTopology}}</strong> during topology building. Based on these flags, <strong>{{MFCreateTranscodeTopology}}</strong> adjusts the transcode profile by modifying the configuration settings for the streams according to the input requirements of the encoder used in the topology. </p><p>For more information about the stream settings that an application can specify, see Using the Transcode {{API}}.</p> <p>If the <strong>{{MF_TRANSCODE_ADJUST_PROFILE_DEFAULT}}</strong> flag is specified, the following changes are made for the video stream:</p><ul> <li>If the frame rate of the media source specified in the <em>pSrc</em> parameter of <strong>{{MFCreateTranscodeTopology}}</strong> and the frame rate specified by the application in the <strong>{{MF_MT_FRAME_RATE}}</strong> attribute differ by less than 1/1000, the profile uses the media source frame rate. This is because the pipeline considers the difference to be negligible.</li> <li>If the application does not specify an interlaced mode by setting the <strong>{{MF_MT_INTERLACE_MODE}}</strong> attribute, the profile is changed to use progressive frames.</li> </ul><p>The <strong>{{MF_TRANSCODE_ADJUST_PROFILE_DEFAULT}}</strong> flag must be accompanied with the required audio and video stream attributes provided by the application. For the audio stream, the required attributes are as follows:</p><ul> <li> <strong>{{MF_MT_AUDIO_NUM_CHANNELS}}</strong> </li> <li> <strong>{{MF_MT_AUDIO_SAMPLES_PER_SECOND}}</strong> </li> <li> <strong>{{MF_MT_AUDIO_BLOCK_ALIGNMENT}}</strong> </li> <li> <strong>{{MF_MT_AUDIO_AVG_BYTES_PER_SECOND}}</strong> </li> <li> <strong>{{MF_MT_AUDIO_BITS_PER_SAMPLE}}</strong> </li> </ul><p> For the video stream, the required attributes are as follows:</p><ul> <li> <strong>{{MF_MT_FRAME_RATE}}</strong> </li> <li> <strong>{{MF_MT_FRAME_SIZE}}</strong> </li> <li> <strong>{{MF_MT_AVG_BITRATE}}</strong> </li> <li> <strong>{{MF_MT_PIXEL_ASPECT_RATIO}}</strong> </li> </ul><p> If these attributes are not set, <strong>{{MFCreateTranscodeTopology}}</strong> creates the topology but Media Session fails to generate the encoded file. The failure code depends on the {{MFT}} node in the topology. For example, if the application does not set the frame size, the {{WMV}} encoder fails to encode the content and application gets the {{MF_E_INVALIDMEDIATYPE}} error code through the Media Session. </p><p>Use the <strong>{{MF_TRANSCODE_ADJUST_PROFILE_USE_SOURCE_ATTRIBUTES}}</strong> flag when you want to transcode the file by using the input stream attributes. The input source stream attributes are copied to the output media type before the {{MFT}} node is inserted in the topology. If you set additional stream attributes, this flag does not overwrite the set values. Only the missing attributes are filled with the input source's attribute values. This flag is useful in remux scenario where you want to generate the output file in the same format as the input source. If you want to perform format conversion, make sure you set the <strong>{{MF_MT_SUBTYPE}}</strong> attribute for the stream to specify the encoder that topology builder must use. The transform node is added in the topology unless {{MF_TRANSCODE_DONOT_INSERT_ENCODER}} is set. In this case, and the content is not encoded. Instead, if permitted by the container, the content is embedded in the specified container. </p><p>For example, assume that your input source is an {{MP3}} file. You set the container to be <strong>{{MFTranscodeContainerType_ASF}}</strong>, you do not set any stream attributes, and you set the <strong>{{MF_TRANSCODE_ADJUST_PROFILE_USE_SOURCE_ATTRIBUTES}}</strong> flag. In this case, the generated output file is an {{ASF}} file (.wma) containing {{MP3}} media data. Note that if you use this flag, certain input stream attributes and the container type might not be compatible. </p> <p>Defines algorithms for the video processor which is use by {{MF_VIDEO_PROCESSOR_ALGORITHM}}.</p> <p> </p><p>Specifies how to open or create a file.</p> <dd> <p>Open an existing file. Fail if the file does not exist.</p> </dd> <dd> <p>Create a new file. Fail if the file already exists.</p> </dd> <dd> <p>Open an existing file and truncate it, so that the size is zero bytes. Fail if the file does not already exist.</p> </dd> <dd> <p>If the file does not exist, create a new file. If the file exists, open it.</p> </dd> <dd> <p>Create a new file. If the file exists, overwrite the file.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Specifies whether a stream associated with an <strong>{{IMFSensorDevice}}</strong> is an input or an output stream.</p> <p>Specifies how a video stream is interlaced.</p><p>In the descriptions that follow, upper field refers to the field that contains the leading half scan line. Lower field refers to the field that contains the first full scan line.</p> <p>Scan lines in the lower field are 0.5 scan line lower than those in the upper field. In {{NTSC}} television, a frame consists of a lower field followed by an upper field. In {{PAL}} television, a frame consists of an upper field followed by a lower field.</p><p>The upper field is also called the even field, the top field, or field 2. The lower field is also called the odd field, the bottom field, or field 1.</p><p>If the interlace mode is {{MFVideoInterlace_FieldSingleUpper}} or {{MFVideoInterlace_FieldSingleLower}}, each sample contains a single field, so each buffer contains only half the number of field lines given in the media type.</p> <dd> <p> The type of interlacing is not known. </p> </dd> <dd> <p> Progressive frames. </p> </dd> <dd> <p> Interlaced frames. Each frame contains two fields. The field lines are interleaved, with the upper field appearing on the first line. </p> </dd> <dd> <p> Interlaced frames. Each frame contains two fields. The field lines are interleaved, with the lower field appearing on the first line. </p> </dd> <dd> <p> Interlaced frames. Each frame contains one field, with the upper field appearing first. </p> </dd> <dd> <p> Interlaced frames. Each frame contains one field, with the lower field appearing first. </p> </dd> <dd> <p> The stream contains a mix of interlaced and progressive modes. </p> </dd> <dd> <p> Reserved. </p> </dd> <dd> <p> Reserved. This member forces the enumeration type to compile as a <strong>{{DWORD}}</strong> value. </p> </dd> <p> Defines the properties of a clock. </p> <dd> <p> The interval at which the clock correlates its clock time with the system time, in 100-nanosecond units. If the value is zero, the correlation is made whenever the <strong>{{IMFClock::GetCorrelatedTime}}</strong> method is called. </p> </dd> <dd> <p> The unique identifier of the underlying device that provides the time. If two clocks have the same unique identifier, they are based on the same device. If the underlying device is not shared between two clocks, the value can be <strong>{{GUID_NULL}}</strong>. </p> </dd> <dd> <p> A bitwise <strong>{{OR}}</strong> of flags from the <strong>{{MFCLOCK_RELATIONAL_FLAGS}}</strong> enumeration. </p> </dd> <dd> <p> The clock frequency in Hz. A value of <strong>{{MFCLOCK_FREQUENCY_HNS}}</strong> means that the clock has a frequency of 10 {{MHz}} (100-nanosecond ticks), which is the standard <strong>{{MFTIME}}</strong> time unit in Media Foundation. If the <strong>{{IMFClock::GetClockCharacteristics}}</strong> method returns the <strong>{{MFCLOCK_CHARACTERISTICS_FLAG_FREQUENCY_10MHZ}}</strong> flag, the value of this field must be <strong>{{MFCLOCK_FREQUENCY_HNS}}</strong>. </p> </dd> <dd> <p> The amount of inaccuracy that may be present on the clock, in parts per billion (ppb). For example, an inaccuracy of 50 ppb means the clock might drift up to 50 seconds per billion seconds of real time. If the tolerance is not known, the value is <strong>{{MFCLOCK_TOLERANCE_UNKNOWN}}</strong>. This constant is equal to 50 parts per million (ppm). </p> </dd> <dd> <p> The amount of jitter that may be present, in 100-nanosecond units. Jitter is the variation in the frequency due to sampling the underlying clock. Jitter does not include inaccuracies caused by drift, which is reflected in the value of <strong>dwClockTolerance</strong>. </p> <p> For clocks based on a single device, the minimum jitter is the length of the tick period (the inverse of the frequency). For example, if the frequency is 10 Hz, the jitter is 0.1 second, which is 1,000,000 in <strong>{{MFTIME}}</strong> units. This value reflects the fact that the clock might be sampled just before the next tick, resulting in a clock time that is one period less than the actual time. If the frequency is greater than 10 {{MHz}}, the jitter should be set to 1 (the minimum value). </p> <p> If a clock's underlying hardware device does not directly time stamp the incoming data, the jitter also includes the time required to dispatch the driver's interrupt service routine ({{ISR}}). In that case, the expected jitter should include the following values: </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{MFCLOCK_JITTER_ISR}}</strong></dt> </dl> </td><td> <p> Jitter due to time stamping during the device driver's {{ISR}}. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCLOCK_JITTER_DPC}}</strong></dt> </dl> </td><td> <p> Jitter due to time stamping during the deferred procedure call ({{DPC}}) processing. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCLOCK_JITTER_PASSIVE}}</strong></dt> </dl> </td><td> <p> Jitter due to dropping to normal thread execution before time stamping. </p> </td></tr> </table> <p>?</p> </dd> <p> </p><p>Contains information about a revoked component.</p> <dd> <p>Specifies the reason for the revocation. The following values are defined.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{MF_BOOT_DRIVER_VERIFICATION_FAILED}}</strong></dt> </dl> </td><td> <p>A boot driver could not be verified.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_COMPONENT_CERT_REVOKED}}</strong></dt> </dl> </td><td> <p>A certificate in a trusted component's certificate chain was revoked.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_COMPONENT_HS_CERT_REVOKED}}</strong></dt> </dl> </td><td> <p>The high-security certificate for authenticating the protected environment ({{PE}}) was revoked.</p> <p>The high-security certificate is typically used by {{ITAs}} that handle high-definition content and next-generation formats such as {{HD}}-{{DVD}}.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_COMPONENT_INVALID_EKU}}</strong></dt> </dl> </td><td> <p>A certificate's extended key usage ({{EKU}}) object is invalid.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_COMPONENT_INVALID_ROOT}}</strong></dt> </dl> </td><td> <p>The root certificate is not valid.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_COMPONENT_LS_CERT_REVOKED}}</strong></dt> </dl> </td><td> <p>The low-security certificate for authenticating the {{PE}} was revoked.</p> <p>The low-security certificate is typically used by {{ITAs}} that handle standard-definition content and current-generation formats.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_COMPONENT_REVOKED}}</strong></dt> </dl> </td><td> <p>A trusted component was revoked.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_GRL_ABSENT}}</strong></dt> </dl> </td><td> <p>The {{GRL}} was not found.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_GRL_LOAD_FAILED}}</strong></dt> </dl> </td><td> <p>Could not load the global revocation list ({{GRL}}).</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_INVALID_GRL_SIGNATURE}}</strong></dt> </dl> </td><td> <p>The {{GRL}} signature is invalid.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_MINCRYPT_FAILURE}}</strong></dt> </dl> </td><td> <p>A certificate chain was not well-formed, or a boot driver is unsigned or is signed with an untrusted certificate.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_TEST_SIGNED_COMPONENT_LOADING}}</strong></dt> </dl> </td><td> <p>A component was signed by a test certificate.</p> </td></tr> </table> <p>?</p> <p>In addition, one of the following flags might be present, indicating the type of component that failed to load.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{MF_USER_MODE_COMPONENT_LOAD}}</strong></dt> </dl> </td><td> <p>User-mode component.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_KERNEL_MODE_COMPONENT_LOAD}}</strong></dt> </dl> </td><td> <p>Kernel-mode component.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Contains a hash of the file header.</p> </dd> <dd> <p>Contains a hash of the public key in the component's certificate.</p> </dd> <dd> <p>File name of the revoked component.</p> </dd> <p> </p><p>Contains information about one or more revoked components.</p> <dd> <p>Revocation information version.</p> </dd> <dd> <p>Number of elements in the <strong>pRRComponents</strong> array.</p> </dd> <dd> <p>Array of <strong>{{MFRR_COMPONENT_HASH_INFO}}</strong> structures.</p> </dd> <p> </p><p>Contains an image that is stored as metadata for a media source. This structure is used as the data item for the <strong>{{WM}}/Picture</strong> metadata attribute.</p> <p>The <strong>{{WM}}/Picture</strong> attribute is defined in the Windows Media Format {{SDK}}. The attribute contains a picture related to the content, such as album art.</p><p>To get this attribute from a media source, call <strong>{{IMFMetadata::GetProperty}}</strong>, passing in the constant g_wszWMPicture for the <em>pwszName</em> parameter. The method retrieves a <strong>{{PROPVARIANT}}</strong> that contains a binary array ({{VT_BLOB}}). The layout of the array is as follows:</p><ul> <li><strong>{{ASF_FLAT_PICTURE}}</strong> structure. </li> <li> Null-terminated wide-character string that contains the {{MIME}} type. </li> <li> Null-terminated wide-character string that contains a description. </li> <li> <p>Image data.</p> </li> </ul><p>This format differs from the <strong>{{WM_PICTURE}}</strong> structure used in the Windows Media Format {{SDK}}. The <strong>{{WM_PICTURE}}</strong> structure contains internal references to two strings and the image data. If the structure is copied, these references become invalid. The <strong>{{ASF_FLAT_PICTURE}}</strong> structure does not contain internal references, so it is safe to copy the structure.</p> <p> </p><p>Contains synchronized lyrics stored as metadata for a media source. This structure is used as the data item for the <strong>{{WM}}/Lyrics_Synchronised</strong> metadata attribute.</p> <p>The <strong>{{WM}}/Lyrics_Synchronised</strong> attribute is defined in the Windows Media Format {{SDK}}. The attribute contains lyrics synchronized to times in the source file.</p><p>To get this attribute from a media source, call <strong>{{IMFMetadata::GetProperty}}</strong>, passing in the constant g_wszWMLyrics_Synchronised for the <em>pwszName</em> parameter. The method retrieves a <strong>{{PROPVARIANT}}</strong> that contains a binary array ({{VT_BLOB}}). The layout of the array is as follows:</p><ul> <li> <p><strong>{{ASF_FLAT_SYNCHRONISED_LYRICS}}</strong> structure.</p> </li> <li> <p>Null-terminated wide-character string that contains a description.</p> </li> <li> <p>Lyric data. The format of the lyric data is described in the Windows Media Format {{SDK}} documentation.</p> </li> </ul><p>This format differs from the <strong>{{WM_SYNCHRONISED_LYRICS}}</strong> structure used in the Windows Media Format {{SDK}}. The <strong>{{WM_SYNCHRONISED_LYRICS}}</strong> structure contains internal references to two strings and the lyric data. If the structure is copied, these references become invalid. The <strong>{{ASF_FLAT_SYNCHRONISED_LYRICS}}</strong> structure does not contain internal references, so it is safe to copy the structure.</p> <dd> <p>Specifies the format of time stamps in the lyrics. This member is equivalent to the <strong>bTimeStampFormat</strong> member in the <strong>{{WM_SYNCHRONISED_LYRICS}}</strong> structure. The <strong>{{WM_SYNCHRONISED_LYRICS}}</strong> structure is documented in the Windows Media Format {{SDK}}.</p> </dd> <dd> <p>Specifies the type of synchronized strings that are in the lyric data. This member is equivalent to the <strong>bContentType</strong> member in the <strong>{{WM_SYNCHRONISED_LYRICS}}</strong> structure.</p> </dd> <dd> <p>Size, in bytes, of the lyric data.</p> </dd> <p>Specifies a new attribute value for a topology node.</p> <p> Due to an error in the structure declaration, the <strong>u64</strong> member is declared as a 32-bit integer, not a 64-bit integer. Therefore, any 64-bit value passed to the <strong>{{IMFTopologyNodeAttributeEditor::UpdateNodeAttributes}}</strong> method is truncated to 32 bits. </p> <dd> <p> The identifier of the topology node to update. To get the identifier of a topology node, call <strong>{{IMFTopologyNode::GetTopoNodeID}}</strong>. </p> </dd> <dd> <p> {{GUID}} that specifies the attribute to update. </p> </dd> <dd> <p> Attribute type, specified as a member of the <strong>{{MF_ATTRIBUTE_TYPE}}</strong> enumeration. </p> </dd> <dd> <p> Attribute value (unsigned 32-bit integer). This member is used when <strong>attrType</strong> equals <strong>{{MF_ATTRIBUTE_UINT32}}</strong>. </p> </dd> <dd> <p> Attribute value (unsigned 32-bit integer). This member is used when <strong>attrType</strong> equals <strong>{{MF_ATTRIBUTE_UINT64}}</strong>. See Remarks. </p> </dd> <dd> <p> Attribute value (floating point). This member is used when <strong>attrType</strong> equals <strong>{{MF_ATTRIBUTE_DOUBLE}}</strong>. </p> </dd> <p> </p><p>Specifies the buffering requirements of a file.</p> <p>This structure describes the buffering requirements for content encoded at the bit rate specified in the <strong>dwBitrate</strong>. The <strong>msBufferWindow</strong> member indicates how much data should be buffered before starting playback. The size of the buffer in bytes is <strong>msBufferWinow</strong>?<strong>dwBitrate</strong> / 8000.</p> <dd> <p>Bit rate, in bits per second.</p> </dd> <dd> <p>Size of the buffer window, in milliseconds.</p> </dd> <p> </p><p>Specifies the buffering parameters for a network byte stream.</p> <dd> <p>Size of the file, in bytes. If the total size is unknown, set this member to -1.</p> </dd> <dd> <p>Size of the playable media data in the file, excluding any trailing data that is not useful for playback. If this value is unknown, set this member to -1.</p> </dd> <dd> <p>Pointer to an array of <strong>{{MF_LEAKY_BUCKET_PAIR}}</strong> structures. Each member of the array gives the buffer window for a particular bit rate.</p> </dd> <dd> <p>The number of elements in the <strong>prgBuckets</strong> array.</p> </dd> <dd> <p>Amount of data to buffer from the network, in 100-nanosecond units. This value is in addition to the buffer windows defined in the <strong>prgBuckets</strong> member.</p> </dd> <dd> <p>Amount of additional data to buffer when seeking, in 100-nanosecond units. This value reflects the fact that downloading must start from the previous key frame before the seek point. If the value is unknown, set this member to zero.</p> </dd> <dd> <p>The playback duration of the file, in 100-nanosecond units. If the duration is unknown, set this member to zero.</p> </dd> <dd> <p>Playback rate.</p> </dd> <p>Specifies a range of bytes.</p> <dd> <p>The offset, in bytes, of the start of the range.</p> </dd> <dd> <p>The offset, in bytes, of the end of the range.</p> </dd> <p> </p><p>Contains the authentication information for the credential manager.</p> <dd> <p>The response code of the authentication challenge. For example, {{NS_E_PROXY_ACCESSDENIED}}.</p> </dd> <dd> <p>Set this flag to <strong>{{TRUE}}</strong> if the currently logged on user's credentials should be used as the default credentials.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, the authentication package will send unencrypted credentials over the network. Otherwise, the authentication package encrypts the credentials.</p> </dd> <dd> <p>The original {{URL}} that requires authentication.</p> </dd> <dd> <p>The name of the site or proxy that requires authentication.</p> </dd> <dd> <p>The name of the realm for this authentication.</p> </dd> <dd> <p>The name of the authentication package. For example, "Digest" or "{{MBS_BASIC}}".</p> </dd> <dd> <p>The number of times that the credential manager should retry after authentication fails.</p> </dd> <p> </p><p>Describes an action requested by an output trust authority ({{OTA}}). The request is sent to an input trust authority ({{ITA}}).</p> <dd> <p>Specifies the action as a member of the <strong>{{MFPOLICYMANAGER_ACTION}}</strong> enumeration.</p> </dd> <dd> <p>Pointer to a buffer that contains a ticket object, provided by the {{OTA}}.</p> </dd> <dd> <p>Size of the ticket object, in bytes.</p> </dd> <p> </p><p>Contains parameters for the <strong>{{IMFInputTrustAuthority::BindAccess}}</strong> or <strong>{{IMFInputTrustAuthority::UpdateAccess}}</strong> method.</p> <p>Contains information about the audio and video streams for the transcode sink activation object.</p><p>To get the information stored in this structure, call <strong>{{IMFTranscodeSinkInfoProvider::GetSinkInfo}}</strong>.</p> <p>The <strong>{{IMFTranscodeSinkInfoProvider::GetSinkInfo}}</strong> method assigns <strong>{{IMFMediaType}}</strong> references to the <strong>pAudioMediaType</strong> and <strong>pVideoMediaType</strong> members of this structure. The method might set either member to <strong>{{NULL}}</strong>. If either member is non-<strong>{{NULL}}</strong> after the method returns, the caller must release the <strong>{{IMFMediaType}}</strong> references.</p> <p>Contains parameters for the <strong>{{IMFLocalMFTRegistration::RegisterMFTs}}</strong> method.</p> <p>Contains information about the data that you want to provide as input to a protection system function.</p> <dd> <p>The identifier of the function that you need to run. This value is defined by the implementation of the protection system. </p> </dd> <dd> <p>The size of the private data that the implementation of the security processor implementation reserved. You can determine this value by calling the <strong>{{IMFContentProtectionDevice::GetPrivateDataByteCount}}</strong> method.</p> </dd> <dd> <p>The size of the data provided as input to the protection system function that you want to run. </p> </dd> <dd> <p>Reserved.</p> </dd> <dd> <p>The data to provide as input to the protection system function.</p> <p>If the value of the <strong>PrivateDataByteCount</strong> member is greater than 0, bytes 0 through <strong>PrivateDataByteCount</strong> - 1 are reserved for use by the independent hardware vendor ({{IHV}}). Bytes <strong>PrivateDataByteCount</strong> through <strong>{{HWProtectionDataByteCount}}</strong> + <strong>PrivateDataByteCount</strong> - 1 contain the input data for the protection system function. </p> <p>The protection system specification defines the format and size of the {{DRM}} function.</p> </dd> <p>Contains information about the data you received as output from a protection system function.</p> <dd> <p>The size of the private data that the implementation of the security processor reserves, in bytes. You can determine this value by calling the <strong>{{IMFContentProtectionDevice::GetPrivateDataByteCount}}</strong> method.</p> </dd> <dd> <p>The maximum size of data that the independent hardware vendor ({{IHV}}) can return in the output buffer, in bytes.</p> </dd> <dd> <p>The size of the data that the {{IHV}} wrote to the output buffer, in bytes.</p> </dd> <dd> <p>The result of the protection system function.</p> </dd> <dd> <p>The number of 100 nanosecond units spent transporting the data. </p> </dd> <dd> <p>The number of 100 nanosecond units spent running the protection system function. </p> </dd> <dd> <p>The output of the protection system function.</p> <p>If the value of the <strong>PrivateDataByteCount</strong> member is greater than 0, bytes 0 through <strong>PrivateDataByteCount</strong> - 1 are reserved for {{IHV}} use. Bytes <strong>PrivateDataByteCount</strong> through <strong>MaxHWProtectionDataByteCount</strong> + <strong>PrivateDataByteCount</strong> - 1 contain the region of the array into which the driver should return the output data from the protection system function.</p> <p>The protection system specification defines the format and size of the function.</p> </dd> <p>Advises the secure processor of the Multimedia Class Scheduler service ({{MMCSS}}) parameters so that real-time tasks can be scheduled at the expected priority.</p> <dd> <p>The identifier for the {{MMCSS}} task.</p> </dd> <dd> <p>The name of the {{MMCSS}} task.</p> </dd> <dd> <p>The base priority of the thread that runs the {{MMCSS}} task.</p> </dd> <p>Provides playback controls for protected and unprotected content. The Media Session and the protected media path ({{PMP}}) session objects expose this interface. This interface is the primary interface that applications use to control the Media Foundation pipeline.</p><p>To obtain a reference to this interface, call <strong>{{MFCreateMediaSession}}</strong> or <strong>{{MFCreatePMPMediaSession}}</strong>.</p> <p> Sets a topology on the Media Session. </p> <p> If <em>pTopology</em> is a full topology, set the <strong>{{MFSESSION_SETTOPOLOGY_NORESOLUTION}}</strong> flag in the <em>dwSetTopologyFlags</em> parameter. Otherwise, the topology is assumed to be a partial topology. The Media Session uses the topology loader to resolve a partial topology into a full topology.</p><p>If the Media Session is currently paused or stopped, the <strong>SetTopology</strong> method does not take effect until the next call to <strong>{{IMFMediaSession::Start}}</strong>.</p><p>If the Media Session is currently running, or on the next call to <strong>Start</strong>, the <strong>SetTopology</strong> method does the following:</p><ul> <li>If the <strong>{{MFSESSION_SETTOPOLOGY_IMMEDIATE}}</strong> flag is set in <em>dwSetTopologyFlags</em>, the Media Session ends the current presentation immediately, clears all pending topologies, and uses <em>pTopology</em> to start a new presentation.</li> <li>Otherwise, the Media Session queues <em>pTopology</em> and starts the new presentation when the current presentation has completed. If there is no current presentation, the new presentation starts immediately.</li> <li>Starting in Windows?7, you can also specify the <strong>{{MFSESSION_SETTOPOLOGY_CLEAR_CURRENT}}</strong> flag to clear the current topology but leave any other pending topologies on the queue.</li> </ul><p> This method is asynchronous. If the method returns {{S_OK}}, the Media Session sends an {{MESessionTopologySet}} event when the operation completes. If the Media Session is currently paused to stopped, the Media Session does not send the {{MESessionTopologySet}} event until the next call to <strong>{{IMFMediaSession::Start}}</strong> </p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p> The operation cannot be performed in the Media Session's current state. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p> The Media Session has been shut down. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TOPO_INVALID_TIME_ATTRIBUTES}}</strong></dt> </dl> </td><td> <p>The topology has invalid values for one or more of the following attributes:</p> <ul> <li> <strong>{{MF_TOPONODE_MEDIASTART}}</strong> </li> <li> <strong>{{MF_TOPONODE_MEDIASTOP}}</strong> </li> <li> <strong>{{MF_TOPOLOGY_PROJECTSTART}}</strong> </li> <li> <strong>{{MF_TOPOLOGY_PROJECTSTOP}}</strong> </li> </ul> </td></tr> <tr><td> <dl> <dt><strong>{{NS_E_DRM_DEBUGGING_NOT_ALLOWED}}</strong></dt> </dl> </td><td> <p> Protected content cannot be played while debugging. </p> </td></tr> </table><p>?</p> <dd> <p> Bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MFSESSION_SETTOPOLOGY_FLAGS}}</strong> enumeration. </p> </dd> <dd> <p> Pointer to the topology object's <strong>{{IMFTopology}}</strong> interface. </p> </dd> <p> </p><p>Clears all of the presentations that are queued for playback in the Media Session.</p> <p>This method is asynchronous. When the operation completes, the Media Session sends an {{MESessionTopologiesCleared}} event.</p><p>This method does not clear the current topology; it only removes topologies that are placed in the queue, waiting for playback. To remove the current topology, call <strong>{{IMFMediaSession::SetTopology}}</strong> with the <strong>{{MFSESSION_SETTOPOLOGY_CLEAR_CURRENT}}</strong> flag.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p> The operation cannot be performed in the Media Session's current state. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p> The Media Session has been shut down. </p> </td></tr> </table><p>?</p> <p> Starts the Media Session. </p> <p>When this method is called, the Media Session starts the presentation clock and begins to process media samples.</p><p>This method is asynchronous. When the method completes, the Media Session sends an {{MESessionStarted}} event.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p> The operation cannot be performed in the Media Session's current state. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p> The Media Session has been shut down. </p> </td></tr> </table><p>?</p> <dd> <p>Pointer to a {{GUID}} that specifies the time format for the <em>pvarStartPosition</em> parameter. This parameter can be <strong>{{NULL}}</strong>. The value <strong>{{NULL}}</strong> is equivalent to passing in <strong>{{GUID_NULL}}</strong>.</p> <p>The following time format {{GUIDs}} are defined:</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{GUID_NULL}}</strong></dt> </dl> </td><td> <p>Presentation time. The <em>pvarStartPosition</em> parameter must have one of the following <strong>{{PROPVARIANT}}</strong> types.</p> <ul> <li><strong>{{VT_I8}}</strong>: The <em>pvarStartPosition</em> parameter contains the starting position in 100-nanosecond units, relative to the start of the presentation.</li> <li><strong>{{VT_EMPTY}}</strong>: Playback starts from the current position.</li> </ul> <p>All media sources support this time format.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_TIME_FORMAT_SEGMENT_OFFSET}}</strong></dt> </dl> </td><td> <p>Segment offset. This time format is supported by the Sequencer Source. The starting time is an offset within a segment.</p> <p>Call the <strong>{{MFCreateSequencerSegmentOffset}}</strong> function to create the <strong>{{PROPVARIANT}}</strong> value for the <em>pvarStartPosition</em> parameter.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_TIME_FORMAT_ENTRY_RELATIVE}}</strong></dt> </dl> </td><td> <strong>Note</strong>??Requires Windows?7 or later. ? <p>Skip to a playlist entry. The <em>pvarStartPosition</em> parameter specifies the index of the playlist entry, relative to the current entry. For example, the value 2 skips forward two entries. To skip backward, pass a negative value. The <strong>{{PROPVARIANT}}</strong> type is <strong>{{VT_I4}}</strong>.</p> <p>If a media source supports this time format, the <strong>{{IMFMediaSource::GetCharacteristics}}</strong> method returns one or both of the following flags:</p> <ul> <li><strong>{{MFMEDIASOURCE_CAN_SKIPFORWARD}}</strong></li> <li><strong>{{MFMEDIASOURCE_CAN_SKIPBACKWARD}}</strong></li> </ul> </td></tr> </table> <p>?</p> </dd> <dd> <p> Pointer to a <strong>{{PROPVARIANT}}</strong> that specifies the starting position for playback. The meaning and data type of this parameter are indicated by the <em>pguidTimeFormat</em> parameter. </p> </dd> <p> </p><p>Pauses the Media Session.</p> <p>This method pauses the presentation clock.</p><p>This method is asynchronous. When the operation completes, the Media Session sends an {{MESessionPaused}} event.</p><p>This method fails if the Media Session is stopped.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The operation cannot be performed in the Media Session's current state.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The Media Session has been shut down.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SESSION_PAUSEWHILESTOPPED}}</strong></dt> </dl> </td><td> <p>The Media Session cannot pause while stopped.</p> </td></tr> </table><p>?</p> <p> </p><p>Stops the Media Session.</p> <p>This method is asynchronous. When the operation completes, the Media Session sends an {{MESessionStopped}} event.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The operation cannot be performed in the Media Session's current state.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The Media Session has been shut down.</p> </td></tr> </table><p>?</p> <p> </p><p>Closes the Media Session and releases all of the resources it is using.</p> <p>This method is asynchronous. When the operation completes, the Media Session sends an {{MESessionClosed}} event.</p><p>After the <strong>Close</strong> method is called, the only valid methods on the Media Session are the following:</p><ul> <li> <p> <strong>{{IMFMediaSession::GetClock}}</strong> </p> </li> <li> <p> <strong>{{IMFMediaSession::GetFullTopology}}</strong> </p> </li> <li> <p> <strong>{{IMFMediaSession::GetSessionCapabilities}}</strong> </p> </li> <li> <p> <strong>{{IMFMediaSession::Shutdown}}</strong> </p> </li> </ul><p>All other methods return {{MF_E_INVALIDREQUEST}}, or else queue an event with that error code.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The Media Session has been shut down.</p> </td></tr> </table><p>?</p> <p> </p><p>Shuts down the Media Session and releases all the resources used by the Media Session.</p> <p>Call this method when you are done using the Media Session, before the final call to <strong>{{IUnknown::Release}}</strong>. Otherwise, your application will leak memory.</p><p>After this method is called, other <strong>{{IMFMediaSession}}</strong> methods return {{MF_E_SHUTDOWN}}.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Retrieves the Media Session's presentation clock.</p> <p>The application can query the returned <strong>{{IMFClock}}</strong> reference for the <strong>{{IMFPresentationClock}}</strong> interface. However, the application should not use this interface to control the state of the presentation clock. Instead, the application should always call the transport control methods on the Media Session's <strong>{{IMFMediaSession}}</strong> interface, such as <strong>Start</strong>, <strong>Stop</strong>, and <strong>Pause</strong>.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_UNEXPECTED}}</strong></dt> </dl> </td><td> <p>The Media Session does not have a presentation clock.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The Media Session has been shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the presentation clock's <strong>{{IMFClock}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Retrieves the capabilities of the Media Session, based on the current presentation.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>{{NULL}} reference argument.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The Media Session has been shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a bitwise <strong>{{OR}}</strong> of zero or more of the following flags.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{MFSESSIONCAP_PAUSE}}</strong></dt> </dl> </td><td> <p>The Media Session can be paused.</p> </td></tr> <tr><td><dl> <dt><strong>{{MFSESSIONCAP_RATE_FORWARD}}</strong></dt> </dl> </td><td> <p>The Media Session supports forward playback at rates faster than 1.0.</p> </td></tr> <tr><td><dl> <dt><strong>{{MFSESSIONCAP_RATE_REVERSE}}</strong></dt> </dl> </td><td> <p>The Media Session supports reverse playback.</p> </td></tr> <tr><td><dl> <dt><strong>{{MFSESSIONCAP_SEEK}}</strong></dt> </dl> </td><td> <p>The Media Session can be seeked.</p> </td></tr> <tr><td><dl> <dt><strong>{{MFSESSIONCAP_START}}</strong></dt> </dl> </td><td> <p>The Media Session can be started.</p> </td></tr> </table> <p>?</p> </dd> <p> Gets a topology from the Media Session.</p><p>This method can get the current topology or a queued topology.</p> <p> If the <strong>{{MFSESSION_GETFULLTOPOLOGY_CURRENT}}</strong> flag is specified in the <em>dwGetFullTopologyFlags</em> parameter, the method returns the topology for the current presentation. Otherwise, the method searches all of the queued topologies for one that matches the identifier given in the <em>TopoId</em> parameter. </p><p> This method can be used to retrieve the topology for the current presentation or any pending presentations. It cannot be used to retrieve a topology that has already ended. </p><p> The topology returned in <em>ppFullTopo</em> is a full topology, not a partial topology. </p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p> The Media Session has been shut down. </p> </td></tr> </table><p>?</p> <dd> <p> Bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MFSESSION_GETFULLTOPOLOGY_FLAGS}}</strong> enumeration. </p> </dd> <dd> <p>The identifier of the topology. This parameter is ignored if the <em>dwGetFullTopologyFlags</em> parameter contains the <strong>{{MFSESSION_GETFULLTOPOLOGY_CURRENT}}</strong> flag. To get the identifier of a topology, call <strong>{{IMFTopology::GetTopologyID}}</strong>. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFTopology}}</strong> interface of the topology. The caller must release the interface. </p> </dd> <p>Creates a media source from a {{URL}} or a byte stream. The Source Resolver implements this interface. To create the source resolver, call <strong>{{MFCreateSourceResolver}}</strong> function.</p> <p> Creates a media source or a byte stream from a {{URL}}. This method is synchronous. </p> <p>The <em>dwFlags</em> parameter must contain either the <strong>{{MF_RESOLUTION_MEDIASOURCE}}</strong> flag or the <strong>{{MF_RESOLUTION_BYTESTREAM}}</strong> flag, but should not contain both.</p><p>It is recommended that you do not set <strong>{{MF_RESOLUTION_WRITE}}</strong> on the input argument <em>dwFlags</em> unless it is necessary for your scenario. For most use-cases, media sources do not need to be created with write capability. Creating a media source with write capability may have a lower probability of success than creating a media source without write capability. This is because there can be stricter checks on the content represented by the {{URL}} when creating a media source with write capability.</p><p>For local files, you can pass the file name in the <em>pwszURL</em> parameter; the <code>file:</code> scheme is not required.</p><strong>Note</strong>??This method cannot be called remotely.? <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SOURCERESOLVER_MUTUALLY_EXCLUSIVE_FLAGS}}</strong></dt> </dl> </td><td> <p> The <em>dwFlags</em> parameter contains mutually exclusive flags. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_SCHEME}}</strong></dt> </dl> </td><td> <p> The {{URL}} scheme is not supported. </p> </td></tr> </table><p>?</p> <dd> <p> Null-terminated string that contains the {{URL}} to resolve. </p> </dd> <dd> <p> Bitwise {{OR}} of one or more flags. See <strong>Source Resolver Flags</strong>. See remarks below.</p> </dd> <dd> <p> Pointer to the <strong>{{IPropertyStore}}</strong> interface of a property store. The method passes the property store to the scheme handler or byte-stream handler that creates the object. The handler can use the property store to configure the object. This parameter can be <strong>{{NULL}}</strong>. For more information, see Configuring a Media Source. </p> </dd> <dd> <p> Receives a member of the <strong>{{MF_OBJECT_TYPE}}</strong> enumeration, specifying the type of object that was created. </p> </dd> <dd> <p> Receives a reference to the object's <strong>{{IUnknown}}</strong> interface. The caller must release the interface. </p> </dd> <p> Creates a media source from a byte stream. This method is synchronous. </p> <p>The <em>dwFlags</em> parameter must contain the <strong>{{MF_RESOLUTION_MEDIASOURCE}}</strong> flag and should not contain the <strong>{{MF_RESOLUTION_BYTESTREAM}}</strong> flag.</p><p>The source resolver attempts to find one or more byte-stream handlers for the byte stream, based on the file name extension of the {{URL}}, or the {{MIME}} type of the byte stream (or both). The {{URL}} is specified in the optional <em>pwszURL</em> parameter, and the {{MIME}} type may be specified in the <strong>{{MF_BYTESTREAM_CONTENT_TYPE}}</strong> attribute on the byte stream. Byte-stream handlers are registered by file name extension or {{MIME}} type, or both, as described in Scheme Handlers and Byte-Stream Handlers. The caller should specify at least one of these values (both if possible):</p><ul> <li> Specify the {{URL}} in the <em>pwszURL</em> parameter. </li> <li> Specify the {{MIME}} type by setting the <strong>{{MF_BYTESTREAM_CONTENT_TYPE}}</strong> attribute on the byte stream. (This attribute might be set already when you create the byte stream, depending on how the byte stream was created.) </li> </ul><strong>Note</strong>??This method cannot be called remotely.? <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SOURCERESOLVER_MUTUALLY_EXCLUSIVE_FLAGS}}</strong></dt> </dl> </td><td> <p> The <em>dwFlags</em> parameter contains mutually exclusive flags. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_BYTESTREAM_TYPE}}</strong></dt> </dl> </td><td> <p> This byte stream is not supported. </p> </td></tr> </table><p>?</p> <dd> <p> Pointer to the byte stream's <strong>{{IMFByteStream}}</strong> interface. </p> </dd> <dd> <p> Null-terminated string that contains the {{URL}} of the byte stream. The {{URL}} is optional and can be <strong>{{NULL}}</strong>. See Remarks for more information. </p> </dd> <dd> <p> Bitwise <strong>{{OR}}</strong> of flags. See <strong>Source Resolver Flags</strong>. </p> </dd> <dd> <p> Pointer to the <strong>{{IPropertyStore}}</strong> interface of a property store. The method passes the property store to the byte-stream handler. The byte-stream handler can use the property store to configure the media source. This parameter can be <strong>{{NULL}}</strong>. For more information, see Configuring a Media Source. </p> </dd> <dd> <p> Receives a member of the <strong>{{MF_OBJECT_TYPE}}</strong> enumeration, specifying the type of object that was created. </p> </dd> <dd> <p> Receives a reference to the media source's <strong>{{IUnknown}}</strong> interface. The caller must release the interface. </p> </dd> <p> </p><p>Begins an asynchronous request to create a media source or a byte stream from a {{URL}}.</p> <p>The <em>dwFlags</em> parameter must contain either the {{MF_RESOLUTION_MEDIASOURCE}} flag or the {{MF_RESOLUTION_BYTESTREAM}} flag, but should not contain both.</p><p>For local files, you can pass the file name in the <em>pwszURL</em> parameter; the <code>file:</code> scheme is not required.</p><p>When the operation completes, the source resolver calls the <strong>{{IMFAsyncCallback::Invoke}}</strong> method. The <strong>Invoke</strong> method should call <strong>{{IMFSourceResolver::EndCreateObjectFromURL}}</strong> to get a reference to the object that was created.</p><p>The usage of the <em>pProps</em> parameter depends on the implementation of the media source. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SOURCERESOLVER_MUTUALLY_EXCLUSIVE_FLAGS}}</strong></dt> </dl> </td><td> <p>The <em>dwFlags</em> parameter contains mutually exclusive flags.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_SCHEME}}</strong></dt> </dl> </td><td> <p>The {{URL}} scheme is not supported.</p> </td></tr> </table><p>?</p> <dd> <p>Null-terminated string that contains the {{URL}} to resolve.</p> </dd> <dd> <p>Bitwise {{OR}} of flags. See <strong>Source Resolver Flags</strong>.</p> </dd> <dd> <p>Pointer to the <strong>{{IPropertyStore}}</strong> interface of a property store. The method passes the property store to the scheme handler or byte-stream handler that creates the object. The handler can use the property store to configure the object. This parameter can be <strong>{{NULL}}</strong>. For more information, see Configuring a Media Source.</p> </dd> <dd> <p>Receives an <strong>{{IUnknown}}</strong> reference or the value <strong>{{NULL}}</strong>. If the value is not <strong>{{NULL}}</strong>, you can cancel the asynchronous operation by passing this reference to the <strong>{{IMFSourceResolver::CancelObjectCreation}}</strong> method. The caller must release the interface. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface.</p> </dd> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.</p> </dd> <p> Completes an asynchronous request to create an object from a {{URL}}. </p> <p>Call this method from inside your application's <strong>{{IMFAsyncCallback::Invoke}}</strong> method.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_ABORT}}</strong></dt> </dl> </td><td> <p> The operation was canceled. </p> </td></tr> </table><p>?</p> <dd> <p> Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>Invoke</strong> method. </p> </dd> <dd> <p> Receives a member of the <strong>{{MF_OBJECT_TYPE}}</strong> enumeration, specifying the type of object that was created. </p> </dd> <dd> <p> Receives a reference to the media source's <strong>{{IUnknown}}</strong> interface. The caller must release the interface. </p> </dd> <p> </p><p>Begins an asynchronous request to create a media source from a byte stream.</p> <p>The <em>dwFlags</em> parameter must contain the <strong>{{MF_RESOLUTION_MEDIASOURCE}}</strong> flag and should not contain the <strong>{{MF_RESOLUTION_BYTESTREAM}}</strong> flag.</p><p>The source resolver attempts to find one or more byte-stream handlers for the byte stream, based on the file name extension of the {{URL}}, or the {{MIME}} type of the byte stream (or both). The {{URL}} is specified in the optional <em>pwszURL</em> parameter, and the {{MIME}} type may be specified in the <strong>{{MF_BYTESTREAM_CONTENT_TYPE}}</strong> attribute on the byte stream. Byte-stream handlers are registered by file name extension or {{MIME}} type, or both, as described in Scheme Handlers and Byte-Stream Handlers. The caller should specify at least one of these values.</p><p>When the operation completes, the source resolver calls the <strong>{{IMFAsyncCallback::Invoke}}</strong> method. The <strong>Invoke</strong> method should call <strong>{{IMFSourceResolver::EndCreateObjectFromByteStream}}</strong> to get a reference to the media source.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SOURCERESOLVER_MUTUALLY_EXCLUSIVE_FLAGS}}</strong></dt> </dl> </td><td> <p>The <em>dwFlags</em> parameter contains mutually exclusive flags.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_BYTESTREAM_TYPE}}</strong></dt> </dl> </td><td> <p>The byte stream is not supported.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_BYTESTREAM_NOT_SEEKABLE}}</strong></dt> </dl> </td><td> <p>The byte stream does not support seeking.</p> </td></tr> </table><p>?</p> <dd> <p>A reference to the byte stream's <strong>{{IMFByteStream}}</strong> interface. </p> </dd> <dd> <p>A null-terminated string that contains the original {{URL}} of the byte stream. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <dd> <p>A bitwise <strong>{{OR}}</strong> of one or more flags. See <strong>Source Resolver Flags</strong>. </p> </dd> <dd> <p>A reference to the <strong>{{IPropertyStore}}</strong> interface of a property store. The method passes the property store to the byte-stream handler. The byte-stream handler can use the property store to configure the media source. This parameter can be <strong>{{NULL}}</strong>. For more information, see Configuring a Media Source. </p> </dd> <dd> <p>Receives an <strong>{{IUnknown}}</strong> reference or the value <strong>{{NULL}}</strong>. If the value is not <strong>{{NULL}}</strong>, you can cancel the asynchronous operation by passing this reference to the <strong>{{IMFSourceResolver::CancelObjectCreation}}</strong> method. The caller must release the interface. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <dd> <p>A reference to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface. </p> </dd> <dd> <p>A oointer to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked. </p> </dd> <p> </p><p>Completes an asynchronous request to create a media source from a byte stream.</p> <p>Call this method from inside your application's <strong>{{IMFAsyncCallback::Invoke}}</strong> method.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_ABORT}}</strong></dt> </dl> </td><td> <p>The application canceled the operation.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>Invoke</strong> method.</p> </dd> <dd> <p>Receives a member of the <strong>{{MF_OBJECT_TYPE}}</strong> enumeration, specifying the type of object that was created.</p> </dd> <dd> <p>Receives a reference to the media source's <strong>{{IUnknown}}</strong> interface. The caller must release the interface.</p> </dd> <p> Cancels an asynchronous request to create an object. </p> <p> You can use this method to cancel a previous call to <strong>BeginCreateObjectFromByteStream</strong> or <strong>BeginCreateObjectFromURL</strong>. Because these methods are asynchronous, however, they might be completed before the operation can be canceled. Therefore, your callback might still be invoked after you call this method. </p><strong>Note</strong>??This method cannot be called remotely.? <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Pointer to the <strong>{{IUnknown}}</strong> interface that was returned in the <em>ppIUnknownCancelCookie</em> parameter of the <strong>{{IMFSourceResolver::BeginCreateObjectFromByteStream}}</strong> or <strong>{{IMFSourceResolver::BeginCreateObjectFromURL}}</strong> method. </p> </dd> <p>Implemented by media source objects.</p><p>Media sources are objects that generate media data. For example, the data might come from a video file, a network stream, or a hardware device, such as a camera. Each media source contains one or more streams, and each stream delivers data of one type, such as audio or video.</p> <p>In Windows?8, this interface is extended with <strong>{{IMFMediaSourceEx}}</strong>.</p> <p> </p><p>Retrieves the characteristics of the media source.</p> <p>The characteristics of a media source can change at any time. If this happens, the source sends an {{MESourceCharacteristicsChanged}} event.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media source's <strong>Shutdown</strong> method has been called.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MFMEDIASOURCE_CHARACTERISTICS}}</strong> enumeration.</p> </dd> <p> </p><p>Retrieves a copy of the media source's presentation descriptor. Applications use the presentation descriptor to select streams and to get information about the source content.</p> <p>The presentation descriptor contains the media source's default settings for the presentation. The application can change these settings by selecting or deselecting streams, or by changing the media type on a stream. Do not modify the presentation descriptor unless the source is stopped. The changes take affect when the source's <strong>{{IMFMediaSource::Start}}</strong> method is called.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media source's <strong>Shutdown</strong> method has been called.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the presentation descriptor's <strong>{{IMFPresentationDescriptor}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Starts, seeks, or restarts the media source by specifying where to start playback.</p> <p>This method is asynchronous. If the operation succeeds, the media source sends the following events:</p><ul> <li> For each new stream, the source sends an {{MENewStream}} event. This event is sent for the first <strong>Start</strong> call in which the stream appears. The event data is a reference to the stream's <strong>{{IMFMediaStream}}</strong> interface. </li> <li> For each <em>updated</em> stream, the source sends an {{MEUpdatedStream}} event. A stream is updated if the stream already existed when <strong>Start</strong> was called (for example, if the application seeks during playback). The event data is a reference to the stream's <strong>{{IMFMediaStream}}</strong> interface. </li> <li> If the previous state was stopped, the source sends an {{MESourceStarted}} event. </li> <li> If the previous state was started or paused and the starting position is the current position (<strong>{{VT_EMPTY}}</strong>), the source sends an {{MESourceStarted}} event. </li> <li> If the previous state was started or paused, and a new starting position is specified, the source sends an {{MESourceSeeked}} event. </li> <li> If the source sends an {{MESourceStarted}} event, each media stream sends an {{MEStreamStarted}} event. If the source sends an {{MESourceSeeked}} event, each stream sends an {{MEStreamSeeked}} event. </li> </ul><p> If the start operation fails asynchronously (after the method returns <strong>{{S_OK}}</strong>), the media source sends an {{MESourceStarted}} event that contains a failure code, without sending any of the other events listed here. If the method fails synchronously (returns an error code), no events are raised. </p><p> A call to <strong>Start</strong> results in a <em>seek</em> if the previous state was started or paused, and the new starting position is not <strong>{{VT_EMPTY}}</strong>. Not every media source can seek. If a media source can seek, the <strong>{{IMFMediaSource::GetCharacteristics}}</strong> method returns the <strong>{{MFMEDIASOURCE_CAN_SEEK}}</strong> flag. </p><p> Events from the media source are not synchronized with events from the media streams. If you seek a media source, therefore, you can still receive samples from the earlier position after getting the {{MESourceSeeked}} event. If you need to synchronize the operations, wait for the stream event, {{MEStreamSeeked}}, which marks the exact point in the stream where the seek occurs. </p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ASF_OUTOFRANGE}}</strong></dt> </dl> </td><td> <p> The start position is past the end of the presentation ({{ASF}} media source). </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_HW_MFT_FAILED_START_STREAMING}}</strong></dt> </dl> </td><td> <p>A hardware device was unable to start streaming. This error code can be returned by a media source that represents a hardware device, such as a camera. For example, if the camera is already being used by another application, the method might return this error code.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p> The start request is not valid. For example, the start position is past the end of the presentation. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p> The media source's <strong>Shutdown</strong> method has been called. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_TIME_FORMAT}}</strong></dt> </dl> </td><td> <p> The media source does not support the time format specified in <em>pguidTimeFormat</em>. </p> </td></tr> </table><p>?</p> <dd> <p> Pointer to the <strong>{{IMFPresentationDescriptor}}</strong> interface of the media source's presentation descriptor. To get the presentation descriptor, call <strong>{{IMFMediaSource::CreatePresentationDescriptor}}</strong>. You can modify the presentation descriptor before calling <strong>Start</strong>, to select or deselect streams or change the media types. </p> </dd> <dd> <p> Pointer to a {{GUID}} that specifies the time format. The time format defines the units for the <em>pvarStartPosition</em> parameter. If the value <em></em> is <strong>{{GUID_NULL}}</strong>, the time format is 100-nanosecond units. Some media sources might support additional time format {{GUIDs}}. This parameter can be <strong>{{NULL}}</strong>. If the value is <strong>{{NULL}}</strong>, it is equalivent to <strong>{{GUID_NULL}}</strong>. </p> </dd> <dd> <p> Specifies where to start playback. The units of this parameter are indicated by the time format given in <em>pguidTimeFormat</em>. If the time format is <strong>{{GUID_NULL}}</strong>, the variant type must be <strong>{{VT_I8}}</strong> or <strong>{{VT_EMPTY}}</strong>. Use <strong>{{VT_I8}}</strong> to specify a new starting position, in 100-nanosecond units. Use <strong>{{VT_EMPTY}}</strong> to start from the current position. Other time formats might use other <strong>{{PROPVARIANT}}</strong> types. </p> </dd> <p> </p><p>Stops all active streams in the media source.</p> <p>This method is asynchronous. When the operation completes, the media source sends and {{MESourceStopped}} event, and every active stream sends an {{MEStreamStopped}} event. If the method returns a failure code, no events are raised.</p><p>When a media source is stopped, its current position reverts to zero. After that, if the <strong>Start</strong> method is called with {{VT_EMPTY}} for the starting position, playback starts from the beginning of the presentation.</p><p>While the source is stopped, no streams produce data.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media source's <strong>Shutdown</strong> method has been called.</p> </td></tr> </table><p>?</p> <p> </p><p>Pauses all active streams in the media source.</p> <p>This method is asynchronous. When the operation completes, the media source sends and {{MESourcePaused}} event, and every active stream sends an {{MEStreamPaused}} event. If the method returns a failure code, no events are raised.</p><p>The media source must be in the started state. The method fails if the media source is paused or stopped.</p><p>While the source is paused, calls to <strong>{{IMFMediaStream::RequestSample}}</strong> succeed, but the streams will not deliver any samples until after the source is started again. Note that the source's event queue is not serialized with the stream event queues, so the client might receive some samples after the {{MESourcePaused}} event, due to multi-threading issues. But the client will not receive any samples from a stream after the {{MEStreamPaused}} event.</p><p>Not every media source can pause. If a media source can pause, the <strong>{{IMFMediaSource::GetCharacteristics}}</strong> method returns the {{MFMEDIASOURCE_CAN_PAUSE}} flag.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALID_STATE_TRANSITION}}</strong></dt> </dl> </td><td> <p>Invalid state transition. The media source must be in the started state.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media source's <strong>Shutdown</strong> method has been called.</p> </td></tr> </table><p>?</p> <p> </p><p>Shuts down the media source and releases the resources it is using.</p> <p>If the application creates the media source, either directly or through the source resolver, the application is responsible for calling <strong>Shutdown</strong> to avoid memory or resource leaks.</p><p>After this method is called, methods on the media source and all of its media streams return {{MF_E_SHUTDOWN}} (except for <strong>{{IUnknown}}</strong> methods).</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p>Extends the <strong>{{IMFMediaSource}}</strong> interface to provide additional capabilities for a media source.</p><p>To get a reference to this interface, call <strong>QueryInterface</strong> on the media source. </p> <p>Implementations of this interface can return <strong>{{E_NOTIMPL}}</strong> for any methods that are not required by the media source.</p> <p>Gets an attribute store for the media source.</p> <p>Use the <strong>{{IMFAttributes}}</strong> reference to get or set attributes that apply to the entire source. For stream-level attributes, use the <strong>{{IMFMediaSourceEx::GetStreamAttributes}}</strong> method instead.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p>The media source does not support source-level attributes.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFAttributes}}</strong> interface. The caller must release the interface.</p> </dd> <p>Gets an attribute store for a stream on the media source.</p> <p>Use the <strong>{{IMFAttributes}}</strong> reference to get or set attributes that apply to the specified stream. For attributes that apply to the entire source, use the <strong>{{IMFMediaSourceEx::GetSourceAttributes}}</strong> method instead.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p>The media source does not support stream-level attributes.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>Invalid stream identifier.</p> </td></tr> </table><p>?</p> <dd> <p>The identifier of the stream. To get the identifier, call <strong>{{IMFStreamDescriptor::GetStreamIdentifier}}</strong> on the stream descriptor.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFAttributes}}</strong> interface. The caller must release the interface.</p> </dd> <p>Sets a reference to the Microsoft DirectX Graphics Infrastructure ({{DXGI}}) Device Manager on the media source.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p>The media source does not support source-level attributes.</p> </td></tr> </table><p>?</p> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of the {{DXGI}} Manager. The media source should query this reference for the <strong>{{IMFDXGIDeviceManager}}</strong> interface.</p> </dd> <p> Creates a media source or a byte stream from a {{URL}}. </p> <p>Applications do not use this interface. This interface is exposed by scheme handlers, which are used by the source resolver. A scheme handler is designed to parse one type of {{URL}} scheme. When the scheme handler is given a {{URL}}, it parses the resource that is located at that {{URL}} and creates either a media source or a byte stream.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Called by the media pipeline to provide the app with an instance of <strong>{{IMFPresentationClock}}</strong>.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> </table><p>?</p> <p> Represents one stream in a media source. </p> <p>Streams are created when a media source is started. For each stream, the media source sends an {{MENewStream}} event with a reference to the stream's <strong>{{IMFMediaStream}}</strong> interface.</p> <p> </p><p>Retrieves a reference to the media source that created this media stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media source's <strong>Shutdown</strong> method has been called.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFMediaSource}}</strong> interface of the media source. The caller must release the interface.</p> </dd> <p> </p><p>Retrieves a stream descriptor for this media stream.</p> <p>Do not modify the stream descriptor. To change the presentation, call <strong>{{IMFMediaSource::CreatePresentationDescriptor}}</strong> and modify the presentation descriptor.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media source's <strong>Shutdown</strong> method has been called.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFStreamDescriptor}}</strong> interface. The caller must release the interface.</p> </dd> <p> Requests a sample from the media source. </p> <p>If <em>pToken</em> is not <strong>{{NULL}}</strong>, the media stream calls <strong>AddRef</strong> on <em>pToken</em> and places the token in a first-in, first-out queue.</p><p>When the next sample is available, the media stream stream does the following:</p><ol> <li> Pulls the first token from the queue. </li> <li> Sets the <strong>{{MFSampleExtension_Token}}</strong> attribute on the media sample. The attribute data is a reference to the token object. </li> <li> Sends an {{MEMediaSample}} event. The event data is a reference to the media sample's <strong>{{IMFSample}}</strong> interface. </li> <li> Calls <strong>Release</strong> on the token. </li> </ol><p>If the media stream cannot fulfill the caller's request for a sample, it simply releases the token object and skips steps 2 and 3.</p><p>The caller should monitor the reference count on the request token. If the media stream sends an {{MEMediaSample}} event, get the <strong>{{MFSampleExtension_Token}}</strong> attribute from the sample and match the attribute value against the token. If the token's reference count falls to zero and you did not receive an {{MEMediaSample}} event, it means that the request was dropped.</p><p>Because the Media Foundation pipeline is multithreaded, the source's <strong>RequestSample</strong> method might get called after the source has stopped. If the media source is stopped, the method should return <strong>{{MF_E_MEDIA_SOURCE_WRONGSTATE}}</strong>. The pipeline does not treat this return code as an error condition. If the source returns any other error code, the pipeline treats it as fatal error and halts the session.</p><strong>Note</strong>??Earlier versions of the documentation listed the wrong error code for this case.?<p>If the media source is paused, the method succeeds, but the stream does not deliver the sample until the source is started again.</p><p>If a media source enounters an error asynchronously while processing data, it should signal the error in one of the following ways (but not both):</p><ul> <li>Return an error code from the next <strong>RequestSample</strong> call.</li> <li>Send an {{MEError}} event.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_END_OF_STREAM}}</strong></dt> </dl> </td><td> <p> The end of the stream was reached. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_MEDIA_SOURCE_WRONGSTATE}}</strong></dt> </dl> </td><td> <p> The media source is stopped.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p> The source's <strong>Shutdown</strong> method has been called. </p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface to an object that is used as a token for the request. The caller must implement this object. This parameter can be <strong>{{NULL}}</strong>. See Remarks.</p> </dd> <p>Implemented by media sink objects. This interface is the base interface for all Media Foundation media sinks. Stream sinks handle the actual processing of data on each stream.</p> <p> </p><p>Gets the characteristics of the media sink.</p> <p> The characteristics of a media sink are fixed throughout the life time of the sink. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p> The media sink's <strong>Shutdown</strong> method has been called. </p> </td></tr> </table><p>?</p> <dd> <p> Receives a bitwise <strong>{{OR}}</strong> of zero or more flags. The following flags are defined: </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong><strong>{{MEDIASINK_FIXED_STREAMS}}</strong></strong></dt> <dt>0x00000001</dt> </dl> </td><td> <p> The media sink has a fixed number of streams. It does not support the <strong>{{IMFMediaSink::AddStreamSink}}</strong> and <strong>{{IMFMediaSink::RemoveStreamSink}}</strong> methods. This flag is a hint to the application. </p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MEDIASINK_CANNOT_MATCH_CLOCK}}</strong></strong></dt> <dt>0x00000002</dt> </dl> </td><td> <p>The media sink cannot match rates with an external clock.</p> <p>For best results, this media sink should be used as the time source for the presentation clock. If any other time source is used, the media sink cannot match rates with the clock, with poor results (for example, glitching).</p> <p>This flag should be used sparingly, because it limits how the pipeline can be configured.</p> <p>For more information about the presentation clock, see Presentation Clock.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MEDIASINK_RATELESS}}</strong></strong></dt> <dt>0x00000004</dt> </dl> </td><td> <p>The media sink is rateless. It consumes samples as quickly as possible, and does not synchronize itself to a presentation clock.</p> <p>Most archiving sinks are rateless.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MEDIASINK_CLOCK_REQUIRED}}</strong></strong></dt> <dt>0x00000008</dt> </dl> </td><td> <p>The media sink requires a presentation clock. The presentation clock is set by calling the media sink's <strong>{{IMFMediaSink::SetPresentationClock}}</strong> method.</p> <p>This flag is obsolete, because all media sinks must support the <strong>SetPresentationClock</strong> method, even if the media sink ignores the clock (as in a rateless media sink).</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MEDIASINK_CAN_PREROLL}}</strong></strong></dt> <dt>0x00000010</dt> </dl> </td><td> <p> The media sink can accept preroll samples before the presentation clock starts. The media sink exposes the <strong>{{IMFMediaSinkPreroll}}</strong> interface. </p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MEDIASINK_REQUIRE_REFERENCE_MEDIATYPE}}</strong></strong></dt> <dt>0x00000020</dt> </dl> </td><td> <p>The first stream sink (index 0) is a reference stream. The reference stream must have a media type before the media types can be set on the other stream sinks.</p> </td></tr> </table> <p>?</p> </dd> <p> </p><p>Adds a new stream sink to the media sink.</p> <p>Not all media sinks support this method. If the media sink does not support this method, the <strong>{{IMFMediaSink::GetCharacteristics}}</strong> method returns the {{MEDIASINK_FIXED_STREAMS}} flag.</p><p>If <em>pMediaType</em> is <strong>{{NULL}}</strong>, use the <strong>{{IMFMediaTypeHandler}}</strong> interface to set the media type. Call <strong>{{IMFStreamSink::GetMediaTypeHandler}}</strong> to get a reference to the interface.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>The specified stream identifier is not valid.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media sink's <strong>Shutdown</strong> method has been called.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_STREAMSINK_EXISTS}}</strong></dt> </dl> </td><td> <p>There is already a stream sink with the same stream identifier.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_STREAMSINKS_FIXED}}</strong></dt> </dl> </td><td> <p>This media sink has a fixed set of stream sinks. New stream sinks cannot be added.</p> </td></tr> </table><p>?</p> <dd> <p>Identifier for the new stream. The value is arbitrary but must be unique.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFMediaType}}</strong> interface, specifying the media type for the stream. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Receives a reference to the new stream sink's <strong>{{IMFStreamSink}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Removes a stream sink from the media sink.</p> <p>After this method is called, the corresponding stream sink object is no longer valid. The <strong>{{IMFMediaSink::GetStreamSinkByIndex}}</strong> and <strong>{{IMFMediaSink::GetStreamSinkById}}</strong> methods will no longer return that stream sink. You can re-use the stream identifier if you add another stream (by calling <strong>AddStreamSink</strong>).</p><p>Not all media sinks support this method. If the media sink does not support this method, the <strong>{{IMFMediaSink::GetCharacteristics}}</strong> method returns the {{MEDIASINK_FIXED_STREAMS}} flag.</p><p>In some cases, the media sink supports this method but does not allow every stream sink to be removed. (For example, it might not allow stream 0 to be removed.)</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>This particular stream sink cannot be removed.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>The stream number is not valid.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_INITIALIZED}}</strong></dt> </dl> </td><td> <p>The media sink has not been initialized.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media sink's <strong>Shutdown</strong> method has been called.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_STREAMSINKS_FIXED}}</strong></dt> </dl> </td><td> <p>This media sink has a fixed set of stream sinks. Stream sinks cannot be removed.</p> </td></tr> </table><p>?</p> <dd> <p>Identifier of the stream to remove. The stream identifier is defined when you call <strong>{{IMFMediaSink::AddStreamSink}}</strong> to add the stream sink.</p> </dd> <p> </p><p>Gets the number of stream sinks on this media sink.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media sink's <strong>Shutdown</strong> method has been called.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of stream sinks.</p> </dd> <p> </p><p>Gets a stream sink, specified by index.</p> <p>Enumerating stream sinks is not a thread-safe operation, because stream sinks can be added or removed between calls to this method.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDINDEX}}</strong></dt> </dl> </td><td> <p>Invalid index.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media sink's <strong>Shutdown</strong> method has been called.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of the stream. To get the number of streams, call <strong>{{IMFMediaSink::GetStreamSinkCount}}</strong>.</p> </dd> <dd> <p>Receives a reference to the stream's <strong>{{IMFStreamSink}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Gets a stream sink, specified by stream identifier.</p> <p>If you add a stream sink by calling the <strong>{{IMFMediaSink::AddStreamSink}}</strong> method, the stream identifier is specified in the <em>dwStreamSinkIdentifier</em> parameter of that method. If the media sink has a fixed set of streams, the media sink assigns the stream identifiers.</p><p>To enumerate the streams by index number instead of stream identifier, call <strong>{{IMFMediaSink::GetStreamSinkByIndex}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>The stream identifier is not valid.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media sink's <strong>Shutdown</strong> method has been called.</p> </td></tr> </table><p>?</p> <dd> <p>Stream identifier of the stream sink.</p> </dd> <dd> <p>Receives a reference to the stream's <strong>{{IMFStreamSink}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Sets the presentation clock on the media sink.</p> <p>During streaming, the media sink attempts to match rates with the presentation clock. Ideally, the media sink presents samples at the correct time according to the presentation clock and does not fall behind. Rateless media sinks are an exception to this rule, as they consume samples as quickly as possible and ignore the clock. If the sink is rateless, the <strong>{{IMFMediaSink::GetCharacteristics}}</strong> method returns the {{MEDIASINK_RATELESS}} flag.</p><p>The presentation clock must have a time source. Before calling this method, call <strong>{{IMFPresentationClock::SetTimeSource}}</strong> on the presentation clock to set the presentation time source. Some media sinks provide time sources; therefore, the media sink might be the time source for its own presentation clock. Regardless of what object provides the time source, however, the media sink must attempt to match rates with the clock specified in <em>pPresentationClock</em>. If a media sink cannot match rates with an external time source, the media sink's <strong>{{IMFMediaSink::GetCharacteristics}}</strong> method retrieves the {{MEDIASINK_CANNOT_MATCH_CLOCK}} flag. In this case, <strong>SetPresentationClock</strong> will still succeed, but the results will not be optimal. The sink might not render samples quickly enough to match rates with the presentation clock.</p><p>If <em>pPresentationClock</em> is non-<strong>{{NULL}}</strong>, the media sink must register for clock state notifications, by calling <strong>{{IMFPresentationClock::AddClockStateSink}}</strong> on the presentation clock. If the method is called again with a new presentation clock, or if <em>pPresentationClock</em> is <strong>{{NULL}}</strong>, the media sink must call <strong>{{IMFPresentationClock::RemoveClockStateSink}}</strong> to deregister itself from the previous clock.</p><p>All media sinks must support this method.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_CLOCK_NO_TIME_SOURCE}}</strong></dt> </dl> </td><td> <p>The presentation clock does not have a time source. Call <strong>SetTimeSource</strong> on the presentation clock.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media sink's <strong>Shutdown</strong> method has been called.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFPresentationClock}}</strong> interface of the presentation clock, or <strong>{{NULL}}</strong>. If the value is <strong>{{NULL}}</strong>, the media sink stops listening to the presentaton clock that was previously set, if any.</p> </dd> <p> </p><p>Gets the presentation clock that was set on the media sink.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NO_CLOCK}}</strong></dt> </dl> </td><td> <p>No clock has been set. To set the presentation clock, call <strong>{{IMFMediaSink::SetPresentationClock}}</strong>.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media sink's <strong>Shutdown</strong> method has been called.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the presentation clock's <strong>{{IMFPresentationClock}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Shuts down the media sink and releases the resources it is using.</p> <p>If the application creates the media sink, it is responsible for calling <strong>Shutdown</strong> to avoid memory or resource leaks. In most applications, however, the application creates an activation object for the media sink, and the Media Session uses that object to create the media sink. In that case, the Media Session ? not the application ? shuts down the media sink. (For more information, see Activation Objects.)</p><p>After this method returns, all methods on the media sink return {{MF_E_SHUTDOWN}}, except for <strong>{{IUnknown}}</strong> methods and <strong>{{IMFMediaEventGenerator}}</strong> methods. The sink will not raise any events after this method is called.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media sink was shut down.</p> </td></tr> </table><p>?</p> <p>Represents a stream on a media sink object.</p> <p> </p><p>Retrieves the media sink that owns this stream sink.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media sink's <strong>Shutdown</strong> method has been called.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_STREAMSINK_REMOVED}}</strong></dt> </dl> </td><td> <p>This stream was removed from the media sink and is no longer valid.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the media sink's <strong>{{IMFMediaSink}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Retrieves the stream identifier for this stream sink.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media sink's <strong>Shutdown</strong> method has been called.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_STREAMSINK_REMOVED}}</strong></dt> </dl> </td><td> <p>This stream was removed from the media sink and is no longer valid.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the stream identifier. If this stream sink was added by calling <strong>{{IMFMediaSink::AddStreamSink}}</strong>, the stream identifier is in the <em>dwStreamSinkIdentifier</em> parameter of that method. Otherwise, the media sink defines the identifier.</p> </dd> <p> </p><p>Delivers a sample to the stream. The media sink processes the sample.</p> <p>Call this method when the stream sink sends an {{MEStreamSinkRequestSample}} event.</p><p>This method can return {{MF_E_INVALID_TIMESTAMP}} for various reasons, depending on the implementation of the media sink:</p><ul> <li> <p>Negative time stamps.</p> </li> <li> <p>Time stamps that jump backward (within the same stream).</p> </li> <li> <p>The time stamps for one stream have drifted too far from the time stamps on another stream within the same media sink (for example, an archive sink that multiplexes the streams).</p> </li> </ul><p>Not every media sink returns an error code in these situations.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALID_STATE_TRANSITION}}</strong></dt> </dl> </td><td> <p>The media sink is in the wrong state to receive a sample. For example, preroll is complete but the presenation clock has not started yet.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALID_TIMESTAMP}}</strong></dt> </dl> </td><td> <p>The sample has an invalid time stamp. See Remarks.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The media sink is paused or stopped and cannot process the sample.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NO_CLOCK}}</strong></dt> </dl> </td><td> <p>The presentation clock was not set. Call <strong>{{IMFMediaSink::SetPresentationClock}}</strong>.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NO_SAMPLE_TIMESTAMP}}</strong></dt> </dl> </td><td> <p>The sample does not have a time stamp.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_INITIALIZED}}</strong></dt> </dl> </td><td> <p>The stream sink has not been initialized.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media sink's <strong>Shutdown</strong> method has been called.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_STREAMSINK_REMOVED}}</strong></dt> </dl> </td><td> <p>This stream was removed from the media sink and is no longer valid.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFSample}}</strong> interface of a sample that contains valid data for the stream.</p> </dd> <p> </p><p>Places a marker in the stream. </p> <p>This method causes the stream sink to send an {{MEStreamSinkMarker}} event after the stream sink consumes all of the samples that were delivered up to this point (before the call to <strong>PlaceMarker</strong>).</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_SHUTDOWN}}</strong></strong></dt> </dl> </td><td> <p> The media sink's <strong>Shutdown</strong> method has been called. </p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_STREAMSINK_REMOVED}}</strong></strong></dt> </dl> </td><td> <p> This stream was removed from the media sink and is no longer valid. </p> </td></tr> </table><p>?</p> <dd> <p> Specifies the marker type, as a member of the <strong>{{MFSTREAMSINK_MARKER_TYPE}}</strong> enumeration. </p> </dd> <dd> <p> Optional reference to a <strong>{{PROPVARIANT}}</strong> that contains additional information related to the marker. The meaning of this value depends on the marker type. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <dd> <p> Optional reference to a <strong>{{PROPVARIANT}}</strong> that is attached to the {{MEStreamSinkMarker}} event. Call <strong>{{IMFMediaEvent::GetValue}}</strong> to get this value from the event. The caller can use this information for any purpose. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <p> </p><p>Causes the stream sink to drop any samples that it has received and has not rendered yet.</p> <p>If any samples are still queued from previous calls to the <strong>{{IMFStreamSink::ProcessSample}}</strong> method, the media sink immediately discards them, without processing them. This can cause a glitch in the rendered output. The running state of the sink (running, paused, or stopped) does not change.</p><p>Any pending marker events from the <strong>{{IMFStreamSink::PlaceMarker}}</strong> method are dispatched immediately, with the status code {{E_ABORT}}.</p><p>This method is synchronous. It does not return until the sink has discarded all pending samples.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_INITIALIZED}}</strong></dt> </dl> </td><td> <p>The stream sink has not been initialized yet. You might need to set a media type.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The media sink's <strong>Shutdown</strong> method has been called.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_STREAMSINK_REMOVED}}</strong></dt> </dl> </td><td> <p>This stream was removed from the media sink and is no longer valid.</p> </td></tr> </table><p>?</p> <p>Allocates video samples for a video media sink.</p><p>The stream sinks on the enhanced video renderer ({{EVR}}) expose this interface as a service. To obtain a reference to the interface, call <strong>{{IMFGetService::GetService}}</strong> using the service identifier {{MR_VIDEO_ACCELERATION_SERVICE}}. Custom media sinks can also implement this interface. The Media Session uses this interface to allocate samples for the {{EVR}}, unless the upstream decoder supports DirectX Video Acceleration ({{DXVA}}).</p> <p> </p><p>Specifies the Direct3D device manager for the video media sink to use.</p> <p>The media sink uses the Direct3D device manager to obtain a reference to the Direct3D device, which it uses to allocate Direct3D surfaces. The device manager enables multiple objects in the pipeline (such as a video renderer and a video decoder) to share the same Direct3D device.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface of the Direct3D device manager. The media sink queries this reference for the <strong>{{IDirect3DDeviceManager9}}</strong> interface.</p> </dd> <p> </p><p>Releases all of the video samples that have been allocated.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> Specifies the number of samples to allocate and the media type for the samples. </p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDMEDIATYPE}}</strong></dt> </dl> </td><td> <p>Invalid media type.</p> </td></tr> </table><p>?</p> <dd> <p> Number of samples to allocate. </p> </dd> <dd> <p> Pointer to the <strong>{{IMFMediaType}}</strong> interface of a media type that describes the video format. </p> </dd> <p>Gets a video sample from the allocator. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_INITIALIZED}}</strong></dt> </dl> </td><td> <p>The allocator was not initialized. Call <strong>{{IMFVideoSampleAllocator::InitializeSampleAllocator}}</strong> or <strong>InitializeSampleAllocatorEx::InitializeSampleAllocatorEx</strong>.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SAMPLEALLOCATOR_EMPTY}}</strong></dt> </dl> </td><td> <p> No samples are available. </p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFSample}}</strong> interface. The caller must release the interface. </p> </dd> <p>The callback for the <strong>{{IMFVideoSampleAllocatorCallback}}</strong> interface.</p> <p>Called when a video sample is returned to the allocator.</p> <p>To get a video sample from the allocator, call the <strong>{{IMFVideoSampleAllocator::AllocateSample}}</strong> method. When the sample is released and then returned to the pool of available samples, the allocator invokes the <strong>NotifyRelease</strong> method. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>The callback for the <strong>{{IMFVideoSampleAllocatorCallback}}</strong> interface.</p> <p>Called when allocator samples are released for pruning by the allocator, or when the allocator is removed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The sample to be pruned.</p> </dd> <p>Enables an application to track video samples allocated by the enhanced video renderer ({{EVR}}).</p><p>The stream sinks on the {{EVR}} expose this interface as a service. To get a reference to the interface, call the <strong>{{IMFGetService::GetService}}</strong> method, using the <strong>{{MR_VIDEO_ACCELERATION_SERVICE}}</strong> service identifier.</p> <p>Sets the callback object that receives notification whenever a video sample is returned to the allocator.</p> <p>To get a video sample from the allocator, call the <strong>{{IMFVideoSampleAllocator::AllocateSample}}</strong> method. When the sample is released, it returns to the pool of available samples. When this happens, the allocator invokes the <strong>{{IMFVideoSampleAllocatorNotify::NotifyRelease}}</strong> callback.</p><p>The allocator holds at most one callback reference. Calling this method again replaces the previous callback reference.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFVideoSampleAllocatorNotify}}</strong> interface that receives notification, or <strong>{{NULL}}</strong> to remove the callback.</p> </dd> <p>Gets the number of video samples that are currently available for use.</p> <p>To get a video sample from the allocator, call the <strong>{{IMFVideoSampleAllocator::AllocateSample}}</strong> method. The <strong>AllocateSample</strong> method removes a sample from the sample pool and returns it to the caller. When a sample is released, it returns to the pool. The <strong>GetFreeSampleCount</strong> method returns the count of samples that remain in the sample pool.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the number of available samples.</p> </dd> <p>Allocates video samples that contain Microsoft Direct3D?11 texture surfaces.</p> <p>You can use this interface to allocateDirect3D?11 video samples, rather than allocate the texture surfaces and media samples directly. To get a reference to this interface, call the <strong>{{MFCreateVideoSampleAllocatorEx}}</strong> function. </p><p>To allocate video samples, perform the following steps:</p><ol> <li>Obtain a reference to the <strong>{{IMFDXGIDeviceManager}}</strong> interface. For a Media Foundation transform ({{MFT}}), this step occurs during the <strong>{{MFT_MESSAGE_SET_D3D_MANAGER}}</strong> event.</li> <li>Call <strong>{{MFCreateVideoSampleAllocatorEx}}</strong> to create the allocator object and get a reference to the <strong>{{IMFVideoSampleAllocatorEx}}</strong> interface.</li> <li>Call <strong>{{IMFVideoSampleAllocator::SetDirectXManager}}</strong> on the allocator to set the <strong>{{IMFDXGIDeviceManager}}</strong> reference on the allocator.</li> <li>Call <strong>{{MFCreateAttributes}}</strong> to get a reference to the <strong>{{IMFAttributes}}</strong> interface.</li> <li>Set the {{MF_SA_D3D11_USAGE}} and {{MF_SA_D3D11_BINDFLAGS}} attributes.</li> <li>Call <strong>{{IMFVideoSampleAllocator::InitializeSampleAllocatorEx}}</strong>.</li> </ol> <p>Initializes the video sample allocator object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The initial number of samples to allocate. </p> </dd> <dd> <p>The maximum number of samples to allocate.</p> </dd> <dd> <p>A reference to the <strong>{{IMFAttributes}}</strong> interface. You can use this interface to configure the allocator. Currently, the following configuration attributes are defined:</p> <ul> <li> {{MF_SA_BUFFERS_PER_SAMPLE}} </li> <li> {{MF_SA_D3D11_BINDFLAGS}} </li> <li> {{MF_SA_D3D11_USAGE}} </li> <li> {{MF_SA_D3D11_SHARED}} </li> <li> {{MF_SA_D3D11_SHARED_WITHOUT_MUTEX}} </li> </ul> </dd> <dd> <p>A reference to the <strong>{{IMFMediaType}}</strong> interface of a media type that describes the video format. </p> </dd> <p>Provides functionality for getting the <strong>{{IMFDXGIDeviceManager}}</strong> from the Microsoft Media Foundation video rendering sink.</p> <p>Gets the <strong>{{IMFDXGIDeviceManager}}</strong> from the Microsoft Media Foundation video rendering sink.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Configures the <strong>Video Processor {{MFT}}</strong>.</p> <p>This interface controls how the <strong>Video Processor {{MFT}}</strong> generates output frames.</p> <p>Sets the border color.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to an <strong>{{MFARGB}}</strong> structure that specifies the border color as an {{ARGB}} (alpha, red, green, blue) value.</p> </dd> <p>Sets the source rectangle. The source rectangle is the portion of the input frame that is blitted to the destination surface.</p> <p>See <strong>Video Processor {{MFT}}</strong> for info regarding source and destination rectangles in the <strong>Video Processor {{MFT}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a <strong>{{RECT}}</strong> structure that specifies the source rectangle.</p> </dd> <p>Sets the destination rectangle. The destination rectangle is the portion of the output surface where the source rectangle is blitted.</p> <p>See <strong>Video Processor {{MFT}}</strong> for info regarding source and destination rectangles in the <strong>Video Processor {{MFT}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a <strong>{{RECT}}</strong> structure that specifies the destination rectangle.</p> </dd> <p>Specifies whether to flip the video image.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An <strong>{{MF_VIDEO_PROCESSOR_MIRROR}}</strong> value that specifies whether to flip the video image, either horizontally or vertically.</p> </dd> <p>Specifies whether to rotate the video to the correct orientation.</p> <p>The original orientation of the video is specified by the {{MF_MT_VIDEO_ROTATION}} attribute of the input media type.</p><p> If <em>eRotation</em> is <strong>{{ROTATION_NONE}}</strong>, the video processor does not correct the orientation of the output video. If the original video is rotated, and <em>eRotation</em> is <strong>{{ROTATION_NORMAL}}</strong>, the video processor corrects the orientation, so that the ouput video is not rotated. The video processor letterboxes the output as needed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A <strong>{{MF_VIDEO_PROCESSOR_ROTATION}}</strong> value that specifies whether to rotate the image.</p> </dd> <p>Specifies the amount of downsampling to perform on the output.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The sampling size. To disable constriction, set this parameter to <strong>{{NULL}}</strong>.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Configures the <strong>Video Processor {{MFT}}</strong>.</p> <p>This interface controls how the <strong>Video Processor {{MFT}}</strong> generates output frames.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Overrides the rotation operation that is performed in the video processor.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Rotation value in degrees. Typically, you can only use values from the <strong>{{MFVideoRotationFormat}}</strong> enumeration.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Enables effects that were implemented with <strong>{{IDirectXVideoProcessor::VideoProcessorBlt}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Returns the list of supported effects in the currently configured video processor.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A combination of <strong>{{D3D11_VIDEO_PROCESSOR_AUTO_STREAM_CAPS}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies the list of suppported effect capabilities.</p> </dd> <p>Represents a topology. A <em>topology</em> describes a collection of media sources, sinks, and transforms that are connected in a certain order. These objects are represented within the topology by <em>topology nodes</em>, which expose the <strong>{{IMFTopologyNode}}</strong> interface. A topology describes the path of multimedia data through these nodes.</p><p>To create a topology, call <strong>{{MFCreateTopology}}</strong>.</p> <p> Gets the identifier of the topology.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Receives the identifier, as a <strong>{{TOPOID}}</strong> value. </p> </dd> <p> </p><p>Adds a node to the topology.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p><em>pNode</em> is invalid, possibly because the node already exists in the topology.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the node's <strong>{{IMFTopologyNode}}</strong> interface.</p> </dd> <p> </p><p>Removes a node from the topology.</p> <p>This method does not destroy the node, so the <strong>{{IMFTopologyNode}}</strong> reference is still valid after the method returns.</p><p>The method breaks any connections between the specified node and other nodes.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>The specified node is not a member of this topology.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the node's <strong>{{IMFTopologyNode}}</strong> interface.</p> </dd> <p> Gets the number of nodes in the topology. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Receives the number of nodes. </p> </dd> <p> Gets a node in the topology, specified by index. </p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p> The index is less than zero. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDINDEX}}</strong></dt> </dl> </td><td> <p> No node can be found at the index <em>wIndex</em>. </p> </td></tr> </table><p>?</p> <dd> <p> The zero-based index of the node. To get the number of nodes in the topology, call <strong>{{IMFTopology::GetNodeCount}}</strong>. </p> </dd> <dd> <p> Receives a reference to the node's <strong>{{IMFTopologyNode}}</strong> interface. The caller must release the reference. </p> </dd> <p> </p><p>Removes all nodes from the topology.</p> <p>You do not need to clear a topology before disposing of it. The <strong>Clear</strong> method is called automatically when the topology is destroyed.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> Converts this topology into a copy of another topology. </p> <p>This method does the following:</p><ul> <li> Removes all of the nodes from this topology. </li> <li> Clones the nodes from <em>pTopology</em> and adds them to this topology. The cloned nodes have the same node identifiers as the nodes from <em>pTopology</em>. </li> <li> Connects the cloned nodes to match the connections in <em>pTopology</em>. </li> <li> Copies the attributes from <em>pTopology</em> to this topology. </li> <li> Copies the topology identifier from <em>pTopology</em> to this topology.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A reference to the <strong>{{IMFTopology}}</strong> interface of the topology to clone. </p> </dd> <p>Gets a node in the topology, specified by node identifier.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_FOUND}}</strong></dt> </dl> </td><td> <p> The topology does not contain a node with this identifier. </p> </td></tr> </table><p>?</p> <dd> <p> The identifier of the node to retrieve. To get a node's identifier, call <strong>{{IMFTopologyNode::GetTopoNodeID}}</strong>. </p> </dd> <dd> <p> Receives a reference to the node's <strong>{{IMFTopologyNode}}</strong> interface. The caller must release the interface. </p> </dd> <p> Gets the source nodes in the topology. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the <strong>{{IMFCollection}}</strong> interface. The caller must release the reference. The collection contains <strong>{{IUnknown}}</strong> references to all of the source nodes in the topology. Each reference can be queried for the <strong>{{IMFTopologyNode}}</strong> interface. The collection might be empty.</p> </dd> <p> Gets the output nodes in the topology. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Receives a reference to the <strong>{{IMFCollection}}</strong> interface. The caller must release the reference. The collection contains <strong>{{IUnknown}}</strong> references to all of the output nodes in the topology. Each reference can be queried for the <strong>{{IMFTopologyNode}}</strong> interface. The collection might be empty. </p> </dd> <p>Represents a node in a topology. The following node types are supported:</p><ul> <li> Output node. Represents a media sink. </li> <li> Source node. Represents a media stream. </li> <li> Transform node. Represents a Media Foundation Transform ({{MFT}}). </li> <li> Tee node. Delivers a media stream to two or more nodes. </li> </ul><p>To create a new node, call the <strong>{{MFCreateTopologyNode}}</strong> function.</p> <p> </p><p>Sets the object associated with this node.</p> <p>All node types support this method, but the object reference is not used by every node type.</p><table> <tr><th>Node type</th><th>Object reference</th></tr> <tr><td>Source node.</td><td>Not used.</td></tr> <tr><td>Transform node.</td><td> <strong>{{IMFTransform}}</strong> or <strong>{{IMFActivate}}</strong> interface.</td></tr> <tr><td>Output node</td><td> <strong>{{IMFStreamSink}}</strong> or <strong>{{IMFActivate}}</strong> interface.</td></tr> <tr><td>Tee node.</td><td>Not used.</td></tr> </table><p>?</p><p>If the object supports <strong>{{IPersist}}</strong>, <strong>{{IPersistStorage}}</strong>, or <strong>{{IPersistPropertyBag}}</strong>, the method gets the object's {{CLSID}} and sets the <strong>{{MF_TOPONODE_TRANSFORM_OBJECTID}}</strong> attribute on the node.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>A reference to the object's <strong>{{IUnknown}}</strong> interface. Use the value <strong>{{NULL}}</strong> to clear an object that was previous set.</p> </dd> <p> Gets the object associated with this node. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_FAIL}}</strong></dt> </dl> </td><td> <p> There is no object associated with this node. </p> </td></tr> </table><p>?</p> <dd> <p> Receives a reference to the object's <strong>{{IUnknown}}</strong> interface. The caller must release the interface. </p> </dd> <p> </p><p>Retrieves the node type.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the node type, specified as a member of the <strong>{{MF_TOPOLOGY_TYPE}}</strong> enumeration.</p> </dd> <p> Retrieves the identifier of the node.</p> <p> When a node is first created, it is assigned an identifier. Node identifiers are unique within a topology, but can be reused across several topologies. The topology loader uses the identifier to look up nodes in the previous topology, so that it can reuse objects from the previous topology. </p><p> To find a node in a topology by its identifier, call <strong>{{IMFTopology::GetNodeByID}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the identifier.</p> </dd> <p> Sets the identifier for the node.</p> <p> When a node is first created, it is assigned an identifier. Typically there is no reason for an application to override the identifier. Within a topology, each node identifier should be unique. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p> The <strong>{{TOPOID}}</strong> has already been set for this object. </p> </td></tr> </table><p>?</p> <dd> <p> The identifier for the node. </p> </dd> <p> </p><p>Retrieves the number of input streams that currently exist on this node.</p> <p>The input streams may or may not be connected to output streams on other nodes. To get the node that is connected to a specified input stream, call <strong>{{IMFTopologyNode::GetInput}}</strong>.</p><p>The <strong>{{IMFTopologyNode::ConnectOutput}}</strong> and <strong>{{IMFTopologyNode::SetInputPrefType}}</strong> methods add new input streams as needed.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of input streams.</p> </dd> <p> </p><p>Retrieves the number of output streams that currently exist on this node.</p> <p>The output streams may or may not be connected to input streams on other nodes. To get the node that is connected to a specific output stream on this node, call <strong>{{IMFTopologyNode::GetOutput}}</strong>.</p><p>The <strong>{{IMFTopologyNode::ConnectOutput}}</strong> and <strong>{{IMFTopologyNode::SetOutputPrefType}}</strong> methods add new input streams as needed.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of output streams.</p> </dd> <p> </p><p>Connects an output stream from this node to the input stream of another node.</p> <p>Node connections represent data flow from one node to the next. The streams are logical, and are specified by index.</p><p>If the node is already connected at the specified output, the method breaks the existing connection. If <em>dwOutputIndex</em> or <em>dwInputIndexOnDownstreamNode</em> specify streams that do not exist yet, the method adds as many streams as needed.</p><p>This method checks for certain invalid conditions:</p><ul> <li> <p>An output node cannot have any output connections. If you call this method on an output node, the method returns {{E_FAIL}}.</p> </li> <li> <p>A node cannot be connected to itself. If <em>pDownstreamNode</em> specifies the same node as the method call, the method returns {{E_INVALIDARG}}.</p> </li> </ul><p>However, if the method succeeds, it does not guarantee that the node connection is valid. It is possible to create a partial topology that the topology loader cannot resolve. If so, the <strong>{{IMFTopoLoader::Load}}</strong> method will fail.</p><p>To break an existing node connection, call <strong>{{IMFTopologyNode::DisconnectOutput}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_FAIL}}</strong></dt> </dl> </td><td> <p>The method failed.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid parameter.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of the output stream on this node.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFTopologyNode}}</strong> interface of the node to connect to.</p> </dd> <dd> <p>Zero-based index of the input stream on the other node.</p> </dd> <p> </p><p>Disconnects an output stream on this node.</p> <p>If the specified output stream is connected to another node, this method breaks the connection.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>The <em>dwOutputIndex</em> parameter is out of range.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_FOUND}}</strong></dt> </dl> </td><td> <p>The specified output stream is not connected to another node.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of the output stream to disconnect.</p> </dd> <p> </p><p>Retrieves the node that is connected to a specified input stream on this node.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>The index is out of range.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_FOUND}}</strong></dt> </dl> </td><td> <p>The specified input stream is not connected to another node.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of an input stream on this node.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFTopologyNode}}</strong> interface of the node that is connected to the specified input stream. The caller must release the interface.</p> </dd> <dd> <p>Receives the index of the output stream that is connected to this node's input stream.</p> </dd> <p> </p><p>Retrieves the node that is connected to a specified output stream on this node.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>The index is out of range.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_FOUND}}</strong></dt> </dl> </td><td> <p>The specified input stream is not connected to another node.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of an output stream on this node.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFTopologyNode}}</strong> interface of the node that is connected to the specified output stream. The caller must release the interface.</p> </dd> <dd> <p>Receives the index of the input stream that is connected to this node's output stream.</p> </dd> <p> </p><p>Sets the preferred media type for an output stream on this node.</p> <p>The preferred type is a hint for the topology loader.</p><p>Do not call this method after loading a topology or setting a topology on the Media Session. Changing the preferred type on a running topology can cause connection errors.</p><p>If no output stream exists at the specified index, the method creates new streams up to and including the specified index number.</p><p>Output nodes cannot have outputs. If this method is called on an output node, it returns {{E_NOTIMPL}}</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p>This node is an output node.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of the output stream.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFMediaType}}</strong> interface of the media type.</p> </dd> <p> </p><p>Retrieves the preferred media type for an output stream on this node.</p> <p>Output nodes cannot have outputs. If this method is called on an output node, it returns {{E_NOTIMPL}}.</p><p>The preferred output type provides a hint to the topology loader. In a fully resolved topology, there is no guarantee that every topology node will have a preferred output type. To get the actual media type for a node, you must get a reference to the node's underlying object. (For more information, see <strong>{{MF_TOPOLOGY_TYPE}}</strong> enumeration.)</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_FAIL}}</strong></dt> </dl> </td><td> <p>This node does not have a preferred output type.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid stream index.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p>This node is an output node.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of the output stream.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaType}}</strong> interface of the media type. The caller must release the interface.</p> </dd> <p> </p><p>Sets the preferred media type for an input stream on this node.</p> <p>The preferred type is a hint for the topology loader.</p><p>Do not call this method after loading a topology or setting a topology on the Media Session. Changing the preferred type on a running topology can cause connection errors.</p><p>If no input stream exists at the specified index, the method creates new streams up to and including the specified index number.</p><p>Source nodes cannot have inputs. If this method is called on a source node, it returns {{E_NOTIMPL}}.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p>This node is a source node.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of the input stream.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFMediaType}}</strong> interface of the media type.</p> </dd> <p> </p><p>Retrieves the preferred media type for an input stream on this node.</p> <p>Source nodes cannot have inputs. If this method is called on a source node, it returns {{E_NOTIMPL}}.</p><p>The preferred input type provides a hint to the topology loader. In a fully resolved topology, there is no guarantee that every topology node will have a preferred input type. To get the actual media type for a node, you must get a reference to the node's underlying object. (For more information, see <strong>{{MF_TOPOLOGY_TYPE}}</strong> enumeration.)</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_FAIL}}</strong></dt> </dl> </td><td> <p>This node does not have a preferred input type.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid stream index.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p>This node is a source node.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of the input stream.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaType}}</strong> interface of the media type. The caller must release the interface.</p> </dd> <p> Copies the data from another topology node into this node.</p> <p> The two nodes must have the same node type. To get the node type, call <strong>{{IMFTopologyNode::GetNodeType}}</strong>. </p><p> This method copies the object reference, preferred types, and attributes from <em>pNode</em> to this node. It also copies the <strong>{{TOPOID}}</strong> that uniquely identifies each node in a topology. It does not duplicate any of the connections from <em>pNode</em> to other nodes. </p><p> The purpose of this method is to copy nodes from one topology to another. Do not use duplicate nodes within the same topology. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p> The node types do not match. </p> </td></tr> </table><p>?</p> <dd> <p> A reference to the <strong>{{IMFTopologyNode}}</strong> interface of the node to copy. </p> </dd> <p> Queries an object for a specified service interface. </p> <p>A service is an interface that is exposed by one object but might be implemented by another object. The <strong>GetService</strong> method is equivalent to <strong>QueryInterface</strong>, with the following difference: when <strong>QueryInterface</strong> retrieves a reference to an interface, it is guaranteed that you can query the returned interface and get back the original interface. The <strong>GetService</strong> method does not make this guarantee, because the retrieved interface might be implemented by a separate object.</p><p>The <strong>{{MFGetService}}</strong> function is a helper function that queries an object for <strong>{{IMFGetService}}</strong> and calls the <strong>GetService</strong> method.</p> <p> </p><p>Retrieves a service interface.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_SERVICE}}</strong></dt> </dl> </td><td> <p>The object does not support the service.</p> </td></tr> </table><p>?</p> <dd> <p>The service identifier ({{SID}}) of the service. For a list of service identifiers, see Service Interfaces.</p> </dd> <dd> <p>The interface identifier ({{IID}}) of the interface being requested.</p> </dd> <dd> <p>Receives the interface reference. The caller must release the interface.</p> </dd> <p>Provides timing information from a clock in Microsoft Media Foundation.</p><p>Clocks and some media sinks expose this interface through <strong>QueryInterface</strong>.</p> <p>The <strong>{{IMFClock}}</strong> interface applies to any kind of clock. The presentation clock exposes the <strong>{{IMFPresentationClock}}</strong> interface in addition to <strong>{{IMFClock}}</strong>.</p> <p> </p><p>Retrieves the characteristics of the clock.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a bitwise {{OR}} of values from the <strong>{{MFCLOCK_CHARACTERISTICS_FLAGS}}</strong> enumeration indicating the characteristics of the clock.</p> </dd> <p> Retrieves the last clock time that was correlated with system time. </p> <p>At some fixed interval, a clock correlates its internal clock ticks with the system time. (The system time is the time returned by the high-resolution performance counter.) This method returns:</p><ul> <li> The most recent clock time that was correlated with system time. </li> <li> The system time when the correlation was performed. </li> </ul><p> The clock time is returned in the <em>pllClockTime</em> parameter and is expressed in units of the clock's frequency. If the clock's <strong>{{IMFClock::GetClockCharacteristics}}</strong> method returns the <strong>{{MFCLOCK_CHARACTERISTICS_FLAG_FREQUENCY_10MHZ}}</strong> flag, the clock's frequency is 10 {{MHz}} (each clock tick is 100 nanoseconds). Otherwise, you can get the clock's frequency by calling <strong>{{IMFClock::GetProperties}}</strong>. The frequency is given in the <strong>qwClockFrequency</strong> member of the <strong>{{MFCLOCK_PROPERTIES}}</strong> structure returned by that method. </p><p> The system time is returned in the <em>phnsSystemTime</em> parameter, and is always expressed in 100-nanosecond units. </p><p> To find out how often the clock correlates its clock time with the system time, call <strong>GetProperties</strong>. The correlation interval is given in the <strong>qwCorrelationRate</strong> member of the <strong>{{MFCLOCK_PROPERTIES}}</strong> structure. If <strong>qwCorrelationRate</strong> is zero, it means the clock performs the correlation whenever <strong>GetCorrelatedTime</strong> is called. Otherwise, you can calculate the current clock time by extrapolating from the last correlated time. </p><p> Some clocks support rate changes through the <strong>{{IMFRateControl}}</strong> interface. If so, the clock time advances at a speed of frequency ? current rate. If a clock does not expose the <strong>{{IMFRateControl}}</strong> interface, the rate is always 1.0. </p><p>For the presentation clock, the clock time is the presentation time, and is always relative to the starting time specified in <strong>{{IMFPresentationClock::Start}}</strong>. You can also get the presentation time by calling <strong>{{IMFPresentationClock::GetTime}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_CLOCK_NO_TIME_SOURCE}}</strong></dt> </dl> </td><td> <p> The clock does not have a time source. </p> </td></tr> </table><p>?</p> <dd> <p> Reserved, must be zero. </p> </dd> <dd> <p> Receives the last known clock time, in units of the clock's frequency. </p> </dd> <dd> <p> Receives the system time that corresponds to the clock time returned in <em>pllClockTime</em>, in 100-nanosecond units. </p> </dd> <p> </p><p>Retrieves the clock's continuity key. (Not supported.)</p> <p>Continuity keys are currently not supported in Media Foundation. Clocks must return the value zero in the <em>pdwContinuityKey</em> parameter.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the continuity key.</p> </dd> <p> </p><p>Retrieves the current state of the clock.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Reserved, must be zero.</p> </dd> <dd> <p>Receives the clock state, as a member of the <strong>{{MFCLOCK_STATE}}</strong> enumeration.</p> </dd> <p> </p><p>Retrieves the properties of the clock.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to an <strong>{{MFCLOCK_PROPERTIES}}</strong> structure that receives the properties.</p> </dd> <p>Represents a presentation clock, which is used to schedule when samples are rendered and to synchronize multiple streams.</p> <p>To create a new instance of the presentation clock, call the {{MFCreatePresentationClock}} function. The presentation clock must have a time source, which is an object that provides the clock times. For example, the audio renderer is a time source that uses the sound card to drive the clock. Time sources expose the {{IMFPresentationTimeSource}} interface. To set the time source, call <strong>SetTimeSource</strong>. The presentation clock does not begin running until the <strong>Start</strong> method is called.</p><p>To get the presentation clock from the Media Session, call {{IMFMediaSession::GetClock}}.</p> <p> </p><p>Sets the time source for the presentation clock. The time source is the object that drives the clock by providing the current time.</p> <p>The presentation clock cannot start until it has a time source.</p><p>The time source is automatically registered to receive state change notifications from the clock, through the time source's {{IMFClockStateSink}} interface, which all time sources must implement.</p><p>This time source have a frequency of 10 {{MHz}}. See {{IMFClock::GetClockCharacteristics}}. If not, the method returns {{MF_E_CLOCK_NOT_SIMPLE}}.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_CLOCK_NOT_SIMPLE}}</strong></dt> </dl> </td><td> <p>The time source does not have a frequency of 10 {{MHz}}.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_INITIALIZED}}</strong></dt> </dl> </td><td> <p>The time source has not been initialized.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the {{IMFPresentationTimeSource}} interface of the time source.</p> </dd> <p> </p><p>Retrieves the clock's presentation time source.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_CLOCK_NO_TIME_SOURCE}}</strong></dt> </dl> </td><td> <p>No time source was set on this clock.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the time source's {{IMFPresentationTimeSource}} interface. The caller must release the interface.</p> </dd> <p> Retrieves the latest clock time. </p> <p>This method does not attempt to smooth out jitter or otherwise account for any inaccuracies in the clock time.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_CLOCK_NO_TIME_SOURCE}}</strong></dt> </dl> </td><td> <p> The clock does not have a presentation time source. Call <strong>{{IMFPresentationClock::SetTimeSource}}</strong>. </p> </td></tr> </table><p>?</p> <dd> <p> Receives the latest clock time, in 100-nanosecond units. The time is relative to when the clock was last started. </p> </dd> <p> </p><p>Registers an object to be notified whenever the clock starts, stops, or pauses, or changes rate.</p> <p>Before releasing the object, call {{IMFPresentationClock::RemoveClockStateSink}} to unregister the object for state-change notifications.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the object's {{IMFClockStateSink}} interface.</p> </dd> <p> </p><p>Unregisters an object that is receiving state-change notifications from the clock.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the object's {{IMFClockStateSink}} interface.</p> </dd> <p> </p><p>Starts the presentation clock.</p> <p>This method is valid in all states (stopped, paused, or running).</p><p>If the clock is paused and restarted from the same position (<em>llClockStartOffset</em> is {{PRESENTATION_CURRENT_POSITION}}), the presentation clock sends an {{IMFClockStateSink::OnClockRestart}} notification. Otherwise, the clock sends an {{IMFClockStateSink::OnClockStart}} notification.</p><p>The presentation clock initiates the state change by calling <strong>OnClockStart</strong> or <strong>OnClockRestart</strong> on the clock's time source. This call is made synchronously. If it fails, the state change does not occur. If the call succeeds, the state changes, and the clock notifies the other state-change subscribers by calling their <strong>OnClockStart</strong> or <strong>OnClockRestart</strong> methods. These calls are made asynchronously.</p><p>If the clock is already running, calling <strong>Start</strong> again has the effect of seeking the clock to the new <em>StartOffset</em> position.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_CLOCK_NO_TIME_SOURCE}}</strong></dt> </dl> </td><td> <p>No time source was set on this clock.</p> </td></tr> </table><p>?</p> <dd> <p>Initial starting time, in 100-nanosecond units. At the time the <strong>Start</strong> method is called, the clock's {{IMFPresentationClock::GetTime}} method returns this value, and the clock time increments from there. If the value is {{PRESENTATION_CURRENT_POSITION}}, the clock starts from its current position. Use this value if the clock is paused and you want to restart it from the same position.</p> </dd> <p> </p><p>Stops the presentation clock. While the clock is stopped, the clock time does not advance, and the clock's {{IMFPresentationClock::GetTime}} method returns zero.</p> <p>This method is valid when the clock is running or paused.</p><p>The presentation clock initiates the state change by calling {{IMFClockStateSink::OnClockStop}} on the clock's time source. This call is made synchronously. If it fails, the state change does not occur. If the call succeeds, the state changes, and the clock notifies the other state-change subscribers by calling their <strong>OnClockStop</strong> methods. These calls are made asynchronously.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_CLOCK_NO_TIME_SOURCE}}</strong></dt> </dl> </td><td> <p>No time source was set on this clock.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_CLOCK_STATE_ALREADY_SET}}</strong></dt> </dl> </td><td> <p>The clock is already stopped.</p> </td></tr> </table><p>?</p> <p> </p><p>Pauses the presentation clock. While the clock is paused, the clock time does not advance, and the clock's {{IMFPresentationClock::GetTime}} returns the time at which the clock was paused.</p> <p>This method is valid when the clock is running. It is not valid when the clock is paused or stopped.</p><p>The presentation clock initiates the state change by calling {{IMFClockStateSink::OnClockPause}} on the clock's time source. This call is made synchronously. If it fails, the state change does not occur. If the call succeeds, the state changes, and the clock notifies the other state-change subscribers by calling their <strong>OnClockPause</strong> methods. These calls are made asynchronously.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_CLOCK_NO_TIME_SOURCE}}</strong></dt> </dl> </td><td> <p>No time source was set on this clock.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_CLOCK_STATE_ALREADY_SET}}</strong></dt> </dl> </td><td> <p>The clock is already paused.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The clock is stopped. This request is not valid when the clock is stopped.</p> </td></tr> </table><p>?</p> <p> Provides the clock times for the presentation clock. </p> <p>This interface is implemented by presentation time sources. A presentation time source is an object that provides the clock time for the presentation clock. For example, the audio renderer is a presentation time source. The rate at which the audio renderer consumes audio samples determines the clock time. If the audio format is 44100 samples per second, the audio renderer will report that one second has passed for every 44100 audio samples it plays. In this case, the timing is provided by the sound card.</p><p>To set the presentation time source on the presentation clock, call <strong>{{IMFPresentationClock::SetTimeSource}}</strong> with a reference to the time source's <strong>{{IMFPresentationTimeSource}}</strong> interface.</p><p>A presentation time source must also implement the <strong>{{IMFClockStateSink}}</strong> interface. The presentaton clock uses this interface to notify the time source when the clock state changes.</p><p>Media Foundation provides a presentation time source that is based on the system clock. To create this object, call the <strong>{{MFCreateSystemTimeSource}}</strong> function.</p> <p> </p><p>Retrieves the underlying clock that the presentation time source uses to generate its clock times.</p> <p>A presentation time source must support stopping, starting, pausing, and rate changes. However, in many cases the time source derives its clock times from a hardware clock or other device. The underlying clock is always running, and might not support rate changes.</p><p>Optionally, a time source can expose the underlying clock by implementing this method. The underlying clock is always running, even when the presentation time source is paused or stopped. (Therefore, the underlying clock returns the {{MFCLOCK_CHARACTERISTICS_FLAG_ALWAYS_RUNNING}} flag in the <strong>{{IMFClock::GetClockCharacteristics}}</strong> method).</p><p>The underlying clock is useful if you want to make decisions based on the clock times while the presentation clock is stopped or paused.</p><p>If the time source does not expose an underlying clock, the method returns {{MF_E_NO_CLOCK}}.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NO_CLOCK}}</strong></dt> </dl> </td><td> <p>This time source does not expose an underlying clock.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the clock's <strong>{{IMFClock}}</strong> interface. The caller must release the interface.</p> </dd> <p> Receives state-change notifications from the presentation clock. </p> <p>To receive state-change notifications from the presentation clock, implement this interface and call <strong>{{IMFPresentationClock::AddClockStateSink}}</strong> on the presentation clock.</p><p>This interface must be implemented by:</p><ul> <li> <p>Presentation time sources. The presentation clock uses this interface to request change states from the time source.</p> </li> <li> <p>Media sinks. Media sinks use this interface to get notifications when the presentation clock changes.</p> </li> </ul><p>Other objects that need to be notified can implement this interface.</p> <p> Called when the presentation clock starts. </p> <p>This method is called whe the presentation clock's <strong>{{IMFPresentationClock::Start}}</strong> method is called, with the following exception: If the clock is paused and <strong>Start</strong> is called with the value <strong>{{PRESENTATION_CURRENT_POSITION}}</strong>, <strong>{{IMFClockStateSink::OnClockRestart}}</strong> is called instead of <strong>OnClockStart</strong>.</p><p>The clock notifies the presentation time source by calling the time source's <strong>OnClockStart</strong> method. This call occurs synchronously within the <strong>Start</strong> method. If the time source returns an error from <strong>OnClockStart</strong>, the presentation clock's <strong>Start</strong> method returns an error and the state change does not take place.</p><p>For any object that is not the presentation time source, the <strong>OnClockStart</strong> method is called asynchronously, after the state change is completed. In that case, the return value from this method is ignored.</p><p>The value given in <em>llClockStartOffset</em> is the presentation time when the clock starts, so it is relative to the start of the presentation. Media sinks should not render any data with a presentation time earlier than <em>llClockStartOffSet</em>. If a sample straddles the offset?that is, if the offset falls between the sample's start and stop times?the sink should either trim the sample so that only data after <em>llClockStartOffset</em> is rendered, or else simply drop the sample.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The system time when the clock started, in 100-nanosecond units. </p> </dd> <dd> <p> The new starting time for the clock, in 100-nanosecond units. This parameter can also equal <strong>{{PRESENTATION_CURRENT_POSITION}}</strong>, indicating the clock has started or restarted from its current position. </p> </dd> <p> Called when the presentation clock stops. </p> <p> When the presentation clock's <strong>{{IMFPresentationClock::Stop}}</strong> method is called, the clock notifies the presentation time source by calling the presentation time source's <strong>OnClockStop</strong> method. This call occurs synchronously within the <strong>Stop</strong> method. If the time source returns an error from <strong>OnClockStop</strong>, the presentation clock's <strong>Stop</strong> method returns an error and the state change does not take place. </p><p> For any object that is not the presentation time source, the <strong>OnClockStop</strong> method is called asynchronously, after the state change is completed. </p><p>If an object is already stopped, it should return <strong>{{S_OK}}</strong> from <strong>OnClockStop</strong>. It should not return an error code. </p><strong>Note</strong>??Although the header file mferror.h defines an error code named <strong>{{MF_E_SINK_ALREADYSTOPPED}}</strong>, it should not be returned in this situation.? <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SINK_ALREADYSTOPPED}}</strong></dt> </dl> </td><td> <p>Deprecated. Do not use this error code.</p> </td></tr> </table><p>?</p> <dd> <p> The system time when the clock stopped, in 100-nanosecond units. </p> </dd> <p> Called when the presentation clock pauses. </p> <p>When the presentation clock's <strong>{{IMFPresentationClock::Pause}}</strong> method is called, the clock notifies the presentation time source by calling the time source's <strong>OnClockPause</strong> method. This call occurs synchronously within the <strong>Pause</strong> method. If the time source returns an error from <strong>OnClockPause</strong>, the presentation clock's <strong>Pause</strong> method returns an error and the state change does not take place.</p><p>For any object that is not the presentation time source, the <strong>OnClockPause</strong> method is called asynchronously, after the state change is completed. In that case, the return value from this method is ignored.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The system time when the clock was paused, in 100-nanosecond units. </p> </dd> <p> Called when the presentation clock restarts from the same position while paused. </p> <p> This method is called if the presentation clock is paused and the <strong>{{IMFPresentationClock::Start}}</strong> method is called with the value <strong>{{PRESENTATION_CURRENT_POSITION}}</strong>. </p><p> The clock notifies the presentation time source by calling the time source's <strong>OnClockRestart</strong> method. This call occurs synchronously within the <strong>Start</strong> method. If the time source returns an error from <strong>OnClockRestart</strong>, the presentation clock's <strong>Start</strong> method returns an error and the state change does not take place. </p><p> For any object that is not the presentation time source, the <strong>OnClockRestart</strong> method is called asynchronously, after the state change is completed. In that case, the return value from this method is ignored. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The system time when the clock restarted, in 100-nanosecond units. </p> </dd> <p>Called when the rate changes on the presentation clock. </p> <p> When the presentation clock's <strong>{{IMFRateControl::SetRate}}</strong> method is called, the clock notifies the presentation time source by calling the time source's <strong>OnClockSetRate</strong> method. This call occurs synchronously within the <strong>SetRate</strong> method. If the time source returns an error from <strong>OnClockSetRate</strong>, the presentation clock's <strong>SetRate</strong> method returns an error and the state change does not take place. </p><p> For any object that is not the presentation time source, the <strong>OnClockSetRate</strong> method is called asynchronously, after the state change is completed. In that case, the return value from this method is ignored. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The system time when the rate was set, in 100-nanosecond units. </p> </dd> <dd> <p> The new rate, as a multiplier of the normal playback rate. </p> </dd> <p> Describes the details of a presentation. A <em>presentation</em> is a set of related media streams that share a common presentation time. </p> <p>Presentation descriptors are used to configure media sources and some media sinks. To get the presentation descriptor from a media source, call <strong>{{IMFMediaSource::CreatePresentationDescriptor}}</strong>. To create a new presentation descriptor, call <strong>{{MFCreatePresentationDescriptor}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p> </p><p>Retrieves the number of stream descriptors in the presentation. Each stream descriptor contains information about one stream in the media source. To retrieve a stream descriptor, call the <strong>{{IMFPresentationDescriptor::GetStreamDescriptorByIndex}}</strong> method.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><p>Retrieves a stream descriptor for a stream in the presentation. The stream descriptor contains information about the stream.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Zero-based index of the stream. To find the number of streams in the presentation, call the <strong>{{IMFPresentationDescriptor::GetStreamDescriptorCount}}</strong> method.</p> </dd> <dd> <p>Receives a Boolean value. The value is <strong>{{TRUE}}</strong> if the stream is currently selected, or <strong>{{FALSE}}</strong> if the stream is currently deselected. If a stream is selected, the media source generates data for that stream when <strong>{{IMFMediaSource::Start}}</strong> is called. The media source will not generated data for deselected streams. To select a stream, call <strong>{{IMFPresentationDescriptor::SelectStream}}</strong>.To deselect a stream, call <strong>{{IMFPresentationDescriptor::DeselectStream}}</strong>.</p> </dd> <dd> <p>Receives a reference to the stream descriptor's <strong>{{IMFStreamDescriptor}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Selects a stream in the presentation.</p> <p> If a stream is selected, the media source will generate data for that stream. The media source will not generated data for deselected streams. To deselect a stream, call <strong>{{IMFPresentationDescriptor::DeselectStream}}</strong>. </p><p> To query whether a stream is selected, call <strong>{{IMFPresentationDescriptor::GetStreamDescriptorByIndex}}</strong>. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p><em>dwDescriptorIndex</em> is out of range.</p> </td></tr> </table><p>?</p> <dd> <p>The stream number to select, indexed from zero. To find the number of streams in the presentation, call <strong>{{IMFPresentationDescriptor::GetStreamDescriptorCount}}</strong>.</p> </dd> <p> </p><p>Deselects a stream in the presentation.</p> <p> If a stream is deselected, no data is generated for that stream. To select the stream again, call <strong>{{IMFPresentationDescriptor::SelectStream}}</strong>. </p><p> To query whether a stream is selected, call <strong>{{IMFPresentationDescriptor::GetStreamDescriptorByIndex}}</strong>. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p><em>dwDescriptorIndex</em> is out of range. </p> </td></tr> </table><p>?</p> <dd> <p> The stream number to deselect, indexed from zero. To find the number of streams in the presentation, call the <strong>{{IMFPresentationDescriptor::GetStreamDescriptorCount}}</strong> method. </p> </dd> <p> </p><p>Creates a copy of this presentation descriptor.</p> <p> This method performs a shallow copy of the presentation descriptor. The stream descriptors are not cloned. Therefore, use caution when modifying the presentation presentation descriptor or its stream descriptors. </p><p> If the original presentation descriptor is from a media source, do not modify the presentation descriptor unless the source is stopped. If you use the presentation descriptor to configure a media sink, do not modify the presentation descriptor after the sink is configured. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the <strong>{{IMFPresentationDescriptor}}</strong> interface of the new presentation descriptor. The caller must release the interface.</p> </dd> <p> Gets information about one stream in a media source. </p> <p>A presentation descriptor contains one or more stream descriptors. To get the stream descriptors from a presentation descriptor, call <strong>{{IMFPresentationDescriptor::GetStreamDescriptorByIndex}}</strong>. To create a new stream descriptor, call <strong>{{MFCreateStreamDescriptor}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p> </p><p>Retrieves an identifier for the stream.</p> <p>The stream identifier uniquely identifies a stream within a presentation. It does not change throughout the lifetime of the stream. For example, if the presentation changes while the source is running, the index number of the stream may change, but the stream identifier does not.</p><p>In general, stream identifiers do not have a specific meaning, other than to identify the stream. Some media sources may assign stream identifiers based on meaningful values, such as packet identifiers, but this depends on the implementation.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the stream identifier.</p> </dd> <p> </p><p>Retrieves a media type handler for the stream. The media type handler can be used to enumerate supported media types for the stream, get the current media type, and set the media type.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the <strong>{{IMFMediaTypeHandler}}</strong> interface. The caller must release the interface.</p> </dd> <p> Gets and sets media types on an object, such as a media source or media sink. </p> <p>This interface is exposed by <em>media-type handlers</em>.</p><ul> <li> For media sources, get the media-type handler from the stream descriptor by calling <strong>{{IMFStreamDescriptor::GetMediaTypeHandler}}</strong>.</li> <li>For media sinks, get the media-type handler by calling <strong>{{IMFStreamSink::GetMediaTypeHandler}}</strong>.</li> </ul><p>If you are implementing a custom media source or media sink, you can create a simple media-type handler by calling <strong>{{MFCreateSimpleTypeHandler}}</strong>, or you can provide your own implementation.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p> </p><p>Queries whether the object supports a specified media type.</p> <p> If the object supports the media type given in <em>pMediaType</em>, the method returns <strong>{{S_OK}}</strong>. For a media source, it means the source can generate data that conforms to that media type. For a media sink, it means the sink can receive data that conforms to that media type. If the object does not support the media type, the method fails. </p><p> The <em>ppMediaType</em> parameter is optional. If the method fails, the object might use <em>ppMediaType</em> to return a media type that the object does support, and which closely matches the one given in <em>pMediaType</em>. The method is not guaranteed to return a media type in <em>ppMediaType</em>. If no type is returned, this parameter receives a <strong>{{NULL}}</strong> reference. If the method succeeds, this parameter receives a <strong>{{NULL}}</strong> reference. If the caller sets <em>ppMediaType</em> to <strong>{{NULL}}</strong>, this parameter is ignored. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with {{SP2}} and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDMEDIATYPE}}</strong></dt> </dl> </td><td> <p> The object does not support this media type. </p> </td></tr> </table><p>?</p> <dd> <p> Pointer to the <strong>{{IMFMediaType}}</strong> interface of the media type to check. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFMediaType}}</strong> interface of the closest matching media type, or receives the value <strong>{{NULL}}</strong>. If non-<strong>{{NULL}}</strong>, the caller must release the interface. This parameter can be <strong>{{NULL}}</strong>. See Remarks. </p> </dd> <p> </p><p>Retrieves the number of media types in the object's list of supported media types.</p> <p> To get the supported media types, call <strong>{{IMFMediaTypeHandler::GetMediaTypeByIndex}}</strong>. </p><p> For a media source, the media type handler for each stream must contain at least one supported media type. For media sinks, the media type handler for each stream might contain zero media types. In that case, the application must provide the media type. To test whether a particular media type is supported, call <strong>{{IMFMediaTypeHandler::IsMediaTypeSupported}}</strong>. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the number of media types in the list.</p> </dd> <p> </p><p>Retrieves a media type from the object's list of supported media types.</p> <p>Media types are returned in the approximate order of preference. The list of supported types is not guaranteed to be complete. To test whether a particular media type is supported, call <strong>{{IMFMediaTypeHandler::IsMediaTypeSupported}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NO_MORE_TYPES}}</strong></dt> </dl> </td><td> <p> The <em>dwIndex</em> parameter is out of range. </p> </td></tr> </table><p>?</p> <dd> <p> Zero-based index of the media type to retrieve. To get the number of media types in the list, call <strong>{{IMFMediaTypeHandler::GetMediaTypeCount}}</strong>. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFMediaType}}</strong> interface. The caller must release the interface. </p> </dd> <p> </p><p>Sets the object's media type.</p> <p>For media sources, setting the media type means the source will generate data that conforms to that media type. For media sinks, setting the media type means the sink can receive data that conforms to that media type.</p><p>Any implementation of this method should check whether <em>pMediaType</em> differs from the object's current media type. If the types are identical, the method should return {{S_OK}} but avoid releasing and recreating resources unnecessarily. If the types are not identical, the method should validate the new type.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p> Invalid request. </p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFMediaType}}</strong> interface of the new media type.</p> </dd> <p> </p><p>Retrieves the current media type of the object.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_INITIALIZED}}</strong></dt> </dl> </td><td> <p> No media type is set. </p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFMediaType}}</strong> interface. The caller must release the interface.</p> </dd> <p>Gets the major media type of the object. </p> <p>The major type identifies what kind of data is in the stream, such as audio or video. To get the specific details of the format, call <strong>{{IMFMediaTypeHandler::GetCurrentMediaType}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a {{GUID}} that identifies the major type. For a list of possible values, see Major Media Types. </p> </dd> <p>Provides a timer that invokes a callback at a specified time.</p> <p>The presentation clock exposes this interface. To get a reference to the interface, call <strong>QueryInterface</strong>.</p> <p> </p><p>Sets a timer that invokes a callback at the specified time.</p> <p>If the clock is stopped, the method returns {{MF_S_CLOCK_STOPPED}}. The callback will not be invoked until the clock is started.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The clock was shut down.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_S_CLOCK_STOPPED}}</strong></dt> </dl> </td><td> <p>The method succeeded, but the clock is stopped.</p> </td></tr> </table><p>?</p> <dd> <p>Bitwise {{OR}} of zero or more flags from the <strong>{{MFTIMER_FLAGS}}</strong> enumeration.</p> </dd> <dd> <p>The time at which the timer should fire, in units of the clock's frequency. The time is either absolute or relative to the current time, depending on the value of <em>dwFlags</em>.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface. The callback's <strong>Invoke</strong> method is called at the time specified in the <em>llClockTime</em> parameter.</p> </dd> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IUnknown}}</strong> interface of a cancellation object. The caller must release the interface. To cancel the timer, pass this reference to the <strong>{{IMFTimer::CancelTimer}}</strong> method. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <p> </p><p>Cancels a timer that was set using the <strong>{{IMFTimer::SetTimer}}</strong> method.</p> <p>Because the timer is dispatched asynchronously, the application's timer callback might get invoked even if this method succeeds.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> Exposed by some Media Foundation objects that must be explicitly shut down. </p> <p>The following types of object expose <strong>{{IMFShutdown}}</strong>:</p><ul> <li> Content enablers (<strong>{{IMFContentEnabler}}</strong> interface) </li> <li> Input trust authorities (<strong>{{IMFInputTrustAuthority}}</strong> interface) </li> <li> Presentation clocks (<strong>{{IMFPresentationClock}}</strong> interface) </li> <li> Asynchronous {{MFTs}} </li> </ul><p> Any component that creates one of these objects is responsible for calling <strong>Shutdown</strong> on the object before releasing the object. Typically, applications do not create any of these objects directly, so it is not usually necessary to use this interface in an application. </p><p> To obtain a reference to this interface, call <strong>QueryInterface</strong> on the object. </p><p> If you are implementing a custom object, your object can expose this interface, but only if you can guarantee that your application will call <strong>Shutdown</strong>. </p><p>Media sources, media sinks, and <em>synchronous</em> {{MFTs}} should not implement this interface, because the Media Foundation pipeline will not call <strong>Shutdown</strong> on these objects. Asynchronous {{MFTs}} must implement this interface.</p><p> This interface is not related to the <strong>{{MFShutdown}}</strong> function, which shuts down the Media Foundation platform, as described in Initializing Media Foundation. </p><p> Some Media Foundation interfaces define a <strong>Shutdown</strong> method, which serves the same purpose as <strong>{{IMFShutdown::Shutdown}}</strong> but is not directly related to it. </p> <p> Shuts down a Media Foundation object and releases all resources associated with the object. </p> <p>The <strong>{{MFShutdownObject}}</strong> helper function is equivalent to calling this method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Queries the status of an earlier call to the <strong>{{IMFShutdown::Shutdown}}</strong> method. </p> <p>Until <strong>Shutdown</strong> is called, the <strong>GetShutdownStatus</strong> method returns <strong>{{MF_E_INVALIDREQUEST}}</strong>.</p><p>If an object's <strong>Shutdown</strong> method is asynchronous, <em>pStatus</em> might receive the value <strong>{{MFSHUTDOWN_INITIATED}}</strong>. When the object is completely shut down, <em>pStatus</em> receives the value <strong>{{MFSHUTDOWN_COMPLETED}}</strong>.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p> The <strong>Shutdown</strong> method has not been called on this object. </p> </td></tr> </table><p>?</p> <p> Creates a fully loaded topology from the input partial topology. </p> <p> This method creates any intermediate transforms that are needed to complete the topology. It also sets the input and output media types on all of the objects in the topology. If the method succeeds, the full topology is returned in the <em>ppOutputTopo</em> parameter. </p><p> You can use the <em>pCurrentTopo</em> parameter to provide a full topology that was previously loaded. If this topology contains objects that are needed in the new topology, the topology loader can re-use them without creating them again. This caching can potentially make the process faster. The objects from <em>pCurrentTopo</em> will not be reconfigured, so you can specify a topology that is actively streaming data. For example, while a topology is still running, you can pre-load the next topology. </p><p> Before calling this method, you must ensure that the output nodes in the partial topology have valid <strong>{{IMFStreamSink}}</strong> references, not <strong>{{IMFActivate}}</strong> references. The Media Session automatically performs this action inside the <strong>{{IMFMediaSession::SetTopology}}</strong> method. However, if you call <strong>Load</strong> before calling <strong>SetTopology</strong>, you must bind the output nodes manually. For more information, see Binding Output Nodes to Media Sinks. </p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TOPO_SINK_ACTIVATES_UNSUPPORTED}}</strong></dt> </dl> </td><td> <p>One or more output nodes contain <strong>{{IMFActivate}}</strong> references. The caller must bind the output nodes to media sinks. See Binding Output Nodes to Media Sinks.</p> </td></tr> </table><p>?</p> <dd> <p>A reference to the <strong>{{IMFTopology}}</strong> interface of the partial topology to be resolved.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFTopology}}</strong> interface of the completed topology. The caller must release the interface.</p> </dd> <dd> <p> A reference to the <strong>{{IMFTopology}}</strong> interface of the previous full topology. The topology loader can re-use objects from this topology in the new topology. This parameter can be <strong>{{NULL}}</strong>. See Remarks. </p> </dd> <p> Creates a fully loaded topology from the input partial topology. </p> <p> This method creates any intermediate transforms that are needed to complete the topology. It also sets the input and output media types on all of the objects in the topology. If the method succeeds, the full topology is returned in the <em>ppOutputTopo</em> parameter. </p><p> You can use the <em>pCurrentTopo</em> parameter to provide a full topology that was previously loaded. If this topology contains objects that are needed in the new topology, the topology loader can re-use them without creating them again. This caching can potentially make the process faster. The objects from <em>pCurrentTopo</em> will not be reconfigured, so you can specify a topology that is actively streaming data. For example, while a topology is still running, you can pre-load the next topology. </p><p> Before calling this method, you must ensure that the output nodes in the partial topology have valid <strong>{{IMFStreamSink}}</strong> references, not <strong>{{IMFActivate}}</strong> references. The Media Session automatically performs this action inside the <strong>{{IMFMediaSession::SetTopology}}</strong> method. However, if you call <strong>Load</strong> before calling <strong>SetTopology</strong>, you must bind the output nodes manually. For more information, see Binding Output Nodes to Media Sinks. </p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TOPO_SINK_ACTIVATES_UNSUPPORTED}}</strong></dt> </dl> </td><td> <p>One or more output nodes contain <strong>{{IMFActivate}}</strong> references. The caller must bind the output nodes to media sinks. See Binding Output Nodes to Media Sinks.</p> </td></tr> </table><p>?</p> <dd> <p>A reference to the <strong>{{IMFTopology}}</strong> interface of the partial topology to be resolved.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFTopology}}</strong> interface of the completed topology. The caller must release the interface.</p> </dd> <dd> <p> A reference to the <strong>{{IMFTopology}}</strong> interface of the previous full topology. The topology loader can re-use objects from this topology in the new topology. This parameter can be <strong>{{NULL}}</strong>. See Remarks. </p> </dd> <p>Enables playback of protected content by providing the application with a reference to a content enabler object.</p><p>Applications that play protected content should implement this interface.</p> <p>A <em>content enabler</em> is an object that performs some action that is required to play a piece of protected content. For example, the action might be obtaining a {{DRM}} license. Content enablers expose the <strong>{{IMFContentEnabler}}</strong> interface, which defines a generic mechanism for content enabler. Content enablers are created inside the protected media path ({{PMP}}) process. However, they must be invoked from the application process. Therefore, the <strong>{{IMFContentProtectionManager}}</strong> interface provides a way for the {{PMP}} Media Session to notify the application.</p><p>To use this interface, do the following:</p><ol> <li> <p>Implement the interface in your application.</p> </li> <li> <p>Create an attribute store by calling <strong>{{MFCreateAttributes}}</strong>.</p> </li> <li> <p>Set the <strong>{{MF_SESSION_CONTENT_PROTECTION_MANAGER}}</strong> attribute on the attribute store. The attribute value is a reference to your <strong>{{IMFContentProtectionManager}}</strong> implementation.</p> </li> <li> <p>Call <strong>{{MFCreatePMPMediaSession}}</strong> and pass the attribute store in the <em>pConfiguration</em> parameter.</p> </li> </ol><p>If the content requires a content enabler, the application's <strong>BeginEnableContent</strong> method is called. Usually this method called during the <strong>{{IMFMediaSession::SetTopology}}</strong> operation, before the Media Session raises the {{MESessionTopologySet}} event. The application might receive multiple <strong>BeginEnableContent</strong> calls for a single piece of content. The {{MESessionTopologySet}} event signals that the content-enabling process is complete for the current topology. The <strong>BeginEnableContent</strong> method can also be called outside of the <strong>SetTopology</strong> operation, but less commonly.</p><p>Many content enablers send machine-specific data to the network, which can have privacy implications. One of the purposes of the <strong>{{IMFContentProtectionManager}}</strong> interface is to give applications an opportunity to display information to the user and enable to user to opt in or out of the process.</p> <p>Begins an asynchronous request to perform a content enabling action.</p><p>This method requests the application to perform a specific step needed to acquire rights to the content, using a content enabler object.</p> <p>Do not block within this callback method. Instead, perform the content enabling action asynchronously on another thread. When the operation is finished, notify the protected media path ({{PMP}}) through the <em>pCallback</em> parameter.</p><p>If you return a success code from this method, you must call <strong>Invoke</strong> on the callback. Conversely, if you return an error code from this method, you must not call <strong>Invoke</strong>. If the operation fails after the method returns a success code, use status code on the <strong>{{IMFAsyncResult}}</strong> object to report the error.</p><p>After the callback is invoked, the {{PMP}} will call the application's <strong>{{IMFContentProtectionManager::EndEnableContent}}</strong> method to complete the asynchronous call.</p><p>This method is not necessarily called every time the application plays protected content. Generally, the method will not be called if the user has a valid, up-to-date license for the content. Internally, the input trust authority ({{ITA}}) determines whether <strong>BeginEnableContent</strong> is called, based on the content provider's {{DRM}} policy. For more information, see Protected Media Path.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> </table><p>?</p> <dd> <p> Pointer to the <strong>{{IMFActivate}}</strong> interface of a content enabler object. To create the content enabler, call <strong>{{IMFActivate::ActivateObject}}</strong> and request the <strong>{{IMFContentEnabler}}</strong> interface. The application should use the methods in <strong>{{IMFContentEnabler}}</strong> to complete the content enabling action. </p> </dd> <dd> <p> Pointer to the <strong>{{IMFTopology}}</strong> interface of the pending topology. </p> </dd> <dd> <p> Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. When the operation is complete, the application should call <strong>{{IMFAsyncCallback::Invoke}}</strong> on the callback. </p> </dd> <dd> <p> Reserved. Currently this parameter is always <strong>{{NULL}}</strong>. </p> </dd> <p> </p><p>Ends an asynchronous request to perform a content enabling action. This method is called by the protected media path ({{PMP}}) to complete an asynchronous call to <strong>{{IMFContentProtectionManager::BeginEnableContent}}</strong>.</p> <p>When the <strong>BeginEnableContent</strong> method completes asynchronously, the application notifies the {{PMP}} by invoking the asynchronous callback. The {{PMP}} calls <strong>EndEnableContent</strong> on the application to get the result code. This method is called on the application's thread from inside the callback method. Therefore, it must not block the thread that invoked the callback.</p><p>The application must return the success or failure code of the asynchronous processing that followed the call to <strong>BeginEnableContent</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p>Implements one step that must be performed for the user to access media content. For example, the steps might be individualization followed by license acquisition. Each of these steps would be encapsulated by a content enabler object that exposes the <strong>{{IMFContentEnabler}}</strong> interface.</p> <p> </p><p>Retrieves the type of operation that this content enabler performs.</p> <p>The following {{GUIDs}} are defined for the <em>pType</em> parameter.</p><table> <tr><th>Value</th><th>Description</th></tr> <tr><td>{{MFENABLETYPE_MF_RebootRequired}}</td><td>The user must reboot his or her computer.</td></tr> <tr><td>{{MFENABLETYPE_MF_UpdateRevocationInformation}}</td><td>Update revocation information.</td></tr> <tr><td>{{MFENABLETYPE_MF_UpdateUntrustedComponent}}</td><td>Update untrusted components.</td></tr> <tr><td>{{MFENABLETYPE_WMDRMV1_LicenseAcquisition}}</td><td>License acquisition for Windows Media Digital Rights Management ({{DRM}}) version 1.</td></tr> <tr><td>{{MFENABLETYPE_WMDRMV7_Individualization}}</td><td>Individualization.</td></tr> <tr><td>{{MFENABLETYPE_WMDRMV7_LicenseAcquisition}}</td><td>License acquisition for Windows Media {{DRM}} version 7 or later.</td></tr> </table><p>?</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a {{GUID}} that identifies the type of operation. An application can tailor its user interface ({{UI}}) strings for known operation types. See Remarks.</p> </dd> <p> </p><p>Retrieves a {{URL}} for performing a manual content enabling action.</p> <p>If the enabling action can be performed by navigating to a {{URL}}, this method returns the {{URL}}. If no such {{URL}} exists, the method returns a failure code.</p><p>The purpose of the {{URL}} depends on the content enabler type, which is obtained by calling <strong>{{IMFContentEnabler::GetEnableType}}</strong>.</p><table> <tr><th>Enable type</th><th>Purpose of {{URL}}</th></tr> <tr><td>Individualization</td><td>Not applicable.</td></tr> <tr><td>License acquisition</td><td>{{URL}} to obtain the license. Call <strong>{{IMFContentEnabler::GetEnableData}}</strong> and submit the data to the {{URL}} as an {{HTTP}} {{POST}} request. To receive notification when the license is acquired, call <strong>{{IMFContentEnabler::MonitorEnable}}</strong>.</td></tr> <tr><td>Revocation</td><td>{{URL}} to a webpage where the user can download and install an updated component.</td></tr> </table><p>?</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_AVAILABLE}}</strong></dt> </dl> </td><td> <p>No {{URL}} is available.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to a buffer that contains the {{URL}}. The caller must release the memory for the buffer by calling <strong>CoTaskMemFree</strong>.</p> </dd> <dd> <p>Receives the number of characters returned in <em>ppwszURL</em>, including the terminating {{NULL}} character.</p> </dd> <dd> <p>Receives a member of the <strong>{{MF_URL_TRUST_STATUS}}</strong> enumeration indicating whether the {{URL}} is trusted.</p> </dd> <p> </p><p>Retrieves the data for a manual content enabling action.</p> <p>The purpose of the data depends on the content enabler type, which is obtained by calling <strong>{{IMFContentEnabler::GetEnableType}}</strong>.</p><table> <tr><th>Enable type</th><th>Purpose of data</th></tr> <tr><td>Individualization</td><td>Not applicable.</td></tr> <tr><td>License acquisition</td><td>{{HTTP}} {{POST}} data.</td></tr> <tr><td>Revocation</td><td> <strong>{{MFRR_COMPONENTS}}</strong> structure.</td></tr> </table><p>?</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_AVAILABLE}}</strong></dt> </dl> </td><td> <p>No data is available.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to a buffer that contains the data. The caller must free the buffer by calling <strong>CoTaskMemFree</strong>.</p> </dd> <dd> <p>Receives the size of the <em>ppbData</em> buffer.</p> </dd> <p> </p><p>Queries whether the content enabler can perform all of its actions automatically.</p> <p>If this method returns <strong>{{TRUE}}</strong> in the <em>pfAutomatic</em> parameter, call the <strong>{{IMFContentEnabler::AutomaticEnable}}</strong> method to perform the enabling action.</p><p>If this method returns <strong>{{FALSE}}</strong> in the <em>pfAutomatic</em> parameter, the application must use manual enabling. To do so, call <strong>{{IMFContentEnabler::GetEnableURL}}</strong> and <strong>{{IMFContentEnabler::GetEnableData}}</strong> to get the {{URL}} and data needed for manual enabling.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a Boolean value. If <strong>{{TRUE}}</strong>, the content enabler can perform the enabing action automatically.</p> </dd> <p> </p><p>Performs a content enabling action without any user interaction.</p> <p>This method is asynchronous. When the operation is complete, the content enabler sends an {{MEEnablerCompleted}} event. While the operation is in progress, the content enabler might send {{MEEnablerProgress}} events.</p><p>To find out whether the content enabler supports this method, call <strong>{{IMFContentEnabler::IsAutomaticSupported}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Requests notification when the enabling action is completed.</p> <p>If you use a manual enabling action, call this method to be notified when the operation completes. If this method returns {{S_OK}}, the content enabler will send an {{MEEnablerCompleted}} event when the operation is completed. If the application cancels the operatation before completing it, call <strong>{{IMFContentEnabler::Cancel}}</strong>.</p><p>You do not have to call <strong>MonitorEnable</strong> when you use automatic enabling by calling <strong>{{IMFContentEnabler::AutomaticEnable}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_FALSE}}</strong></dt> </dl> </td><td> <p>The method succeeded and no action was required.</p> </td></tr> </table><p>?</p> <p> </p><p>Cancels a pending content enabling action.</p> <p>The content enabler sends an {{MEEnablerCompleted}} event with a status code of {{E_CANCEL}}.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p>Manages metadata for an object. Metadata is information that describes a media file, stream, or other content. Metadata consists of individual properties, where each property contains a descriptive name and a value. A property may be associated with a particular language.</p><p>To get this interface from a media source, use the <strong>{{IMFMetadataProvider}}</strong> interface.</p> <p> Sets the language for setting and retrieving metadata. </p> <p>For more information about language tags, see {{RFC}} 1766, "Tags for the Identification of Languages".</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to a null-terminated string containing an {{RFC}} 1766-compliant language tag.</p> </dd> <p> Gets the current language setting.</p> <p>For more information about language tags, see {{RFC}} 1766, "Tags for the Identification of Languages."</p><p>The <strong>{{IMFMetadata::SetLanguage}}</strong> and <strong>{{IMFMetadata::GetProperty}}</strong> methods set and get metadata for the current language setting.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p>The metadata provider does not support multiple languages.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p> No language was set. </p> </td></tr> </table><p>?</p> <dd> <p> Receives a reference to a null-terminated string containing an {{RFC}} 1766-compliant language tag. The caller must release the string by calling <strong>CoTaskMemFree</strong>. </p> </dd> <p> Gets a list of the languages in which metadata is available.</p> <p> For more information about language tags, see {{RFC}} 1766, "Tags for the Identification of Languages". </p><p> To set the current language, call <strong>{{IMFMetadata::SetLanguage}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A reference to a <strong>{{PROPVARIANT}}</strong> that receives the list of languages. The list is returned as an array of null-terminated wide-character strings. Each string in the array is an {{RFC}} 1766-compliant language tag. </p> <p>The returned <strong>{{PROPVARIANT}}</strong> type is {{VT_VECTOR}} | {{VT_LPWSTR}}. The list might be empty, if no language tags are present. The caller must free the <strong>{{PROPVARIANT}}</strong> by calling <strong>PropVariantClear</strong>. </p> </dd> <p> Sets the value of a metadata property. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to a null-terminated string containing the name of the property.</p> </dd> <dd> <p>Pointer to a <strong>{{PROPVARIANT}}</strong> that contains the value of the property. For multivalued properties, use a <strong>{{PROPVARIANT}}</strong> with a {{VT_VECTOR}} type.</p> </dd> <p> Gets the value of a metadata property.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_PROPERTY_NOT_FOUND}}</strong></dt> </dl> </td><td> <p> The requested property was not found. </p> </td></tr> </table><p>?</p> <dd> <p> A reference to a null-terminated string that containings the name of the property. To get the list of property names, call <strong>{{IMFMetadata::GetAllPropertyNames}}</strong>.</p> </dd> <dd> <p> Pointer to a <strong>{{PROPVARIANT}}</strong> that receives the value of the property. The <strong>{{PROPVARIANT}}</strong> type depends on the property. For multivalued properties, the <strong>{{PROPVARIANT}}</strong> is a <strong>{{VT_VECTOR}}</strong> type. The caller must free the <strong>{{PROPVARIANT}}</strong> by calling <strong>PropVariantClear</strong>. </p> </dd> <p> Deletes a metadata property.</p> <p>For a media source, deleting a property from the metadata collection does not change the original content.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_PROPERTY_NOT_FOUND}}</strong></dt> </dl> </td><td> <p> The property was not found. </p> </td></tr> </table><p>?</p> <dd> <p>Pointer to a null-terminated string containing the name of the property.</p> </dd> <p> Gets a list of all the metadata property names on this object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to a <strong>{{PROPVARIANT}}</strong> that receives an array of null-terminated wide-character strings. If no properties are available, the <strong>{{PROPVARIANT}}</strong> type is {{VT_EMPTY}}. Otherwise, the <strong>{{PROPVARIANT}}</strong> type is {{VT_VECTOR}} | {{VT_LPWSTR}}. The caller must free the <strong>{{PROPVARIANT}}</strong> by calling <strong>PropVariantClear</strong>.</p> </dd> <p>Gets metadata from a media source or other object.</p><p>If a media source supports this interface, it must expose the interface as a service. To get a reference to this interface from a media source, call <strong>{{IMFGetService::GetService}}</strong>. The service identifier is <strong>{{MF_METADATA_PROVIDER_SERVICE}}</strong>. Other types of object can expose this interface through <strong>QueryInterface</strong>.</p><p>Use this interface to get a reference to the <strong>{{IMFMetadata}}</strong> interface.</p> <p> Gets a collection of metadata, either for an entire presentation, or for one stream in the presentation.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_PROPERTY_NOT_FOUND}}</strong></dt> </dl> </td><td> <p>No metadata is available for the requested stream or presentation.</p> </td></tr> </table><p>?</p> <dd> <p> Pointer to the <strong>{{IMFPresentationDescriptor}}</strong> interface of the media source's presentation descriptor. </p> </dd> <dd> <p> If this parameter is zero, the method retrieves metadata that applies to the entire presentation. Otherwise, this <em></em> parameter specifies a stream identifier, and the method retrieves metadata for that stream. To get the stream identifier for a stream, call <strong>{{IMFStreamDescriptor::GetStreamIdentifier}}</strong>. </p> </dd> <dd> <p> Reserved. Must be zero. </p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMetadata}}</strong> interface. Use this interface to access the metadata. The caller must release the interface.</p> </dd> <p>Queries the range of playback rates that are supported, including reverse playback.</p><p>To get a reference to this interface, call <strong>{{IMFGetService::GetService}}</strong> with the service identifier {{MF_RATE_CONTROL_SERVICE}}.</p> <p>Applications can use this interface to discover the fastest and slowest playback rates that are possible, and to query whether a given playback rate is supported. Applications obtain this interface from the Media Session. Internally, the Media Session queries the objects in the pipeline. For more information, see How to Determine Supported Rates.</p><p>To get the current playback rate and to change the playback rate, use the <strong>{{IMFRateControl}}</strong> interface.</p><p>Playback rates are expressed as a ratio the normal playback rate. Reverse playback is expressed as a negative rate. Playback is either <em>thinned</em> or <em>non-thinned</em>. In thinned playback, some of the source data is skipped (typically delta frames). In non-thinned playback, all of the source data is rendered.</p><p>You might need to implement this interface if you are writing a pipeline object (media source, transform, or media sink). For more information, see Implementing Rate Control.</p> <p> </p><p>Retrieves the slowest playback rate supported by the object.</p> <p>The value returned in <em>plfRate</em> represents a lower bound. Playback at this rate is not guaranteed. Call <strong>{{IMFRateSupport::IsRateSupported}}</strong> to check whether the boundary rate is supported. For example, a component that supports arbitrarily slow rates will return zero in <em>pflRate</em>, and applications should call <strong>IsRateSupported</strong> separately to determine whether the component supports rate 0.</p><p>If <em>eDirection</em> is {{MFRATE_REVERSE}}, the method retrieves the slowest reverse playback rate. This is a negative value, assuming the object supports reverse playback.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_REVERSE_UNSUPPORTED}}</strong></dt> </dl> </td><td> <p>The object does not support reverse playback.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_THINNING_UNSUPPORTED}}</strong></dt> </dl> </td><td> <p>The object does not support thinning.</p> </td></tr> </table><p>?</p> <dd> <p>Specifies whether to query to the slowest forward playback rate or reverse playback rate. The value is a member of the <strong>{{MFRATE_DIRECTION}}</strong> enumeration.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, the method retrieves the slowest thinned playback rate. Otherwise, the method retrieves the slowest non-thinned playback rate. For information about thinning, see About Rate Control.</p> </dd> <dd> <p>Receives the slowest playback rate that the object supports.</p> </dd> <p> </p><p>Gets the fastest playback rate supported by the object.</p> <p>For some formats (such as {{ASF}}), thinning means dropping all frames that are not I-frames. If a component produces stream data, such as a media source or a demultiplexer, it should pay attention to the <em>fThin</em> parameter and return {{MF_E_THINNING_UNSUPPORTED}} if it cannot thin the stream.</p><p>If the component processes or receives a stream (most transforms or media sinks), it may ignore this parameter if it does not care whether the stream is thinned. In the Media Session's implementation of rate support, if the transforms do not explicitly support reverse playback, the Media Session will attempt to playback in reverse with thinning but not without thinning. Therefore, most applications will set <em>fThin</em> to <strong>{{TRUE}}</strong> when using the Media Session for reverse playback.</p><p>If <em>eDirection</em> is {{MFRATE_REVERSE}}, the method retrieves the fastest reverse playback rate. This is a negative value, assuming the object supports reverse playback.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_REVERSE_UNSUPPORTED}}</strong></dt> </dl> </td><td> <p>The object does not support reverse playback.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_THINNING_UNSUPPORTED}}</strong></dt> </dl> </td><td> <p>The object does not support thinning.</p> </td></tr> </table><p>?</p> <dd> <p>Specifies whether to query to the fastest forward playback rate or reverse playback rate. The value is a member of the <strong>{{MFRATE_DIRECTION}}</strong> enumeration.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, the method retrieves the fastest thinned playback rate. Otherwise, the method retrieves the fastest non-thinned playback rate. For information about thinning, see About Rate Control.</p> </dd> <dd> <p>Receives the fastest playback rate that the object supports.</p> </dd> <p> </p><p>Queries whether the object supports a specified playback rate.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The object supports the specified rate.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_REVERSE_UNSUPPORTED}}</strong></dt> </dl> </td><td> <p>The object does not support reverse playback.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_THINNING_UNSUPPORTED}}</strong></dt> </dl> </td><td> <p>The object does not support thinning.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_RATE}}</strong></dt> </dl> </td><td> <p>The object does not support the specified rate.</p> </td></tr> </table><p>?</p> <dd> <p>If <strong>{{TRUE}}</strong>, the method queries whether the object supports the playback rate with thinning. Otherwise, the method queries whether the object supports the playback rate without thinning. For information about thinning, see About Rate Control.</p> </dd> <dd> <p>The playback rate to query.</p> </dd> <dd> <p>If the object does not support the playback rate given in <em>flRate</em>, this parameter receives the closest supported playback rate. If the method returns {{S_OK}}, this parameter receives the value given in <em>flRate</em>. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <p> Gets or sets the playback rate. </p> <p>Objects can expose this interface as a service. To obtain a reference to the interface, call <strong>{{IMFGetService::GetService}}</strong> with the service identifier {{MF_RATE_CONTROL_SERVICE}}. The Media Session supports this interface. Media sources and transforms support this interface if they support rate changes. Media sinks do not need to support this interface. Media sinks are notified of rate changes through the <strong>{{IMFClockStateSink::OnClockSetRate}}</strong> method.</p><p>For more information, see About Rate Control.</p><p>To discover the playback rates that an object supports, use the <strong>{{IMFRateSupport}}</strong> interface</p> <p> Sets the playback rate. </p> <p>The Media Session prevents some transitions between rate boundaries, depending on the current playback state:</p><table> <tr><th>Playback State</th><th>Forward/Reverse</th><th>Forward/Zero</th><th>Reverse/Zero</th></tr> <tr><td>Running</td><td>No</td><td>No</td><td>No</td></tr> <tr><td>Paused</td><td>No</td><td>Yes</td><td>No</td></tr> <tr><td>Stopped</td><td>Yes</td><td>Yes</td><td>Yes</td></tr> </table><p>?</p><p>If the transition is not supported, the method returns <strong>{{MF_E_UNSUPPORTED_RATE_TRANSITION}}</strong>.</p><p>When a media source completes a call to <strong>SetRate</strong>, it sends the {{MESourceRateChanged}} event. Other pipeline components do not send this event.</p><p>If a media source switches between thinned and non-thinned playback, the streams send an {{MEStreamThinMode}} event to indicate the transition. Events from the media source are not synchronized with events from the media streams. After you receive the {{MESourceRateChanged}} event, you can still receive samples that were queued before the stream switched to thinned or non-thinned mode. The {{MEStreamThinMode}} event marks the exact point in the stream where the transition occurs.</p><p>When the Media Session completes a call to <strong>SetRate</strong>, it sends the {{MESessionRateChanged}} event.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_REVERSE_UNSUPPORTED}}</strong></dt> </dl> </td><td> <p> The object does not support reverse playback. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_THINNING_UNSUPPORTED}}</strong></dt> </dl> </td><td> <p> The object does not support thinning. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_RATE}}</strong></dt> </dl> </td><td> <p> The object does not support the requested playback rate. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_RATE_TRANSITION}}</strong></dt> </dl> </td><td> <p> The object cannot change to the new rate while in the running state. </p> </td></tr> </table><p>?</p> <dd> <p> If <strong>{{TRUE}}</strong>, the media streams are thinned. Otherwise, the stream is not thinned. For media sources and demultiplexers, the object must thin the streams when this parameter is <strong>{{TRUE}}</strong>. For downstream transforms, such as decoders and multiplexers, this parameter is informative; it notifies the object that the input streams are thinned. For information, see About Rate Control. </p> </dd> <dd> <p> The requested playback rate. Postive values indicate forward playback, negative values indicate reverse playback, and zero indicates scrubbing (the source delivers a single frame). </p> </dd> <p> </p><p>Gets the current playback rate.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if the stream is currently being thinned. If the object does not support thinning, this parameter always receives the value <strong>{{FALSE}}</strong>. This parameter can be <strong>{{NULL}}</strong>. For more information, see About Rate Control.</p> </dd> <dd> <p>Receives the current playback rate.</p> </dd> <p>Converts between Society of Motion Picture and Television Engineers ({{SMPTE}}) time codes and 100-nanosecond time units.</p> <p>If an object supports this interface, it must expose the interface as a service. To get a reference to the interface, call <strong>{{IMFGetService::GetService}}</strong> with the service identifier <strong>{{MF_TIMECODE_SERVICE}}</strong>.</p><p>The Advanced Streaming Format ({{ASF}}) media source exposes this interface.</p> <p>Starts an asynchronous call to convert Society of Motion Picture and Television Engineers ({{SMPTE}}) time code to 100-nanosecond units.</p> <p>When the asynchronous method completes, the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method is called. At that point, the application must call <strong>{{IMFTimecodeTranslate::EndConvertTimecodeToHNS}}</strong> to complete the asynchronous request.</p><p>The value of <em>pPropVarTimecode</em> is a 64-bit unsigned value typed as a <strong>{{LONGLONG}}</strong>. The upper <strong>{{DWORD}}</strong> contains the range. (A <em>range</em> is a continuous series of time codes.) The lower <strong>{{DWORD}}</strong> contains the time code in the form of a hexadecimal number <em>0xhhmmssff</em>, where each 2-byte sequence is read as a decimal value.</p><pre>void CreateTimeCode( {{DWORD}} dwFrames, {{DWORD}} dwSeconds, {{DWORD}} dwMinutes, {{DWORD}} dwHours, {{DWORD}} dwRange, {{PROPVARIANT}} *pvar ) { {{ULONGLONG}} ullTimecode = (({{ULONGLONG}})dwRange) &lt;&lt; 32; ullTimecode += dwFrames % 10; ullTimecode += (( ({{ULONGLONG}})dwFrames ) / 10) &lt;&lt; 4; ullTimecode += (( ({{ULONGLONG}})dwSeconds ) % 10) &lt;&lt; 8; ullTimecode += (( ({{ULONGLONG}})dwSeconds ) / 10) &lt;&lt; 12; ullTimecode += (( ({{ULONGLONG}})dwMinutes ) % 10) &lt;&lt; 16; ullTimecode += (( ({{ULONGLONG}})dwMinutes ) / 10) &lt;&lt; 20; ullTimecode += (( ({{ULONGLONG}})dwHours ) % 10) &lt;&lt; 24; ullTimecode += (( ({{ULONGLONG}})dwHours ) / 10) &lt;&lt; 28; pvar-&gt;vt = {{VT_I8}}; pvar-&gt;hVal.QuadPart = ({{LONGLONG}})ullTimecode; } </pre> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p><em>pPropVarTimecode</em> is not <strong>{{VT_I8}}</strong>.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_BYTESTREAM_NOT_SEEKABLE}}</strong></dt> </dl> </td><td> <p>The byte stream is not seekable. The time code cannot be read from the end of the byte stream.</p> </td></tr> </table><p>?</p> <dd> <p>Time in {{SMPTE}} time code to convert. The <strong>vt</strong> member of the <strong>{{PROPVARIANT}}</strong> structure is set to <strong>{{VT_I8}}</strong>. The <strong>hVal.QuadPart</strong> member contains the time in binary coded decimal ({{BCD}}) form. See Remarks.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface.</p> </dd> <dd> <p>{{PPointer}} to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.</p> </dd> <p>Completes an asynchronous request to convert time in Society of Motion Picture and Television Engineers ({{SMPTE}}) time code to 100-nanosecond units.</p> <p>Call this method after the <strong>{{IMFTimecodeTranslate::BeginConvertTimecodeToHNS}}</strong> method completes asynchronously.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>{{IMFAsyncCallback::Invoke}}</strong> method. </p> </dd> <dd> <p>Receives the converted time.</p> </dd> <p>Starts an asynchronous call to convert time in 100-nanosecond units to Society of Motion Picture and Television Engineers ({{SMPTE}}) time code.</p> <p>When the asynchronous method completes, the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method is called. At that point, the application must call <strong>{{IMFTimecodeTranslate::EndConvertHNSToTimecode}}</strong> to complete the asynchronous request.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The object's <strong>Shutdown</strong> method was called.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_BYTESTREAM_NOT_SEEKABLE}}</strong></dt> </dl> </td><td> <p>The byte stream is not seekable. The time code cannot be read from the end of the byte stream.</p> </td></tr> </table><p>?</p> <dd> <p>The time to convert, in 100-nanosecond units.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface. </p> </dd> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.</p> </dd> <p>Completes an asynchronous request to convert time in 100-nanosecond units to Society of Motion Picture and Television Engineers ({{SMPTE}}) time code.</p> <p>Call this method after the <strong>{{IMFTimecodeTranslate::BeginConvertHNSToTimecode}}</strong> method completes asynchronously.</p><p>The value of <em>pPropVarTimecode</em> is a 64-bit unsigned value typed as a <strong>{{LONGLONG}}</strong>. The upper <strong>{{DWORD}}</strong> contains the range. (A <em>range</em> is a continuous series of time codes.) The lower <strong>{{DWORD}}</strong> contains the time code in the form of a hexadecimal number <em>0xhhmmssff</em>, where each 2-byte sequence is read as a decimal value.</p><pre>{{HRESULT}} ParseTimeCode( const {{PROPVARIANT}}&amp; var, {{DWORD}} *pdwRange, {{DWORD}} *pdwFrames, {{DWORD}} *pdwSeconds, {{DWORD}} *pdwMinutes, {{DWORD}} *pdwHours ) { if (var.vt != {{VT_I8}}) { return {{E_INVALIDARG}}; } {{ULONGLONG}} ullTimeCode = ({{ULONGLONG}})var.hVal.QuadPart; {{DWORD}} dwTimecode = ({{DWORD}})(ullTimeCode &amp; 0xFFFFFFFF); *pdwRange = ({{DWORD}})(ullTimeCode &gt;&gt; 32); *pdwFrames = dwTimecode &amp; 0x0000000F; *pdwFrames += (( dwTimecode &amp; 0x000000F0) &gt;&gt; 4 ) * 10; *pdwSeconds = ( dwTimecode &amp; 0x00000F00) &gt;&gt; 8; *pdwSeconds += (( dwTimecode &amp; 0x0000F000) &gt;&gt; 12 ) * 10; *pdwMinutes = ( dwTimecode &amp; 0x000F0000) &gt;&gt; 16; *pdwMinutes += (( dwTimecode &amp; 0x00F00000) &gt;&gt; 20 ) * 10; *pdwHours = ( dwTimecode &amp; 0x0F000000) &gt;&gt; 24; *pdwHours += (( dwTimecode &amp; 0xF0000000) &gt;&gt; 28 ) * 10; return {{S_OK}}; } </pre> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>{{IMFAsyncCallback::Invoke}}</strong> method.</p> </dd> <dd> <p>A reference to a <strong>{{PROPVARIANT}}</strong> that receives the converted time. The <strong>vt</strong> member of the <strong>{{PROPVARIANT}}</strong> structure is set to {{VT_I8}}. The <strong>hVal.QuadPart</strong> member contains the converted time in binary coded decimal ({{BCD}}) form. See Remarks.</p> </dd> <p>For a particular seek position, gets the two nearest key frames.</p> <p>If an application seeks to a non?key frame, the decoder must start decoding from the previous key frame. This can increase latency, because several frames might get decoded before the requested frame is reached. To reduce latency, an application can call this method to find the two key frames that are closest to the desired time, and then seek to one of those key frames. </p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_TIME_FORMAT}}</strong></dt> </dl> </td><td> <p>The time format specified in <em>pguidTimeFormat</em> is not supported.</p> </td></tr> </table><p>?</p> <dd> <p>A reference to a {{GUID}} that specifies the time format. The time format defines the units for the other parameters of this method. If the value is <strong>{{GUID_NULL}}</strong>, the time format is 100-nanosecond units. Some media sources might support additional time format {{GUIDs}}. </p> </dd> <dd> <p>The seek position. The units for this parameter are specified by <em>pguidTimeFormat</em>.</p> </dd> <dd> <p>Receives the position of the nearest key frame that appears earlier than <em>pvarStartPosition</em>. The units for this parameter are specified by <em>pguidTimeFormat</em>.</p> </dd> <dd> <p>Receives the position of the nearest key frame that appears earlier than <em>pvarStartPosition</em>. The units for this parameter are specified by <em>pguidTimeFormat</em>.</p> </dd> <p>For a particular seek position, gets the two nearest key frames.</p> <p>If an application seeks to a non?key frame, the decoder must start decoding from the previous key frame. This can increase latency, because several frames might get decoded before the requested frame is reached. To reduce latency, an application can call this method to find the two key frames that are closest to the desired time, and then seek to one of those key frames. </p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_TIME_FORMAT}}</strong></dt> </dl> </td><td> <p>The time format specified in <em>pguidTimeFormat</em> is not supported.</p> </td></tr> </table><p>?</p> <dd> <p>A reference to a {{GUID}} that specifies the time format. The time format defines the units for the other parameters of this method. If the value is <strong>{{GUID_NULL}}</strong>, the time format is 100-nanosecond units. Some media sources might support additional time format {{GUIDs}}. </p> </dd> <dd> <p>The seek position. The units for this parameter are specified by <em>pguidTimeFormat</em>.</p> </dd> <dd> <p>Receives the position of the nearest key frame that appears earlier than <em>pvarStartPosition</em>. The units for this parameter are specified by <em>pguidTimeFormat</em>.</p> </dd> <dd> <p>Receives the position of the nearest key frame that appears earlier than <em>pvarStartPosition</em>. The units for this parameter are specified by <em>pguidTimeFormat</em>.</p> </dd> <p>Controls the master volume level of the audio session associated with the streaming audio renderer ({{SAR}}) and the audio capture source.</p><p>The {{SAR}} and the audio capture source expose this interface as a service. To get a reference to the interface, call <strong>{{IMFGetService::GetService}}</strong>. For the {{SAR}}, use the service identifier {{MR_POLICY_VOLUME_SERVICE}}. For the audio capture source, use the service identifier {{MR_CAPTURE_POLICY_VOLUME_SERVICE}}. You can call <strong>GetService</strong> directly on the {{SAR}} or the audio capture source, or call it on the Media Session.</p> <p>To control the volume levels of individual channels, use the <strong>{{IMFAudioStreamVolume}}</strong> interface. The <strong>{{IMFAudioStreamVolume}}</strong> interface is supported by the {{SAR}} only.</p><p>Volume is expressed as an attenuation level, where 0.0 indicates silence and 1.0 indicates full volume (no attenuation). For each channel, the attenuation level is the product of:</p><ul> <li> <p>The master volume level of the audio session.</p> </li> <li> <p>The volume level of the channel.</p> </li> </ul><p>For example, if the master volume is 0.8 and the channel volume is 0.5, the attenuaton for that channel is 0.8 ? 0.5 = 0.4. Volume levels can exceed 1.0 (positive gain), but the audio engine clips any audio samples that exceed zero decibels. To change the volume level of individual channels, use the <strong>{{IMFAudioStreamVolume}}</strong> interface.</p><p>Use the following formula to convert the volume level to the decibel (dB) scale:</p><p> Attenuation (dB) = 20 * log10(<em>Level</em>) </p><p>For example, a volume level of 0.50 represents 6.02 dB of attenuation.</p> <p> </p><p>Sets the master volume level.</p> <p>Events outside of the application can change the master volume level. For example, the user can change the volume from the system volume-control program (SndVol). If an external event changes the master volume, the audio renderer sends an {{MEAudioSessionVolumeChanged}} event, which the Media Session forwards to the application.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_INITIALIZED}}</strong></dt> </dl> </td><td> <p>The audio renderer is not initialized.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_STREAMSINK_REMOVED}}</strong></dt> </dl> </td><td> <p>The audio renderer was removed from the pipeline.</p> </td></tr> </table><p>?</p> <dd> <p>Volume level. Volume is expressed as an attenuation level, where 0.0 indicates silence and 1.0 indicates full volume (no attenuation).</p> </dd> <p> </p><p>Retrieves the master volume level.</p> <p>If an external event changes the master volume, the audio renderer sends an {{MEAudioSessionVolumeChanged}} event, which the Media Session forwards to the application.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_INITIALIZED}}</strong></dt> </dl> </td><td> <p>The audio renderer is not initialized.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_STREAMSINK_REMOVED}}</strong></dt> </dl> </td><td> <p>The audio renderer was removed from the pipeline.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the volume level. Volume is expressed as an attenuation level, where 0.0 indicates silence and 1.0 indicates full volume (no attenuation).</p> </dd> <p> </p><p>Mutes or unmutes the audio.</p> <p>This method does not change the volume level returned by the <strong>{{IMFSimpleAudioVolume::GetMasterVolume}}</strong> function.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_INITIALIZED}}</strong></dt> </dl> </td><td> <p>The audio renderer is not initialized.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_STREAMSINK_REMOVED}}</strong></dt> </dl> </td><td> <p>The audio renderer was removed from the pipeline.</p> </td></tr> </table><p>?</p> <dd> <p>Specify <strong>{{TRUE}}</strong> to mute the audio, or <strong>{{FALSE}}</strong> to unmute the audio.</p> </dd> <p> </p><p>Queries whether the audio is muted.</p> <p>Calling <strong>{{IMFSimpleAudioVolume::SetMasterVolume}}</strong> to set the volume does not change whether the audio is muted.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_INITIALIZED}}</strong></dt> </dl> </td><td> <p>The audio renderer is not initialized.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_STREAMSINK_REMOVED}}</strong></dt> </dl> </td><td> <p>The audio renderer was removed from the pipeline.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a Boolean value. If <strong>{{TRUE}}</strong>, the audio is muted; otherwise, the audio is not muted.</p> </dd> <p>Controls the volume levels of individual audio channels.</p><p>The streaming audio renderer ({{SAR}}) exposes this interface as a service. To get a reference to the interface, call <strong>{{IMFGetService::GetService}}</strong> with the service identifier <strong>{{MR_STREAM_VOLUME_SERVICE}}</strong>. You can call <strong>GetService</strong> directly on the {{SAR}} or call it on the Media Session.</p> <p>If your application does not require channel-level volume control, you can use the <strong>{{IMFSimpleAudioVolume}}</strong> interface to control the master volume level of the audio session.</p><p>Volume is expressed as an attenuation level, where 0.0 indicates silence and 1.0 indicates full volume (no attenuation). For each channel, the attenuation level is the product of:</p><ul> <li> The master volume level of the audio session. </li> <li> The volume level of the channel. </li> </ul><p>For example, if the master volume is 0.8 and the channel volume is 0.5, the attenuation for that channel is 0.8 ? 0.5 = 0.4. Volume levels can exceed 1.0 (positive gain), but the audio engine clips any audio samples that exceed zero decibels.</p><p>Use the following formula to convert the volume level to the decibel (dB) scale:</p><p>Attenuation (dB) = 20 * log10(<em>Level</em>)</p><p>For example, a volume level of 0.50 represents 6.02 dB of attenuation.</p> <p> </p><p>Retrieves the number of channels in the audio stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of channels in the audio stream.</p> </dd> <p> </p><p>Sets the volume level for a specified channel in the audio stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of the audio channel. To get the number of channels, call <strong>{{IMFAudioStreamVolume::GetChannelCount}}</strong>.</p> </dd> <dd> <p>Volume level for the channel.</p> </dd> <p> </p><p>Retrieves the volume level for a specified channel in the audio stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of the audio channel. To get the number of channels, call <strong>{{IMFAudioStreamVolume::GetChannelCount}}</strong>.</p> </dd> <dd> <p>Receives the volume level for the channel.</p> </dd> <p> </p><p>Sets the individual volume levels for all of the channels in the audio stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Number of elements in the <em>pfVolumes</em> array. The value must equal the number of channels. To get the number of channels, call <strong>{{IMFAudioStreamVolume::GetChannelCount}}</strong>.</p> </dd> <dd> <p>Address of an array of size <em>dwCount</em>, allocated by the caller. The array specifies the volume levels for all of the channels. Before calling the method, set each element of the array to the desired volume level for the channel.</p> </dd> <p> </p><p>Retrieves the volume levels for all of the channels in the audio stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Number of elements in the <em>pfVolumes</em> array. The value must equal the number of channels. To get the number of channels, call <strong>{{IMFAudioStreamVolume::GetChannelCount}}</strong>.</p> </dd> <dd> <p>Address of an array of size <em>dwCount</em>, allocated by the caller. The method fills the array with the volume level for each channel in the stream.</p> </dd> <p>Configures the audio session that is associated with the streaming audio renderer ({{SAR}}). Use this interface to change how the audio session appears in the Windows volume control.</p><p>The {{SAR}} exposes this interface as a service. To get a reference to the interface, call <strong>{{IMFGetService::GetService}}</strong> with the service identifier {{MR_AUDIO_POLICY_SERVICE}}. You can call <strong>GetService</strong> directly on the {{SAR}} or call it on the Media Session.</p> <p> </p><p>Assigns the audio session to a group of sessions.</p> <p>If two or more audio sessions share the same group, the Windows volume control displays one slider control for the entire group. Otherwise, it displays a slider for each session. For more information, see <strong>{{IAudioSessionControl::SetGroupingParam}}</strong> in the core audio {{API}} documentation.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>A <strong>{{GUID}}</strong> that identifies the session group. Groups are application-defined. To create a new session group, assign a new {{GUID}}.</p> </dd> <p> </p><p>Retrieves the group of sessions to which this audio session belongs.</p> <p>If two or more audio sessions share the same group, the Windows volume control displays one slider control for the entire group. Otherwise, it displays a slider for each session. For more information, see <strong>{{IAudioSessionControl::SetGroupingParam}}</strong> in the core audio {{API}} documentation.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a {{GUID}} that identifies the session group.</p> </dd> <p> </p><p>Sets the display name of the audio session. The Windows volume control displays this name.</p> <p>If the application does not set a display name, Windows creates one.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>A null-terminated wide-character string that contains the display name.</p> </dd> <p> </p><p>Retrieves the display name of the audio session. The Windows volume control displays this name.</p> <p>If the application does not set a display name, Windows creates one.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the display name string. The caller must free the memory allocated for the string by calling <strong>CoTaskMemFree</strong>.</p> </dd> <p> Sets the icon resource for the audio session. The Windows volume control displays this icon. </p> <p>The icon path has the format "path,index" or "path,-id", where <em>path</em> is the fully qualified path to a {{DLL}}, executable file, or icon file; <em>index</em> is the zero-based index of the icon within the file; and <em>id</em> is a resource identifier. Note that resource identifiers are preceded by a minus sign (-) to distinguish them from indexes. The path can contain environment variables, such as "%windir%". For more information, see <strong>{{IAudioSessionControl::SetIconPath}}</strong> in the Windows {{SDK}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A wide-character string that specifies the icon. See Remarks.</p> </dd> <p> </p><p>Retrieves the icon resource for the audio session. The Windows volume control displays this icon.</p> <p>If the application did not set an icon path, the method returns an empty string ("").</p><p>For more information, see <strong>{{IAudioSessionControl::GetIconPath}}</strong> in the core audio {{API}} documentation.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to a wide-character string that specifies a shell resource. The format of the string is described in the topic <strong>{{IMFAudioPolicy::SetIconPath}}</strong>. The caller must free the memory allocated for the string by calling <strong>CoTaskMemFree</strong>.</p> </dd> <p> Callback interface to get media data from the sample-grabber sink. </p> <p>The sample-grabber sink enables an application to get data from the Media Foundation pipeline without implementing a custom media sink. To use the sample-grabber sink, the application must perform the following steps:</p><ol> <li> <p>Implement the <strong>{{IMFSampleGrabberSinkCallback}}</strong> interface.</p> </li> <li> <p>Call <strong>{{MFCreateSampleGrabberSinkActivate}}</strong>, passing in the <strong>{{IMFSampleGrabberSinkCallback}}</strong> interface reference. This function returns an <strong>{{IMFActivate}}</strong> object.</p> </li> <li> <p>Create a topology that includes an output node with the sink's <strong>{{IMFActivate}}</strong> object.</p> </li> <li> <p>Pass this topology to the Media Session.</p> </li> </ol><p>During playback, the sample-grabber sink calls methods on the application's callback.</p><p>You cannot use the sample-grabber sink to get protected content.</p> <p> </p><p>Called when the presentation clock is set on the sample-grabber sink.</p> <p>This method should return quickly, or it might interfere with playback. Do not block the thread, wait on events, or perform other lengthy operations inside this method.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the presentation clock's <strong>{{IMFPresentationClock}}</strong> interface.</p> </dd> <p> </p><p>Called when the sample-grabber sink receives a new media sample.</p> <p>If you use the sample-grabber sink in a playback topology, this method should return quickly, or it might interfere with playback. Do not block the thread, wait on events, or perform other lengthy operations inside this method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The major type that specifies the format of the data. For a list of possible values, see Major Media Types. </p> </dd> <dd> <p> Reserved. </p> </dd> <dd> <p>The presentation time for this sample, in 100-nanosecond units. If the sample does not have a presentation time, the value of this parameter is <strong>_I64_MAX</strong>.</p> </dd> <dd> <p>The duration of the sample, in 100-nanosecond units. If the sample does not have a duration, the value of this parameter is <strong>_I64_MAX</strong>.</p> </dd> <dd> <p> A reference to a buffer that contains the sample data. </p> </dd> <dd> <p> Size of the <em>pSampleBuffer</em> buffer, in bytes. </p> </dd> <p> </p><p>Called when the sample-grabber sink is shut down.</p> <p>This method is called when the sink's <strong>{{IMFMediaSink::Shutdown}}</strong> method is called.</p><p>The <strong>OnShutdown</strong> method should return quickly, or it might interfere with playback. Do not block the thread, wait on events, or perform other lengthy operations inside this method.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p>Extends the <strong>{{IMFSampleGrabberSinkCallback}}</strong> interface.</p> <p>This callback interface is used with the sample-grabber sink. It extends the <strong>{{IMFSampleGrabberSinkCallback}}</strong> interface by adding the <strong>OnProcessSampleEx</strong> method, which supersedes the <strong>{{IMFSampleGrabberSinkCallback::OnProcessSample}}</strong> method.</p><p> The <strong>OnProcessSampleEx</strong> method adds a parameter that contains the attributes for the media sample. You can use the attributes to get information about the sample, such as field dominance and telecine flags. </p><p>To use this interface, do the following: </p><ol> <li>Implement a callback object that exposes the interface.</li> <li>Create the sample-grabber sink by calling the <strong>{{MFCreateSampleGrabberSinkActivate}}</strong> function. Pass the callback reference in the <em>pIMFSampleGrabberSinkCallback</em> parameter.</li> <li>The sample-grabber sink will call <strong>QueryInterface</strong> on the callback object.</li> <li>If the callback object exposes the <strong>{{IMFSampleGrabberSinkCallback2}}</strong> interface, the sample-grabber sink will use the <strong>OnProcessSampleEx</strong> callback method. Otherwise, the sample-grabber sink will use the older <strong>OnProcessSample</strong> callback method.</li> </ol> <p>Called when the sample-grabber sink receives a new media sample.</p> <p>If you use the sample-grabber sink in a playback topology, this method should return quickly, or it might interfere with playback. Do not block the thread, wait on events, or perform other lengthy operations inside this method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The major type {{GUID}} that specifies the format of the data. For a list of possible values, see Major Media Types. </p> </dd> <dd> <p>Sample flags. The sample-grabber sink gets the value of this parameter by calling the <strong>{{IMFSample::GetSampleFlags}}</strong> method of the media sample.</p> </dd> <dd> <p>The presentation time for this sample, in 100-nanosecond units. If the sample does not have a presentation time, the value of this parameter is <strong>_I64_MAX</strong></p> </dd> <dd> <p>The duration of the sample, in 100-nanosecond units. If the sample does not have a duration, the value of this parameter is <strong>_I64_MAX</strong>.</p> </dd> <dd> <p>A reference to a buffer that contains the sample data.</p> </dd> <dd> <p>The size, in bytes, of the <em>pSampleBuffer</em> buffer.</p> </dd> <dd> <p>A reference to the <strong>{{IMFAttributes}}</strong> interface. Use this interface to get the attributes for this sample (if any). For a list of sample attributes, see Sample Attributes.</p> </dd> <p> </p><p>Completes an asynchronous request to register the topology work queues with the Multimedia Class Scheduler Service ({{MMCSS}}).</p> <p>Call this method when the <strong>{{IMFWorkQueueServices::BeginRegisterTopologyWorkQueuesWithMMCSS}}</strong> method completes asynchronously.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>{{IMFAsyncCallback::Invoke}}</strong> method.</p> </dd> <p> </p><p>Registers the topology work queues with the Multimedia Class Scheduler Service ({{MMCSS}}).</p> <p>Each source node in the topology defines one branch of the topology. The branch includes every topology node that receives data from that node. An application can assign each branch of a topology its own work queue and then associate those work queues with {{MMCSS}} tasks. </p><p>To use this method, perform the following steps.</p><ol> <li>Create the topology.</li> <li>Set the following attributes on the source nodes in the topology.<ul> <li> <strong>{{MF_TOPONODE_WORKQUEUE_ID}}</strong>. Specifies an identifier for the work queue. The Media Session will allocate a new work queue.</li> <li> <strong>{{MF_TOPONODE_WORKQUEUE_MMCSS_CLASS}}</strong>. Specifies the {{MMCSS}} class. </li> <li> <strong>{{MF_TOPONODE_WORKQUEUE_MMCSS_TASKID}}</strong>. Specifies the {{MMCSS}} task identifier (optional). If this attribute is not set, {{MMCSS}} assigns a new task identifier. </li> </ul> </li> <li>Queue the topology by calling <strong>{{IMFMediaSession::SetTopology}}</strong>.</li> <li>Wait for the {{MESessionTopologyStatus}} event with the <strong>{{MF_TOPOSTATUS_READY}}</strong> status.</li> <li>Call <strong>BeginRegisterTopologyWorkQueuesWithMMCSS</strong>. This method registers all of the topology work queues with {{MMCSS}}.</li> </ol><p>The <strong>BeginRegisterTopologyWorkQueuesWithMMCSS</strong> method is asynchronous. When the operation completes, the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method is called. Within the callback method, call <strong>{{IMFWorkQueueServices::EndRegisterTopologyWorkQueuesWithMMCSS}}</strong> to complete the asynchronous request. After this operation completes, the Media Session automatically registers the work queues for every new topology that is queued on the Media Session. The application does not need to call the method again for new topologies.</p><p>To unregister the topology work queues from {{MMCSS}}, call <strong>{{IMFWorkQueueServices::BeginUnregisterTopologyWorkQueuesWithMMCSS}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface. </p> </dd> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of a state object defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked. </p> </dd> <p> </p><p>Completes an asynchronous request to register the topology work queues with the Multimedia Class Scheduler Service ({{MMCSS}}).</p> <p>Call this method when the <strong>{{IMFWorkQueueServices::BeginRegisterTopologyWorkQueuesWithMMCSS}}</strong> method completes asynchronously.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>{{IMFAsyncCallback::Invoke}}</strong> method.</p> </dd> <p> </p><p>Unregisters the topology work queues from the Multimedia Class Scheduler Service ({{MMCSS}}).</p> <p>This method is asynchronous. When the operation completes, the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method is called. At that point, the application should call <strong>{{IMFWorkQueueServices::EndUnregisterTopologyWorkQueuesWithMMCSS}}</strong> to complete the asynchronous request.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface.</p> </dd> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.</p> </dd> <p> </p><p>Completes an asynchronous request to unregister the topology work queues from the Multimedia Class Scheduler Service ({{MMCSS}}).</p> <p>Call this method when the <strong>{{IMFWorkQueueServices::BeginRegisterTopologyWorkQueuesWithMMCSS}}</strong> method completes asynchronously.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>{{IMFAsyncCallback::Invoke}}</strong> method.</p> </dd> <p> </p><p>Retrieves the Multimedia Class Scheduler Service ({{MMCSS}}) class for a specified branch of the current topology.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>There is no work queue with the specified identifier.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_BUFFERTOOSMALL}}</strong></dt> </dl> </td><td> <p>The <em>pwszClass</em> buffer is too small to receive the class name.</p> </td></tr> </table><p>?</p> <dd> <p>Identifies the work queue assigned to this topology branch. The application defines this value by setting the <strong>{{MF_TOPONODE_WORKQUEUE_ID}}</strong> attribute on the source node for the branch.</p> </dd> <dd> <p>Pointer to a buffer that receives the name of the {{MMCSS}} class. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>On input, specifies the size of the <em>pwszClass</em> buffer, in characters. On output, receives the required size of the buffer, in characters. The size includes the terminating null character.</p> </dd> <p> </p><p>Retrieves the Multimedia Class Scheduler Service ({{MMCSS}}) task identifier for a specified branch of the current topology.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Identifies the work queue assigned to this topology branch. The application defines this value by setting the <strong>{{MF_TOPONODE_WORKQUEUE_ID}}</strong> attribute on the source node for the branch.</p> </dd> <dd> <p>Receives the task identifier.</p> </dd> <p> Associates a platform work queue with a Multimedia Class Scheduler Service ({{MMCSS}}) task. </p> <p>This method is asynchronous. When the operation completes, the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method is called. At that point, the application should call <strong>{{IMFWorkQueueServices::EndRegisterPlatformWorkQueueWithMMCSS}}</strong> to complete the asynchronous request.</p><p>To unregister the work queue from the {{MMCSS}} class, call <strong>{{IMFWorkQueueServices::BeginUnregisterPlatformWorkQueueWithMMCSS}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The platform work queue to register with {{MMCSS}}. See Work Queue Identifiers. To register all of the standard work queues to the same {{MMCSS}} task, set this parameter to <strong>{{MFASYNC_CALLBACK_QUEUE_ALL}}</strong>.</p> </dd> <dd> <p>The name of the {{MMCSS}} task to be performed. </p> </dd> <dd> <p> The unique task identifier. To obtain a new task identifier, set this value to zero. </p> </dd> <dd> <p>A reference to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface. </p> </dd> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked. </p> </dd> <p> </p><p>Completes an asynchronous request to associate a platform work queue with a Multimedia Class Scheduler Service ({{MMCSS}}) task.</p> <p>Call this function when the <strong>{{IMFWorkQueueServices::BeginRegisterPlatformWorkQueueWithMMCSS}}</strong> method completes asynchronously.</p><p>To unregister the work queue from the {{MMCSS}} class, call <strong>{{IMFWorkQueueServices::BeginUnregisterPlatformWorkQueueWithMMCSS}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>{{IMFAsyncCallback::Invoke}}</strong> method.</p> </dd> <dd> <p>The unique task identifier.</p> </dd> <p> </p><p>Unregisters a platform work queue from a Multimedia Class Scheduler Service ({{MMCSS}}) task.</p> <p>This method is asynchronous. When the operation completes, the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method is called. At that point, the application should call <strong>{{IMFWorkQueueServices::EndUnregisterPlatformWorkQueueWithMMCSS}}</strong> to complete the asynchronous request.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Platform work queue to register with {{MMCSS}}. See <strong>{{IMFWorkQueueServices::BeginRegisterPlatformWorkQueueWithMMCSS}}</strong>.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface.</p> </dd> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.</p> </dd> <p> </p><p>Completes an asynchronous request to unregister a platform work queue from a Multimedia Class Scheduler Service ({{MMCSS}}) task.</p> <p>Call this method when the <strong>{{IMFWorkQueueServices::BeginUnregisterPlatformWorkQueueWithMMCSS}}</strong> method completes asynchronously.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>{{IMFAsyncCallback::Invoke}}</strong> method.</p> </dd> <p> </p><p>Retrieves the Multimedia Class Scheduler Service ({{MMCSS}}) class for a specified platform work queue.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_BUFFERTOOSMALL}}</strong></dt> </dl> </td><td> <p>The <em>pwszClass</em> buffer is too small to receive the class name.</p> </td></tr> </table><p>?</p> <dd> <p>Platform work queue to query. See <strong>{{IMFWorkQueueServices::BeginRegisterPlatformWorkQueueWithMMCSS}}</strong>.</p> </dd> <dd> <p>Pointer to a buffer that receives the name of the {{MMCSS}} class. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>On input, specifies the size of the pwszClass buffer, in characters. On output, receives the required size of the buffer, in characters. The size includes the terminating null character.</p> </dd> <p> </p><p>Retrieves the Multimedia Class Scheduler Service ({{MMCSS}}) task identifier for a specified platform work queue.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Platform work queue to query. See <strong>{{IMFWorkQueueServices::BeginRegisterPlatformWorkQueueWithMMCSS}}</strong>.</p> </dd> <dd> <p>Receives the task identifier.</p> </dd> <p>Extends the <strong>{{IMFWorkQueueServices}}</strong> interface.</p> <p>This interface allows applications to control both platform and topology work queues.</p><p>The <strong>{{IMFWorkQueueServices}}</strong> can be obtained from the session by querying for the <strong>{{MF_WORKQUEUE_SERVICES}}</strong> service.</p> <p>Retrieves the Multimedia Class Scheduler Service ({{MMCSS}}) string associated with the given topology work queue.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The id of the topology work queue. </p> </dd> <dd> <p>Pointer to the buffer the work queue's {{MMCSS}} task id will be copied to.</p> </dd> <p>Registers a platform work queue with Multimedia Class Scheduler Service ({{MMCSS}}) using the specified class and task id.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The id of one of the standard platform work queues.</p> </dd> <dd> <p>The {{MMCSS}} class which the work queue should be registered with.</p> </dd> <dd> <p> The task id which the work queue should be registered with. If <em>dwTaskId</em> is 0, a new {{MMCSS}} bucket will be created.</p> </dd> <dd> <p>The priority.</p> </dd> <dd> <p>Standard callback used for async operations in Media Foundation.</p> </dd> <dd> <p>Standard state used for async operations in Media Foundation.</p> </dd> <p>Gets the priority of the Multimedia Class Scheduler Service ({{MMCSS}}) priority associated with the specified platform work queue.</p> <p>Pointer to a buffer allocated by the caller that the work queue's {{MMCSS}} task id will be copied to.</p> <dd> <p>Topology work queue id for which the info will be returned.</p> </dd> <dd></dd> <p> Adjusts playback quality. This interface is exposed by the quality manager. </p> <p>Media Foundation provides a default quality manager that is tuned for playback. Applications can provide a custom quality manager to the Media Session by setting the <strong>{{MF_SESSION_QUALITY_MANAGER}}</strong> attribute when creating the Media Session.</p> <p> </p><p>Called when the Media Session is about to start playing a new topology.</p> <p>In a typical quality manager this method does the following:</p><ol> <li> <p>Enumerates the nodes in the topology.</p> </li> <li> <p>Calls <strong>{{IMFTopologyNode::GetObject}}</strong> to get the node's underlying object.</p> </li> <li> <p>Queries for the <strong>{{IMFQualityAdvise}}</strong> interface.</p> </li> </ol><p>The quality manager can then use the <strong>{{IMFQualityAdvise}}</strong> references to adjust audio-video quality as needed.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFTopology}}</strong> interface of the new topology. If this parameter is <strong>{{NULL}}</strong>, the quality manager should release any references to the previous topology.</p> </dd> <p> </p><p>Called when the Media Session selects a presentation clock.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFPresentationClock}}</strong> interface of the presentation clock. If this parameter is <strong>{{NULL}}</strong>, the quality manager should release any references to the presentation clock.</p> </dd> <p> </p><p>Called when the media processor is about to deliver an input sample to a pipeline component.</p> <p>This method is called for every sample passing through every pipeline component. Therefore, the method must return quickly to avoid introducing too much latency into the pipeline.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFTopologyNode}}</strong> interface of the topology node that represents the pipeline component.</p> </dd> <dd> <p>Index of the input stream on the topology node.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFSample}}</strong> interface of the input sample.</p> </dd> <p> </p><p>Called after the media processor gets an output sample from a pipeline component.</p> <p>This method is called for every sample passing through every pipeline component. Therefore, the method must return quickly to avoid introducing too much latency into the pipeline.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFTopologyNode}}</strong> interface of the topology node that represents the pipeline component.</p> </dd> <dd> <p>Index of the output stream on the topology node.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFSample}}</strong> interface of the output sample.</p> </dd> <p> </p><p>Called when a pipeline component sends an {{MEQualityNotify}} event.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Called when the Media Session is shutting down.</p> <p>The quality manager should release all references to the Media Session when this method is called.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p>Enables the quality manager to adjust the audio or video quality of a component in the pipeline.</p><p>This interface is exposed by pipeline components that can adjust their quality. Typically it is exposed by decoders and stream sinks. For example, the enhanced video renderer ({{EVR}}) implements this interface. However, media sources can also implement this interface.</p><p>To get a reference to this interface from a media source, call <strong>{{IMFGetService::GetService}}</strong> with the service identifier {{MF_QUALITY_SERVICES}}. For all other pipeline objects (transforms and media sinks), call <strong>QueryInterface</strong>.</p> <p>The quality manager typically obtains this interface when the quality manager's <strong>{{IMFQualityManager::NotifyTopology}}</strong> method is called.</p> <p> </p><p>Sets the drop mode. In drop mode, a component drops samples, more or less aggressively depending on the level of the drop mode.</p> <p>If this method is called on a media source, the media source might switch between thinned and non-thinned output. If that occurs, the affected streams will send an {{MEStreamThinMode}} event to indicate the transition. The operation is asynchronous; after <strong>SetDropMode</strong> returns, you might receive samples that were queued before the transition. The {{MEStreamThinMode}} event marks the exact point in the stream where the transition occurs.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NO_MORE_DROP_MODES}}</strong></dt> </dl> </td><td> <p>The component does not support the specified mode or any higher modes.</p> </td></tr> </table><p>?</p> <dd> <p>Requested drop mode, specified as a member of the <strong>{{MF_QUALITY_DROP_MODE}}</strong> enumeration.</p> </dd> <p> </p><p>Sets the quality level. The quality level determines how the component consumes or produces samples.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NO_MORE_QUALITY_LEVELS}}</strong></dt> </dl> </td><td> <p>The component does not support the specified quality level or any levels below it.</p> </td></tr> </table><p>?</p> <dd> <p>Requested quality level, specified as a member of the <strong>{{MF_QUALITY_LEVEL}}</strong> enumeration.</p> </dd> <p> </p><p>Retrieves the current drop mode.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the drop mode, specified as a member of the <strong>{{MF_QUALITY_DROP_MODE}}</strong> enumeration.</p> </dd> <p> </p><p>Retrieves the current quality level.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the quality level, specified as a member of the <strong>{{MF_QUALITY_LEVEL}}</strong> enumeration.</p> </dd> <p> </p><p>Drops samples over a specified interval of time.</p> <p>Ideally the quality manager can prevent a renderer from falling behind. But if this does occur, then simply lowering quality does not guarantee the renderer will ever catch up. As a result, audio and video might fall out of sync. To correct this problem, the quality manager can call <strong>DropTime</strong> to request that the renderer drop samples quickly over a specified time interval. After that period, the renderer stops dropping samples.</p><p>This method is primarily intended for the video renderer. Dropped audio samples cause audio glitching, which is not desirable.</p><p>If a component does not support this method, it should return {{MF_E_DROPTIME_NOT_SUPPORTED}}.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_DROPTIME_NOT_SUPPORTED}}</strong></dt> </dl> </td><td> <p>The object does not support this method.</p> </td></tr> </table><p>?</p> <dd> <p>Amount of time to drop, in 100-nanosecond units. This value is always absolute. If the method is called multiple times, do not add the times from previous calls.</p> </dd> <p>Enables a pipeline object to adjust its own audio or video quality, in response to quality messages.</p> <p>This interface enables a pipeline object to respond to quality messages from the media sink. Currently, it is supported only for video decoders.</p><p>If a video decoder exposes <strong>{{IMFQualityAdvise}}</strong> but not <strong>{{IMFQualityAdvise2}}</strong>, the quality manager controls quality adjustments for the decoder. In this case, the quality manager responds to {{MEQualityNotify}} events from the Enhanced Video Renderer ({{EVR}}) by calling <strong>{{IMFQualityAdvise}}</strong> methods on the decoder.</p><p>If the decoder exposes <strong>{{IMFQualityAdvise2}}</strong>, the quality manager forwards the {{MEQualityNotify}} events to the decoder and does not adjust the decoder's quality settings. The decoder should respond to these events by adjusting its own quality settings internally.</p><p>The preceding remarks apply to the default implementation of the quality manager; custom quality managers can implement other behaviors.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>Forwards an {{MEQualityNotify}} event from the media sink.</p> <p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Queries an object for the number of <em>quality modes</em> it supports. Quality modes are used to adjust the trade-off between quality and speed when rendering audio or video.</p><p>The default presenter for the <em>enhanced video renderer</em> ({{EVR}}) implements this interface. The {{EVR}} uses the interface to respond to quality messages from the quality manager.</p> <p>Gets the maximum <em>drop mode</em>. A higher drop mode means that the object will, if needed, drop samples more aggressively to match the presentation clock.</p> <p>To get the current drop mode, call the <strong>{{IMFQualityAdvise::GetDropMode}}</strong> method. To set the drop mode, call the <strong>{{IMFQualityAdvise::SetDropMode}}</strong> method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the maximum drop mode, specified as a member of the <strong>{{MF_QUALITY_DROP_MODE}}</strong> enumeration.</p> </dd> <p>Gets the minimum quality level that is supported by the component.</p> <p>To get the current quality level, call the <strong>{{IMFQualityAdvise::GetQualityLevel}}</strong> method. To set the quality level, call the <strong>{{IMFQualityAdvise::SetQualityLevel}}</strong> method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the minimum quality level, specified as a member of the <strong>{{MF_QUALITY_LEVEL}}</strong> enumeration.</p> </dd> <p>Notifies a pipeline object to register itself with the Multimedia Class Scheduler Service ({{MMCSS}}).</p><p>Any pipeline object that creates worker threads should implement this interface.</p> <p>Media Foundation provides a mechanism for applications to associate branches in the topology with {{MMCSS}} tasks. A topology branch is defined by a source node in the topology and all of the nodes downstream from it. An application registers a topology branch with {{MMCSS}} by setting the <strong>{{MF_TOPONODE_WORKQUEUE_ID}}</strong> attribute on the source node and then calling <strong>{{IMFWorkQueueServices::BeginRegisterTopologyWorkQueuesWithMMCSS}}</strong>.</p><p>When the application registers a topology branch with {{MMCSS}}, the Media Session queries every pipeline object in that branch for the <strong>{{IMFRealTimeClient}}</strong> interface. If the object exposes the interface, the Media Session calls <strong>RegisterThreads</strong>.</p><p>When the application unregisters the topology branch, the Media Session calls <strong>UnregisterThreads</strong>.</p><p>If a pipeline object creates its own worker threads but does not implement this interface, it can cause priority inversions in the Media Foundation pipeline, because high-priority processing threads might be blocked while waiting for the component to process data on a thread with lower priority.</p><p>Pipeline objects that do not create worker threads do not need to implement this interface.</p><p>In Windows?8, this interface is extended with <strong>{{IMFRealTimeClientEx}}</strong>.</p> <p>Notifies the object to register its worker threads with the Multimedia Class Scheduler Service ({{MMCSS}}).</p> <p> The object's worker threads should register themselves with {{MMCSS}} by calling <strong>AvSetMmThreadCharacteristics</strong>, using the task name and identifier specified in this method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The {{MMCSS}} task identifier. </p> </dd> <dd> <p>The name of the {{MMCSS}} task. </p> </dd> <p> Notifies the object to unregister its worker threads from the Multimedia Class Scheduler Service ({{MMCSS}}). </p> <p>The object's worker threads should unregister themselves from {{MMCSS}} by calling <strong>AvRevertMmThreadCharacteristics</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Specifies the work queue for the topology branch that contains this object.</p> <p> An application can register a branch of the topology to use a private work queue. The Media Session notifies any pipeline object that supports <strong>{{IMFRealTimeClient}}</strong> by calling <strong>SetWorkQueue</strong> with the application's work queue identifier. </p><p>When the application unregisters the topology branch, the Media Session calls <strong>SetWorkQueue</strong> again with the value <strong>{{MFASYNC_CALLBACK_QUEUE_UNDEFINED}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The identifier of the work queue, or the value <strong>{{MFASYNC_CALLBACK_QUEUE_UNDEFINED}}</strong>. See Remarks. </p> </dd> <p>Notifies a pipeline object to register itself with the Multimedia Class Scheduler Service ({{MMCSS}}). </p><p>This interface is a replacement for the <strong>{{IMFRealTimeClient}}</strong> interface.</p> <p>Notifies the object to register its worker threads with the Multimedia Class Scheduler Service ({{MMCSS}}).</p> <p>If the object does not create worker threads, the method should simply return {{S_OK}} and take no further action. </p><p>Otherwise, if the value of <code>*pdwTaskIndex</code> is zero on input, the object should perform the following steps:</p><ol> <li>A single worker thread calls <strong>AvSetMmThreadCharacteristics</strong> to create a new {{MMCSS}} task identifier. Store this value.</li> <li>Any additional worker threads call <strong>AvSetMmThreadCharacteristics</strong> using the new task identifier.</li> <li>Return the new task identifier to the caller, by setting <code>*pdwTaskIndex</code> equal to the task identifier.</li> </ol><p>If the value of <code>*pdwTaskIndex</code> is nonzero on input, the parameter contains an existing {{MMCSS}} task identifer. In that case, all worker threads of the object should register themselves for that task by calling <strong>AvSetMmThreadCharacteristics</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{MMCSS}} task identifier. If the value is zero on input, the object should create a new {{MCCSS}} task group. See Remarks.</p> </dd> <dd> <p>The name of the {{MMCSS}} task.</p> </dd> <dd> <p>The base priority of the thread.</p> </dd> <p>Notifies the object to unregister its worker threads from the Multimedia Class Scheduler Service ({{MMCSS}}). </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Specifies the work queue that this object should use for asynchronous work items. </p> <p>The object should use the values of <em>dwMultithreadedWorkQueueId</em> and <em>lWorkItemBasePriority</em> when it queues new work items. Use the <strong>{{MFPutWorkItem2}}</strong> or <strong>{{MFPutWorkItemEx2}}</strong> function to queue the work item.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The work queue identifier.</p> </dd> <dd> <p>The base priority for work items.</p> </dd> <p>Implemented by the Sequencer Source. The sequencer source enables an application to create a sequence of topologies. To create the sequencer source, call <strong>{{MFCreateSequencerSource}}</strong>. For step-by-step instructions about how to create a playlist, see How to Create a Playlist.</p> <p> </p><p>Adds a topology to the end of the queue.</p> <p>The sequencer plays topologies in the order they are queued. You can queue as many topologies as you want to preroll.</p><p>The application must indicate to the sequencer when it has queued the last topology on the Media Session. To specify the last topology, set the SequencerTopologyFlags_Last flag in the <em>dwFlags</em> parameter when you append the topology. The sequencer uses this information to end playback with the pipeline. Otherwise, the sequencer waits indefinitely for a new topology to be queued.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></dt> </dl> </td><td> <p>The source topology node is missing one of the following attributes:</p> <ul> <li> <p> <strong>{{MF_TOPONODE_STREAM_DESCRIPTOR}}</strong> </p> </li> <li> <p> <strong>{{MF_TOPONODE_PRESENTATION_DESCRIPTOR}}</strong> </p> </li> <li> <p> <strong>{{MF_TOPONODE_SOURCE}}</strong> </p> </li> </ul> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFTopology}}</strong> interface of the topology. This reference cannot be <strong>{{NULL}}</strong>. If an application passes <strong>{{NULL}}</strong>, the call fails with an {{E_INVALIDARG}} error code.</p> </dd> <dd> <p>A combination of flags from the <strong>{{MFSequencerTopologyFlags}}</strong> enumeration.</p> </dd> <dd> <p>Receives the sequencer element identifier for this topology.</p> </dd> <p> </p><p>Deletes a topology from the queue.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The sequencer element identifier of the topology to delete.</p> </dd> <p> </p><p>Maps a presentation descriptor to its associated sequencer element identifier and the topology it represents.</p> <p>The topology returned in <em>ppTopology</em> is the original topology that the application specified in <strong>AppendTopology</strong>. The source nodes in this topology contain references to the native sources. Do not queue this topology on the Media Session. Instead, call <strong>{{IMFMediaSourceTopologyProvider::GetMediaSourceTopology}}</strong> to get the sequencer source's modified topology. The source nodes in the modified topology contain references to the sequencer source, rather than the native sources.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>The presentation descriptor is not valid.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_S_SEQUENCER_CONTEXT_CANCELED}}</strong></dt> </dl> </td><td> <p>This segment was canceled.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFPresentationDescriptor}}</strong> interface of the presentation descriptor.</p> </dd> <dd> <p>Receives the sequencer element identifier. This value is assigned by the sequencer source when the application calls <strong>{{IMFSequencerSource::AppendTopology}}</strong>. This parameter is optional and can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFTopology}}</strong> interface of the original topology that the application added to the sequencer source. The caller must release the interface. This parameter can receive the value <strong>{{NULL}}</strong> if the sequencer source has switched to the next presentation. This parameter is optional and can be <strong>{{NULL}}</strong>.</p> </dd> <p> </p><p>Updates a topology in the queue.</p> <p>This method is asynchronous. When the operation is completed, the sequencer source sends an {{MESequencerSourceTopologyUpdated}} event.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The sequencer source has been shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Sequencer element identifier of the topology to update.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFTopology}}</strong> interface of the updated topology object.</p> </dd> <p> </p><p>Updates the flags for a topology in the queue.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Sequencer element identifier of the topology to update.</p> </dd> <dd> <p>Bitwise <strong>{{OR}}</strong> of flags from the <strong>{{MFSequencerTopologyFlags}}</strong> enumeration.</p> </dd> <p>Enables an application to get a topology from the sequencer source. This interface is exposed by the sequencer source object.</p> <p> </p><p>Returns a topology for a media source that builds an internal topology.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid argument. For example, a <strong>{{NULL}}</strong> input parameter, or the presentation descriptor is not valid.</p> </td></tr> </table><p>?</p> <dd> <p>A reference to the <strong>{{IMFPresentationDescriptor}}</strong> interface of the media source's presentation descriptor. To get this reference, either call <strong>{{IMFMediaSource::CreatePresentationDescriptor}}</strong> on the media source, or get the reference from the {{MENewPresentation}} event.</p> </dd> <dd> <p>Receives a reference to the topology's <strong>{{IMFTopology}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Notifies the source when playback has reached the end of a segment. For timelines, this corresponds to reaching a mark-out point.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFPresentationDescriptor}}</strong> interface of the presentation descriptor for the segment that has ended.</p> </dd> <p> </p><p>Notifies the source when playback has reached the end of a segment. For timelines, this corresponds to reaching a mark-out point.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFPresentationDescriptor}}</strong> interface of the presentation descriptor for the segment that has ended.</p> </dd> <p>Updates the attributes of one or more nodes in the Media Session's current topology.</p><p>The Media Session exposes this interface as a service. To get a reference to the interface, call <strong>{{IMFGetService::GetService}}</strong>. The service identifier is {{MF_TOPONODE_ATTRIBUTE_EDITOR_SERVICE}}.</p> <p>Currently the only attribute that can be updated is the <strong>{{MF_TOPONODE_MEDIASTOP}}</strong> attribute.</p> <p> </p><p>Updates the attributes of one or more nodes in the current topology.</p> <p>Currently the only attribute that can be updated is the <strong>{{MF_TOPONODE_MEDIASTOP}}</strong> attribute. The method ignores any other attributes.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Reserved.</p> </dd> <dd> <p>The number of elements in the <em>pUpdates</em> array.</p> </dd> <dd> <p>Pointer to an array of <strong>{{MFTOPONODE_ATTRIBUTE_UPDATE}}</strong> structures. Each element of the array updates one attribute on a node.</p> </dd> <p> Controls how a byte stream buffers data from a network. </p><p>To get a reference to this interface, call <strong>QueryInterface</strong> on the byte stream object.</p> <p> If a byte stream implements this interface, a media source can use it to control how the byte stream buffers data. This interface is designed for byte streams that read data from a network. </p><p> A byte stream that implements this interface should also implement the <strong>{{IMFMediaEventGenerator}}</strong> interface. When the byte stream starts buffering, it sends an {{MEBufferingStarted}} event. When it stops buffering, it sends an {{MEBufferingStopped}} event. </p><p> The byte stream must send a matching {{MEBufferingStopped}} event for every {{MEBufferingStarted}} event. The byte stream must not send {{MEBufferingStarted}} events unless the media source has enabled buffering by calling <strong>EnableBuffering</strong> with the value <strong>{{TRUE}}</strong>. </p><p> After the byte stream sends an {{MEBufferingStarted}} event, it should send {{MEBufferingStopped}} if any of the following occur: </p><ul> <li> The byte stream finishes buffering data. </li> <li> The byte stream reaches the end of the stream. </li> <li> The media source calls <strong>EnableBuffering</strong> with the value <strong>{{FALSE}}</strong>. </li> <li> The media source calls <strong>StopBuffering</strong>. </li> </ul><p> The byte stream should not send any more buffering events after it reaches the end of the file. </p><p> If buffering is disabled, the byte stream does not send any buffering events. Internally, however, it might still buffer data while it waits for I/O requests to complete. Therefore, <strong>{{IMFByteStream}}</strong> methods might take an indefinite length of time to complete. </p><p> If the byte stream is buffering data internally and the media source calls <strong>EnableBuffering</strong> with the value <strong>{{TRUE}}</strong>, the byte stream can send {{MEBufferingStarted}} immediately. </p><p> After the presentation has started, the media source should forward and {{MEBufferingStarted}} and {{MEBufferingStopped}} events that it receives while started. The Media Session will pause the presentation clock while buffering is progress and restart the presentation clock when buffering completes. The media source should only forward these events while the presentation is playing. The purpose of sending these events to the Media Session is to pause the presentation time while the source buffers data. </p> <p> </p><p>Sets the buffering parameters.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to an <strong>{{MFBYTESTREAM_BUFFERING_PARAMS}}</strong> structure that contains the buffering parameters. The byte stream uses this information to calculate how much data to buffer from the network.</p> </dd> <p> </p><p>Enables or disables buffering.</p> <p>Before calling this method, call <strong>{{IMFByteStreamBuffering::SetBufferingParams}}</strong> to set the buffering parameters on the byte stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Specifies whether the byte stream buffers data. If <strong>{{TRUE}}</strong>, buffering is enabled. If <strong>{{FALSE}}</strong>, buffering is disabled.</p> </dd> <p> </p><p>Stops any buffering that is in progress.</p> <p>If the byte stream is currently buffering data, it stops and sends an {{MEBufferingStopped}} event. If the byte stream is not currently buffering, this method has no effect.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The byte stream successfully stopped buffering.</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_FALSE}}</strong></dt> </dl> </td><td> <p>No buffering was in progress.</p> </td></tr> </table><p>?</p> <p>Controls how a network byte stream transfers data to a local cache. Optionally, this interface is exposed by byte streams that read data from a network, for example, through {{HTTP}}. </p><p>To get a reference to this interface, call <strong>QueryInterface</strong> on the byte stream object.</p> <p>Stops the background transfer of data to the local cache.</p> <p>The byte stream resumes transferring data to the cache if the application does one of the following:</p><ul> <li>Reads data from the byte stream.</li> <li>Calls the byte stream's <strong>{{IMFByteStreamBuffering::EnableBuffering}}</strong> method.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Seeks a byte stream by time position.</p> <p>A byte stream can implement this interface if it supports time-based seeking. For example, a byte stream that reads data from a server might implement the interface. Typically, a local file-based byte stream would not implement it.</p><p>To get a reference to this interface, call <strong>QueryInterface</strong> on the byte stream object.</p> <p>Queries whether the byte stream supports time-based seeking.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if the byte stream supports time-based seeking, or <strong>{{FALSE}}</strong> otherwise.</p> </dd> <p>Seeks to a new position in the byte stream.</p> <p>If the byte stream reads from a server, it might cache the seek request until the next read request. Therefore, the byte stream might not send a request to the server immediately.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The new position, in 100-nanosecond units.</p> </dd> <p>Gets the result of a time-based seek.</p> <p>This method returns the server response from a previous time-based seek. </p><strong>Note</strong>??This method normally cannot be invoked until some data is read from the byte stream, because the <strong>{{IMFByteStreamTimeSeek::TimeSeek}}</strong> method does not send a server request immediately.? <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The byte stream does not support time-based seeking, or no data is available.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the new position after the seek, in 100-nanosecond units.</p> </dd> <dd> <p>Receives the stop time, in 100-nanosecond units. If the stop time is unknown, the value is zero.</p> </dd> <dd> <p>Receives the total duration of the file, in 100-nanosecond units. If the duration is unknown, the value is ?1.</p> </dd> <p>Controls how a network byte stream transfers data to a local cache. This interface extends the <strong>{{IMFByteStreamCacheControl}}</strong> interface.</p> <p>Byte streams object in Microsoft Media Foundation can optionally implement this interface. To get a reference to this interface, call <strong>QueryInterface</strong> on the byte stream object. </p> <p>Gets the ranges of bytes that are currently stored in the cache.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the number of ranges returned in the <em>ppRanges</em> array.</p> </dd> <dd> <p>Receives an array of <strong>{{MF_BYTE_STREAM_CACHE_RANGE}}</strong> structures. Each structure specifies a range of bytes stored in the cache. The caller must free the array by calling <strong>CoTaskMemFree</strong>.</p> </dd> <p>Limits the cache size.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The maximum number of bytes to store in the cache, or <strong>{{ULONGLONG_MAX}} </strong> for no limit. The default value is no limit.</p> </dd> <p>Queries whether background transfer is active.</p> <p>Background transfer might stop because the cache limit was reached (see <strong>{{IMFByteStreamCacheControl2::SetCacheLimit}}</strong>) or because the <strong>{{IMFByteStreamCacheControl::StopBackgroundTransfer}}</strong> method was called.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if background transfer is currently active, or <strong>{{FALSE}}</strong> otherwise.</p> </dd> <p> </p><p>Retrieves the user name.</p> <p>If the user name is not available, the method might succeed and set *<em>pcbData</em> to zero.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to a buffer that receives the user name. To find the required buffer size, set this parameter to <strong>{{NULL}}</strong>. If <em>fEncryptData</em> is <strong>{{FALSE}}</strong>, the buffer contains a wide-character string. Otherwise, the buffer contains encrypted data.</p> </dd> <dd> <p>On input, specifies the size of the <em>pbData</em> buffer, in bytes. On output, receives the required buffer size. If <em>fEncryptData</em> is <strong>{{FALSE}}</strong>, the size includes the terminating null character.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, the method returns an encrypted string. Otherwise, the method returns an unencrypted string.</p> </dd> <p> </p><p>Sets the user name.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to a buffer that contains the user name. If <em>fDataIsEncrypted</em> is <strong>{{FALSE}}</strong>, the buffer is a wide-character string. Otherwise, the buffer contains encrypted data.</p> </dd> <dd> <p>Size of <em>pbData</em>, in bytes. If <em>fDataIsEncrypted</em> is <strong>{{FALSE}}</strong>, the size includes the terminating null character.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, the user name is encrypted. Otherwise, the user name is not encrypted.</p> </dd> <p> </p><p>Sets the password.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to a buffer that contains the password. If <em>fDataIsEncrypted</em> is <strong>{{FALSE}}</strong>, the buffer is a wide-character string. Otherwise, the buffer contains encrypted data.</p> </dd> <dd> <p>Size of <em>pbData</em>, in bytes. If <em>fDataIsEncrypted</em> is <strong>{{FALSE}}</strong>, the size includes the terminating null character.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, the password is encrypted. Otherwise, the password is not encrypted.</p> </dd> <p> </p><p>Retrieves the user name.</p> <p>If the user name is not available, the method might succeed and set *<em>pcbData</em> to zero.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to a buffer that receives the user name. To find the required buffer size, set this parameter to <strong>{{NULL}}</strong>. If <em>fEncryptData</em> is <strong>{{FALSE}}</strong>, the buffer contains a wide-character string. Otherwise, the buffer contains encrypted data.</p> </dd> <dd> <p>On input, specifies the size of the <em>pbData</em> buffer, in bytes. On output, receives the required buffer size. If <em>fEncryptData</em> is <strong>{{FALSE}}</strong>, the size includes the terminating null character.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, the method returns an encrypted string. Otherwise, the method returns an unencrypted string.</p> </dd> <p> </p><p>Retrieves the password.</p> <p>If the password is not available, the method might succeed and set *<em>pcbData</em> to zero.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to a buffer that receives the password. To find the required buffer size, set this parameter to <strong>{{NULL}}</strong>. If <em>fEncryptData</em> is <strong>{{FALSE}}</strong>, the buffer contains a wide-character string. Otherwise, the buffer contains encrypted data.</p> </dd> <dd> <p>On input, specifies the size of the <em>pbData</em> buffer, in bytes. On output, receives the required buffer size. If <em>fEncryptData</em> is <strong>{{FALSE}}</strong>, the size includes the terminating null character.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, the method returns an encrypted string. Otherwise, the method returns an unencrypted string.</p> </dd> <p> </p><p>Queries whether logged-on credentials should be used.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a Boolean value. If logged-on credentials should be used, the value is <strong>{{TRUE}}</strong>. Otherwise, the value is <strong>{{FALSE}}</strong>.</p> </dd> <p>Implemented by applications to provide user credentials for a network source.</p><p>To use this interface, implement it in your application. Then create a property store object and set the <strong>{{MFNETSOURCE_CREDENTIAL_MANAGER}}</strong> property. The value of the property is a reference to your application's <strong>{{IMFNetCredentialManager}}</strong> interface. Then pass the property store to one of the source resolver's creation functions, such as <strong>{{IMFSourceResolver::CreateObjectFromURL}}</strong>, in the <em>pProps</em> parameter.</p><p>Media Foundation does not provide a default implementation of this interface. Applications that support authentication must implement this interface.</p> <p> </p><p>Begins an asynchronous request to retrieve the user's credentials.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to an <strong>{{MFNetCredentialManagerGetParam}}</strong> structure.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface.</p> </dd> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. The object is returned to the caller when the callback is invoked.</p> </dd> <p> </p><p>Completes an asynchronous request to retrieve the user's credentials.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to an <strong>{{IMFAsyncResult}}</strong> interface that contains the asynchronous result.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFNetCredential}}</strong> interface, which is used to retrieve the credentials. The caller must release the interface.</p> </dd> <p> </p><p>Specifies whether the user's credentials succeeded in the authentication challenge. The network source calls this method to informs the application whether the user's credentials were authenticated.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFNetCredential}}</strong> interface.</p> </dd> <dd> <p>Boolean value. The value is <strong>{{TRUE}}</strong> if the credentials succeeded in the authentication challenge. Otherwise, the value is <strong>{{FALSE}}</strong>.</p> </dd> <p>Gets credentials from the credential cache.</p><p>This interface is implemented by the credential cache object. Applications that implement the <strong>{{IMFNetCredentialManager}}</strong> interface can use this object to store the user's credentials. To create the credential cache object, call <strong>{{MFCreateCredentialCache}}</strong>.</p> <p> </p><p>Retrieves the credential object for the specified {{URL}}.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>A null-terminated wide-character string containing the {{URL}} for which the credential is needed.</p> </dd> <dd> <p>A null-terminated wide-character string containing the realm for the authentication.</p> </dd> <dd> <p>Bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MFNetAuthenticationFlags}}</strong> enumeration.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFNetCredential}}</strong> interface. The caller must release the interface.</p> </dd> <dd> <p>Receives a bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MFNetCredentialRequirements}}</strong> enumeration.</p> </dd> <p> </p><p>Reports whether the credential object provided successfully passed the authentication challenge.</p> <p>This method is called by the network source into the credential manager.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFNetCredential}}</strong> interface.</p> </dd> <dd> <p><strong>{{TRUE}}</strong> if the credential object succeeded in the authentication challenge; otherwise, <strong>{{FALSE}}</strong>.</p> </dd> <p> </p><p>Specifies how user credentials are stored.</p> <p>If no flags are specified, the credentials are cached in memory. This method can be implemented by the credential manager and called by the network source.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFNetCredential}}</strong> interface. Obtain this reference by calling <strong>{{IMFNetCredentialCache::GetCredential}}</strong>.</p> </dd> <dd> <p>Bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MFNetCredentialOptions}}</strong> enumeration.</p> </dd> <p>Implemented by a client and called by Microsoft Media Foundation to get the client Secure Sockets Layer ({{SSL}}) certificate requested by the server. </p><p>In most {{HTTPS}} connections the server provides a certificate so that the client can ensure the identity of the server. However, in certain cases the server might wants to verify the identity of the client by requesting the client to send a certificate. For this scenario, a client application must provide a mechanism for Media Foundation to retrieve the client side certificate while opening an {{HTTPS}} {{URL}} with the source resolver or the scheme handler. The application must implement <strong>{{IMFSSLCertificateManager}}</strong>, set the <strong>{{IUnknown}}</strong> reference of the implemented object in the {{MFNETSOURCE_SSLCERTIFICATE_MANAGER}} property, and pass the property store to the source resolver. While opening the {{URL}}, Media Foundation calls the <strong>{{IMFSSLCertificateManager}}</strong> methods to get the certificate information. If the application needs to connect to {{HTTPS}} {{URL}} that requires a client-side certificate, or the application wants customized control over the type of server certificates to accept, then they can implement this interface. This interface can also be used by the application to validate the server {{SSL}} certificate.</p><p>If the <strong>{{IUnknown}}</strong> reference is not provided by the application and the {{HTTPS}} {{URL}} does not require the client to provide a certificate, Media Foundation uses the default implementation to open the {{URL}}. </p> <p>Gets the client {{SSL}} certificate synchronously.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to a string that contains the {{URL}} for which a client-side {{SSL}} certificate is required. Media Foundation can resolve the scheme and send the request to the server.</p> </dd> <dd> <p>Pointer to the buffer that stores the certificate. This caller must free the buffer by calling <strong>CoTaskMemFree</strong>.</p> </dd> <dd> <p>Pointer to a <strong>{{DWORD}}</strong> variable that receives the number of bytes required to hold the certificate data in the buffer pointed by <em>*ppbData</em>.</p> </dd> <p>Starts an asynchronous call to get the client {{SSL}} certificate.</p> <p>When the operation completes, the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method is called. At that point, the application should call <strong>{{IMFSSLCertificateManager::EndGetClientCertificate}}</strong> to complete the asynchronous request. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A null-terminated string that contains the {{URL}} for which a client-side {{SSL}} certificate is required. Media Foundation can resolve the scheme and send the request to the server.</p> </dd> <dd> <p>A reference to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface.</p> </dd> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked. </p> </dd> <p>Completes an asynchronous request to get the client {{SSL}} certificate. </p> <p>Call this method after the <strong>{{IMFSSLCertificateManager::BeginGetClientCertificate}}</strong> method completes asynchronously. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>{{IMFAsyncCallback::Invoke}}</strong> method. </p> </dd> <dd> <p>Receives a reference to the buffer that stores the certificate. The caller must free the buffer by calling <strong>CoTaskMemFree</strong>.</p> </dd> <dd> <p>Receives the size of the <em>ppbData</em> buffer, in bytes.</p> </dd> <p>Indicates whether the server {{SSL}} certificate must be verified by the caller, Media Foundation, or the <strong>{{IMFSSLCertificateManager}}</strong> implementation class.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Pointer to a string that contains the {{URL}} that is sent to the server.</p> </dd> <dd> <p>Pointer to a <strong>{{BOOL}}</strong> value. Set to <strong>{{TRUE}}</strong> if <strong>{{IMFSSLCertificateManager::OnServerCertificate}}</strong> is used to verify the server certificate. Set to <strong>{{FALSE}}</strong> if Media Foundation verifies the server certificate by using the certificates in the Windows certificate store. </p> </dd> <dd> <p>Pointer to a <strong>{{BOOL}}</strong> value. Set to <strong>{{TRUE}}</strong> if the {{SSL}} certificate for the client is available for immediate retrieval. Media Foundation calls <strong>{{IMFSSLCertificateManager::GetClientCertificate}}</strong> to obtain the client certificate synchronously. If the value is set to <strong>{{FALSE}}</strong>, Media Foundation obtains the client {{SSL}} certificate with an asynchronous call to <strong>{{IMFSSLCertificateManager::BeginGetClientCertificate}}</strong>.</p> </dd> <p>Called by Media Foundation when the server {{SSL}} certificate has been received; indicates whether the server certificate is accepted.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to a string that contains the {{URL}} used to send the request to the server, and for which a server-side {{SSL}} certificate has been received.</p> </dd> <dd> <p>Pointer to a buffer that contains the server {{SSL}} certificate.</p> </dd> <dd> <p>Pointer to a <strong>{{DWORD}}</strong> variable that indicates the size of <em>pbData</em> in bytes.</p> </dd> <dd> <p>Pointer to a <strong>{{BOOL}}</strong> variable that indicates whether the certificate is accepted.</p> </dd> <p>Notifies the application when a byte stream requests a {{URL}}, and enables the application to block {{URL}} redirection.</p> <p>To set the callback interface:</p><ol> <li>Query the byte stream object for the <strong>{{IMFAttributes}}</strong> interface.</li> <li>Call <strong>{{IMFAttributes::SetUnknown}}</strong> to set the {{MFNETSOURCE_RESOURCE_FILTER}} attribute.</li> </ol> <p>Called when the byte stream redirects to a {{URL}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{URL}} to which the connection has been redirected.</p> </dd> <dd> <p>To cancel the redirection, set this parameter to <strong>{{VARIANT_TRUE}}</strong>. To allow the redirection, set this parameter to <strong>{{VARIANT_FALSE}}</strong>.</p> </dd> <p>Called when the byte stream requests a {{URL}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{URL}} that the byte stream is requesting.</p> </dd> <p>Callback interface to receive notifications from a network source on the progress of an asynchronous open operation.</p> <p> </p><p>Called by the network source when the open operation begins or ends.</p> <p>The networks source calls this method with the following event types.</p><ul> <li> <p> {{MEConnectStart}} </p> </li> <li> <p> {{MEConnectEnd}} </p> </li> </ul><p>For more information, see How to Get Events from the Network Source.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFMediaEvent}}</strong> interface.</p> </dd> <p>Determines the proxy to use when connecting to a server. The network source uses this interface.</p><p>Applications can create the proxy locator configured by the application by implementing the <strong>{{IMFNetProxyLocatorFactory}}</strong> interface and setting the <strong>{{MFNETSOURCE_PROXYLOCATORFACTORY}}</strong> property on the source resolver. Otherwise, the network source uses the default Media Foundation implementation.</p><p>To create the default proxy locator, call <strong>{{MFCreateProxyLocator}}</strong>.</p> <p> </p><p>Initializes the proxy locator object.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Null-terminated wide-character string containing the hostname of the destination server.</p> </dd> <dd> <p>Null-terminated wide-character string containing the destination {{URL}}.</p> </dd> <dd> <p>Reserved. Set to <strong>{{FALSE}}</strong>.</p> </dd> <p> </p><p>Determines the next proxy to use.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_FALSE}}</strong></dt> </dl> </td><td> <p>There are no more proxy objects.</p> </td></tr> </table><p>?</p> <p> </p><p>Keeps a record of the success or failure of using the current proxy.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p><strong>{{HRESULT}}</strong> specifying the result of using the current proxy for connection.</p> </dd> <p> </p><p>Retrieves the current proxy information including hostname and port.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOT_SUFFICIENT_BUFFER}}</strong></dt> </dl> </td><td> <p>The buffer specified in <em>pszStr</em> is too small.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to a buffer that receives a null-terminated string containing the proxy hostname and port. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>On input, specifies the number of elements in the <em>pszStr</em> array. On output, receives the required size of the buffer.</p> </dd> <p> </p><p>Creates a new instance of the default proxy locator.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the new proxy locator object's <strong>{{IMFNetProxyLocator}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Creates an <strong>{{IMFNetProxyLocator}}</strong> interface proxy locator object based on the protocol name.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Creates an <strong>{{IMFNetProxyLocator}}</strong> interface proxy locator object based on the protocol name.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p>Persists media data from a source byte stream to an application-provided byte stream.</p><p>The byte stream used for {{HTTP}} download implements this interface. To get a reference to this interface, call <strong>{{IMFGetService::GetService}}</strong> on the byte stream, with the service identifier {{MFNET_SAVEJOB_SERVICE}}.</p> <p> </p><p>Begins saving a Windows Media file to the application's byte stream.</p> <p>When the operation completes, the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method is called. At that point, the application should call <strong>{{IMFSaveJob::EndSave}}</strong> to complete the asynchronous request.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFByteStream}}</strong> interface of the application's byte stream. The data from the source byte stream is written to this byte stream.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface</p> </dd> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.</p> </dd> <p> </p><p>Completes the operation started by <strong>{{IMFSaveJob::BeginSave}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Cancels the operation started by <strong>{{IMFSaveJob::BeginSave}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Retrieves the percentage of content saved to the provided byte stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the percentage of completion.</p> </dd> <p> </p><p>Retrieves the number of protocols supported by the network scheme plug-in.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of protocols.</p> </dd> <p> </p><p>Retrieves the number of protocols supported by the network scheme plug-in.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of protocols.</p> </dd> <p> </p><p>Retrieves a supported protocol by index</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>The value passed in the <em>nProtocolIndex</em> parameter was greater than the total number of supported protocols, returned by <strong>GetNumberOfSupportedProtocols</strong>.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of the protocol to retrieve. To get the number of supported protocols, call <strong>{{IMFNetSchemeHandlerConfig::GetNumberOfSupportedProtocols}}</strong>.</p> </dd> <dd> <p>Receives a member of the <strong>{{MFNETSOURCE_PROTOCOL_TYPE}}</strong> enumeration.</p> </dd> <p> </p><p>Not implemented in this release.</p> <p>This method returns {{S_OK}}.</p> <p> </p><p>Begins an asynchronous request to create an object from a {{URL}}.</p><p>When the Source Resolver creates a media source from a {{URL}}, it passes the request to a scheme handler. The scheme handler might create a media source directly from the {{URL}}, or it might return a byte stream. If it returns a byte stream, the source resolver use a byte-stream handler to create the media source from the byte stream.</p> <p>The <em>dwFlags</em> parameter must contain the <strong>{{MF_RESOLUTION_MEDIASOURCE}}</strong> flag or the <strong>{{MF_RESOLUTION_BYTESTREAM}}</strong> flag. If the <strong>{{MF_RESOLUTION_MEDIASOURCE}}</strong> flag is set, the scheme handler might create the media source directly from the {{URL}}, or it might create a byte stream. The type of object is returned in the <em>pObjectType</em> parameter of the <strong>{{IMFSchemeHandler::EndCreateObject}}</strong> method. If the scheme handler returns a byte stream, the source resolver will pass the byte stream to a byte-stream handler, which will create the media source from the byte stream.</p><p>If the <strong>{{MF_RESOLUTION_BYTESTREAM}}</strong> flag is set, the scheme handler will attempt to create a byte stream from the {{URL}}. However, if the scheme handler is designed to create a media source directly, rather than a byte stream, the method will fail.</p><p>The following table summarizes the behavior of these two flags when passed to this method:</p><table> <tr><th>Flag</th><th>Object created</th></tr> <tr><td><strong>{{MF_RESOLUTION_MEDIASOURCE}}</strong></td><td>Media source or byte stream</td></tr> <tr><td><strong>{{MF_RESOLUTION_BYTESTREAM}}</strong></td><td>Byte stream</td></tr> </table><p>?</p><p>The <strong>{{MF_RESOLUTION_MEDIASOURCE}}</strong> and <strong>{{MF_RESOLUTION_BYTESTREAM}}</strong> flags can be combined, although in this case it is redundant.</p><p>When the operation completes, the scheme handler calls the <strong>{{IMFAsyncCallback::Invoke}}</strong> method. The Invoke method should call <strong>{{IMFSchemeHandler::EndCreateObject}}</strong> to get a reference to the created object.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_ACCESSDENIED}}</strong></dt> </dl> </td><td> <p> Cannot open the {{URL}} with the requested access (read or write). </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_BYTESTREAM_TYPE}}</strong></dt> </dl> </td><td> <p> Unsupported byte stream type. </p> </td></tr> </table><p>?</p> <p> </p><p>Begins an asynchronous request to create an object from a {{URL}}.</p><p>When the Source Resolver creates a media source from a {{URL}}, it passes the request to a scheme handler. The scheme handler might create a media source directly from the {{URL}}, or it might return a byte stream. If it returns a byte stream, the source resolver use a byte-stream handler to create the media source from the byte stream.</p> <p>The <em>dwFlags</em> parameter must contain the <strong>{{MF_RESOLUTION_MEDIASOURCE}}</strong> flag or the <strong>{{MF_RESOLUTION_BYTESTREAM}}</strong> flag. If the <strong>{{MF_RESOLUTION_MEDIASOURCE}}</strong> flag is set, the scheme handler might create the media source directly from the {{URL}}, or it might create a byte stream. The type of object is returned in the <em>pObjectType</em> parameter of the <strong>{{IMFSchemeHandler::EndCreateObject}}</strong> method. If the scheme handler returns a byte stream, the source resolver will pass the byte stream to a byte-stream handler, which will create the media source from the byte stream.</p><p>If the <strong>{{MF_RESOLUTION_BYTESTREAM}}</strong> flag is set, the scheme handler will attempt to create a byte stream from the {{URL}}. However, if the scheme handler is designed to create a media source directly, rather than a byte stream, the method will fail.</p><p>The following table summarizes the behavior of these two flags when passed to this method:</p><table> <tr><th>Flag</th><th>Object created</th></tr> <tr><td><strong>{{MF_RESOLUTION_MEDIASOURCE}}</strong></td><td>Media source or byte stream</td></tr> <tr><td><strong>{{MF_RESOLUTION_BYTESTREAM}}</strong></td><td>Byte stream</td></tr> </table><p>?</p><p>The <strong>{{MF_RESOLUTION_MEDIASOURCE}}</strong> and <strong>{{MF_RESOLUTION_BYTESTREAM}}</strong> flags can be combined, although in this case it is redundant.</p><p>When the operation completes, the scheme handler calls the <strong>{{IMFAsyncCallback::Invoke}}</strong> method. The Invoke method should call <strong>{{IMFSchemeHandler::EndCreateObject}}</strong> to get a reference to the created object.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_ACCESSDENIED}}</strong></dt> </dl> </td><td> <p> Cannot open the {{URL}} with the requested access (read or write). </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_BYTESTREAM_TYPE}}</strong></dt> </dl> </td><td> <p> Unsupported byte stream type. </p> </td></tr> </table><p>?</p> <p> </p><p>Completes an asynchronous request to create an object from a {{URL}}.</p> <p>Call this method from inside the <strong>{{IMFAsyncCallback::Invoke}}</strong> method.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_ABORT}}</strong></dt> </dl> </td><td> <p>The operation was canceled.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the Invoke method.</p> </dd> <dd> <p>Receives a member of the <strong>{{MF_OBJECT_TYPE}}</strong> enumeration, specifying the type of object that was created.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IUnknown}}</strong> interface of the object. The caller must release the interface.</p> </dd> <p> </p><p>Cancels the current request to create an object from a {{URL}}.</p> <p>You can use this method to cancel a previous call to <strong>BeginCreateObject</strong>. Because that method is asynchronous, however, it might be completed before the operation can be canceled. Therefore, your callback might still be invoked after you call this method.</p><p>The operation cannot be canceled if <strong>BeginCreateObject</strong> returns <strong>{{NULL}}</strong> in the <em>ppIUnknownCancelCookie</em> parameter.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface that was returned in the <em>ppIUnknownCancelCookie</em> parameter of the <strong>{{IMFSchemeHandler::BeginCreateObject}}</strong> method.</p> </dd> <p> Creates a media source from a byte stream. </p> <p>Applications do not use this interface directly. This interface is exposed by byte-stream handlers, which are used by the source resolver. When the byte-stream handler is given a byte stream, it parses the stream and creates a media source. Byte-stream handlers are registered by file name extension or {{MIME}} type.</p> <p> </p><p>Begins an asynchronous request to create a media source from a byte stream.</p> <p>The <em>dwFlags</em> parameter must contain the {{MF_RESOLUTION_MEDIASOURCE}} flag and should not contain the {{MF_RESOLUTION_BYTESTREAM}} flag.</p><p>The byte-stream handler is responsible for parsing the stream and validating the contents. If the stream is not valid or the byte stream handler cannot parse the stream, the handler should return a failure code. The byte stream is not guaranteed to match the type of stream that the byte handler is designed to parse.</p><p>If the <em>pwszURL</em> parameter is not <strong>{{NULL}}</strong>, the byte-stream handler might use the {{URL}} during the resolution process. (For example, it might use the file name extension, if present.) Also, the byte stream might contain the <strong>{{MF_BYTESTREAM_CONTENT_TYPE}}</strong> attribute, specifying the {{MIME}} type.</p><p>When the operation completes, the byte-stream handler calls the <strong>{{IMFAsyncCallback::Invoke}}</strong> method. The <strong>Invoke</strong> method should call <strong>{{IMFByteStreamHandler::EndCreateObject}}</strong> to get a reference to the media source.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_CANNOT_PARSE_BYTESTREAM}}</strong></dt> </dl> </td><td> <p>Unable to parse the byte stream.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the byte stream's <strong>{{IMFByteStream}}</strong> interface.</p> </dd> <dd> <p>String that contains the original {{URL}} of the byte stream. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Bitwise {{OR}} of zero or more flags. See <strong>Source Resolver Flags</strong>.</p> </dd> <dd> <p>Pointer to the <strong>{{IPropertyStore}}</strong> interface of a property store. The byte-stream handler can use this property store to configure the object. This parameter can be <strong>{{NULL}}</strong>. For more information, see Configuring a Media Source.</p> </dd> <dd> <p>Receives an <strong>{{IUnknown}}</strong> reference or the value <strong>{{NULL}}</strong>. If the value is not <strong>{{NULL}}</strong>, you can cancel the asynchronous operation by passing this reference to the <strong>{{IMFByteStreamHandler::CancelObjectCreation}}</strong> method. The caller must release the interface. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface.</p> </dd> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.</p> </dd> <p> </p><p>Completes an asynchronous request to create a media source.</p> <p>Call this method from inside the <strong>{{IMFAsyncCallback::Invoke}}</strong> method.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_ABORT}}</strong></dt> </dl> </td><td> <p>The operation was canceled. See <strong>{{IMFByteStreamHandler::CancelObjectCreation}}</strong>.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_CANNOT_PARSE_BYTESTREAM}}</strong></dt> </dl> </td><td> <p>Unable to parse the byte stream.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>Invoke</strong> method.</p> </dd> <dd> <p>Receives a member of the <strong>{{MF_OBJECT_TYPE}}</strong> enumeration, specifying the type of object that was created.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IUnknown}}</strong> interface of the media source. The caller must release the interface.</p> </dd> <p> </p><p>Cancels the current request to create a media source.</p> <p>You can use this method to cancel a previous call to <strong>BeginCreateObject</strong>. Because that method is asynchronous, however, it might be completed before the operation can be canceled. Therefore, your callback might still be invoked after you call this method.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface that was returned in the <em>ppIUnknownCancelCookie</em> parameter of the <strong>{{IMFByteStreamHandler::BeginCreateObject}}</strong> method.</p> </dd> <p> </p><p>Retrieves the maximum number of bytes needed to create the media source or determine that the byte stream handler cannot parse this stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the maximum number of bytes that are required.</p> </dd> <p> Implemented by components that provide input trust authorities ({{ITAs}}). This interface is used to get the {{ITA}} for each of the component's streams. </p> <p> </p><p>Retrieves the input trust authority ({{ITA}}) for a specified stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOINTERFACE}}</strong></dt> </dl> </td><td> <p>The {{ITA}} does not expose the requested interface.</p> </td></tr> </table><p>?</p> <dd> <p>The stream identifier for which the {{ITA}} is being requested.</p> </dd> <dd> <p>The interface identifier ({{IID}}) of the interface being requested. Currently the only supported value is {{IID_IMFInputTrustAuthority}}.</p> </dd> <dd> <p>Receives a reference to the {{ITA}}'s <strong>{{IUnknown}}</strong> interface. The caller must release the interface.</p> </dd> <p>Enables other components in the protected media path ({{PMP}}) to use the input protection system provided by an input trust authorities ({{ITA}}). An {{ITA}} is a component that implements an input protection system for media content. {{ITAs}} expose the <strong>{{IMFInputTrustAuthority}}</strong> interface.</p><p>An {{ITA}} translates policy from the content's native format into a common format that is used by other {{PMP}} components. It also provides a decrypter, if one is needed to decrypt the stream.</p><p>The topology contains one {{ITA}} instance for every protected stream in the media source. The {{ITA}} is obtained from the media source by calling <strong>{{IMFTrustedInput::GetInputTrustAuthority}}</strong>.</p> <p> </p><p>Retrieves a decrypter transform.</p> <p>The decrypter should be created in a disabled state, where any calls to <strong>{{IMFTransform::ProcessOutput}}</strong> automatically fail. After the input trust authority ({{ITA}}) has verified that it is running inside the protected media path ({{PMP}}), the {{ITA}} should enable the decrypter.</p><p>An {{ITA}} is not required to provide a decrypter. If the source content is not encrypted, the method should return {{MF_E_NOT_PROTECTED}}. The {{PMP}} will then proceed without using a decrypter for that stream.</p><p>The {{ITA}} must create a new instance of its decrypter for each call to <strong>GetDecrypter</strong>. Do not return multiple references to the same decrypter. They must be separate instances because the Media Session might place them in two different branches of the topology.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOINTERFACE}}</strong></dt> </dl> </td><td> <p>The decrypter does not support the requested interface.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_PROTECTED}}</strong></dt> </dl> </td><td> <p>This input trust authority ({{ITA}}) does not provide a decrypter.</p> </td></tr> </table><p>?</p> <dd> <p>Interface identifier ({{IID}}) of the interface being requested. Currently this value must be {{IID_IMFTransform}}, which requests the <strong>{{IMFTransform}}</strong> interface.</p> </dd> <dd> <p>Receives a reference to the interface. The caller must release the interface.</p> </dd> <p> </p><p>Requests permission to perform a specified action on the stream.</p> <p>This method verifies whether the user has permission to perform a specified action on the stream. The {{ITA}} does any work needed to verify the user's right to perform the action, such as checking licenses.</p><p>To verify the user's rights, the {{ITA}} might need to perform additional steps that require interaction with the user or consent from the user. For example, it might need to acquire a new license or individualize a {{DRM}} component. In that case, the {{ITA}} creates an activation object for a content enabler and returns the activation object's <strong>{{IMFActivate}}</strong> interface in the <em>ppContentEnablerActivate</em> parameter. The activation object is responsible for creating a content enabler that exposes the <strong>{{IMFContentEnabler}}</strong> interface. The content enabler is used as follows:</p><ol> <li> <p>The Media Session returns the <strong>{{IMFActivate}}</strong> reference to the application.</p> </li> <li> <p>The application calls <strong>{{IMFActivate::ActivateObject}}</strong> to activate the content enabler.</p> </li> <li> <p>The application calls <strong>{{IMFContentEnabler}}</strong> methods to perform whatever actions are needed, such as individualization or obtaining a license. The content enabler object must encapsulate this functionality through the <strong>{{IMFContentEnabler}}</strong> interface.</p> </li> <li> <p>The Media Session calls <strong>RequestAccess</strong> again.</p> </li> </ol><p>The return value signals whether the user has permission to perform the action:</p><ul> <li> <p>If the user already has permission to perform the action, the method returns {{S_OK}} and sets *<em>ppContentEnablerActivate</em> to <strong>{{NULL}}</strong>.</p> </li> <li> <p>If the user does not have permission, the method returns a failure code and sets *<em>ppContentEnablerActivate</em> to <strong>{{NULL}}</strong>.</p> </li> <li> <p>If the {{ITA}} must perform additional steps that require interaction with the user, the method returns a failure code and returns the content enabler's <strong>{{IMFActivate}}</strong> reference in <em>ppContentEnablerActivate</em>.</p> </li> </ul><p>The Media Session will not allow the action unless this method returns {{S_OK}}. However, a return value of {{S_OK}} does not guarantee that the action will be performed, because some other failure might occur after this method is called. When the action is definitely about to happen, the Media Session calls <strong>{{IMFInputTrustAuthority::BindAccess}}</strong>.</p><p>A stream can go to multiple outputs, so this method might be called multiple times with different actions, once for every output.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The user has permission to perform this action.</p> </td></tr> <tr><td> <dl> <dt><strong>{{NS_E_DRM_NEEDS_INDIVIDUALIZATION}}</strong></dt> </dl> </td><td> <p>The user must individualize the application.</p> </td></tr> <tr><td> <dl> <dt><strong>{{NS_E_LICENSE_REQUIRED}}</strong></dt> </dl> </td><td> <p>The user must obtain a license.</p> </td></tr> </table><p>?</p> <dd> <p>The requested action, specified as a member of the <strong>{{MFPOLICYMANAGER_ACTION}}</strong> enumeration.</p> </dd> <dd> <p>Receives the value <strong>{{NULL}}</strong> or a reference to the <strong>{{IMFActivate}}</strong> interface. The <strong>{{IMFActivate}}</strong> interface is used to create a content enabler object. The caller must release the interface. For more information, see Remarks.</p> </dd> <p> </p><p>Retrieves the policy that defines which output protection systems are allowed for this stream, and the configuration data for each protection system.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The action that will be performed on this stream, specified as a member of the <strong>{{MFPOLICYMANAGER_ACTION}}</strong> enumeration.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFOutputPolicy}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Notifies the input trust authority ({{ITA}}) that a requested action is about to be performed.</p> <p>Before calling this method, the Media Session calls <strong>{{IMFInputTrustAuthority::RequestAccess}}</strong> to request an action. The <strong>BindAccess</strong> method notifies the {{ITA}} that the action is definitely about to occur, so that the {{ITA}} can update its internal state as needed. If the method returns a failure code, the Media Session cancels the action.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to an <strong>{{MFINPUTTRUSTAUTHORITY_ACCESS_PARAMS}}</strong> structure that contains parameters for the <strong>BindAccess</strong> action.</p> </dd> <p> </p><p>Notifies the input trust authority ({{ITA}}) when the number of output trust authorities ({{OTAs}}) that will perform a specified action has changed.</p> <p>The {{ITA}} can update its internal state if needed. If the method returns a failure code, the Media Session cancels the action.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to an <strong>{{MFINPUTTRUSTAUTHORITY_ACCESS_PARAMS}}</strong> structure that contains parameters for the <strong>UpdateAccess</strong> action.</p> </dd> <p> </p><p>Resets the input trust authority ({{ITA}}) to its initial state.</p> <p>When this method is called, the {{ITA}} should disable any decrypter that was returned in the <strong>{{IMFInputTrustAuthority::GetDecrypter}}</strong> method.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p>Implemented by components that provide output trust authorities ({{OTAs}}). Any Media Foundation transform ({{MFT}}) or media sink that is designed to work within the protected media path ({{PMP}}) and also sends protected content outside the Media Foundation pipeline must implement this interface.</p><p>The policy engine uses this interface to negotiate what type of content protection should be applied to the content. Applications do not use this interface directly.</p> <p>If an {{MFT}} supports <strong>{{IMFTrustedOutput}}</strong>, it must expose the interface through <strong>QueryInterface</strong>. The interface applies to all of the input streams on the {{MFT}}. (There is no mechanism to return a separate <strong>{{IMFTrustedOutput}}</strong> reference for each stream.) The {{MFT}} must apply the output policies to all of its input streams. If the {{MFT}} sends different streams to separate connectors, it must report all of the connector attributes.</p> <p> Gets the number of output trust authorities ({{OTAs}}) provided by this trusted output. Each {{OTA}} reports a single action.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Receives the number of {{OTAs}}. </p> </dd> <p> Gets an output trust authority ({{OTA}}), specified by index.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Zero-based index of the {{OTA}} to retrieve. To get the number of {{OTAs}} provided by this object, call <strong>{{IMFTrustedOutput::GetOutputTrustAuthorityCount}}</strong>. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFOutputTrustAuthority}}</strong> interface of the {{OTA}}. The caller must release the interface. </p> </dd> <p> </p><p>Queries whether this output is a policy sink, meaning it handles the rights and restrictions required by the input trust authority ({{ITA}}).</p> <p>A trusted output is generally considered to be a policy sink if it does not pass the media content that it receives anywhere else; or, if it does pass the media content elsewhere, either it protects the content using some proprietary method such as encryption, or it sufficiently devalues the content so as not to require protection.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a Boolean value. If <strong>{{TRUE}}</strong>, this object is a policy sink. If <strong>{{FALSE}}</strong>, the policy must be enforced further downstream.</p> </dd> <p>Encapsulates the functionality of one or more output protection systems that a trusted output supports. This interface is exposed by output trust authority ({{OTA}}) objects. Each {{OTA}} represents a single action that the trusted output can perform, such as play, copy, or transcode. An {{OTA}} can represent more than one physical output if each output performs the same action.</p> <p> </p><p>Retrieves the action that is performed by this output trust authority ({{OTA}}).</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a member of the {{MFPOLICYMANAGER_ACTION}} enumeration.</p> </dd> <p> Sets one or more policy objects on the output trust authority ({{OTA}}). </p> <p>If the method returns <strong>{{MF_S_WAIT_FOR_POLICY_SET}}</strong>, the {{OTA}} sends an {{MEPolicySet}} event when it enforces the policy.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_S_WAIT_FOR_POLICY_SET}}</strong></dt> </dl> </td><td> <p> The policy was negotiated successfully, but the {{OTA}} will enforce it asynchronously. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_POLICY_UNSUPPORTED}}</strong></dt> </dl> </td><td> <p> The {{OTA}} does not support the requirements of this policy. </p> </td></tr> </table><p>?</p> <dd> <p>The address of an array of <strong>{{IMFOutputPolicy}}</strong> references. </p> </dd> <dd> <p> The number of elements in the <em>ppPolicy</em> array. </p> </dd> <dd> <p> Receives either a reference to a buffer allocated by the {{OTA}}, or the value <strong>{{NULL}}</strong>. If this parameter receives a non-<strong>{{NULL}}</strong> value, the caller must release the buffer by calling <strong>CoTaskMemFree</strong>. </p> <strong>Note</strong>??Currently this parameter is reserved. An {{OTA}} should set the reference to <strong>{{NULL}}</strong>. ? </dd> <dd> <p> Receives the size of the <em>ppbTicket</em> buffer, in bytes. If <em>ppbTicket</em> receives the value <strong>{{NULL}}</strong>, <em>pcbTicket</em> receives the value zero.</p> </dd> <p>Encapsulates a usage policy from an input trust authority ({{ITA}}). Output trust authorities ({{OTAs}}) use this interface to query which protection systems they are required to enforce by the {{ITA}}.</p> <p> Retrieves a list of the output protection systems that the output trust authority ({{OTA}}) must enforce, along with configuration data for each protection system. </p> <p>The video {{OTA}} returns the <strong>{{MFCONNECTOR_UNKNOWN}}</strong> connector type unless the Direct3D device is in full-screen mode. (Direct3D windowed mode is not generally a secure video mode.) You can override this behavior by implementing a custom {{EVR}} presenter that implements the <strong>{{IEVRTrustedVideoPlugin}}</strong> interface.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Describes the output that is represented by the {{OTA}} calling this method. This value is a bitwise {{OR}} of zero or more of the following flags. </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{MFOUTPUTATTRIBUTE_BUS}}</strong></dt> </dl> </td><td> <p> Hardware bus. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFOUTPUTATTRIBUTE_COMPRESSED}}</strong></dt> </dl> </td><td> <p> The output sends compressed data. If this flag is absent, the output sends uncompressed data. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFOUTPUTATTRIBUTE_BUSIMPLEMENTATION}}</strong></dt> </dl> </td><td> <p> Reserved. Do not use. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFOUTPUTATTRIBUTE_DIGITAL}}</strong></dt> </dl> </td><td> <p> The output sends a digital signal. If this flag is absent, the output sends an analog signal. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFOUTPUTATTRIBUTE_NONSTANDARDIMPLEMENTATION}}</strong></dt> </dl> </td><td> <p> Reserved. Do not use. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFOUTPUTATTRIBUTE_SOFTWARE}}</strong></dt> </dl> </td><td> <p> Reserved. Do not use. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFOUTPUTATTRIBUTE_VIDEO}}</strong></dt> </dl> </td><td> <p> The output sends video data. If this flag is absent, the output sends audio data. </p> </td></tr> </table> <p>?</p> </dd> <dd> <p> Indicates a specific family of output connectors that is represented by the {{OTA}} calling this method. Possible values include the following. </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_AGP}}</strong></dt> </dl> </td><td> <p> {{AGP}} bus. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_COMPONENT}}</strong></dt> </dl> </td><td> <p> Component video. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_COMPOSITE}}</strong></dt> </dl> </td><td> <p> Composite video. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_D_JPN}}</strong></dt> </dl> </td><td> <p> Japanese D connector. (Connector conforming to the {{EIAJ}} {{RC}}-5237 standard.) </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_DISPLAYPORT_EMBEDDED}}</strong></dt> </dl> </td><td> <p> Embedded DisplayPort connector. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_DISPLAYPORT_EXTERNAL}}</strong></dt> </dl> </td><td> <p> External DisplayPort connector. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_DVI}}</strong></dt> </dl> </td><td> <p> Digital video interface ({{DVI}}) connector. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_HDMI}}</strong></dt> </dl> </td><td> <p> High-definition multimedia interface ({{HDMI}}) connector. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_LVDS}}</strong></dt> </dl> </td><td> <p> Low voltage differential signaling ({{LVDS}}) connector.</p> <p>A connector using the {{LVDS}} interface to connect internally to a display device. The connection between the graphics adapter and the display device is permanent and not accessible to the user. Applications should not enable High-Bandwidth Digital Content Protection ({{HDCP}}) for this connector.</p> </td></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_PCI}}</strong></dt> </dl> </td><td> <p> {{PCI}} bus. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_PCI_Express}}</strong></dt> </dl> </td><td> <p> {{PCI}} Express bus. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_PCIX}}</strong></dt> </dl> </td><td> <p> {{PCI}}-X bus. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_SDI}}</strong></dt> </dl> </td><td> <p> Audio data sent over a connector via S/{{PDIF}}. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_SPDIF}}</strong></dt> </dl> </td><td> <p> Serial digital interface connector. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_SVIDEO}}</strong></dt> </dl> </td><td> <p> S-Video connector. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_UDI_EMBEDDED}}</strong></dt> </dl> </td><td> <p> Embedded Unified Display Interface ({{UDI}}). </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_UDI_EXTERNAL}}</strong></dt> </dl> </td><td> <p> External {{UDI}}. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_UNKNOWN}}</strong></dt> </dl> </td><td> <p> Unknown connector type. See Remarks. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFCONNECTOR_VGA}}</strong></dt> </dl> </td><td> <p> {{VGA}} connector. </p> </td></tr> <tr><td><dl> <dt><strong> {{MFCONNECTOR_MIRACAST}}</strong></dt> </dl> </td><td> <p>Miracast wireless connector. </p> <p>Supported in Windows?8.1 and later.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p> Pointer to an array of {{GUID}} values that specify which output protection systems are supported by the {{OTA}} that is calling this method. </p> </dd> <dd> <p> Number of elements in the <em>rgGuidProtectionSchemasSupported</em> array. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFCollection}}</strong> interface of a collection object. The caller must release the interface. Each object in the collection is an <strong>{{IMFOutputSchema}}</strong> reference. Each <strong>{{IMFOutputSchema}}</strong> reference defines an output protection system that the {{OTA}} must enforce. </p> </dd> <p> </p><p>Retrieives a {{GUID}} identifying the input trust authority ({{ITA}}) that created this output policy object.</p> <p>All of the policy objects and output schemas from the same {{ITA}} should return the same originator identifier (including dynamic policy changes). This value enables the {{OTA}} to distinguish policies that originate from different {{ITAs}}, so that the {{OTA}} can update dynamic policies correctly.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a {{GUID}} that identifies the originating {{ITA}}.</p> </dd> <p> </p><p>Retrieves the minimum version of the global revocation list ({{GRL}}) that must be enforced by the protected environment for this policy.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the minimum {{GRL}} version.</p> </dd> <p>Encapsulates information about an output protection system and its corresponding configuration data.</p> <p>If the configuration information for the output protection system does not require more than a <strong>{{DWORD}}</strong> of space, the configuration information is retrieved in the <strong>GetConfigurationData</strong> method. If more than a <strong>{{DWORD}}</strong> of configuration information is needed, it is stored using the <strong>{{IMFAttributes}}</strong> interface.</p> <p> </p><p>Retrieves the output protection system that is represented by this object. Output protection systems are identified by {{GUID}} value.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the {{GUID}} that identifies the output protection system.</p> </dd> <p> </p><p>Returns configuration data for the output protection system. The configuration data is used to enable or disable the protection system, and to set the protection levels.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the configuration data. The meaning of this data depends on the output protection system.</p> </dd> <p> </p><p>Retrieves a {{GUID}} identifying the input trust authority ({{ITA}}) that generated this output schema object.</p> <p>All of the policy objects and output schemas from the same {{ITA}} should return the same originator identifier (including dynamic policy changes). This value enables the {{OTA}} to distinguish policies that originate from different {{ITAs}}, so that the {{OTA}} can update dynamic policies correctly.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a {{GUID}} that identifies the originating {{ITA}}.</p> </dd> <p> Establishes a one-way secure channel between two objects. </p> <p> </p><p>Retrieves the client's certificate.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to a buffer allocated by the object. The buffer contains the client's certificate. The caller must release the buffer by calling <strong>CoTaskMemFree</strong>.</p> </dd> <dd> <p>Receives the size of the <em>ppCert</em> buffer, in bytes.</p> </dd> <p> </p><p>Passes the encrypted session key to the client.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to a buffer that contains the encrypted session key. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Size of the <em>pbEncryptedSessionKey</em> buffer, in bytes.</p> </dd> <p> Provides encryption for media data inside the protected media path ({{PMP}}). </p> <p> </p><p>Retrieves the version of sample protection that the component implements on input.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a member of the <strong>{{SAMPLE_PROTECTION_VERSION}}</strong> enumeration.</p> </dd> <p> </p><p>Retrieves the version of sample protection that the component implements on output.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a member of the <strong>{{SAMPLE_PROTECTION_VERSION}}</strong> enumeration.</p> </dd> <p> </p><p>Retrieves the sample protection certificate.</p> <p>For certain version numbers of sample protection, the downstream component must provide a certificate. Components that do not support these version numbers can return {{E_NOTIMPL}}.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p>Not implemented.</p> </td></tr> </table><p>?</p> <dd> <p>Specifies the version number of the sample protection scheme for which to receive a certificate. The version number is specified as a <strong>{{SAMPLE_PROTECTION_VERSION}}</strong> enumeration value.</p> </dd> <dd> <p>Receives a reference to a buffer containing the certificate. The caller must free the memory for the buffer by calling <strong>CoTaskMemFree</strong>.</p> </dd> <dd> <p>Receives the size of the <em>ppCert</em> buffer, in bytes.</p> </dd> <p> </p><p>Retrieves initialization information for sample protection from the upstream component.</p> <p>This method must be implemented by the upstream component. The method fails if the component does not support the requested sample protection version. Downstream components do not implement this method and should return {{E_NOTIMPL}}.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p>Not implemented.</p> </td></tr> </table><p>?</p> <dd> <p>Specifies the version number of the sample protection scheme. The version number is specified as a <strong>{{SAMPLE_PROTECTION_VERSION}}</strong> enumeration value.</p> </dd> <dd> <p>Identifier of the output stream. The identifier corresponds to the output stream identifier returned by the <strong>{{IMFTransform}}</strong> interface.</p> </dd> <dd> <p>Pointer to a certificate provided by the downstream component.</p> </dd> <dd> <p>Size of the certificate, in bytes.</p> </dd> <dd> <p>Receives a reference to a buffer that contains the initialization information for downstream component. The caller must free the memory for the buffer by calling <strong>CoTaskMemFree</strong>.</p> </dd> <dd> <p>Receives the size of the <em>ppbSeed</em> buffer, in bytes.</p> </dd> <p> </p><p>Initializes sample protection on the downstream component.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Specifies the version number of the sample protection scheme. The version number is specified as a <strong>{{SAMPLE_PROTECTION_VERSION}}</strong> enumeration value.</p> </dd> <dd> <p>Identifier of the input stream. The identifier corresponds to the output stream identifier returned by the <strong>{{IMFTransform}}</strong> interface.</p> </dd> <dd> <p>Pointer to a buffer that contains the initialization data provided by the upstream component. To retrieve this buffer, call <strong>{{IMFSampleProtection::InitOutputProtection}}</strong>.</p> </dd> <dd> <p>Size of the <em>pbSeed</em> buffer, in bytes.</p> </dd> <p>Enables a media sink to receive samples before the presentation clock is started.</p><p>To get a reference to this interface, call <strong>QueryInterface</strong> on the media sink.</p> <p>Media sinks can implement this interface to support seamless playback and transitions. If a media sink exposes this interface, it can receive samples before the presentation clock starts. It can then pre-process the samples, so that rendering can begin immediately when the clock starts. Prerolling helps to avoid glitches during playback.</p><p>If a media sink supports preroll, the media sink's <strong>{{IMFMediaSink::GetCharacteristics}}</strong> method should return the {{MEDIASINK_CAN_PREROLL}} flag.</p> <p> Notifies the media sink that the presentation clock is about to start. </p> <p> After this method is called, the media sink sends any number of {{MEStreamSinkRequestSample}} events to request samples, until is has enough preroll data. When it has enough preroll data, the media sink sends an {{MEStreamSinkPrerolled}} event. This event signals that the client can start the presentation clock. </p><p> During preroll, the media sink can prepare the samples that it receives, so that they are ready to be rendered. It does not actually render any samples until the clock starts. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The upcoming start time for the presentation clock, in 100-nanosecond units. This time is the same value that will be given to the <strong>{{IMFPresentationClock::Start}}</strong> method when the presentation clock is started. </p> </dd> <p>Optionally supported by media sinks to perform required tasks before shutdown. This interface is typically exposed by archive sinks?that is, media sinks that write to a file. It is used to perform tasks such as flushing data to disk or updating a file header.</p><p>To get a reference to this interface, call <strong>QueryInterface</strong> on the media sink.</p> <p>If a media sink exposes this interface, the Media Session will call <strong>BeginFinalize</strong> on the sink before the session closes.</p> <p> </p><p>Notifies the media sink to asynchronously take any steps it needs to finish its tasks.</p> <p>Many archive media sinks have steps they need to do at the end of archiving to complete their file operations, such as updating the header (for some formats) or flushing all pending writes to disk. In some cases, this may include expensive operations such as indexing the content. <strong>BeginFinalize</strong> is an asynchronous way to initiate final tasks.</p><p>When the finalize operation is complete, the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method is called. At that point, the application should call <strong>{{IMFFinalizableMediaSink::EndFinalize}}</strong> to complete the asynchronous request.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface of an asynchronous object. The caller must implement this interface.</p> </dd> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.</p> </dd> <p> </p><p>Completes an asynchronous finalize operation.</p> <p>Call this method after the <strong>{{IMFFinalizableMediaSink::BeginFinalize}}</strong> method completes asynchronously.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>{{IMFAsyncCallback::Invoke}}</strong> method.</p> </dd> <p>Passes configuration information to the media sinks that are used for streaming the content. Optionally, this interface is supported by media sinks. The built-in {{ASF}} streaming media sink and the {{MP3}} media sink implement this interface.</p> <p>Called by the streaming media client before the Media Session starts streaming to specify the byte offset or the time offset.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A Boolean value that specifies whether <em>qwSeekOffset</em> gives a byte offset of a time offset.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{TRUE}}</strong></dt> </dl> </td><td> <p>The <em>qwSeekOffset</em> parameter specifies a byte offset.</p> </td></tr> <tr><td><dl> <dt><strong>{{FALSE}}</strong></dt> </dl> </td><td> <p>The <em>qwSeekOffset</em> parameter specifies the time position in 100-nanosecond units.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A byte offset or a time offset, depending on the value passed in <em>fSeekOffsetIsByteOffset</em>. Time offsets are specified in 100-nanosecond units. </p> </dd> <p> </p><p>Retrieves a reference to the remote object for which this object is a proxy.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Interface identifier ({{IID}}) of the requested interface.</p> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface.</p> </dd> <p> </p><p>Retrieves a reference to the remote object for which this object is a proxy.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Interface identifier ({{IID}}) of the requested interface.</p> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface.</p> </dd> <p> </p><p>Retrieves a reference to the object that is hosting this proxy.</p> <p>The method returns an {{HRESULT}}. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Interface identifier ({{IID}}) of the requested interface.</p> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface.</p> </dd> <p> </p><p>Marshals an interface reference to and from a stream.</p><p>Stream objects that support <strong>{{IStream}}</strong> can expose this interface to provide custom marshaling for interface references.</p> <p> </p><p>Stores the data needed to marshal an interface across a process boundary.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Interface identifier of the interface to marshal.</p> </dd> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface.</p> </dd> <p> </p><p>Marshals an interface from data stored in the stream.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Interface identifier of the interface to marshal.</p> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface.</p> </dd> <p>Enables a media source in the application process to create objects in the protected media path ({{PMP}}) process.</p> <p>This interface is used when a media source resides in the application process but the Media Session resides in a {{PMP}} process. The media source can use this interface to create objects in the {{PMP}} process. For example, to play {{DRM}}-protected content, the media source typically must create an input trust authority ({{ITA}}) in the {{PMP}} process. </p><p>To use this interface, the media source implements the <strong>{{IMFPMPClient}}</strong> interface. The {{PMP}} Media Session calls <strong>{{IMFPMPClient::SetPMPHost}}</strong> on the media source, passing in a reference to the <strong>{{IMFPMPHost}}</strong> interface.</p><p>You can also get a reference to this interface by calling <strong>{{IMFGetService::GetService}}</strong> on the {{PMP}} Media Session, using the service identifier <strong>{{MF_PMP_SERVICE}}</strong>.</p> <p> Blocks the protected media path ({{PMP}}) process from ending. </p> <p>When this method is called, it increments the lock count on the {{PMP}} process. For every call to this method, the application should make a corresponding call to <strong>{{IMFPMPHost::UnlockProcess}}</strong>, which decrements the lock count. When the {{PMP}} process is ready to exit, it waits for about 3 seconds, or until the lock count reaches zero, before exiting.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Decrements the lock count on the protected media path ({{PMP}}) process. Call this method once for each call to <strong>{{IMFPMPHost::LockProcess}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Creates an object in the protect media path ({{PMP}}) process, from a {{CLSID}}. </p> <p> You can use the <em>pStream</em> parameter to initialize the object after it is created. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The {{CLSID}} of the object to create. </p> </dd> <dd> <p>A reference to the <strong>{{IStream}}</strong> interface. This parameter can be <strong>{{NULL}}</strong>. If this parameter is not <strong>{{NULL}}</strong>, the {{PMP}} host queries the created object for the <strong>{{IPersistStream}}</strong> interface and calls <strong>{{IPersistStream::Load}}</strong>, passing in the <em>pStream</em> reference. </p> </dd> <dd> <p> The interface identifier ({{IID}}) of the interface to retrieve. </p> </dd> <dd> <p> Receives a reference to the requested interface. The caller must release the interface. </p> </dd> <p> Enables a media source to receive a reference to the <strong>{{IMFPMPHost}}</strong> interface. </p> <p>If a media source exposes this interface, the Protected Media Path ({{PMP}}) Media Session calls <strong>SetPMPHost</strong> with a reference to the <strong>{{IMFPMPHost}}</strong> interface. The media source can use the <strong>{{IMFPMPHost}}</strong> interface to create objects in the {{PMP}} process.</p> <p> Provides a reference to the <strong>{{IMFPMPHost}}</strong> interface. </p> <p>The <strong>{{IMFPMPHost}}</strong> reference is apartment threaded. The media source must add the reference to the global interface table ({{GIT}}) before using it.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Enables two instances of the Media Session to share the same protected media path ({{PMP}}) process. </p> <p>If your application creates more than one instance of the Media Session, you can use this interface to share the same {{PMP}} process among several instances. This can be more efficient than re-creating the {{PMP}} process each time.</p><p>Use this interface as follows:</p><ol> <li> Create the first instance of the {{PMP}} Media Session by calling <strong>{{MFCreatePMPMediaSession}}</strong>. </li> <li> Retrieve an <strong>{{IMFPMPServer}}</strong> reference from the first Media Session by calling <strong>{{IMFGetService::GetService}}</strong> with the service identifier <strong>{{MF_PMP_SERVER_CONTEXT}}</strong>. </li> <li> Create the second instance of the {{PMP}} Media Session. Set the {{MF_SESSION_SERVER_CONTEXT}} attribute on the <em>pConfiguration</em> parameter of the <strong>{{MFCreatePMPMediaSession}}</strong> function. The attribute value is the <strong>{{IMFPMPServer}}</strong> reference retrieved in step 2. </li> </ol> <p> </p><p>Blocks the protected media path ({{PMP}}) process from ending.</p> <p>When this method is called, it increments the lock count on the {{PMP}} process. For every call to this method, the application should make a corresponding call to {{IMFPMPServer::UnlockProcess}}, which decrements the lock count. When the {{PMP}} process is ready to exit, it waits for about 3 seconds, or until the lock count reaches zero, before exiting.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Decrements the lock count on the protected media path ({{PMP}}) process. Call this method once for each call to {{IMFPMPServer::LockProcess}}.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Creates an object in the protected media path ({{PMP}}) process.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>{{CLSID}} of the object to create.</p> </dd> <dd> <p>Interface identifier of the interface to retrieve.</p> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface.</p> </dd> <p> Modifies a topology for use in a Terminal Services environment. </p> <p>To use this interface, do the following:</p><ol> <li> Call <strong>GetSystemMetrics</strong> with the <strong>{{SM_REMOTESESSION}}</strong> flag. The function returns <strong>{{TRUE}}</strong> if the calling process is associated with a Terminal Services client session. </li> <li> If <strong>GetSystemMetrics</strong> returns <strong>{{TRUE}}</strong>, call <strong>{{MFCreateRemoteDesktopPlugin}}</strong>. This function returns a reference to the <strong>{{IMFRemoteDesktopPlugin}}</strong> interface. </li> <li> Call <strong>UpdateTopology</strong> with a reference to the topology. </li> </ol><p>The application must call <strong>UpdateTopology</strong> before calling <strong>{{IMFMediaSession::SetTopology}}</strong> on the Media Session.</p> <p> </p><p>Modifies a topology for use in a Terminal Services environment.</p> <p>If the application is running in a Terminal Services client session, call this method before calling <strong>{{IMFMediaSession::SetTopology}}</strong> on the Media Session.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFTopology}}</strong> interface of the topology.</p> </dd> <p> Sets and retrieves Synchronized Accessible Media Interchange ({{SAMI}}) styles on the {{SAMI}} Media Source. </p> <p> To get a reference to this interface, call <strong>{{IMFGetService::GetService}}</strong>. The service identifier is <strong>{{MF_SAMI_SERVICE}}</strong>. Call <strong>GetService</strong> either directly on the {{SAMI}} media source, or on the Media Session (if you are using the {{SAMI}} source with the Media Session).</p> <p> Gets the number of styles defined in the {{SAMI}} file. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Receives the number of {{SAMI}} styles in the file. </p> </dd> <p> Gets a list of the style names defined in the {{SAMI}} file. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to a <strong>{{PROPVARIANT}}</strong> that receives an array of null-terminated wide-character strings. The <strong>{{PROPVARIANT}}</strong> type is {{VT_VECTOR}} | {{VT_LPWSTR}}. The caller must clear the <strong>{{PROPVARIANT}}</strong> by calling <strong>PropVariantClear</strong>.</p> </dd> <p> Sets the current style on the {{SAMI}} media source.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to a null-terminated string containing the name of the style. To clear the current style, pass an empty string (""). To get the list of style names, call <strong>{{IMFSAMIStyle::GetStyles}}</strong>.</p> </dd> <p> Gets the current style from the {{SAMI}} media source. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Receives a reference to a null-terminated string that contains the name of the style. If no style is currently set, the method returns an empty string. The caller must free the memory for the string by calling <strong>CoTaskMemFree</strong>. </p> </dd> <p>Implemented by the transcode profile object.</p><p>The transcode profile stores configuration settings that the topology builder uses to generate the transcode topology for the output file. These configuration settings are specified by the caller and include audio and video stream properties, encoder settings, and container settings that are specified by the caller.</p><p>To create the transcode profile object, call <strong>{{MFCreateTranscodeProfile}}</strong>. The configured transcode profile is passed to <strong>{{MFCreateTranscodeTopology}}</strong>, which creates the transcode topology with the appropriate settings. </p> <p>Sets audio stream configuration settings in the transcode profile.</p><p>To get a list of compatible audio media types supported by the Media Foundation transform ({{MFT}}) encoder , call <strong>{{MFTranscodeGetAudioOutputAvailableTypes}}</strong>. You can get the attributes that are set on the required media type and set them on the transcode profile. To set the audio attributes properly, create a new attribute store and copy the attribute store from the required media media type by calling <strong>{{IMFAttributes::CopyAllItems}}</strong>. This makes sure that the caller does not hold the references to the media type retrieved from the encoder. For example code, see <strong>{{MFCreateTranscodeProfile}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets the audio stream settings that are currently set in the transcode profile. </p> <p>If there are no audio attributes set in the transcode profile, the call to <strong>GetAudioAttributes</strong> succeeds and <em>ppAttrs</em> receives <strong>{{NULL}}</strong>.</p><p>To get a specific attribute value, the caller must call the appropriate <strong>{{IMFAttributes}}</strong> method depending on the data type of the attribute, and specify the attribute name. The following topics describe the audio attributes:</p><ul> <li> Audio Media Types </li> <li> {{MF_TRANSCODE_ENCODINGPROFILE}} </li> <li> {{MF_TRANSCODE_QUALITYVSSPEED}} </li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the <strong>{{IMFAttributes}}</strong> interface of the attribute store containing the current audio stream settings. Caller must release the interface reference.</p> </dd> <p>Sets video stream configuration settings in the transcode profile.</p><p> For example code, see <strong>{{MFCreateTranscodeProfile}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets the video stream settings that are currently set in the transcode profile.</p> <p>If there are no container attributes set in the transcode profile, the <strong>GetVideoAttributes</strong> method succeeds and <em>ppAttrs</em> receives <strong>{{NULL}}</strong>.</p><p>To get a specific attribute value, the caller must call the appropriate <strong>{{IMFAttributes}}</strong> method depending on the data type of the attribute, and specify the attribute name. The following list shows the video attributes:</p><ul> <li> Video Media Types </li> <li> {{MF_TRANSCODE_ENCODINGPROFILE}} </li> <li> {{MF_TRANSCODE_QUALITYVSSPEED}} </li> <li> {{MF_TRANSCODE_DONOT_INSERT_ENCODER}} </li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the <strong>{{IMFAttributes}}</strong> interface of the attribute store containing the current video stream settings. Caller must release the interface reference.</p> </dd> <p>Sets container configuration settings in the transcode profile.</p><p> For example code, see <strong>{{MFCreateTranscodeProfile}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets the container settings that are currently set in the transcode profile.</p> <p>If there are no container attributes set in the transcode profile, the call to <strong>GetContainerAttributes</strong> succeeds and <em>ppAttrs</em> receives <strong>{{NULL}}</strong>.</p><p> To get a specific attribute value, the caller must call the appropriate <strong>{{IMFAttributes}}</strong> method depending on the data type of the attribute. The following list shows the container attributes:</p><ul> <li> {{MF_TRANSCODE_CONTAINERTYPE}} </li> <li> {{MF_TRANSCODE_SKIP_METADATA_TRANSFER}} </li> <li> {{MF_TRANSCODE_TOPOLOGYMODE}} </li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the <strong>{{IMFAttributes}}</strong> interface of the attribute store containing the current container type for the output file. Caller must release the interface reference.</p> </dd> <p>Sets the name of the encoded output file.</p> <p> The media sink will create a local file with the specified file name.</p><p>Alternately, you can call <strong>{{IMFTranscodeSinkInfoProvider::SetOutputByteStream}}</strong> to specify a byte stream that will receive the transcoded data. These two methods are mutually exclusive.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to a null-terminated string that contains the name of the output file.</p> </dd> <p>Sets the name of the encoded output file.</p> <p> The media sink will create a local file with the specified file name.</p><p>Alternately, you can call <strong>{{IMFTranscodeSinkInfoProvider::SetOutputByteStream}}</strong> to specify a byte stream that will receive the transcoded data. These two methods are mutually exclusive.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to a null-terminated string that contains the name of the output file.</p> </dd> <p>Sets an output byte stream for the transcode media sink.</p> <p>Call this method to provide a writeable byte stream that will receive the transcoded data.</p><p>Alternatively, you can provide the name of an output file, by calling <strong>{{IMFTranscodeSinkInfoProvider::SetOutputFile}}</strong>. These two methods are mutually exclusive.</p><p>The <em>pByteStreamActivate</em> parameter must specify an activation object that creates a writeable byte stream. Internally, the transcode media sink calls <strong>{{IMFActivate::ActivateObject}}</strong> to create the byte stream, as follows:</p><code>{{IMFByteStream}} *pByteStream = {{NULL}}; {{HRESULT}} hr = pByteStreamActivate-&gt;ActivateObject({{IID_IMFByteStream}}, (void**)&amp;pByteStream);</code><p>Currently, Microsoft Media Foundation does not provide any byte-stream activation objects. To use this method, an application must provide a custom implementation of <strong>{{IMFActivate}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFActivate}}</strong> interface of a byte-stream activation object. </p> </dd> <p>Sets the transcoding profile on the transcode sink activation object.</p> <p>Before calling this method, initialize the profile object as follows:</p><ul> <li>Set the {{MF_TRANSCODE_CONTAINERTYPE}} attribute to specify the container type of the output file.</li> <li>If the output file will have a video stream, set video attributes by calling the <strong>{{IMFTranscodeProfile::SetVideoAttributes}}</strong> method.</li> <li>If the output file will have an audio stream, set audio attributes by calling the <strong>{{IMFTranscodeProfile::SetAudioAttributes}}</strong> method.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFTranscodeProfile}}</strong> interface. To get a reference to this interface, call <strong>{{MFCreateTranscodeProfile}}</strong>.</p> </dd> <p> Gets the media types for the audio and video streams specified in the transcode profile.</p> <p>Before calling this method, call <strong>{{IMFTranscodeSinkInfoProvider::SetProfile}}</strong> to set the transcode profile. The <strong>GetSinkInfo</strong> method uses the profile to create media types for the audio and video streams. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to an <strong>{{MF_TRANSCODE_SINK_INFO}}</strong> structure.</p> <p>If the method succeeds, the method assigns <strong>{{IMFMediaType}}</strong> references to the <strong>pAudioMediaType</strong> and <strong>pVideoMediaType</strong> members of this structure. The method might set either member to <strong>{{NULL}}</strong>. If either member is non-{{NULL}} after the method returns, the caller must release the <strong>{{IMFMediaType}}</strong> references.</p> </dd> <p>Enables an application to use a Media Foundation transform ({{MFT}}) that has restrictions on its use.</p> <p>If you register an {{MFT}} that requires unlocking, include the <strong>{{MFT_ENUM_FLAG_FIELDOFUSE}}</strong> flag when you call the <strong>{{MFTRegister}}</strong> function.</p> <p>Unlocks a Media Foundation transform ({{MFT}}) so that the application can use it.</p> <p>This method authenticates the caller, using a private communication channel between the {{MFT}} and the object that implements the <strong>{{IMFFieldOfUseMFTUnlock}}</strong> interface. The details of the communication depend entirely on the implementation.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of the {{MFT}}.</p> </dd> <p>Registers Media Foundation transforms ({{MFTs}}) in the caller's process.</p><p>The Media Session exposes this interface as a service. To obtain a reference to this interface, call the <strong>{{IMFGetService::GetService}}</strong> method on the Media Session with the service identifier <strong>{{MF_LOCAL_MFT_REGISTRATION_SERVICE}}</strong>.</p> <p>This interface requires the Media Session. If you are not using the Media Session for playback, call one of the following functions instead:</p><ul> <li> <strong>{{MFTRegisterLocal}}</strong> </li> <li> <strong>{{MFTRegisterLocalByCLSID}}</strong> </li> </ul> <p>Registers one or more Media Foundation transforms ({{MFTs}}) in the caller's process.</p> <p>This method is similar to the <strong>{{MFTRegisterLocalByCLSID}}</strong> function. It registers one or more {{MFTs}} in the caller's process. These {{MFTs}} can be enumerated by calling the <strong>{{MFTEnumEx}}</strong> function with the <strong>{{MFT_ENUM_FLAG_LOCALMFT}}</strong> flag.</p><p>Unlike <strong>{{MFTRegisterLocalByCLSID}}</strong>, however, this method also makes the {{MFT}} available in the Protected Media Path ({{PMP}}) process, and is therefore useful if you are using the Media Session inside the {{PMP}}. For more information, see the following topics:</p><ul> <li> <strong>{{MFCreatePMPMediaSession}}</strong> </li> <li> Protected Media Path </li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to an array of <strong>{{MFT_REGISTRATION_INFO}}</strong> structures.</p> </dd> <dd> <p>The number of elements in the <em>pMFTs</em> array.</p> </dd> <p>Allows a media source to create a Windows Runtime object in the Protected Media Path ({{PMP}}) process. </p> <p> Blocks the protected media path ({{PMP}}) process from ending. </p> <p>When this method is called, it increments the lock count on the {{PMP}} process. For every call to this method, the application should make a corresponding call to <strong>{{IMFPMPHostApp::UnlockProcess}}</strong>, which decrements the lock count. When the {{PMP}} process is ready to exit, it waits for about 3 seconds, or until the lock count reaches zero, before exiting.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Decrements the lock count on the protected media path ({{PMP}}) process. Call this method once for each call to <strong>{{IMFPMPHostApp::LockProcess}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Creates a Windows Runtime object in the protected media path ({{PMP}}) process. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Id of object to create.</p> </dd> <dd> <p>Data to be passed to the object by way of a <strong>{{IPersistStream}}</strong>.</p> </dd> <dd> <p> The interface identifier ({{IID}}) of the interface to retrieve. </p> </dd> <dd> <p> Receives a reference to the created object. </p> </dd> <p>Provides a mechanism for a media source to implement content protection functionality in a Windows Store apps.</p> <p><strong>When to implement:</strong> A media source implements <strong>{{IMFPMPClientApp}}</strong> in order to implement content protection functionality for Windows Store apps. </p> <p>Sets a reference to the <strong>{{IMFPMPHostApp}}</strong> interface allowing a media source to create objects in the {{PMP}} process.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Represents a request for a sample from a MediaStreamSource. </p> <p><strong>{{MFMediaStreamSourceSampleRequest}}</strong> is implemented by the <strong>Windows.Media.Core.MediaStreamSourceSampleRequest</strong> runtime class.</p> <p>Sets the sample for the media stream source.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The sample for the media stream source.</p> </dd> <p>Tracks the reference counts on a video media sample. Video samples created by the <strong>{{MFCreateVideoSampleFromSurface}}</strong> function expose this interface.</p> <p>Use this interface to determine whether it is safe to delete or re-use the buffer contained in a sample. One object assigns itself as the owner of the video sample by calling <strong>SetAllocator</strong>. When all objects release their reference counts on the sample, the owner's callback method is invoked.</p> <p> </p><p>Sets the owner for the sample.</p> <p>When this method is called, the sample holds an additional reference count on itself. When every other object releases its reference counts on the sample, the sample invokes the <em>pSampleAllocator</em> callback method. To get a reference to the sample, call <strong>{{IMFAsyncResult::GetObject}}</strong> on the asynchronous result object given to the callback's <strong>{{IMFAsyncCallback::Invoke}}</strong> method.</p><p>After the callback is invoked, the sample clears the callback. To reinstate the callback, you must call <strong>SetAllocator</strong> again.</p><p>It is safe to pass in the sample's <strong>{{IMFSample}}</strong> interface reference as the state object (<em>pUnkState</em>) for the callback. If <em>pUnkState</em> points to the sample, the <strong>SetAllocator</strong> method accounts for the additional reference count on <em>pUnkState</em>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOTACCEPTING}}</strong></dt> </dl> </td><td> <p>The owner was already set. This method cannot be called twice on the sample.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface.</p> </dd> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.</p> </dd> <p>Provides a method that allows content protection systems to perform a handshake with the protected environment. This is needed because the <strong>CreateFile</strong> and <strong>DeviceIoControl</strong> {{APIs}} are not available to Windows Store apps.</p> <p>See <strong>{{MFCreateProtectedEnvironmentAccess}}</strong> for an example of how to create and use an <strong>{{IMFProtectedEnvironmentAccess}}</strong> object.</p> <p>Allows content protection systems to access the protected environment.</p> <p>See <strong>{{MFCreateProtectedEnvironmentAccess}}</strong> for an example of how to create an <strong>{{IMFProtectedEnvironmentAccess}}</strong> object and use the <strong>Call</strong> method.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The length in bytes of the input data.</p> </dd> <dd> <p>A reference to the input data.</p> </dd> <dd> <p>The length in bytes of the output data.</p> </dd> <dd> <p>A reference to the output data.</p> </dd> <p>Gets the Global Revocation List ({{GLR}}).</p> <p>Allows reading of the system Global Revocation List ({{GRL}}). </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The length of the data returned in <strong>output</strong>.</p> </dd> <dd> <p>Receives the contents of the global revocation list file.</p> </dd> <p>Provides a method that allows content protection systems to get the procedure address of a function in the signed library. This method provides the same functionality as <strong>GetProcAddress</strong> which is not available to Windows Store apps.</p> <p>See <strong>{{MFLoadSignedLibrary}}</strong> for an example of how to create and use an <strong>{{IMFSignedLibrary}}</strong> object.</p> <p>Gets the procedure address of the specified function in the signed library.</p> <p>See <strong>{{MFLoadSignedLibrary}}</strong> for an example of how to create an <strong>{{IMFSignedLibrary}}</strong> object and call the <strong>GetProcedureAddress</strong> method.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The entry point name in the {{DLL}} that specifies the function.</p> </dd> <dd> <p>Receives the address of the entry point.</p> </dd> <p>Provides a method that retireves system id data.</p> <p>Retrieves system id data.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The size in bytes of the returned data.</p> </dd> <dd> <p>Receives the returned data. The caller must free this buffer by calling <strong>CoTaskMemFree</strong>.</p> </dd> <p>Sets up the <strong>{{IMFSystemId}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Gets the required number of bytes that need to be prepended to the input and output buffers when you call the security processor through the <strong>InvokeFunction</strong> method. When you specify this number of bytes, the Media Foundation transform ({{MFT}}) decryptor can allocate the total amount of bytes and can avoid making copies of the data when the decrytor moves the data to the security processor. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Calls into the implementation of the protection system in the security processor. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The identifier of the function that you want to run. This identifier is defined by the implementation of the protection system.</p> </dd> <dd> <p>The number of bytes of in the buffer that <em>InputBuffer</em> specifies, including private data.</p> </dd> <dd> <p>A reference to the data that you want to provide as input.</p> </dd> <dd> <p>Pointer to a value that specifies the length in bytes of the data that the function wrote to the buffer that <em>OutputBuffer</em> specifies, including the private data. </p> </dd> <dd> <p>Pointer to the buffer where you want the function to write its output.</p> </dd> <p> Gets the required number of bytes that need to be prepended to the input and output buffers when you call the security processor through the <strong>InvokeFunction</strong> method. When you specify this number of bytes, the Media Foundation transform ({{MFT}}) decryptor can allocate the total amount of bytes and can avoid making copies of the data when the decrytor moves the data to the security processor. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Allows a decryptor to manage hardware keys and decrypt hardware samples.</p> <p> Allows the display driver to return {{IHV}}-specific information used when initializing a new hardware key. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The number of bytes in the buffer that <em>InputPrivateData</em> specifies.</p> </dd> <dd> <p>The contents of this parameter are defined by the implementation of the protection system that runs in the security processor. The contents may contain data about license or stream properties.</p> </dd> <dd> <p>The return data is also defined by the implementation of the protection system implementation that runs in the security processor. The contents may contain data associated with the underlying hardware key.</p> </dd> <p>Implemented by the Microsoft Media Foundation sink writer object.</p> <p>To create the sink writer, call one of the following functions:</p><ul> <li> <strong>{{MFCreateSinkWriterFromMediaSink}}</strong> </li> <li> <strong>{{MFCreateSinkWriterFromURL}}</strong> </li> </ul><p>Alternatively, use the <strong>{{IMFReadWriteClassFactory}}</strong> interface.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p><p>In Windows?8, this interface is extended with <strong>{{IMFSinkWriterEx}}</strong>.</p> <p>Enables a media source in the application process to create objects in the protected media path ({{PMP}}) process.</p> <p>This interface is used when a media source resides in the application process but the Media Session resides in a {{PMP}} process. The media source can use this interface to create objects in the {{PMP}} process. For example, to play {{DRM}}-protected content, the media source typically must create an input trust authority ({{ITA}}) in the {{PMP}} process. </p><p>To use this interface, the media source implements the <strong>{{IMFPMPClient}}</strong> interface. The {{PMP}} Media Session calls <strong>{{IMFPMPClient::SetPMPHost}}</strong> on the media source, passing in a reference to the <strong>{{IMFPMPHost}}</strong> interface.</p><p>You can also get a reference to this interface by calling <strong>{{IMFGetService::GetService}}</strong> on the {{PMP}} Media Session, using the service identifier <strong>{{MF_PMP_SERVICE}}</strong>.</p> <p>Applications implement this interface in order to provide custom a custom {{HTTP}} or {{HTTPS}} download implementation. Use the <strong>{{IMFSourceResolver}}</strong> interface to register the provider. For more information, see Using the Source Resolver. Once registered, the Microsoft Media Foundation will invoke the <strong>CreateHttpDownloadSession</strong> method of the provider implementation to open {{HTTP}} or {{HTTPS}} {{URLs}} instead of using the default implementation.</p> <p>Applications implement this interface in order to provide custom a custom {{HTTP}} or {{HTTPS}} download implementation. Use the <strong>{{IMFSourceResolver}}</strong> interface to register the provider. For more information, see Using the Source Resolver. Once registered, the Microsoft Media Foundation will invoke the <strong>CreateHttpDownloadSession</strong> method of the provider implementation to open {{HTTP}} or {{HTTPS}} {{URLs}} instead of using the default implementation.</p> <p>Implemented by the Microsoft Media Foundation sink writer object.</p> <p>To create the sink writer, call one of the following functions:</p><ul> <li> <strong>{{MFCreateSinkWriterFromMediaSink}}</strong> </li> <li> <strong>{{MFCreateSinkWriterFromURL}}</strong> </li> </ul><p>Alternatively, use the <strong>{{IMFReadWriteClassFactory}}</strong> interface.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p><p>In Windows?8, this interface is extended with <strong>{{IMFSinkWriterEx}}</strong>.</p> <p>Implemented by the Microsoft Media Foundation sink writer object.</p> <p>To create the sink writer, call one of the following functions:</p><ul> <li> <strong>{{MFCreateSinkWriterFromMediaSink}}</strong> </li> <li> <strong>{{MFCreateSinkWriterFromURL}}</strong> </li> </ul><p>Alternatively, use the <strong>{{IMFReadWriteClassFactory}}</strong> interface.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p><p>In Windows?8, this interface is extended with <strong>{{IMFSinkWriterEx}}</strong>.</p> <p></p> <p></p> <p></p> <p>Implemented by the Microsoft Media Foundation sink writer object.</p> <p>To create the sink writer, call one of the following functions:</p><ul> <li> <strong>{{MFCreateSinkWriterFromMediaSink}}</strong> </li> <li> <strong>{{MFCreateSinkWriterFromURL}}</strong> </li> </ul><p>Alternatively, use the <strong>{{IMFReadWriteClassFactory}}</strong> interface.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p><p>In Windows?8, this interface is extended with <strong>{{IMFSinkWriterEx}}</strong>.</p> <p>Called by the media pipeline to get information about a transform provided by the sensor transform.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The index of the transform for which information is being requested. In the current release, this value will always be 0.</p> </dd> <dd> <p>Gets the identifier for the transform.</p> </dd> <dd> <p>The attribute store to be populated.</p> </dd> <dd> <p>A collection of <strong>{{IMFSensorStream}}</strong> objects.</p> </dd> <p> </p><p>Creates the Media Session in the application's process.</p> <p> If your application does not play protected content, you can use this function to create the Media Session in the application's process. To use the Media Session for protected content, you must call <strong>{{MFCreatePMPMediaSession}}</strong>. </p><p> You can use the <em>pConfiguration</em> parameter to specify any of the following attributes: </p><ul> <li> <strong>{{MF_SESSION_GLOBAL_TIME}}</strong> </li> <li> <strong>{{MF_SESSION_QUALITY_MANAGER}}</strong> </li> <li> <strong>{{MF_SESSION_TOPOLOADER}}</strong> </li> <li> {{MF_LOW_LATENCY}} </li> </ul> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The function succeeded. </p> </td></tr> </table><p>?</p> <p> Creates an instance of the Media Session inside a Protected Media Path ({{PMP}}) process. </p> <p>You can use the <em>pConfiguration</em> parameter to set any of the following attributes:</p><ul> <li> <strong>{{MF_SESSION_CONTENT_PROTECTION_MANAGER}}</strong> </li> <li> <strong>{{MF_SESSION_GLOBAL_TIME}}</strong> </li> <li> <strong>{{MF_SESSION_QUALITY_MANAGER}}</strong> </li> <li> <strong>{{MF_SESSION_REMOTE_SOURCE_MODE}}</strong> </li> <li> <strong>{{MF_SESSION_SERVER_CONTEXT}}</strong> </li> <li> <strong>{{MF_SESSION_TOPOLOADER}}</strong> </li> </ul><p>If this function cannot create the {{PMP}} Media Session because a trusted binary was revoked, the <em>ppEnablerActivate</em> parameter receives an <strong>{{IMFActivate}}</strong> interface reference. The application can use this reference to create a content enabler object, which can then be used to download an updated binary:</p><ol> <li> Call <strong>{{IMFActivate::ActivateObject}}</strong> with the interface identifier {{IID_IMFContentEnabler}} to get an <strong>{{IMFContentEnabler}}</strong> interface reference. </li> <li> Use that interface to download the updated binary. </li> <li> Call <strong>{{MFCreatePMPMediaSession}}</strong> again. </li> </ol><p>If the function successfully creates the {{PMP}} Media Session, the <em>ppEnablerActivate</em> parameter receives the value <strong>{{NULL}}</strong>.</p><p>Do not make calls to the {{PMP}} Media Session from a thread that is processing a window message sent from another thread. To test whether the current thread falls into this category, call <strong>InSendMessage</strong>.</p> <p> The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The function succeeded.</p> </td></tr> </table><p>?</p> <p> Creates the source resolver, which is used to create a media source from a {{URL}} or byte stream. </p> <strong>Note</strong>??Prior to Windows?7, this function was exported from mf.dll. Starting in Windows?7, this function is exported from mfplat.dll, and mf.dll exports a stub function that calls into mfplat.dll. For more information, see Library Changes in Windows?7.? <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the source resolver's <strong>{{IMFSourceResolver}}</strong> interface. The caller must release the interface.</p> </dd> <p>[This {{API}} is not supported and may be altered or unavailable in the future. Instead, applications should use the <strong>{{PSCreateMemoryPropertyStore}}</strong> function to create property stores.]</p><p> Creates an empty property store object.</p> <p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Receives a reference to the <strong>{{IPropertyStore}}</strong> interface. The caller must release the interface. </p> </dd> <p> </p><p>Retrieves the {{URL}} schemes that are registered for the source resolver.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to a <strong>{{PROPVARIANT}}</strong> that receives the {{URL}} schemes. Before calling this method, call <strong>PropVariantInit</strong> to initialize the <strong>{{PROPVARIANT}}</strong>. If the method succeeds, the <strong>{{PROPVARIANT}}</strong> contains an array of wide-character strings. The <strong>{{PROPVARIANT}}</strong> data type is {{VT_VECTOR}} | {{VT_LPWSTR}}. The caller must release the <strong>{{PROPVARIANT}}</strong> by calling <strong>PropVariantClear</strong>.</p> </dd> <p> </p><p>Retrieves the {{MIME}} types that are registered for the source resolver.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The function succeeded. </p> </td></tr> </table><p>?</p> <dd> <p>Pointer to a <strong>{{PROPVARIANT}}</strong> that receives the {{MIME}} types. Before calling this method, call <strong>PropVariantInit</strong> to initialize the <strong>{{PROPVARIANT}}</strong>. If the method succeeds, the <strong>{{PROPVARIANT}}</strong> contains an array of wide-character strings. The <strong>{{PROPVARIANT}}</strong> data type is {{VT_VECTOR}} | {{VT_LPWSTR}}. The caller must release the <strong>{{PROPVARIANT}}</strong> by calling <strong>PropVariantClear</strong>.</p> </dd> <p> </p><p>Creates a topology object.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFTopology}}</strong> interface of the topology object. The caller must release the interface.</p> </dd> <p> Creates a topology node.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> The type of node to create, specified as a member of the <strong>{{MF_TOPOLOGY_TYPE}}</strong> enumeration.</p> </dd> <dd> <p> Receives a reference to the node's <strong>{{IMFTopologyNode}}</strong> interface. The caller must release the interface. </p> </dd> <p>Gets the media type for a stream associated with a topology node.</p> <p>This function gets the actual media type from the object that is associated with the topology node. The <em>pNode</em> parameter should specify a node that belongs to a fully resolved topology. If the node belongs to a partial topology, the function will probably fail. </p><p>Tee nodes do not have an associated object to query. For tee nodes, the function gets the node's input type, if available. Otherwise, if no input type is available, the function gets the media type of the node's primary output stream. The primary output stream is identified by the <strong>{{MF_TOPONODE_PRIMARYOUTPUT}}</strong> attribute.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>The stream index is invalid.</p> </td></tr> </table><p>?</p> <dd> <p>A reference to the <strong>{{IMFTopologyNode}}</strong> interface.</p> </dd> <dd> <p>The identifier of the stream to query. This parameter is interpreted as follows:</p> <ul> <li>Transform nodes: The value is the zero-based index of the input or output stream.</li> <li>All other node types: The value must be zero.</li> </ul> </dd> <dd> <p><strong>If {{TRUE}}</strong>, the function gets an output type<strong>. If {{FALSE}}</strong>, the function gets an input type. This parameter is interpreted as follows:</p> <ul> <li>Output nodes: The value must be <strong>{{TRUE}}</strong>.</li> <li>Source nodes: The value must be <strong>{{FALSE}}</strong>.</li> <li>Tee nodes: The value is ignored.</li> <li>Transform nodes: If the value is <strong>{{TRUE}}</strong>, the <em>dwStreamIndex</em> parameter is the index for an output stream. Otherwise, <em>dwStreamIndex</em> is the index for an input stream.</li> </ul> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaType}}</strong> interface. The caller must release the interface.</p> </dd> <p>Queries an object for a specified service interface.</p><p>This function is a helper function that wraps the <strong>{{IMFGetService::GetService}}</strong> method. The function queries the object for the <strong>{{IMFGetService}}</strong> interface and, if successful, calls <strong>GetService</strong> on the object.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_SERVICE}}</strong></dt> </dl> </td><td> <p> The service requested cannot be found in the object represented by <em>punkObject</em>. </p> </td></tr> </table><p>?</p> <p> Returns the system time. </p> <p> Returns the system time, in 100-nanosecond units. </p> <p>Creates the presentation clock. The presentation clock is used to schedule the time at which samples are rendered and to synchronize multiple streams. </p> <p>The caller must shut down the presentation clock by calling <strong>{{IMFShutdown::Shutdown}}</strong> on the clock.</p><p>Typically applications do not create the presentation clock. The Media Session automatically creates the presentation clock. To get a reference to the presentation clock from the Media Session, call <strong>{{IMFMediaSession::GetClock}}</strong>.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the clock's <strong>{{IMFPresentationClock}}</strong> interface. The caller must release the interface. </p> </dd> <p> </p><p>Creates a presentation time source that is based on the system time.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the object's <strong>{{IMFPresentationTimeSource}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Creates a presentation descriptor.</p> <p> If you are writing a custom media source, you can use this function to create the source presentation descriptor. The presentation descriptor is created with no streams selected. Generally, a media source should select at least one stream by default. To select a stream, call <strong>{{IMFPresentationDescriptor::SelectStream}}</strong>. </p><p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Number of elements in the <em>apStreamDescriptors</em> array.</p> </dd> <dd> <p>Array of <strong>{{IMFStreamDescriptor}}</strong> interface references. Each reference represents a stream descriptor for one stream in the presentation.</p> </dd> <dd> <p>Receives a reference to an <strong>{{IMFPresentationDescriptor}}</strong> interface of the presentation descriptor. The caller must release the interface.</p> </dd> <p> </p><p>Queries whether a media presentation requires the Protected Media Path ({{PMP}}).</p> <p>If this function returns <strong>{{S_OK}}</strong>, it means the {{PMP}} is required for this presentation. Call <strong>{{MFCreatePMPMediaSession}}</strong> to create the {{PMP}} session object.</p><p>If the function returns <strong>{{S_FALSE}}</strong>, you can use the unprotected pipeline. Call <strong>{{MFCreateMediaSession}}</strong> to create the regular Media Session object.</p><p>Internally, this function checks whether any of the stream descriptors in the presentation have the <strong>{{MF_SD_PROTECTED}}</strong> attribute with the value <strong>{{TRUE}}</strong>.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>This presentation requires a protected environment.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{S_FALSE}}</strong></strong></dt> </dl> </td><td> <p>This presentation does not require a protected environment.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFPresentationDescriptor}}</strong> interface of a presentation descriptor. The presentation descriptor is created by the media source, and describes the presentation.</p> </dd> <p> </p><p>Serializes a presentation descriptor to a byte array.</p> <p>To deserialize the presentation descriptor, pass the byte array to the <strong>{{MFDeserializePresentationDescriptor}}</strong> function.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFPresentationDescriptor}}</strong> interface of the presentation descriptor to serialize.</p> </dd> <dd> <p>Receives the size of the <em>ppbData</em> array, in bytes.</p> </dd> <dd> <p>Receives a reference to an array of bytes containing the serialized presentation descriptor. The caller must free the memory for the array by calling <strong>CoTaskMemFree</strong>.</p> </dd> <p> </p><p>Deserializes a presentation descriptor from a byte array.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Size of the <em>pbData</em> array, in bytes.</p> </dd> <dd> <p>Pointer to an array of bytes that contains the serialized presentation descriptor.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFPresentationDescriptor}}</strong> interface of the presentation descriptor. The caller must release the interface.</p> </dd> <p> Creates a stream descriptor. </p> <p> If you are writing a custom media source, you can use this function to create stream descriptors for the source. This function automatically creates the stream descriptor media type handler and initializes it with the list of types given in <em>apMediaTypes</em>. The function does not set the current media type on the handler, however. To set the type, call <strong>{{IMFMediaTypeHandler::SetCurrentMediaType}}</strong>. </p><p>This function is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Stream identifier. </p> </dd> <dd> <p> Number of elements in the <em>apMediaTypes</em> array. </p> </dd> <dd> <p> Pointer to an array of <strong>{{IMFMediaType}}</strong> interface references. These references are used to initialize the media type handler for the stream descriptor. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFStreamDescriptor}}</strong> interface of the new stream descriptor. The caller must release the interface. </p> </dd> <p> </p><p>Creates a media-type handler that supports a single media type at a time.</p> <p>The media-type handler created by this function supports one media type at a time. Set the media type by calling <strong>{{IMFMediaTypeHandler::SetCurrentMediaType}}</strong>. After the type is set, <strong>{{IMFMediaTypeHandler::IsMediaTypeSupported}}</strong> always checks against that type.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFMediaTypeHandler}}</strong> interface of the media-type handler. The caller must release the interface.</p> </dd> <p>Shuts down a Media Foundation object and releases all resources associated with the object.</p><p>This function is a helper function that wraps the <strong>{{IMFShutdown::Shutdown}}</strong> method. The function queries the object for the <strong>{{IMFShutdown}}</strong> interface and, if successful, calls <strong>Shutdown</strong> on the object.</p> <p>This function is not related to the <strong>{{MFShutdown}}</strong> function, which shuts down the Media Foundation platform, as described in Initializing Media Foundation. </p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The function succeeded. </p> </td></tr> </table><p>?</p> <p> Creates the Streaming Audio Renderer. </p> <p>To configure the audio renderer, set any of the following attributes on the <strong>{{IMFAttributes}}</strong> interface specified in the <em>pAudioAttributes</em> parameter.</p><table> <tr><th>Attribute</th><th>Description</th></tr> <tr><td> <strong>{{MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ID}}</strong> </td><td>The audio endpoint device identifier.</td></tr> <tr><td> <strong>{{MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ROLE}}</strong> </td><td>The audio endpoint role.</td></tr> <tr><td> <strong>{{MF_AUDIO_RENDERER_ATTRIBUTE_FLAGS}}</strong> </td><td>Miscellaneous configuration flags.</td></tr> <tr><td> <strong>{{MF_AUDIO_RENDERER_ATTRIBUTE_SESSION_ID}}</strong> </td><td>The audio policy class.</td></tr> <tr><td> {{MF_AUDIO_RENDERER_ATTRIBUTE_STREAM_CATEGORY}} </td><td>The audio stream category.</td></tr> <tr><td> {{MF_LOW_LATENCY}} </td><td>Enables low-latency audio streaming.</td></tr> </table><p>?</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><p>Creates an activation object for the Streaming Audio Renderer.</p> <p>To create the audio renderer, call <strong>{{IMFActivate::ActivateObject}}</strong> on the retrieved <strong>{{IMFActivate}}</strong> reference.</p><strong>Note</strong>??To avoid a memory leak, call <strong>{{IMFActivate::ShutdownObject}}</strong> before releasing the final reference to the audio renderer or the audio renderer activate object.?<p>To configure the audio renderer, set any of the following attributes on the <strong>{{IMFActivate}}</strong> object before calling <strong>ActivateObject</strong>. (If you are using the Media Session, the Media Session automatically calls <strong>ActivateObject</strong> when you queue the topology.)</p><table> <tr><th>Attribute</th><th>Description</th></tr> <tr><td> <strong>{{MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ID}}</strong> </td><td>The audio endpoint device identifier.</td></tr> <tr><td> <strong>{{MF_AUDIO_RENDERER_ATTRIBUTE_ENDPOINT_ROLE}}</strong> </td><td>The audio endpoint role.</td></tr> <tr><td> <strong>{{MF_AUDIO_RENDERER_ATTRIBUTE_FLAGS}}</strong> </td><td>Miscellaneous configuration flags.</td></tr> <tr><td> <strong>{{MF_AUDIO_RENDERER_ATTRIBUTE_SESSION_ID}}</strong> </td><td>The audio policy class.</td></tr> <tr><td> {{MF_AUDIO_RENDERER_ATTRIBUTE_STREAM_CATEGORY}} </td><td>The audio stream category.</td></tr> <tr><td> {{MF_LOW_LATENCY}} </td><td>Enables low-latency audio streaming.</td></tr> </table><p>?</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> </p><p>Creates an activation object for the enhanced video renderer ({{EVR}}) media sink.</p> <p>To create the {{EVR}}, call <strong>{{IMFActivate::ActivateObject}}</strong> on the retrieved <strong>{{IMFActivate}}</strong> reference. (If you are using the Media Session, the Media Session automatically calls <strong>ActivateObject</strong> when you queue the topology.)</p><p>To configure the {{EVR}}, set any of the following attributes on the <strong>{{IMFActivate}}</strong> object before calling <strong>ActivateObject</strong>.</p><table> <tr><th>Attribute</th><th>Description</th></tr> <tr><td> <strong>{{MF_ACTIVATE_CUSTOM_VIDEO_MIXER_ACTIVATE}}</strong> </td><td>Activation object for a custom mixer.</td></tr> <tr><td> <strong>{{MF_ACTIVATE_CUSTOM_VIDEO_MIXER_CLSID}}</strong> </td><td>{{CLSID}} for a custom mixer.</td></tr> <tr><td> <strong>{{MF_ACTIVATE_CUSTOM_VIDEO_MIXER_FLAGS}}</strong> </td><td>Flags for creating a custom mixer.</td></tr> <tr><td> <strong>{{MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_ACTIVATE}}</strong> </td><td>Activation object for a custom presenter.</td></tr> <tr><td> <strong>{{MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_CLSID}}</strong> </td><td>{{CLSID}} for a custom presenter.</td></tr> <tr><td> <strong>{{MF_ACTIVATE_CUSTOM_VIDEO_PRESENTER_FLAGS}}</strong> </td><td>Flags for creating a custom presenter.</td></tr> </table><p>?</p><p>When <strong>{{IMFActivate::ActivateObject}}</strong> is called, the activation objects sets the video window on the {{EVR}} by calling <strong>{{IMFVideoDisplayControl::SetVideoPosition}}</strong>. Passing <strong>{{NULL}}</strong> for the <em>hwndVideo</em> parameter is not an error, but no video will render unless the {{EVR}} has a valid video window.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Handle to the window where the video will be displayed.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFActivate}}</strong> interface. Use this interface to create the {{EVR}}. The caller must release the interface.</p> </dd> <p>Creates a media sink for authoring {{MP4}} files.</p> <p>The {{MP4}} media sink supports a maximum of one video stream and one audio stream. The initial stream formats are given in the <em>pVideoMediaType</em> and <em>pAudioMediaType</em> parameters. To create an {{MP4}} file with one stream, set the other stream type to <strong>{{NULL}}</strong>. For example, to create an audio-only file, set <em>pVideoMediaType</em> to <strong>{{NULL}}</strong>. </p><p>The number of streams is fixed when you create the media sink. The sink does not support the <strong>{{IMFMediaSink::AddStreamSink}}</strong> method.</p><p>To author 3GP files, use the <strong>{{MFCreate3GPMediaSink}}</strong> function.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFByteStream}}</strong> interface of a byte stream. The media sink writes the {{MP4}} file to this byte stream. The byte stream must be writable and support seeking.</p> </dd> <dd> <p>A reference to the <strong>{{IMFMediaType}}</strong> interface of a video media type. This type specifies the format of the video stream.</p> <p>This parameter can be <strong>{{NULL}}</strong>, but not if <em>pAudioMediaType</em> is <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>A reference to the <strong>{{IMFMediaType}}</strong> interface of an audio media type. This type specifies the format of the audio stream.</p> <p>This parameter can be <strong>{{NULL}}</strong>, but not if <em>pVideoMediaType</em> is <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Receives a reference to the {{MP4}} media sink's <strong>{{IMFMediaSink}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates a media sink for authoring 3GP files.</p> <p>The 3GP media sink supports a maximum of one video stream and one audio stream. The initial stream formats are given in the <em>pVideoMediaType</em> and <em>pAudioMediaType</em> parameters. To create an {{MP4}} file with one stream, set the other stream type to <strong>{{NULL}}</strong>. For example, to create an audio-only file, set <em>pVideoMediaType</em> to <strong>{{NULL}}</strong>. </p><p>The number of streams is fixed when you create the media sink. The sink does not support the <strong>{{IMFMediaSink::AddStreamSink}}</strong> method.</p><p>To author {{MP4}} files, use the <strong>{{MFCreateMPEG4MediaSink}}</strong> function.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFByteStream}}</strong> interface of a byte stream. The media sink writes the 3GP file to this byte stream. The byte stream must be writable and support seeking.</p> </dd> <dd> <p>A reference to the <strong>{{IMFMediaType}}</strong> interface of a video media type. This type specifies the format of the video stream.</p> <p>This parameter can be <strong>{{NULL}}</strong>, but not if <em>pAudioMediaType</em> is <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>A reference to the <strong>{{IMFMediaType}}</strong> interface of an audio media type. This type specifies the format of the audio stream.</p> <p>This parameter can be <strong>{{NULL}}</strong>, but not if <em>pVideoMediaType</em> is <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Receives a reference to the 3GP media sink's <strong>{{IMFMediaSink}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates the {{MP3}} media sink.</p> <p> The {{MP3}} media sink takes compressed {{MP3}} audio samples as input, and writes an {{MP3}} file with {{ID3}} headers as output. The {{MP3}} media sink does not perform {{MP3}} audio encoding. </p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFByteStream}}</strong> interface of a byte stream. The media sink writes the {{MP3}} file to this byte stream. The byte stream must be writable.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaSink}}</strong> interface of the {{MP3}} media sink.. The caller must release the interface.</p> </dd> <p>Creates an instance of the {{AC}}-3 media sink.</p> <p>The {{AC}}-3 media sink takes compressed {{AC}}-3 audio as input and writes the audio to the byte stream without modification. The primary use for this media sink is to stream {{AC}}-3 audio over a network. The media sink does not perform {{AC}}-3 audio encoding.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFByteStream}}</strong> interface of a byte stream. The media sink writes the {{AC}}-3 file to this byte stream. The byte stream must be writable. </p> </dd> <dd> <p>A reference to the <strong>{{IMFMediaType}}</strong> interface. This parameter specifies the media type for the {{AC}}-3 audio stream. The media type must contain the following attributes.</p> <table> <tr><th>Attribute</th><th>Value</th></tr> <tr><td> {{MF_MT_MAJOR_TYPE}} </td><td><strong>{{MFMediaType_Audio}}</strong></td></tr> <tr><td> {{MF_MT_SUBTYPE}} </td><td><strong>{{MFAudioFormat_Dolby_AC3}}</strong> or <strong>{{MFAudioFormat_Dolby_DDPlus}}</strong></td></tr> </table> <p>?</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaSink}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates an instance of the audio data transport stream ({{ADTS}}) media sink.</p> <p>The {{ADTS}} media sink converts Advanced Audio Coding ({{AAC}}) audio packets into an {{ADTS}} stream. The primary use for this media sink is to stream {{ADTS}} over a network. The output is not an audio file, but a stream of audio frames with {{ADTS}} headers.</p><p>The media sink can accept raw {{AAC}} frames ({{MF_MT_AAC_PAYLOAD_TYPE}} = 0) or {{ADTS}} packets ({{MF_MT_AAC_PAYLOAD_TYPE}} = 1). If the input is raw {{AAC}}, the media sink inserts an {{ADTS}} header at the start of each audio frame. If the input is {{ADTS}} packets, the media sink passes the packets through to the byte stream, without modification.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFByteStream}}</strong> interface of a byte stream. The media sink writes the {{ADTS}} stream to this byte stream. The byte stream must be writable.</p> </dd> <dd> <p>A reference to the <strong>{{IMFMediaType}}</strong> interface. This parameter specifies the media type for the {{ADTS}} stream. The media type must contain the following attributes.</p> <table> <tr><th>Attribute</th><th>Value</th></tr> <tr><td> {{MF_MT_MAJOR_TYPE}} </td><td><strong>{{MFMediaType_Audio}}</strong></td></tr> <tr><td> {{MF_MT_SUBTYPE}} </td><td><strong>{{MFAudioFormat_AAC}}</strong></td></tr> <tr><td> {{MF_MT_AAC_PAYLOAD_TYPE}} </td><td>0 (raw {{AAC}}) or 1 ({{ADTS}})</td></tr> </table> <p>?</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaSink}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates a generic media sink that wraps a multiplexer Microsoft Media Foundation transform ({{MFT}}).</p> <p>This function attempts to find a multiplexer {{MFT}} that supports an output type with the following definition:</p><ul> <li>Major type: <strong>{{MFMediaType_Stream}}</strong></li> <li>Subtype: <em>guidOutputSubType</em></li> <li>Additional format attributes (optional)</li> </ul><p>To provide a list of additional format attributes:</p><ol> <li>Call <strong>{{MFCreateAttributes}}</strong> to get an <strong>{{IMFAttributes}}</strong> reference.</li> <li>Use the <strong>{{IMFAttributes}}</strong> interface to set the attributes. (See Media Type Attributes.)</li> <li>Pass the <strong>{{IMFAttributes}}</strong> reference in the <em>pOutputAttributes</em> parameter.</li> </ol><p>The multiplexer {{MFT}} must be registered in the <strong>{{MFT_CATEGORY_MULTIPLEXER}}</strong> category.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The subtype {{GUID}} of the output type for the {{MFT}}.</p> </dd> <dd> <p>A list of format attributes for the {{MFT}} output type. This parameter is optional and can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>A reference to the <strong>{{IMFByteStream}}</strong> interface of a byte stream. The output from the {{MFT}} is written to this byte stream. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaSink}}</strong> interface of the media sink. The caller must release the interface.</p> </dd> <p>Creates a media sink for authoring fragmented {{MP4}} files.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFByteStream}}</strong> interface of a byte stream. The media sink writes the {{MP4}} file to this byte stream. The byte stream must be writable and support seeking.</p> </dd> <dd> <p>A reference to the <strong>{{IMFMediaType}}</strong> interface of a video media type. This type specifies the format of the video stream.</p> <p>This parameter can be <strong>{{NULL}}</strong>, but not if <em>pAudioMediaType</em> is <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>A reference to the <strong>{{IMFMediaType}}</strong> interface of an audio media type. This type specifies the format of the audio stream.</p> <p>This parameter can be <strong>{{NULL}}</strong>, but not if <em>pVideoMediaType</em> is <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Receives a reference to the {{MP4}} media sink's <strong>{{IMFMediaSink}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates an Audio-Video Interleaved ({{AVI}}) Sink.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to the byte stream that will be used to write the {{AVI}} file.</p> </dd> <dd> <p>Pointer to the media type of the video input stream</p> </dd> <dd> <p>Pointer to the media type of the audio input stream</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaSink}}</strong> Interface. The caller must release this interface.</p> </dd> <p> Creates an {{WAVE}} archive sink. The {{WAVE}} archive sink takes audio and writes it to an .wav file. </p> <dd> <p> Pointer to the byte stream that will be used to write the .wav file.</p> </dd> <dd> <p>Pointer to the audio media type.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaSink}}</strong> interface. The caller must release this interface.</p> </dd> <p> </p><p>Creates a new instance of the topology loader.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFTopoLoader}}</strong> interface of the topology loader. The caller must release the interface.</p> </dd> <p> </p><p>Creates an activation object for the sample grabber media sink.</p> <p>To create the sample grabber sink, call <strong>{{IMFActivate::ActivateObject}}</strong> on the reference received in the <em>ppIActivate</em> parameter.</p><p>Before calling <strong>ActivateObject</strong>, you can configure the sample grabber by setting any of the following attributes on the <em>ppIActivate</em> reference:</p><ul> <li> {{MF_SAMPLEGRABBERSINK_IGNORE_CLOCK}} </li> <li> <strong>{{MF_SAMPLEGRABBERSINK_SAMPLE_TIME_OFFSET}}</strong> </li> </ul> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Pointer to the <strong>{{IMFMediaType}}</strong> interface, defining the media type for the sample grabber's input stream. </p> </dd> <dd> <p> Pointer to the <strong>{{IMFSampleGrabberSinkCallback}}</strong> interface of a callback object. The caller must implement this interface. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFActivate}}</strong> interface. Use this interface to complete the creation of the sample grabber. The caller must release the interface. </p> </dd> <p> </p><p>Creates the default implementation of the quality manager.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the quality manager's <strong>{{IMFQualityManager}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Creates the sequencer source.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Reserved. Must be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFSequencerSource}}</strong> interface of the sequencer source. The caller must release the interface.</p> </dd> <p> Creates a <strong>{{PROPVARIANT}}</strong> that can be used to seek within a sequencer source presentation. </p> <p> The <strong>{{PROPVARIANT}}</strong> returned in <em>pvarSegmentOffset</em> can be used for the <em>pvarStartPosition</em> parameter in the <strong>{{IMFMediaSession::Start}}</strong> method. Use the time format <strong>{{GUID}} {{MF_TIME_FORMAT_SEGMENT_OFFSET}}</strong>. </p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Sequencer element identifier. This value specifies the segment in which to begin playback. The element identifier is returned in the <strong>{{IMFSequencerSource::AppendTopology}}</strong> method. </p> </dd> <dd> <p> Starting position within the segment, in 100-nanosecond units. </p> </dd> <dd> <p> Pointer to a <strong>{{PROPVARIANT}}</strong>. The method fills in the <strong>{{PROPVARIANT}}</strong> with the information needed for performing a seek operation. The caller must free the <strong>{{PROPVARIANT}}</strong> by calling <strong>PropVariantClear</strong>. </p> </dd> <p>Creates a media source that aggregates a collection of media sources. </p> <p>The aggregated media source is useful for combining streams from separate media sources. For example, you can use it to combine a video capture source and an audio capture source. </p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p> The <em>pSourceCollection</em> collection does not contain any elements.</p> </td></tr> </table><p>?</p> <dd> <p>A reference to the <strong>{{IMFCollection}}</strong> interface of the collection object that contains a list of media sources. </p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaSource}}</strong> interface of the aggregated media source. The caller must release the interface.</p> </dd> <p> </p><p>Creates a credential cache object. An application can use this object to implement a custom credential manager.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The function succeeded. </p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFNetCredentialCache}}</strong> interface of the new credential cache object. The caller must release the interface.</p> </dd> <p> </p><p>Creates a default proxy locator.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The function succeeded. </p> </td></tr> </table><p>?</p> <dd> <p>The name of the protocol.</p> <strong>Note</strong>??In this release of Media Foundation, the default proxy locator does not support {{RTSP}}. ? </dd> <dd> <p>Pointer to the <strong>{{IPropertyStore}}</strong> interface of a property store that contains the proxy configuration in the <strong>{{MFNETSOURCE_PROXYSETTINGS}}</strong> property.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFNetProxyLocator}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Creates the scheme handler for the network source.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Interface identifier ({{IID}}) of the interface to retrieve.</p> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface. The scheme handler exposes the <strong>{{IMFSchemeHandler}}</strong> interface.</p> </dd> <p> </p><p>Creates the protected media path ({{PMP}}) server object.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The function succeeded. </p> </td></tr> </table><p>?</p> <dd> <p>A member of the <strong>{{MFPMPSESSION_CREATION_FLAGS}}</strong> enumeration that specifies how to create the {{PMP}} session.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFPMPServer}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Creates the remote desktop plug-in object. Use this object if the application is running in a Terminal Services client session.</p> <p> The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The function succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_ACCESSDENIED}}</strong></dt> </dl> </td><td> <p>Remote desktop connections are not allowed by the current session policy.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFRemoteDesktopPlugin}}</strong> interface of the plug-in object. The caller must release the interface.</p> </dd> <p>[This {{API}} is not supported and may be altered or unavailable in the future. Instead, applications should use the <strong>{{PSCreateMemoryPropertyStore}}</strong> function to create named property stores.]</p><p>Creates an empty property store to hold name/value pairs.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{INamedPropertyStore}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates an instance of the sample copier transform.</p> <p>The sample copier is a Media Foundation transform ({{MFT}}) that copies data from input samples to output samples without modifying the data. The following data is copied from the sample:</p><ul> <li>All Sample Attributes.</li> <li>The time stamp and duration.</li> <li>Sample flags (see <strong>{{IMFSample::SetSampleFlags}}</strong>).</li> <li>The data in the media buffers. If the input sample contains multiple buffers, the data is copied into a single buffer on the output sample.</li> </ul><p>This {{MFT}} is useful in the following situation:</p><ul> <li>One pipeline object, such as a media source, allocates media samples for output.</li> <li>Another pipeline object, such as a media sink, allocates its own media samples for input. For example, the object might require buffers allocated from a special memory pool, such as video memory.</li> </ul><p>The following diagram shows this situation with a media source and a media sink.</p><p></p><p>In order for the media sink to receive data from the media source, the data must be copied into the media samples owned by the media sink. The sample copier can be used for this purpose.</p><p>A specific example of such a media sink is the Enhanced Video Renderer ({{EVR}}). The {{EVR}} allocates samples that contain Direct3D surface buffers, so it cannot receive video samples directly from a media source. Starting in Windows?7, the topology loader automatically handles this case by inserting the sample copier between the media source and the {{EVR}}.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the <strong>{{IMFTransform}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates an empty transcode profile object.</p><p>The transcode profile stores configuration settings for the output file. These configuration settings are specified by the caller, and include audio and video stream properties, encoder settings, and container settings. To set these properties, the caller must call the appropriate <strong>{{IMFTranscodeProfile}}</strong> methods.</p><p>The configured transcode profile is passed to the <strong>{{MFCreateTranscodeTopology}}</strong> function. The underlying topology builder uses these settings to build the transcode topology.</p> <p>The <strong>{{MFCreateTranscodeProfile}}</strong> function creates an empty transcode profile. You must configure the transcode profile setting attributes that define the media types and the container properties. Use the following methods to configure the profile:</p><ul> <li> <strong>{{IMFTranscodeProfile::SetAudioAttributes}}</strong> </li> <li> <strong>{{IMFTranscodeProfile::SetVideoAttributes}}</strong> </li> <li> <strong>{{IMFTranscodeProfile::SetContainerAttributes}}</strong> </li> </ul><p>For example code that uses this function, see the following topics:</p><ul> <li> Tutorial: Encoding an {{MP4}} File </li> <li> Tutorial: Encoding a {{WMA}} File </li> </ul> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a partial transcode topology.</p><p>The underlying topology builder creates a partial topology by connecting the required pipeline objects: source, encoder, and sink. The encoder and the sink are configured according to the settings specified by the caller in the transcode profile. </p><p>To create the transcode profile object, call the <strong>{{MFCreateTranscodeProfile}}</strong> function and set the required attributes by calling the appropriate the <strong>{{IMFTranscodeProfile}}</strong> methods. </p><p>The configured transcode profile is passed to the <strong>{{MFCreateTranscodeTopology}}</strong> function, which creates the transcode topology with the appropriate settings. The caller can then set this topology on the Media Session and start the session to begin the encoding process. When the Media Session ends, the transcoded file is generated.</p> <p>For example code that uses this function, see the following topics:</p><ul> <li> Tutorial: Encoding an {{MP4}} File </li> <li> Tutorial: Encoding a {{WMA}} File </li> </ul> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function call succeeded, and <em>ppTranscodeTopo</em> receives a reference to the transcode topology.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p><em>pwszOutputFilePath</em> contains invalid characters.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_MEDIA_SOURCE_NO_STREAMS_SELECTED}}</strong></dt> </dl> </td><td> <p>No streams are selected in the media source.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSCODE_NO_CONTAINERTYPE}}</strong></dt> </dl> </td><td> <p>The profile does not contain the {{MF_TRANSCODE_CONTAINERTYPE}} attribute.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSCODE_NO_MATCHING_ENCODER}}</strong></dt> </dl> </td><td> <p>For one or more streams, cannot find an encoder that accepts the media type given in the profile.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSCODE_PROFILE_NO_MATCHING_STREAMS}}</strong></dt> </dl> </td><td> <p>The profile does not specify a media type for any of the selected streams on the media source.</p> </td></tr> </table><p>?</p> <p>Creates a topology for transcoding to a byte stream.</p> <p>This function creates a partial topology that contains the media source, the encoder, and the media sink. </p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFMediaSource}}</strong> interface of a media source. The media source provides that source content for transcoding.</p> </dd> <dd> <p>A reference to the <strong>{{IMFByteStream}}</strong> interface of a byte stream. The transcoded output will be written to this byte stream.</p> </dd> <dd> <p>A reference to the <strong>{{IMFTranscodeProfile}}</strong> interface of a transcoding profile. </p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFTopology}}</strong> interface. The caller must release the interface.</p> </dd> <p>Gets a list of output formats from an audio encoder.</p> <p>This function assumes the encoder will be used in its default encoding mode, which is typically constant bit-rate ({{CBR}}) encoding. Therefore, the types returned by the function might not work with other modes, such as variable bit-rate ({{VBR}}) encoding.</p><p>Internally, this function works by calling <strong>{{MFTEnumEx}}</strong> to find a matching encoder, and then calling <strong>{{IMFTransform::GetOutputAvailableType}}</strong> to get the encoder's output types.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The function call succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSCODE_NO_MATCHING_ENCODER}}</strong></dt> </dl> </td><td> <p>Failed to find an encoder that matches the specified configuration settings.</p> </td></tr> </table><p>?</p> <dd> <p>Specifies the subtype of the output media. The encoder uses this value as a filter when it is enumerating the available output types. For information about the audio subtypes, see <strong>Audio Subtype {{GUIDs}}</strong>. </p> </dd> <dd> <p>Bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>_MFT_ENUM_FLAG</strong> enumeration. </p> </dd> <dd> <p>A reference to the <strong>{{IMFAttributes}}</strong> interface of an attribute store. The attribute store specifies the encoder configuration settings. This parameter can be <strong>{{NULL}}</strong>. The attribute store can hold any of the following attributes.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{MFT_FIELDOFUSE_UNLOCK_Attribute}}</strong></dt> </dl> </td><td> <p>Set this attribute to unlock an encoder that has field-of-use descriptions.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_TRANSCODE_ENCODINGPROFILE}}</strong></dt> </dl> </td><td> <p>Specifies a device conformance profile for a Windows Media encoder.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_TRANSCODE_QUALITYVSSPEED}}</strong></dt> </dl> </td><td> <p>Sets the tradeoff between encoding quality and encoding speed.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFCollection}}</strong> interface of a collection object that contains a list of preferred audio media types. The collection contains <strong>{{IMFMediaType}}</strong> references. The caller must release the interface reference.</p> </dd> <p>Creates the transcode sink activation object.</p><p>The transcode sink activation object can be used to create any of the following file sinks:</p><ul> <li>3GP file sink</li> <li>{{MP3}} file sink</li> <li>{{MP4}} file sink</li> </ul><p>The transcode sink activation object exposes the <strong>{{IMFTranscodeSinkInfoProvider}}</strong> interface.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an <strong>{{IMFTrackedSample}}</strong> object that tracks the reference counts on a video media sample.</p> <p>Creates a Microsoft Media Foundation byte stream that wraps an <strong>{{IStream}}</strong> reference.</p> <p>This function enables applications to pass an <strong>{{IStream}}</strong> object to a Media Foundation {{API}} that takes an <strong>{{IMFByteStream}}</strong> reference.</p> <p>Returns an <strong>{{HRESULT}}</strong> value.</p> <dd> <p>A reference to the <strong>{{IStream}}</strong> interface.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFByteStream}}</strong> interface. The caller must release the interface.</p> </dd> <p>Returns an <strong>{{IStream}}</strong> reference that wraps a Microsoft Media Foundation byte stream.</p> <p>This function enables an application to pass a Media Foundation byte stream to an {{API}} that takes an <strong>{{IStream}}</strong> reference.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a Microsoft Media Foundation byte stream that wraps an <strong>{{IRandomAccessStream}}</strong> object.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates an <strong>{{IRandomAccessStream}}</strong> object that wraps a Microsoft Media Foundation byte stream.</p> <p>The returned byte stream object exposes the <strong>{{IMFGetService}}</strong> interface. To get the original <strong>{{IMFByteStream}}</strong> reference, call <strong>{{IMFGetService::GetService}}</strong> using the service identifier <strong>{{MF_WRAPPED_OBJECT}}</strong>.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Create an <strong>{{IMFMediaType}}</strong> from properties.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates properties from a <strong>{{IMFMediaType}}</strong>.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Enumerates a list of audio or video capture devices.</p> <p>Each returned <strong>{{IMFActivate}}</strong> reference represents a capture device, and can be used to create a media source for that device. You can also use the <strong>{{IMFActivate}}</strong> reference to query for attributes that describe the device. The following attributes might be set:</p><table> <tr><th>Attribute</th><th>Description</th></tr> <tr><td> {{MF_DEVSOURCE_ATTRIBUTE_FRIENDLY_NAME}} </td><td>The display name of the device.</td></tr> <tr><td> {{MF_DEVSOURCE_ATTRIBUTE_MEDIA_TYPE}} </td><td>The major type and subtype {{GUIDs}} that describe the device's output format.</td></tr> <tr><td> {{MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE}} </td><td>The type of capture device (audio or video).</td></tr> <tr><td> {{MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ENDPOINT_ID}} </td><td>The audio endpoint {{ID}} string. (Audio devices only.)</td></tr> <tr><td> {{MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_CATEGORY}} </td><td>The device category. (Video devices only.)</td></tr> <tr><td> {{MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_HW_SOURCE}} </td><td> Whether a device is a hardware or software device. (Video devices only.)</td></tr> <tr><td> {{MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK}} </td><td>The symbolic link for the device driver. (Video devices only.)</td></tr> </table><p>?</p><p>To create a media source from an <strong>{{IMFActivate}}</strong> reference, call the <strong>{{IMFActivate::ActivateObject}}</strong> method.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to an attribute store that contains search criteria. To create the attribute store, call <strong>{{MFCreateAttributes}}</strong>. Set one or more of the following attributes on the attribute store:</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE}}</strong></dt> </dl> </td><td> <p>Specifies whether to enumerate audio or video devices. (Required.)</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ROLE}}</strong></dt> </dl> </td><td> <p>For audio capture devices, specifies the device role. (Optional.)</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_CATEGORY}}</strong></dt> </dl> </td><td> <p>For video capture devices, specifies the device category. (Optional.)</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Receives an array of <strong>{{IMFActivate}}</strong> interface references. Each reference represents an activation object for a media source. The function allocates the memory for the array. The caller must release the references in the array and call <strong>CoTaskMemFree</strong> to free the memory for the array.</p> </dd> <dd> <p>Receives the number of elements in the <em>pppSourceActivate</em> array. If no capture devices match the search criteria, this parameter receives the value 0.</p> </dd> <p>Creates a media source for a hardware capture device.</p> <strong>Important</strong>??When the capture device is no longer needed, you must shut down the device by calling <strong>Shutdown</strong> on the <strong>{{IMFMediaSource}}</strong> object you obtained by calling <strong>{{MFCreateDeviceSource}}</strong>. Failure to call <strong>Shutdown</strong> can result in memory links because the system may keep a reference to <strong>{{IMFMediaSource}}</strong> resources until <strong>Shutdown</strong> is called.?<p>The <em>pAttributes</em> parameter specifies an attribute store. To create the attribute store, call the <strong>{{MFCreateAttributes}}</strong> function. You must set the {{MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE}} attribute, which specifies the type of device (audio or video).</p><p>For audio capture devices, optionally set one of the following attributes:</p><p></p><table> <tr><th>Attribute</th><th>Description</th></tr> <tr><td> <p>{{MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ENDPOINT_ID}} </p> </td><td> <p>Specifies the audio endpoint {{ID}} of the audio capture device.</p> </td></tr> <tr><td> <p>{{MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ROLE}} </p> </td><td> <p>Specifies the device role. If this attribute is set, the function uses the default audio capture device for that device role.</p> <p>Do not combine this attribute with the {{MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ENDPOINT_ID}} attribute.</p> </td></tr> </table><p>?</p><p>If neither attribute is specified, the function selects the default audio capture device for the <strong>eCommunications</strong> role.</p><p>For video capture devices, you must set the following attribute:</p><p></p><table> <tr><th>Attribute</th><th>Description</th></tr> <tr><td> <p>{{MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK}} </p> </td><td> <p>Specifies the symbolic link to the device.</p> </td></tr> </table><p>?</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to the <strong>{{IMFAttributes}}</strong> interface of an attribute store, which is used to select the device. See Remarks.</p> </dd> <dd> <p>Receives a reference to the media source's <strong>{{IMFMediaSource}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates an activation object that represents a hardware capture device.</p> <p>This function creates an activation object that can be used to create a media source for a hardware device. To create the media source itself, call <strong>{{IMFActivate::ActivateObject}}</strong>.</p><p>The <em>pAttributes</em> parameter specifies an attribute store. To create the attribute store, call the <strong>{{MFCreateAttributes}}</strong> function. You must set the {{MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE}} attribute, which specifies the type of device (audio or video).</p><p>For audio capture devices, optionally set one of the following attributes:</p><p></p><table> <tr><th>Attribute</th><th>Description</th></tr> <tr><td> <p>{{MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ENDPOINT_ID}} </p> </td><td> <p>Specifies the audio endpoint {{ID}} of the audio capture device.</p> </td></tr> <tr><td> <p>{{MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ROLE}} </p> </td><td> <p>Specifies the device role. If this attribute is set, the function uses the default audio capture device for that device role.</p> <p>Do not combine this attribute with the {{MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_AUDCAP_ENDPOINT_ID}} attribute.</p> </td></tr> </table><p>?</p><p>If neither attribute is specified, the function selects the default audio capture device for the <strong>eCommunications</strong> role.</p><p>For video capture devices, you must set the following attribute:</p><p></p><table> <tr><th>Attribute</th><th>Description</th></tr> <tr><td> <p>{{MF_DEVSOURCE_ATTRIBUTE_SOURCE_TYPE_VIDCAP_SYMBOLIC_LINK}} </p> </td><td> <p>Specifies the symbolic link to the device.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAttributes}}</strong> interface of an attribute store, which is used to select the device. See Remarks.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFActivate}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates an <strong>{{IMFProtectedEnvironmentAccess}}</strong> object that allows content protection systems to perform a handshake with the protected environment.</p> <p>Loads a dynamic link library that is signed for the protected environment.</p> <p>A singlemodule load count is maintained on the dynamic link library (as it is with <strong>LoadLibrary</strong>). This load count is freed when the final release is called on the <strong>{{IMFSignedLibrary}}</strong> object.</p> <dd> <p>The name of the dynamic link library to load. This dynamic link library must be signed for the protected environment.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFSignedLibrary}}</strong> interface for the library.</p> </dd> <p>Returns an <strong>{{IMFSystemId}}</strong> object for retrieving system id data.</p> <p>Gets the local system {{ID}}.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p> <dd> <p>Application-specific verifier value.</p> </dd> <dd> <p>Length in bytes of verifier.</p> </dd> <dd> <p>Returned {{ID}} string. This value must be freed by the caller by calling <strong>CoTaskMemFree</strong>.</p> </dd> <p>Creates an <strong>{{IMFContentProtectionDevice}}</strong> interface for the specified media protection system.</p> <p>Checks whether a hardware security processor is supported for the specified media protection system.</p> <dd> <p>The identifier of the protection system that you want to check.</p> </dd> <dd> <p><strong>{{TRUE}}</strong> if the hardware security processor is supported for the specified protection system; otherwise <strong>{{FALSE}}</strong>.</p> </dd> <p>Creates an <strong>{{IMFContentDecryptorContext}}</strong> interface for the specified media protection system. </p> <p>Locks the shared Microsoft DirectX Graphics Infrastructure ({{DXGI}}) Device Manager.</p> <p>This function obtains a reference to a {{DXGI}} Device Manager instance that can be shared between components. The Microsoft Media Foundation platform creates this instance of the {{DXGI}} Device Manager as a singleton object. Alternatively, you can create a new {{DXGI}} Device Manager by calling <strong>{{MFCreateDXGIDeviceManager}}</strong>.</p><p>The first time this function is called, the Media Foundation platform creates the shared {{DXGI}} Device Manager. </p><p>When you are done use the <strong>{{IMFDXGIDeviceManager}}</strong> reference, call the <strong>{{MFUnlockDXGIDeviceManager}}</strong>.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a token that identifies this instance of the {{DXGI}} Device Manager. Use this token when calling <strong>{{IMFDXGIDeviceManager::ResetDevice}}</strong>. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFDXGIDeviceManager}}</strong> interface. The caller must release the interface.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Creates an instance of the <strong>{{IMFSensorStream}}</strong> interface.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>The supplied <strong>{{IMFSensorGroup}}</strong> is null.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>The supplied <strong>{{LPCWSTR}}</strong> is null.</p> </td></tr> </table><p>?</p> <p>Used to determinine whether the adapter supports creating heaps from existing system memory. Such heaps are not intended for general use, but are exceptionally useful for diagnostic purposes because they are guaranteed to persist even after the adapter faults or experiences a device-removal event. Persistence is not guaranteed for heaps returned by CreateHeap or CreateCommittedResource, even when the heap resides in system memory.</p> <p>For a variety of performance and compatibility reasons, applications should not make use of this feature except for diagnostic purposes. In particular, heaps created using this feature only support system-memory heaps with cross-adapter properties, which precludes many optimization opportunities that typical application scenarios could otherwise take advantage of.</p> <dd> <p>True if the adapter can create a heap from existing system memory. Otherwise, false.</p> </dd> <p>Contains flags that indicate the status of the <strong>{{IMFSourceReader::ReadSample}}</strong> method.</p> <p>Contains flags for the <strong>{{IMFSourceReader::ReadSample}}</strong> method.</p> <p>Contains statistics about the performance of the sink writer.</p> <dd> <p>The size of the structure, in bytes.</p> </dd> <dd> <p>The time stamp of the most recent sample given to the sink writer. The sink writer updates this value each time the application calls <strong>{{IMFSinkWriter::WriteSample}}</strong>.</p> </dd> <dd> <p>The time stamp of the most recent sample to be encoded. The sink writer updates this value whenever it calls <strong>{{IMFTransform::ProcessOutput}}</strong> on the encoder.</p> </dd> <dd> <p>The time stamp of the most recent sample given to the media sink. The sink writer updates this value whenever it calls <strong>{{IMFStreamSink::ProcessSample}}</strong> on the media sink.</p> </dd> <dd> <p>The time stamp of the most recent stream tick. The sink writer updates this value whenever the application calls <strong>{{IMFSinkWriter::SendStreamTick}}</strong>.</p> </dd> <dd> <p>The system time of the most recent sample request from the media sink. The sink writer updates this value whenever it receives an {{MEStreamSinkRequestSample}} event from the media sink. The value is the current system time.</p> </dd> <dd> <p>The number of samples received.</p> </dd> <dd> <p>The number of samples encoded.</p> </dd> <dd> <p>The number of samples given to the media sink.</p> </dd> <dd> <p>The number of stream ticks received.</p> </dd> <dd> <p>The amount of data, in bytes, currently waiting to be processed. </p> </dd> <dd> <p>The total amount of data, in bytes, that has been sent to the media sink.</p> </dd> <dd> <p>The number of pending sample requests.</p> </dd> <dd> <p>The average rate, in media samples per 100-nanoseconds, at which the application sent samples to the sink writer.</p> </dd> <dd> <p>The average rate, in media samples per 100-nanoseconds, at which the sink writer sent samples to the encoder.</p> </dd> <dd> <p>The average rate, in media samples per 100-nanoseconds, at which the sink writer sent samples to the media sink.</p> </dd> <p>Creates an instance of either the sink writer or the source reader.</p> <p>To get a reference to this interface, call the <strong>CoCreateInstance</strong> function. The {{CLSID}} is <strong>{{CLSID_MFReadWriteClassFactory}}</strong>. Call the <strong>{{MFStartup}}</strong> function before using the interface.</p><p>As an alternative to using this interface, you can call any of the following functions:</p><ul> <li> <strong>{{MFCreateSinkWriterFromMediaSink}}</strong> </li> <li> <strong>{{MFCreateSinkWriterFromURL}}</strong> </li> <li> <strong>{{MFCreateSourceReaderFromByteStream}}</strong> </li> <li> <strong>{{MFCreateSourceReaderFromMediaSource}}</strong> </li> <li> <strong>{{MFCreateSourceReaderFromURL}}</strong> </li> </ul><p>Internally, these functions use the <strong>{{IMFReadWriteClassFactory}}</strong> interface.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>Creates an instance of the sink writer or source reader, given a {{URL}}.</p> <p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{CLSID}} of the object to create.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong><strong>{{CLSID_MFSinkWriter}}</strong></strong></dt> </dl> </td><td> <p>Create the sink writer. The <em>ppvObject</em> parameter receives an <strong>{{IMFSinkWriter}}</strong> interface reference.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{CLSID_MFSourceReader}}</strong></strong></dt> </dl> </td><td> <p>Create the source reader. The <em>ppvObject</em> parameter receives an <strong>{{IMFSourceReader}}</strong> interface reference.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A null-terminated string that contains a {{URL}}. If <em>clsid</em> is {{CLSID_}}<strong>{{MFSinkWriter}}</strong>, the {{URL}} specifies the name of the output file. The sink writer creates a new file with this name. If <em>clsid</em> is <strong>{{CLSID_MFSourceReader}}</strong>, the {{URL}} specifies the input file for the source reader.</p> </dd> <dd> <p>A reference to the <strong>{{IMFAttributes}}</strong> interface. You can use this parameter to configure the sink writer or source reader. For more information, see the following topics:</p> <ul> <li> Sink Writer Attributes </li> <li> Source Reader Attributes </li> </ul> <p>This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>The {{IID}} of the requested interface.</p> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface.</p> </dd> <p>Creates an instance of the sink writer or source reader, given an <strong>{{IUnknown}}</strong> reference. </p> <p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{CLSID}} of the object to create.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong><strong>{{CLSID_MFSinkWriter}}</strong></strong></dt> </dl> </td><td> <p>Create the sink writer. The <em>ppvObject</em> parameter receives an <strong>{{IMFSinkWriter}}</strong> interface reference.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{CLSID_MFSourceReader}}</strong></strong></dt> </dl> </td><td> <p>Create the source reader. The <em>ppvObject</em> parameter receives an <strong>{{IMFSourceReader}}</strong> interface reference.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of an object that is used to initialize the source reader or sink writer. The method queries this reference for one of the following interfaces.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong><strong>{{IMFByteStream}}</strong></strong></dt> </dl> </td><td> <p>Pointer to a byte stream. </p> <p>If <em>clsid</em> is <strong>{{CLSID_MFSinkWriter}}</strong>, the sink writer writes data to this byte stream.</p> <p>If <em>clsid</em> is <strong>{{CLSID_MFSourceReader}}</strong>, this byte stream provides the source data for the source reader.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{IMFMediaSink}}</strong></strong></dt> </dl> </td><td> <p>Pointer to a media sink. Applies only when <em>clsid</em> is <strong>{{CLSID_MFSinkWriter}}</strong>. </p> </td></tr> <tr><td><dl> <dt><strong><strong>{{IMFMediaSource}}</strong></strong></dt> </dl> </td><td> <p>Pointer to a media source. Applies only when <em>clsid</em> is <strong>{{CLSID_MFSourceReader}}</strong>.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A reference to the <strong>{{IMFAttributes}}</strong> interface. You can use this parameter to configure the sink writer or source reader. For more information, see the following topics:</p> <ul> <li> Sink Writer Attributes </li> <li> Source Reader Attributes </li> </ul> <p>This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>The {{IID}} of the requested interface.</p> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface.</p> </dd> <p>Implemented by the Microsoft Media Foundation source reader object.</p> <p>To create the source reader, call one of the following functions:</p><ul> <li> <strong>{{MFCreateSourceReaderFromByteStream}}</strong> </li> <li> <strong>{{MFCreateSourceReaderFromMediaSource}}</strong> </li> <li> <strong>{{MFCreateSourceReaderFromURL}}</strong> </li> </ul><p>Alternatively, use the <strong>{{IMFReadWriteClassFactory}}</strong> interface.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p><p>In Windows?8, this interface is extended with <strong>{{IMFSourceReaderEx}}</strong>.</p> <p>Queries whether a stream is selected.</p> <p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The stream to query. The value can be any of the following.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0?0xFFFFFFFB</dt> </dl> </td><td> <p>The zero-based index of a stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_VIDEO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFC</dt> </dl> </td><td> <p>The first video stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_AUDIO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFD</dt> </dl> </td><td> <p>The first audio stream.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Receives <strong>{{TRUE}}</strong> if the stream is selected and will generate data. Receives <strong>{{FALSE}}</strong> if the stream is not selected and will not generate data.</p> </dd> <p>Selects or deselects one or more streams.</p> <p>There are two common uses for this method:</p><ul> <li>To change the default stream selection. Some media files contain multiple streams of the same type. For example, a file might include audio streams for multiple languages. You can use this method to change which of the streams is selected. To get information about each stream, call <strong>{{IMFSourceReader::GetPresentationAttribute}}</strong> or <strong>{{IMFSourceReader::GetNativeMediaType}}</strong>.</li> <li>If you will not need data from one of the streams, it is a good idea to deselect that stream. If the stream is selected, the media source might hold onto a queue of unread data, and the queue might grow indefinitely, consuming memory. </li> </ul><p>For an example of deselecting a stream, see Tutorial: Decoding Audio.</p><p>If a stream is deselected, the <strong>{{IMFSourceReader::ReadSample}}</strong> method returns <strong>{{MF_E_INVALIDREQUEST}}</strong> for that stream. Other <strong>{{IMFSourceReader}}</strong> methods are valid for deselected streams.</p><p>Stream selection does not affect how the source reader loads or unloads decoders in memory. In particular, deselecting a stream does not force the source reader to unload the decoder for that stream.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The stream to set. The value can be any of the following.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0?0xFFFFFFFB</dt> </dl> </td><td> <p>The zero-based index of a stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_VIDEO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFC</dt> </dl> </td><td> <p>The first video stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_AUDIO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFD</dt> </dl> </td><td> <p>The first audio stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_ALL_STREAMS}}</strong></strong></dt> <dt>0xFFFFFFFE</dt> </dl> </td><td> <p>All streams.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Specify <strong>{{TRUE}}</strong> to select streams or <strong>{{FALSE}}</strong> to deselect streams. If a stream is deselected, it will not generate data.</p> </dd> <p>Gets a format that is supported natively by the media source.</p> <p>This method queries the underlying media source for its native output format. Potentially, each source stream can produce more than one output format. Use the <em>dwMediaTypeIndex</em> parameter to loop through the available formats. Generally, file sources offer just one format per stream, but capture devices might offer several formats.</p><p> The method returns a copy of the media type, so it is safe to modify the object received in the <em> ppMediaType</em> parameter.</p><p>To set the output type for a stream, call the <strong>{{IMFSourceReader::SetCurrentMediaType}}</strong> method.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></strong></dt> </dl> </td><td> <p>The <em>dwStreamIndex</em> parameter is invalid.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_NO_MORE_TYPES}}</strong></strong></dt> </dl> </td><td> <p>The <em>dwMediaTypeIndex</em> parameter is out of range.</p> </td></tr> </table><p>?</p> <dd> <p>Specifies which stream to query. The value can be any of the following.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0?0xFFFFFFFB</dt> </dl> </td><td> <p>The zero-based index of a stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_VIDEO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFC</dt> </dl> </td><td> <p>The first video stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_AUDIO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFD</dt> </dl> </td><td> <p>The first audio stream.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>The zero-based index of the media type to retrieve.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaType}}</strong> interface. The caller must release the interface.</p> </dd> <p>Gets the current media type for a stream.</p> <p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></strong></dt> </dl> </td><td> <p>The <em>dwStreamIndex</em> parameter is invalid.</p> </td></tr> </table><p>?</p> <dd> <p>The stream to query. The value can be any of the following.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0?0xFFFFFFFB</dt> </dl> </td><td> <p>The zero-based index of a stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_VIDEO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFC</dt> </dl> </td><td> <p>The first video stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_AUDIO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFD</dt> </dl> </td><td> <p>The first audio stream.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaType}}</strong> interface. The caller must release the interface.</p> </dd> <p>Sets the media type for a stream.</p><p>This media type defines that format that the Source Reader produces as output. It can differ from the native format provided by the media source. See Remarks for more information.</p> <p>For each stream, you can set the media type to any of the following:</p><ul> <li>One of the native types offered by the media source. To enumerate the native types, call <strong>{{IMFSourceReader::GetNativeMediaType}}</strong>.</li> <li>If the native media type is compressed, you can specify a corresponding uncompressed format. The Source Reader will search for a decoder that can decode from the native format to the specified uncompressed format.</li> </ul><p>Audio resampling support was added to the source reader with Windows?8. In versions of Windows prior to Windows?8, the source reader does not support audio resampling. If you need to resample the audio in versions of Windows earlier than Windows?8, you can use the <strong>Audio Resampler {{DSP}}</strong>.</p><p>If you set the {{MF_SOURCE_READER_ENABLE_VIDEO_PROCESSING}} attribute to <strong>{{TRUE}}</strong> when you create the Source Reader, the Source Reader will convert {{YUV}} video to {{RGB}}-32. This conversion is not optimized for real-time video playback.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDMEDIATYPE}}</strong></strong></dt> </dl> </td><td> <p>At least one decoder was found for the native stream type, but the type specified by <em>pMediaType</em> was rejected.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDREQUEST}}</strong></strong></dt> </dl> </td><td> <p>One or more sample requests are still pending.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></strong></dt> </dl> </td><td> <p>The <em>dwStreamIndex</em> parameter is invalid.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_TOPO_CODEC_NOT_FOUND}}</strong></strong></dt> </dl> </td><td> <p>Could not find a decoder for the native stream type.</p> </td></tr> </table><p>?</p> <p>Seeks to a new position in the media source.</p> <p>The <strong>SetCurrentPosition</strong> method does not guarantee exact seeking. The accuracy of the seek depends on the media content. If the media content contains a video stream, the <strong>SetCurrentPosition</strong> method typically seeks to the nearest key frame before the desired position. The distance between key frames depends on several factors, including the encoder implementation, the video content, and the particular encoding settings used to encode the content. The distance between key frame can vary within a single video file (for example, depending on scene complexity).</p><p>After seeking, the application should call <strong>{{IMFSourceReader::ReadSample}}</strong> and advance to the desired position. </p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDREQUEST}}</strong></strong></dt> </dl> </td><td> <p>One or more sample requests are still pending.</p> </td></tr> </table><p>?</p> <dd> <p>A {{GUID}} that specifies the <em>time format</em>. The time format defines the units for the <em>varPosition</em> parameter. The following value is defined for all media sources:</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{GUID_NULL}}</strong></dt> </dl> </td><td> <p>100-nanosecond units.</p> </td></tr> </table> <p>?</p> <p>Some media sources might support additional values. </p> </dd> <dd> <p>The position from which playback will be started. The units are specified by the <em>guidTimeFormat</em> parameter. If the <em>guidTimeFormat</em> parameter is <strong>{{GUID_NULL}}</strong>, set the variant type to <strong>{{VT_I8}}</strong>.</p> </dd> <p>Reads the next sample from the media source.</p> <p>If the requested stream is not selected, the return code is <strong>{{MF_E_INVALIDREQUEST}}</strong>. See <strong>{{IMFSourceReader::SetStreamSelection}}</strong>.</p><p> This method can complete synchronously or asynchronously. If you provide a callback reference when you create the source reader, the method is asynchronous. Otherwise, the method is synchronous. For more information about setting the callback reference, see {{MF_SOURCE_READER_ASYNC_CALLBACK}}.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDREQUEST}}</strong></strong></dt> </dl> </td><td> <p>Invalid request.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></strong></dt> </dl> </td><td> <p>The <em>dwStreamIndex</em> parameter is invalid.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_NOTACCEPTING}}</strong></strong></dt> </dl> </td><td> <p>A flush operation is pending. See <strong>{{IMFSourceReader::Flush}}</strong>.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{E_INVALIDARG}}</strong></strong></dt> </dl> </td><td> <p>Invalid argument. See Remarks.</p> </td></tr> </table><p>?</p> <dd> <p>The stream to pull data from. The value can be any of the following.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0?0xFFFFFFFB</dt> </dl> </td><td> <p>The zero-based index of a stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_VIDEO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFC</dt> </dl> </td><td> <p>The first video stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_AUDIO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFD</dt> </dl> </td><td> <p>The first audio stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_ANY_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFE</dt> </dl> </td><td> <p>Get the next available sample, regardless of which stream.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MF_SOURCE_READER_CONTROL_FLAG}}</strong> enumeration.</p> </dd> <dd> <p>Receives the zero-based index of the stream.</p> </dd> <dd> <p>Receives a bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MF_SOURCE_READER_FLAG}}</strong> enumeration.</p> </dd> <dd> <p>Receives the time stamp of the sample, or the time of the stream event indicated in <em>pdwStreamFlags</em>. The time is given in 100-nanosecond units.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFSample}}</strong> interface or the value <strong>{{NULL}}</strong> (see Remarks). If this parameter receives a non-<strong>{{NULL}}</strong> reference, the caller must release the interface.</p> </dd> <p>Flushes one or more streams.</p> <p>The <strong>Flush</strong> method discards all queued samples and cancels all pending sample requests.</p><p>This method can complete either synchronously or asynchronously. If you provide a callback reference when you create the source reader, the method is asynchronous. Otherwise, the method is synchronous. For more information about the setting the callback reference, see {{MF_SOURCE_READER_ASYNC_CALLBACK}}.</p><p>In synchronous mode, the method blocks until the operation is complete.</p><p>In asynchronous mode, the application's <strong>{{IMFSourceReaderCallback::OnFlush}}</strong> method is called when the flush operation completes. While a flush operation is pending, the <strong>{{IMFSourceReader::ReadSample}}</strong> method returns <strong>{{MF_E_NOTACCEPTING}}</strong>.</p><strong>Note</strong>??In Windows?7, there was a bug in the implementation of this method, which causes <strong>OnFlush</strong> to be called before the flush operation completes. A hotfix is available that fixes this bug. For more information, see http://support.microsoft.com/kb/979567.?<p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The stream to flush. The value can be any of the following.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0?0xFFFFFFFB</dt> </dl> </td><td> <p>The zero-based index of a stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_VIDEO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFC</dt> </dl> </td><td> <p>The first video stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_AUDIO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFD</dt> </dl> </td><td> <p>The first audio stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_ALL_STREAMS}}</strong></strong></dt> <dt>0xFFFFFFFE</dt> </dl> </td><td> <p>All streams.</p> </td></tr> </table> <p>?</p> </dd> <p>Queries the underlying media source or decoder for an interface.</p> <p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The stream or object to query. If the value is <strong>{{MF_SOURCE_READER_MEDIASOURCE}}</strong>, the method queries the media source. Otherwise, it queries the decoder that is associated with the specified stream. The following values are possible.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0?0xFFFFFFFB</dt> </dl> </td><td> <p>The zero-based index of a stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_VIDEO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFC</dt> </dl> </td><td> <p>The first video stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_AUDIO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFD</dt> </dl> </td><td> <p>The first audio stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_MEDIASOURCE}}</strong></strong></dt> <dt>0xFFFFFFFF</dt> </dl> </td><td> <p>The media source. </p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A service identifier {{GUID}}. If the value is <strong>{{GUID_NULL}}</strong>, the method calls <strong>QueryInterface</strong> to get the requested interface. Otherwise, the method calls the <strong>{{IMFGetService::GetService}}</strong> method. For a list of service identifiers, see Service Interfaces.</p> </dd> <dd> <p>The interface identifier ({{IID}}) of the interface being requested. </p> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface.</p> </dd> <p>Gets an attribute from the underlying media source.</p> <p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The stream or object to query. The value can be any of the following.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0?0xFFFFFFFB</dt> </dl> </td><td> <p>The zero-based index of a stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_VIDEO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFC</dt> </dl> </td><td> <p>The first video stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_AUDIO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFD</dt> </dl> </td><td> <p>The first audio stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_MEDIASOURCE}}</strong></strong></dt> <dt>0xFFFFFFFF</dt> </dl> </td><td> <p>The media source. </p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A {{GUID}} that identifies the attribute to retrieve. If the <em>dwStreamIndex</em> parameter equals <strong>{{MF_SOURCE_READER_MEDIASOURCE}}</strong>, <em>guidAttribute</em> can specify one of the following:</p> <ul> <li>A presentation descriptor attribute. For a list of values, see Presentation Descriptor Attributes.</li> <li> {{MF_SOURCE_READER_MEDIASOURCE_CHARACTERISTICS}}. Use this value to get characteristics flags from the media source.</li> </ul> <p>Otherwise, if the <em>dwStreamIndex</em> parameter specifies a stream, <em>guidAttribute</em> specifies a stream descriptor attribute. For a list of values, see Stream Descriptor Attributes.</p> </dd> <dd> <p>A reference to a <strong>{{PROPVARIANT}}</strong> that receives the value of the attribute. Call the <strong>PropVariantClear</strong> function to free the <strong>{{PROPVARIANT}}</strong>. </p> </dd> <p>Extends the <strong>{{IMFSourceReader}}</strong> interface.</p><p>The Source Reader implements this interface in Windows?8. To get a reference to this interface, call <strong>QueryInterface</strong> on the Source Reader.</p> <p>Sets the native media type for a stream on the media source.</p> <p>This method sets the output type that is produced by the media source. Unlike the <strong>{{IMFSourceReader::SetCurrentMediaType}}</strong> method, this method does not insert any decoders, video processors, or other transforms. The media source must support the specified media type natively. To get a list of supported types from the media source, call <strong>{{IMFSourceReader::GetNativeMediaType}}</strong>.</p><p>In asynchronous mode, this method fails if a sample request is pending. In that case, wait for the <strong>OnReadSample</strong> callback to be invoked before calling the method. For more information about using the Source Reader in asynchronous mode, see <strong>{{IMFSourceReader::ReadSample}}</strong>.</p><p>This method can trigger a change in the output format for the stream. If so, the <strong>{{MF_SOURCE_READERF_CURRENTMEDIATYPECHANGED}}</strong> flag is returned in the <em>pdwStreamFlags</em> parameter. The method might also cause the Source Reader to remove any effects that were added by the <strong>{{IMFSourceReaderEx::AddTransformForStream}}</strong> method. If this occurs, the <strong>{{MF_SOURCE_READERF_ALLEFFECTSREMOVED}}</strong> flag is returned in <em>pdwStreamFlags</em>. </p><p>This method is useful with audio and video capture devices, because a device might support several output formats. This method enables the application to choose the device format before decoders and other transforms are added.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>Invalid request.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></strong></dt> </dl> </td><td> <p>The <em>dwStreamIndex</em> parameter is invalid.</p> </td></tr> </table><p>?</p> <dd></dd> <dd> <p>A reference to the <strong>{{IMFMediaType}}</strong> interface of the media type.</p> </dd> <dd> <p>Receives a bitwise <strong>{{OR}}</strong> of zero or more of the following flags.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{MF_SOURCE_READERF_ALLEFFECTSREMOVED}}</strong></dt> </dl> </td><td> <p>All effects were removed from the stream.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_SOURCE_READERF_CURRENTMEDIATYPECHANGED}}</strong></dt> </dl> </td><td> <p>The current output type changed.</p> </td></tr> </table> <p>?</p> </dd> <p>Adds a transform, such as an audio or video effect, to a stream.</p> <p>This method attempts to add the transform at the end of the current processing chain. </p><p>To use this method, make the following sequence of calls:</p><ol> <li>Call <strong>{{IMFSourceReader::SetCurrentMediaType}}</strong> to set the output type that you want for the stream. In this step, you can specify a media type that contains only the major type and subtype {{GUIDs}}. For example, to get 32-bit {{RGB}} output, set a major type of <strong>{{MFMediaType_Video}}</strong> and a subtype of <strong>{{MFVideoFormat_RGB32}}</strong>. (For more information, see Media Type {{GUIDs}}.)</li> <li>Call <strong>AddTransformForStream</strong>. If the Source Reader successfully connects the transform, it sets the output type on the transform.</li> <li>Call <strong>{{IMFSourceReader::GetCurrentMediaType}}</strong> to get the output type from the transform. This method returns a media type with a complete format description.</li> <li>Optionally, if you want to modify the output type, call <strong>{{IMFSourceReader::SetCurrentMediaType}}</strong> again to set a complete media type on the transform.</li> </ol><p>The <strong>AddTransformForStream</strong> method will not insert a decoder into the processing chain. If the native stream format is encoded, and the transform requires an uncompressed format, call <strong>SetCurrentMediaType</strong> to set the uncompressed format (step 1 in the previous list). However, the method will insert a video processor to convert between {{RGB}} and {{YUV}} formats, if required.</p><p>The method fails if the source reader was configured with the {{MF_READWRITE_DISABLE_CONVERTERS}} or {{MF_SOURCE_READER_ENABLE_VIDEO_PROCESSING}} attributes. </p><p>In asynchronous mode, the method also fails if a sample request is pending. In that case, wait for the <strong>OnReadSample</strong> callback to be invoked before calling the method. For more information about using the Source Reader in asynchronous mode, see <strong>{{IMFSourceReader::ReadSample}}</strong>.</p><p>You can add a transform at any time during streaming. However, the method does not flush or drain the pipeline before inserting the transform. Therefore, if data is already in the pipeline, the next sample is not guaranteed to have the transform applied.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDMEDIATYPE}}</strong></dt> </dl> </td><td> <p>The transform does not support the current stream format, and no conversion was possible. See Remarks for more information.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>Invalid request.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></strong></dt> </dl> </td><td> <p>The <em>dwStreamIndex</em> parameter is invalid.</p> </td></tr> </table><p>?</p> <dd> <p>The stream to configure. The value can be any of the following.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0?0xFFFFFFFB</dt> </dl> </td><td> <p>The zero-based index of a stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_VIDEO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFC</dt> </dl> </td><td> <p>The first video stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_AUDIO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFD</dt> </dl> </td><td> <p>The first audio stream.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A reference to one of the following:</p> <ul> <li>A Media Foundation transform ({{MFT}}) that exposes the <strong>{{IMFTransform}}</strong> interface.</li> <li>An {{MFT}} activation object that exposes the <strong>{{IMFActivate}}</strong> interface.</li> </ul> </dd> <p>Removes all of the Media Foundation transforms ({{MFTs}}) for a specified stream, with the exception of the decoder.</p> <p>Calling this method can reset the current output type for the stream. To get the new output type, call <strong>{{IMFSourceReader::GetCurrentMediaType}}</strong>.</p><p>In asynchronous mode, this method fails if a sample request is pending. In that case, wait for the <strong>OnReadSample</strong> callback to be invoked before calling the method. For more information about using the Source Reader in asynchronous mode, see <strong>{{IMFSourceReader::ReadSample}}</strong>.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>Invalid request.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></strong></dt> </dl> </td><td> <p>The <em>dwStreamIndex</em> parameter is invalid.</p> </td></tr> </table><p>?</p> <dd> <p>The stream for which to remove the {{MFTs}}. The value can be any of the following.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0?0xFFFFFFFB</dt> </dl> </td><td> <p>The zero-based index of a stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_VIDEO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFC</dt> </dl> </td><td> <p>The first video stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_AUDIO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFD</dt> </dl> </td><td> <p>The first audio stream.</p> </td></tr> </table> <p>?</p> </dd> <p>Gets a reference to a Media Foundation transform ({{MFT}}) for a specified stream.</p> <p>You can use this method to configure an {{MFT}} after it is inserted into the processing chain. Do not use the reference returned in <em>ppTransform</em> to set media types on the {{MFT}} or to process data. In particular, calling any of the following <strong>{{IMFTransform}}</strong> methods could have unexpected results.</p><ul> <li> <strong>AddInputStreams</strong> </li> <li> <strong>DeleteInputStream</strong> </li> <li> <strong>ProcessEvent</strong> </li> <li> <strong>ProcessInput</strong> </li> <li> <strong>ProcessMessage</strong> </li> <li> <strong>ProcessOutput</strong> </li> <li> <strong>SetInputType</strong> </li> <li> <strong>SetOutputType</strong> </li> </ul><p>If a decoder is present, it appears at index position zero.</p><p>To avoid losing any data, you should drain the source reader before calling this method. For more information, see Draining the Data Pipeline.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDINDEX}}</strong></dt> </dl> </td><td> <p>The <em>dwTransformIndex</em> parameter is out of range.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></strong></dt> </dl> </td><td> <p>The <em>dwStreamIndex</em> parameter is invalid.</p> </td></tr> </table><p>?</p> <dd> <p>The stream to query for the {{MFT}}. The value can be any of the following.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0?0xFFFFFFFB</dt> </dl> </td><td> <p>The zero-based index of a stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_VIDEO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFC</dt> </dl> </td><td> <p>The first video stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_SOURCE_READER_FIRST_AUDIO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFD</dt> </dl> </td><td> <p>The first audio stream.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>The zero-based index of the {{MFT}} to retreive.</p> </dd> <dd> <p>Receives a {{GUID}} that specifies the category of the {{MFT}}. For a list of possible values, see <strong>{{MFT_CATEGORY}}</strong>.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFTransform}}</strong> interface of the {{MFT}}. The caller must release the interface.</p> </dd> <p>Callback interface for the Microsoft Media Foundation source reader.</p> <p>Use the {{MF_SOURCE_READER_ASYNC_CALLBACK}} attribute to set the callback reference when you first create the source reader object.</p><p>The callback methods can be called from any thread, so an object that implements this interface must be thread-safe.</p><p>If you do not specify a callback reference, the source reader operates synchronously.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>Called when the <strong>{{IMFSourceReader::ReadSample}}</strong> method completes.</p> <p>The <em>pSample</em> parameter might be <strong>{{NULL}}</strong>. For example, when the source reader reaches the end of a stream, <em>dwStreamFlags</em> contains the <strong>{{MF_SOURCE_READERF_ENDOFSTREAM}}</strong> flag, and <em>pSample</em> is <strong>{{NULL}}</strong>. </p><p>If there is a gap in the stream, <em>dwStreamFlags</em> contains the <strong>{{MF_SOURCE_READERF_STREAMTICK}}</strong> flag, <em>pSample</em> is <strong>{{NULL}}</strong>, and <em>llTimestamp</em> indicates the time when the gap occurred. </p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Currently, the source reader ignores the return value.</p> <p>Called when the <strong>{{IMFSourceReader::Flush}}</strong> method completes.</p> <p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Currently, the source reader ignores the return value.</p> <p>Called when the source reader receives certain events from the media source.</p> <p>In the current implementation, the source reader uses this method to forward the following events to the application:</p><ul> <li> {{MEBufferingStarted}} </li> <li> {{MEBufferingStopped}} </li> <li> {{MEConnectEnd}} </li> <li> {{MEConnectStart}} </li> <li> {{MEExtendedType}} </li> <li> {{MESourceCharacteristicsChanged}} </li> <li> {{MESourceMetadataChanged}} </li> </ul><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Currently, the source reader ignores the return value.</p> <dd> <p>For stream events, the value is the zero-based index of the stream that sent the event. For source events, the value is <strong>{{MF_SOURCE_READER_MEDIASOURCE}}</strong>.</p> </dd> <dd> <p>A reference to the <strong>{{IMFMediaEvent}}</strong> interface of the event.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Extends the <strong>{{IMFSourceReaderCallback}}</strong> interface.</p> <p>This interface provides a mechanism for apps that use <strong>{{IMFSourceReader}}</strong> to receive asynchronous notifications when the transform chain is complete and the system is ready for use or when an asynchronous error occurs.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Called when the transform chain in the <strong>{{IMFSourceReader}}</strong> is built or modified.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Currently, the source reader ignores the return value.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Called when an asynchronous error occurs with the <strong>{{IMFSourceReader}}</strong>.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Currently, the source reader ignores the return value.</p> <p>Implemented by the Microsoft Media Foundation sink writer object.</p> <p>To create the sink writer, call one of the following functions:</p><ul> <li> <strong>{{MFCreateSinkWriterFromMediaSink}}</strong> </li> <li> <strong>{{MFCreateSinkWriterFromURL}}</strong> </li> </ul><p>Alternatively, use the <strong>{{IMFReadWriteClassFactory}}</strong> interface.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p><p>In Windows?8, this interface is extended with <strong>{{IMFSinkWriterEx}}</strong>.</p> <p>Adds a stream to the sink writer.</p> <p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFMediaType}}</strong> interface of a media type. This media type specifies the format of the samples that will be written to the file. It does not need to match the input format. To set the input format, call <strong>{{IMFSinkWriter::SetInputMediaType}}</strong>.</p> </dd> <dd> <p>Receives the zero-based index of the new stream.</p> </dd> <p>Sets the input format for a stream on the sink writer.</p> <p>The input format does not have to match the target format that is written to the media sink. If the formats do not match, the method attempts to load an encoder that can encode from the input format to the target format.</p><p>After streaming begins?that is, after the first call to <strong>{{IMFSinkWriter::WriteSample}}</strong>?you can call this method at any time to change the input format. However, the underlying encoder and media sink must support dynamic format changes.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDMEDIATYPE}}</strong></strong></dt> </dl> </td><td> <p>The underlying media sink does not support the format, no conversion is possible, or a dynamic format change is not possible.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></strong></dt> </dl> </td><td> <p>The <em>dwStreamIndex</em> parameter is invalid.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_TOPO_CODEC_NOT_FOUND}}</strong></strong></dt> </dl> </td><td> <p>Could not find an encoder for the encoded format.</p> </td></tr> </table><p>?</p> <dd> <p>The zero-based index of the stream. The index is received by the <em>pdwStreamIndex</em> parameter of the <strong>{{IMFSinkWriter::AddStream}}</strong> method.</p> </dd> <dd> <p>A reference to the <strong>{{IMFMediaType}}</strong> interface of a media type. The media type specifies the input format.</p> </dd> <dd> <p>A reference to the <strong>{{IMFAttributes}}</strong> interface of an attribute store. Use the attribute store to configure the encoder. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <p>Initializes the sink writer for writing.</p> <p>Call this method after you configure the input streams and before you send any data to the sink writer. </p><p>You must call <strong>BeginWriting</strong> before calling any of the following methods:</p><ul> <li> <strong>{{IMFSinkWriter::Finalize}}</strong> </li> <li> <strong>{{IMFSinkWriter::Flush}}</strong> </li> <li> <strong>{{IMFSinkWriter::NotifyEndOfSegment}}</strong> </li> <li> <strong>{{IMFSinkWriter::PlaceMarker}}</strong> </li> <li> <strong>{{IMFSinkWriter::SendStreamTick}}</strong> </li> <li> <strong>{{IMFSinkWriter::WriteSample}}</strong> </li> </ul><p>The underlying media sink must have at least one input stream. Otherwise, <strong>BeginWriting</strong> returns <strong>{{MF_E_INVALIDREQUEST}}</strong>. To add input streams, call the <strong>{{IMFSinkWriter::AddStream}}</strong> method.</p><p>If <strong>BeginWriting</strong> succeeds, any further calls to <strong>BeginWriting</strong> return <strong>{{MF_E_INVALIDREQUEST}}</strong>.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDREQUEST}}</strong></strong></dt> </dl> </td><td> <p>The request is invalid.</p> </td></tr> </table><p>?</p> <p>Delivers a sample to the sink writer.</p> <p>You must call <strong>{{IMFSinkWriter::BeginWriting}}</strong> before calling this method. Otherwise, the method returns <strong>{{MF_E_INVALIDREQUEST}}</strong>.</p><p>By default, the sink writer limits the rate of incoming data by blocking the calling thread inside the <strong>WriteSample</strong> method. This prevents the application from delivering samples too quickly. To disable this behavior, set the {{MF_SINK_WRITER_DISABLE_THROTTLING}} attribute when you create the sink writer.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDREQUEST}}</strong></strong></dt> </dl> </td><td> <p>The request is invalid.</p> </td></tr> </table><p>?</p> <dd> <p>The zero-based index of the stream for this sample.</p> </dd> <dd> <p>A reference to the <strong>{{IMFSample}}</strong> interface of the sample.</p> </dd> <p>Indicates a gap in an input stream.</p> <p>For video, call this method once for each missing frame. For audio, call this method at least once per second during a gap in the audio. Set the <strong>{{MFSampleExtension_Discontinuity}}</strong> attribute on the first media sample after the gap.</p><p>Internally, this method calls <strong>{{IMFStreamSink::PlaceMarker}}</strong> on the media sink.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the stream.</p> </dd> <dd> <p>The position in the stream where the gap in the data occurs. The value is given in 100-nanosecond units, relative to the start of the stream.</p> </dd> <p>Places a marker in the specified stream.</p> <p>To use this method, you must provide an asynchronous callback when you create the sink writer. Otherwise, the method returns <strong>{{MF_E_INVALIDREQUEST}}</strong>. For more information, see {{MF_SINK_WRITER_ASYNC_CALLBACK}}.</p><p>Markers provide a way to be notified when the media sink consumes all of the samples in a stream up to a certain point. The media sink does not process the marker until it has processed all of the samples that came before the marker. When the media sink processes the marker, the sink writer calls the application's <strong>OnMarker</strong> method. When the callback is invoked, you know that the sink has consumed all of the previous samples for that stream.</p><p>For example, to change the format midstream, call <strong>PlaceMarker</strong> at the point where the format changes. When <strong>OnMarker</strong> is called, it is safe to call <strong>{{IMFSinkWriter::SetInputMediaType}}</strong> to change the input type (assuming that the media sink supports dynamic format changes).</p><p>Internally, this method calls <strong>{{IMFStreamSink::PlaceMarker}}</strong> on the media sink.</p><p> </p><strong>Note</strong>??The <em>pvContext</em> parameter of the <strong>{{IMFSinkWriter::PlaceMarker}}</strong> method is not passed to the <em>pvarContextValue</em> parameter of the <strong>{{IMFStreamSink::PlaceMarker}}</strong> method. These two parameters are not directly related.?<p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDREQUEST}}</strong></strong></dt> </dl> </td><td> <p>The request is invalid.</p> </td></tr> </table><p>?</p> <dd> <p>The zero-based index of the stream.</p> </dd> <dd> <p>Pointer to an application-defined value. The value of this parameter is returned to the caller in the <em>pvContext</em> parameter of the caller's <strong>{{IMFSinkWriterCallback::OnMarker}}</strong> callback method. The application is responsible for any memory allocation associated with this data. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <p>Notifies the media sink that a stream has reached the end of a segment.</p> <p>You must call <strong>{{IMFSinkWriter::BeginWriting}}</strong> before calling this method. Otherwise, the method returns <strong>{{MF_E_INVALIDREQUEST}}</strong>.</p><p>This method sends an <strong>{{MFSTREAMSINK_MARKER_ENDOFSEGMENT}}</strong> marker to the media sink for the specified streams. For more information, see <strong>{{IMFStreamSink::PlaceMarker}}</strong>.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDREQUEST}}</strong></strong></dt> </dl> </td><td> <p>The request is invalid.</p> </td></tr> </table><p>?</p> <dd> <p>The zero-based index of a stream, or <strong>{{MF_SINK_WRITER_ALL_STREAMS}}</strong> to signal that all streams have reached the end of a segment.</p> </dd> <p>Flushes one or more streams.</p> <p>You must call <strong>{{IMFSinkWriter::BeginWriting}}</strong> before calling this method. Otherwise, the method returns <strong>{{MF_E_INVALIDREQUEST}}</strong>.</p><p>For each stream that is flushed, the sink writer drops all pending samples, flushes the encoder, and sends an <strong>{{MFSTREAMSINK_MARKER_ENDOFSEGMENT}}</strong> marker to the media sink.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDREQUEST}}</strong></strong></dt> </dl> </td><td> <p>The request is invalid.</p> </td></tr> </table><p>?</p> <dd> <p>The zero-based index of the stream to flush, or <strong>{{MF_SINK_WRITER_ALL_STREAMS}}</strong> to flush all of the streams.</p> </dd> <p>Completes all writing operations on the sink writer.</p> <p>Call this method after you send all of the input samples to the sink writer. The method performs any operations needed to create the final output from the media sink.</p><p>If you provide a callback interface when you create the sink writer, this method completes asynchronously. When the operation completes, the <strong>{{IMFSinkWriterCallback::OnFinalize}}</strong> method of your callback is called. For more information, see {{MF_SINK_WRITER_ASYNC_CALLBACK}}. Otherwise, if you do not provide a callback, the <strong>Finalize</strong> method blocks until the operation completes.</p><p>Internally, this method calls <strong>{{IMFStreamSink::PlaceMarker}}</strong> to place end-of-segment markers for each stream on the media sink. It also calls <strong>{{IMFFinalizableMediaSink::BeginFinalize}}</strong> and <strong>EndFinalize</strong> if the media sink supports the <strong>{{IMFFinalizableMediaSink}}</strong> interface.</p><p>After this method is called, the following methods will fail:</p><ul> <li> <strong>{{IMFSinkWriter::PlaceMarker}}</strong> </li> <li> <strong>{{IMFSinkWriter::SendStreamTick}}</strong> </li> <li> <strong>{{IMFSinkWriter::WriteSample}}</strong> </li> </ul><p>If you do not call <strong>Finalize</strong>, the output from the media sink might be incomplete or invalid. For example, required file headers might be missing from the output file.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Queries the underlying media sink or encoder for an interface.</p> <p>If the <em>dwStreamIndex</em> parameter equals <strong>{{MF_SINK_WRITER_MEDIASINK}}</strong>, the method attempts to get the interface from the media sink. Otherwise, it attempts to get the interface from the encoder for the stream at the specified index. If that fails, or if no encoder is present, the method attempts to get the interface from the stream on the media sink.</p><p> If the input and output types of the sink are identical and compressed, it's possible that no encoding is required and the video encoder will not be instantiated. In that case, <strong>GetServiceForStream</strong> will return {{MF_E_UNSUPPORTED_SERVICE}}. </p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of a stream to query, or <strong>{{MF_SINK_WRITER_MEDIASINK}}</strong> to query the media sink itself.</p> </dd> <dd> <p>A service identifier {{GUID}}, or <strong>{{GUID_NULL}}</strong>. If the value is <strong>{{GUID_NULL}}</strong>, the method calls <strong>QueryInterface</strong> to get the requested interface. Otherwise, the method calls <strong>{{IMFGetService::GetService}}</strong>. For a list of service identifiers, see Service Interfaces.</p> </dd> <dd> <p>The interface identifier ({{IID}}) of the interface being requested. </p> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface.</p> </dd> <p>Gets statistics about the performance of the sink writer.</p> <p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>Invalid stream number.</p> </td></tr> </table><p>?</p> <dd> <p>The zero-based index of a stream to query, or <strong>{{MF_SINK_WRITER_ALL_STREAMS}} </strong> to query the media sink itself.</p> </dd> <dd> <p>A reference to an <strong>{{MF_SINK_WRITER_STATISTICS}}</strong> structure. Before calling the method, set the <strong>cb</strong> member to the size of the structure in bytes. The method fills the structure with statistics from the sink writer.</p> </dd> <p>Extends the <strong>{{IMFSinkWriter}}</strong> interface.</p><p>The Sink Writer implements this interface in Windows?8. To get a reference to this interface, call <strong>QueryInterface</strong> on the Sink Writer.</p> <p>Gets a reference to a Media Foundation transform ({{MFT}}) for a specified stream.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of a stream.</p> </dd> <dd> <p>The zero-based index of the {{MFT}} to retreive.</p> </dd> <dd> <p>Receives a reference to a {{GUID}} that specifies the category of the {{MFT}}. For a list of possible values, see <strong>{{MFT_CATEGORY}}</strong>.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFTransform}}</strong> interface of the {{MFT}}. The caller must release the interface.</p> </dd> <p>Provides additional functionality on the sink writer for dynamically changing the media type and encoder configuration. </p> <p>The Sink Writer implements this interface in Windows?8.1. To get a reference to this interface, call <strong>QueryInterface</strong> on the <strong>{{IMFSinkWriter}}</strong>.</p> <p>Dynamically changes the target media type that Sink Writer is encoding to. </p> <p>The new media type must be supported by the media sink being used and by the encoder {{MFTs}} installed on the system. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Specifies the stream index.</p> </dd> <dd> <p>The new media format to encode to.</p> </dd> <dd> <p>The new set of encoding parameters to configure the encoder with. If not specified, previously provided parameters will be used. </p> </dd> <p>Dynamically updates the encoder configuration with a collection of new encoder settings.</p> <p>The encoder will be configured with these settings after all previously queued input media samples have been sent to it through <strong>{{IMFTransform::ProcessInput}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Specifies the stream index.</p> </dd> <dd> <p>A set of encoding parameters to configure the encoder with. </p> </dd> <p>Callback interface for the Microsoft Media Foundation sink writer. </p> <p>Set the callback reference by setting the {{MF_SINK_WRITER_ASYNC_CALLBACK}} attribute when you first create the sink writer. </p><p>The callback methods can be called from any thread, so an object that implements this interface must be thread-safe.</p><p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>Called when the <strong>{{IMFSinkWriter::Finalize}}</strong> method completes.</p> <p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Currently, the sink writer ignores the return value.</p> <p>Called when the <strong>{{IMFSinkWriter::PlaceMarker}}</strong> method completes.</p> <p>This interface is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Currently, the sink writer ignores the return value.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Extends the <strong>{{IMFSinkWriterCallback}}</strong> interface.</p> <p>This interface provides a mechanism for apps that use <strong>{{IMFSinkWriter}}</strong> to receive asynchronous notifications when the transform chain is complete and the system is ready for use or when an asynchronous error occurs.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Called when the transform chain in the <strong>{{IMFSourceReader}}</strong> is built or modified.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Currently, the sink writer ignores the return value.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Called when an asynchronous error occurs with the <strong>{{IMFSinkWriter}}</strong>.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Currently, the sink writer ignores the return value.</p> <p>Creates the source reader from a {{URL}}.</p> <p>Call <strong>CoInitialize(Ex)</strong> and <strong>{{MFStartup}}</strong> before calling this function.</p><p> Internally, the source reader calls the <strong>{{IMFSourceResolver::CreateObjectFromURL}}</strong> method to create a media source from the {{URL}}. </p><p>This function is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{URL}} of a media file to open.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFAttributes}}</strong> interface. You can use this parameter to configure the source reader. For more information, see Source Reader Attributes. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFSourceReader}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates the source reader from a byte stream.</p> <p>Call <strong>CoInitialize(Ex)</strong> and <strong>{{MFStartup}}</strong> before calling this function.</p><p> Internally, the source reader calls the <strong>{{IMFSourceResolver::CreateObjectFromByteStream}}</strong> method to create a media source from the byte stream. Therefore, a byte-stream handler must be registered for the byte stream. For more information about byte-stream handlers, see Scheme Handlers and Byte-Stream Handlers. </p><p>This function is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFByteStream}}</strong> interface of a byte stream. This byte stream will provide the source data for the source reader.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFAttributes}}</strong> interface. You can use this parameter to configure the source reader. For more information, see Source Reader Attributes. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFSourceReader}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates the source reader from a media source.</p> <p>Call <strong>CoInitialize(Ex)</strong> and <strong>{{MFStartup}}</strong> before calling this function.</p><p>By default, when the application releases the source reader, the source reader shuts down the media source by calling <strong>{{IMFMediaSource::Shutdown}}</strong> on the media source. At that point, the application can no longer use the media source.</p><p>To change this default behavior, set the {{MF_SOURCE_READER_DISCONNECT_MEDIASOURCE_ON_SHUTDOWN}} attribute in the <em>pAttributes</em> parameter. If this attribute is <strong>{{TRUE}}</strong>, the application is responsible for shutting down the media source.</p><p>When using the Source Reader, do not call any of the following methods on the media source:</p><ul> <li> <strong>{{IMFMediaSource::Pause}}</strong> </li> <li> <strong>{{IMFMediaSource::Start}}</strong> </li> <li> <strong>{{IMFMediaSource::Stop}}</strong> </li> <li>All <strong>{{IMFMediaEventGenerator}}</strong> methods</li> </ul><p>This function is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_DRM_UNSUPPORTED}}</strong></strong></dt> </dl> </td><td> <p>The source contains protected content.</p> </td></tr> </table><p>?</p> <dd> <p>A reference to the <strong>{{IMFMediaSource}}</strong> interface of a media source.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFAttributes}}</strong> interface. You can use this parameter to configure the source reader. For more information, see Source Reader Attributes. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFSourceReader}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates the sink writer from a {{URL}} or byte stream.</p> <p>Call <strong>CoInitialize(Ex)</strong> and <strong>{{MFStartup}}</strong> before calling this function.</p><p>The first three parameters to this function can be <strong>{{NULL}}</strong>; however, only certain combinations are valid:</p><p> </p><table> <tr><th>Description</th><th><em>pwszOutputURL</em></th><th><em>pByteStream</em></th><th><em>pAttributes</em></th></tr> <tr><td>Specify a byte stream, with no {{URL}}.</td><td><strong>{{NULL}}</strong></td><td>non-<strong>{{NULL}}</strong></td><td>Required (must not be <strong>{{NULL}}</strong>).</td></tr> <tr><td>Specify a {{URL}}, with no byte stream.</td><td>not <strong>{{NULL}}</strong></td><td><strong>{{NULL}}</strong></td><td>Optional (may be <strong>{{NULL}}</strong>).</td></tr> <tr><td>Specify both a {{URL}} and a byte stream.</td><td>non-<strong>{{NULL}}</strong></td><td>non-<strong>{{NULL}}</strong></td><td>Optional (may be <strong>{{NULL}}</strong>).</td></tr> </table><p>?</p><p>The <em>pAttributes</em> parameter is required in the first case and optional in the others.</p><ul> <li>Case 1: Specify a byte stream without a {{URL}}. The <em>pAttributes</em> parameter must point to an attribute store that contains the {{MF_TRANSCODE_CONTAINERTYPE}} attribute. The sink writer uses the {{MF_TRANSCODE_CONTAINERTYPE}} attribute to determine the type of file container to write, such as {{ASF}} or {{MP4}}.</li> <li>Case 2: Specify a {{URL}} without a byte stream. The sink writer creates a new file named <em>pwszOutputURL</em>. If <em>pAttributes</em> specifies an attribute store with the {{MF_TRANSCODE_CONTAINERTYPE}} attribute, the sink writer uses that attribute to determine the type of file container. Otherwise, if the {{MF_TRANSCODE_CONTAINERTYPE}} attribute is absent or <em>pAttributes</em> is <strong>{{NULL}}</strong>, the sink writer uses the file name extension to select the container type; for example, ".asf" for an {{ASF}} file.</li> <li>Case 3: Specify both a {{URL}} and a byte stream. The sink writer writes to the byte stream. The {{URL}} provided in <em>pwszOutputURL</em> is informational only; the sink writer does not create a new file. If <em>pAttributes</em> specifies an attribute store with the {{MF_TRANSCODE_CONTAINERTYPE}} attribute, the sink writer uses that attribute to determine the type of file container. Otherwise, the sink writer uses the file name extension to select the container type. The {{MF_TRANSCODE_CONTAINERTYPE}} attribute overrides the {{URL}} file name extension in this case.</li> </ul><p>This function is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>This function can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_FOUND}}</strong></dt> </dl> </td><td> <p>The specified {{URL}} was not found.</p> </td></tr> </table><p>?</p> <dd> <p>A null-terminated string that contains the {{URL}} of the output file. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFByteStream}}</strong> interface of a byte stream. This parameter can be <strong>{{NULL}}</strong>.</p> <p>If this parameter is a valid reference, the sink writer writes to the provided byte stream. (The byte stream must be writable.) Otherwise, if <em>pByteStream</em> is <strong>{{NULL}}</strong>, the sink writer creates a new file named <em>pwszOutputURL</em>.</p> </dd> <dd> <p>Pointer to the <strong>{{IMFAttributes}}</strong> interface. You can use this parameter to configure the sink writer. For more information, see Sink Writer Attributes. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFSinkWriter}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates the sink writer from a media sink.</p> <p>Call <strong>CoInitialize(Ex)</strong> and <strong>{{MFStartup}}</strong> before calling this function.</p><p>When you are done using the media sink, call the media sink's <strong>{{IMFMediaSink::Shutdown}}</strong> method. (The sink writer does not shut down the media sink.) Release the sink writer before calling <strong>Shutdown</strong> on the media sink.</p><p>This function is available on Windows?Vista if Platform Update Supplement for Windows?Vista is installed.</p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to the <strong>{{IMFMediaSink}}</strong> interface of a media sink. </p> </dd> <dd> <p>Pointer to the <strong>{{IMFAttributes}}</strong> interface. You can use this parameter to configure the sink writer. For more information, see Sink Writer Attributes. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFSinkWriter}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Defines the data type for a key/value pair.</p> <dd> <p>Unsigned 32-bit integer.</p> </dd> <dd> <p>Unsigned 64-bit integer.</p> </dd> <dd> <p>Floating-point number.</p> </dd> <dd> <p><strong>{{GUID}}</strong> value.</p> </dd> <dd> <p>{{NULL}}-terminated wide-character string.</p> </dd> <dd> <p>Byte array.</p> </dd> <dd> <p><strong>{{IUnknown}}</strong> reference.</p> </dd> <p> </p><p>Specifies how to compare the attributes on two objects.</p> <dd> <p>Check whether all the attributes in <em>pThis</em> exist in <em>pTheirs</em> and have the same data, where <em>pThis</em> is the object whose <strong>Compare</strong> method is being called and <em>pTheirs</em> is the object given in the <em>pTheirs</em> parameter.</p> </dd> <dd> <p>Check whether all the attributes in <em>pTheirs</em> exist in <em>pThis</em> and have the same data, where <em>pThis</em> is the object whose <strong>Compare</strong> method is being called and <em>pTheirs</em> is the object given in the <em>pTheirs</em> parameter.</p> </dd> <dd> <p>Check whether both objects have identical attributes with the same data.</p> </dd> <dd> <p>Check whether the attributes that exist in both objects have the same data.</p> </dd> <dd> <p>Find the object with the fewest number of attributes, and check if those attributes exist in the other object and have the same data.</p> </dd> <p> </p><p>Defines flags for serializing and deserializing attribute stores.</p> <dd> <p>If this flag is set, <strong>{{IUnknown}}</strong> references in the attribute store are marshaled to and from the stream. If this flag is absent, <strong>{{IUnknown}}</strong> references in the attribute store are not marshaled or serialized.</p> </dd> <p>Contains flags for the <strong>{{IMF2DBuffer2::Lock2DSize}}</strong> method.</p> <p>Specifies how a video stream is interlaced.</p><p>In the descriptions that follow, upper field refers to the field that contains the leading half scan line. Lower field refers to the field that contains the first full scan line.</p> <p>Scan lines in the lower field are 0.5 scan line lower than those in the upper field. In {{NTSC}} television, a frame consists of a lower field followed by an upper field. In {{PAL}} television, a frame consists of an upper field followed by a lower field.</p><p>The upper field is also called the even field, the top field, or field 2. The lower field is also called the odd field, the bottom field, or field 1.</p><p>If the interlace mode is {{MFVideoInterlace_FieldSingleUpper}} or {{MFVideoInterlace_FieldSingleLower}}, each sample contains a single field, so each buffer contains only half the number of field lines given in the media type.</p> <dd> <p> The type of interlacing is not known. </p> </dd> <dd> <p> Progressive frames. </p> </dd> <dd> <p> Interlaced frames. Each frame contains two fields. The field lines are interleaved, with the upper field appearing on the first line. </p> </dd> <dd> <p> Interlaced frames. Each frame contains two fields. The field lines are interleaved, with the lower field appearing on the first line. </p> </dd> <dd> <p> Interlaced frames. Each frame contains one field, with the upper field appearing first. </p> </dd> <dd> <p> Interlaced frames. Each frame contains one field, with the lower field appearing first. </p> </dd> <dd> <p> The stream contains a mix of interlaced and progressive modes. </p> </dd> <dd> <p> Reserved. </p> </dd> <dd> <p> Reserved. This member forces the enumeration type to compile as a <strong>{{DWORD}}</strong> value. </p> </dd> <p> Specifies the conversion function from linear {{RGB}} to non-linear {{RGB}} (R'G'B'). </p> <p> These flags are used with the <strong>{{MF_MT_TRANSFER_FUNCTION}}</strong> attribute. </p><p> For more information about these values, see the remarks for the <strong>{{DXVA2_VideoTransferFunction}}</strong> enumeration, which is the DirectX Video Acceleration ({{DXVA}}) equivalent of this enumeration. </p> <dd> <p> Unknown. Treat as {{MFVideoTransFunc_709}}. </p> </dd> <dd> <p> Linear {{RGB}} (gamma = 1.0). </p> </dd> <dd> <p> True 1.8 gamma, L' = L^1/1.8. </p> </dd> <dd> <p> True 2.0 gamma, L' = L^1/2.0. </p> </dd> <dd> <p> True 2.2 gamma, L' = L^1/2.2. This transfer function is used in {{ITU}}-R {{BT}}.470-2 System M ({{NTSC}}). </p> </dd> <dd> <p> {{ITU}}-R {{BT}}.709 transfer function. Gamma 2.2 curve with a linear segment in the lower range. This transfer function is used in {{BT}}.709, {{BT}}.601, {{SMPTE}} 296M, {{SMPTE}} 170M, {{BT}}.470, and {{SPMTE}} 274M. In addition {{BT}}-1361 uses this function within the range [0...1]. </p> </dd> <dd> <p> {{SPMTE}} 240M transfer function. Gamma 2.2 curve with a linear segment in the lower range. </p> </dd> <dd> <p> sRGB transfer function. Gamma 2.4 curve with a linear segment in the lower range. </p> </dd> <dd> <p> True 2.8 gamma. L' = L^1/2.8. This transfer function is used in {{ITU}}-R {{BT}}.470-2 System B, G ({{PAL}}). </p> </dd> <dd> <p>Logarithmic transfer (100:1 range); for example, as used in H.264 video.</p> <strong>Note</strong>??Requires Windows?7 or later. ? </dd> <dd> <p>Logarithmic transfer (316.22777:1 range); for example, as used in H.264 video.</p> <strong>Note</strong>??Requires Windows?7 or later. ? </dd> <dd> <p>Symmetric {{ITU}}-R {{BT}}.709.</p> <strong>Note</strong>??Requires Windows?7 or later. ? </dd> <dd> <p> Reserved. </p> </dd> <dd> <p> Reserved. This member forces the enumeration type to compile as a <strong>{{DWORD}}</strong> value. </p> </dd> <p>Specifies the color primaries of a video source. The color primaries define how to convert colors from {{RGB}} color space to {{CIE}} {{XYZ}} color space.</p> <p>This enumeration is used with the <strong>{{MF_MT_VIDEO_PRIMARIES}}</strong> attribute.</p><p>For more information about these values, see the remarks for the <strong>{{DXVA2_VideoPrimaries}}</strong> enumeration, which is the DirectX Video Acceleration ({{DXVA}}) equivalent of this enumeration.</p> <dd> <p> The color primaries are unknown. </p> </dd> <dd> <p> Reserved. </p> </dd> <dd> <p> {{ITU}}-R {{BT}}.709. Also used for sRGB and scRGB. </p> </dd> <dd> <p> {{ITU}}-R {{BT}}.470-4 System M ({{NTSC}}). </p> </dd> <dd> <p> {{ITU}}-R {{BT}}.470-4 System B,G ({{NTSC}}). </p> </dd> <dd> <p> {{SMPTE}} 170M. </p> </dd> <dd> <p> {{SMPTE}} 240M. </p> </dd> <dd> <p> {{EBU}} 3213. </p> </dd> <dd> <p> {{SMPTE}} C ({{SMPTE}} {{RP}} 145). </p> </dd> <dd> <p> Reserved. </p> </dd> <dd> <p> Reserved. This member forces the enumeration type to compile as a <strong>{{DWORD}}</strong> value. </p> </dd> <p> </p><p>Describes the optimal lighting for viewing a particular set of video content.</p> <p>This enumeration is used with the <strong>{{MF_MT_VIDEO_LIGHTING}}</strong> attribute.</p> <dd> <p>The optimal lighting is unknown.</p> </dd> <dd> <p>Bright lighting; for example, outdoors.</p> </dd> <dd> <p>Medium brightness; for example, normal office lighting.</p> </dd> <dd> <p>Dim; for example, a living room with a television and additional low lighting.</p> </dd> <dd> <p>Dark; for example, a movie theater.</p> </dd> <dd> <p>Reserved.</p> </dd> <dd> <p>Reserved. This member forces the enumeration type to compile as a <strong>{{DWORD}}</strong> value.</p> </dd> <p> </p><p>Describes the conversion matrices between Y'PbPr (component video) and studio R'G'B'.</p> <p>This enumeration is used with the <strong>{{MF_MT_YUV_MATRIX}}</strong> attribute.</p><p>For more information about these values, see the remarks for the <strong>{{DXVA2_VideoTransferMatrix}}</strong> enumeration, which is the DirectX Video Acceleration ({{DXVA}}) equivalent of this enumeration.</p> <dd> <p>Unknown transfer matrix. Treat as {{MFVideoTransferMatrix_BT709}}.</p> </dd> <dd> <p>{{ITU}}-R {{BT}}.709 transfer matrix.</p> </dd> <dd> <p>{{ITU}}-R {{BT}}.601 transfer matrix. Also used for {{SMPTE}} 170 and {{ITU}}-R {{BT}}.470-2 System B,G.</p> </dd> <dd> <p>{{SMPTE}} 240M transfer matrix.</p> </dd> <dd> <p>Reserved.</p> </dd> <dd> <p>Reserved. This member forces the enumeration type to compile as a <strong>{{DWORD}}</strong> value.</p> </dd> <p> </p><p>Contains flags that define the chroma encoding scheme for Y'Cb'Cr' data.</p> <p>These flags are used with the <strong>{{MF_MT_VIDEO_CHROMA_SITING}}</strong> attribute.</p><p>For more information about these values, see the remarks for the <strong>{{DXVA2_VideoChromaSubSampling}}</strong> enumeration, which is the DirectX Video Acceleration ({{DXVA}}) equivalent of this enumeration.</p> <dd> <p>Unknown encoding scheme.</p> </dd> <dd> <p>Chroma should be reconstructed as if the underlying video was progressive content, rather than skipping fields or applying chroma filtering to minimize artifacts from reconstructing 4:2:0 interlaced chroma.</p> </dd> <dd> <p>Chroma samples are aligned horizontally with the luma samples, or with multiples of the luma samples. If this flag is not set, chroma samples are located 1/2 pixel to the right of the corresponding luma sample.</p> </dd> <dd> <p>Chroma samples are aligned vertically with the luma samples, or with multiples of the luma samples. If this flag is not set, chroma samples are located 1/2 pixel down from the corresponding luma sample.</p> </dd> <dd> <p>The U and V planes are aligned vertically. If this flag is not set, the chroma planes are assumed to be out of phase by 1/2 chroma sample, alternating between a line of U followed by a line of V.</p> </dd> <dd> <p>Specifies the chroma encoding scheme for {{MPEG}}-2 video. Chroma samples are aligned horizontally with the luma samples, but are not aligned vertically. The U and V planes are aligned vertically.</p> </dd> <dd> <p>Specifies the chroma encoding scheme for {{MPEG}}-1 video.</p> </dd> <dd> <p>Specifies the chroma encoding scheme for {{PAL}} {{DV}} video.</p> </dd> <dd> <p>Chroma samples are aligned vertically and horizontally with the luma samples. {{YUV}} formats such as 4:4:4, 4:2:2, and 4:1:1 are always cosited in both directions and should use this flag.</p> </dd> <dd> <p>Reserved.</p> </dd> <dd> <p>Reserved. This member forces the enumeration type to compile as a <strong>{{DWORD}}</strong> value.</p> </dd> <p>Specifies whether color data includes headroom and toeroom. Headroom allows for values beyond 1.0 white ("whiter than white"), and toeroom allows for values below reference 0.0 black ("blacker than black"). </p> <p> This enumeration is used with the <strong>{{MF_MT_VIDEO_NOMINAL_RANGE}}</strong> attribute. </p><p> For more information about these values, see the remarks for the <strong>{{DXVA2_NominalRange}}</strong> enumeration, which is the DirectX Video Acceleration ({{DXVA}}) equivalent of this enumeration. </p> <dd> <p> Unknown nominal range. </p> </dd> <dd> <p> Equivalent to {{MFNominalRange_0_255}}. </p> </dd> <dd> <p> Equivalent to {{MFNominalRange_16_235}}. </p> </dd> <dd> <p> The normalized range [0...1] maps to [0...255] for 8-bit samples or [0...1023] for 10-bit samples. </p> </dd> <dd> <p> The normalized range [0...1] maps to [16...235] for 8-bit samples or [64...940] for 10-bit samples. </p> </dd> <dd> <p> The normalized range [0..1] maps to [48...208] for 8-bit samples or [64...940] for 10-bit samples. </p> </dd> <dd> <p>The normalized range [0..1] maps to [64...127] for 8-bit samples or [256...508] for 10-bit samples. This range is used in the xRGB color space.</p> <strong>Note</strong>??Requires Windows?7 or later. ? </dd> <p>Contains flags that describe a video stream.</p><p>These flags are used in the <strong>{{MFVideoInfo}}</strong> structure, which is part of the <strong>{{MFVIDEOFORMAT}}</strong> structure.</p> <p>Developers are encouraged to use media type attributes instead of using the <strong>{{MFVIDEOFORMAT}}</strong> structure. The following table lists the attributes that correspond to the flags defined in this enumeration.</p><table> <tr><th>Flags</th><th>Media Type Attribute</th></tr> <tr><td> <p>{{MFVideoFlag_PAD_TO_None}}</p> <p>{{MFVideoFlag_PAD_TO_4x3}}</p> <p>{{MFVideoFlag_PAD_TO_16x9}}</p> </td><td> <strong>{{MF_MT_PAD_CONTROL_FLAGS}}</strong> </td></tr> <tr><td> <p>{{MFVideoFlag_SrcContentHint16x9}}</p> <p>{{MFVideoFlag_SrcContentHint16x9}}</p> <p>{{MFVideoFlag_SrcContentHint235_1}}</p> </td><td> <strong>{{MF_MT_SOURCE_CONTENT_HINT}}</strong> </td></tr> <tr><td> <p>{{MFVideoFlag_AnalogProtected}}</p> <p>{{MFVideoFlag_DigitallyProtected}}</p> </td><td> <strong>{{MF_MT_DRM_FLAGS}}</strong> </td></tr> <tr><td>{{MFVideoFlag_PanScanEnabled}}</td><td> <strong>{{MF_MT_PAN_SCAN_ENABLED}}</strong> </td></tr> <tr><td>{{MFVideoFlag_BottomUpLinearRep}}</td><td>Use the <strong>{{MF_MT_DEFAULT_STRIDE}}</strong> attribute to specify a negative stride.</td></tr> </table><p>?</p><p>The following flags were defined to describe per-sample interlacing information, but are obsolete:</p><ul> <li> {{MFVideoFlag_ProgressiveContent}} </li> <li> {{MFVideoFlag_FieldRepeatCountMask}} </li> <li> {{MFVideoFlag_FieldRepeatCountShift}} </li> <li> {{MFVideoFlag_ProgressiveSeqReset}} </li> <li> {{MFVideoFlag_LowerFieldFirst}} </li> </ul><p>Instead, components should use sample attributes to describe per-sample interlacing information, as described in the topic Video Interlacing.</p> <p> </p><p>Contains values that specify common video formats.</p> <dd> <p>Reserved; do not use.</p> </dd> <dd> <p>{{NTSC}} television (720 x 480i).</p> </dd> <dd> <p>{{PAL}} television (720 x 576i).</p> </dd> <dd> <p>{{DVD}}, {{NTSC}} standard (720 x 480).</p> </dd> <dd> <p>{{DVD}}, {{PAL}} standard (720 x 576).</p> </dd> <dd> <p>{{DV}} video, {{PAL}} standard.</p> </dd> <dd> <p>{{DV}} video, {{NTSC}} standard.</p> </dd> <dd> <p>{{ATSC}} digital television, {{SD}} (480i).</p> </dd> <dd> <p>{{ATSC}} digital television, {{HD}} interlaced (1080i)</p> </dd> <dd> <p>{{ATSC}} digital television, {{HD}} progressive (720p)</p> </dd> <p> </p><p>Specifies the origin for a seek request.</p> <dd> <p>The seek position is specified relative to the start of the stream.</p> </dd> <dd> <p>The seek position is specified relative to the current read/write position in the stream.</p> </dd> <p> </p><p>Specifies the requested access mode for opening a file.</p> <dd> <p>Read mode.</p> </dd> <dd> <p>Write mode.</p> </dd> <dd> <p>Read and write mode.</p> </dd> <p> </p><p>Specifies how to open or create a file.</p> <dd> <p>Open an existing file. Fail if the file does not exist.</p> </dd> <dd> <p>Create a new file. Fail if the file already exists.</p> </dd> <dd> <p>Open an existing file and truncate it, so that the size is zero bytes. Fail if the file does not already exist.</p> </dd> <dd> <p>If the file does not exist, create a new file. If the file exists, open it.</p> </dd> <dd> <p>Create a new file. If the file exists, overwrite the file.</p> </dd> <p> Specifies the behavior when opening a file. </p> <dd> <p> Use the default behavior. </p> </dd> <dd> <p> Open the file with no system caching. </p> </dd> <dd> <p>Subsequent open operations can have write access to the file. </p> <strong>Note</strong>??Requires Windows?7 or later. ? </dd> <p>Specifies the object type for the <strong>{{IMFPluginControl}}</strong> interface.</p> <p>Defines policy settings for the <strong>{{IMFPluginControl2::SetPolicy}}</strong> method.</p> <p>Contains media type information for registering a Media Foundation transform ({{MFT}}). </p> <dd> <p>The major media type. For a list of possible values, see Major Media Types. </p> </dd> <dd> <p>The media subtype. For a list of possible values, see the following topics:</p> <ul> <li> Audio Subtype {{GUIDs}} </li> <li> Video Subtype {{GUIDs}} </li> </ul> </dd> <p> </p><p>Represents a ratio.</p> <dd> <p>Numerator of the ratio.</p> </dd> <dd> <p>Denominator of the ratio.</p> </dd> <p> Specifies an offset as a fixed-point real number. </p> <p> The value of the number is <strong>value</strong> + (<strong>fract</strong> / 65536.0f).</p> <dd> <p> The fractional part of the number. </p> </dd> <dd> <p> The integer part of the number. </p> </dd> <p> Specifies a rectangular area within a video frame. </p> <dd> <p> An <strong>{{MFOffset}}</strong> structure that contains the x-coordinate of the upper-left corner of the rectangle. This coordinate might have a fractional value. </p> </dd> <dd> <p> An <strong>{{MFOffset}}</strong> structure that contains the y-coordinate of the upper-left corner of the rectangle. This coordinate might have a fractional value. </p> </dd> <dd> <p> A <strong>{{SIZE}}</strong> structure that contains the width and height of the rectangle. </p> </dd> <p> </p><p>Contains video format information that applies to both compressed and uncompressed formats.</p><p>This structure is used in the <strong>{{MFVIDEOFORMAT}}</strong> structure.</p> <p>Developers are encouraged to use media type attributes instead of using the <strong>{{MFVideoInfo}}</strong> structure. The following table lists the attributes that correspond to the members of this structure.</p><table> <tr><th>Structure Member</th><th>Media Type Attribute</th></tr> <tr><td><strong>dwWidth</strong>, <strong>dwHeight</strong></td><td> <strong>{{MF_MT_FRAME_SIZE}}</strong> </td></tr> <tr><td><strong>PixelAspectRatio</strong></td><td> <strong>{{MF_MT_PIXEL_ASPECT_RATIO}}</strong> </td></tr> <tr><td><strong>SourceChromaSubsampling</strong></td><td> <strong>{{MF_MT_VIDEO_CHROMA_SITING}}</strong> </td></tr> <tr><td><strong>InterlaceMode</strong></td><td> <strong>{{MF_MT_INTERLACE_MODE}}</strong> </td></tr> <tr><td><strong>TransferFunction</strong></td><td> <strong>{{MF_MT_TRANSFER_FUNCTION}}</strong> </td></tr> <tr><td><strong>ColorPrimaries</strong></td><td> <strong>{{MF_MT_VIDEO_PRIMARIES}}</strong> </td></tr> <tr><td><strong>TransferMatrix</strong></td><td> <strong>{{MF_MT_YUV_MATRIX}}</strong> </td></tr> <tr><td><strong>SourceLighting</strong></td><td> <strong>{{MF_MT_VIDEO_LIGHTING}}</strong> </td></tr> <tr><td><strong>FramesPerSecond</strong></td><td> <strong>{{MF_MT_FRAME_RATE}}</strong> </td></tr> <tr><td><strong>NominalRange</strong></td><td> <strong>{{MF_MT_VIDEO_NOMINAL_RANGE}}</strong> </td></tr> <tr><td><strong>GeometricAperture</strong></td><td> <strong>{{MF_MT_GEOMETRIC_APERTURE}}</strong> </td></tr> <tr><td><strong>MinimumDisplayAperture</strong></td><td> <strong>{{MF_MT_MINIMUM_DISPLAY_APERTURE}}</strong> </td></tr> <tr><td><strong>PanScanAperture</strong></td><td> <strong>{{MF_MT_PAN_SCAN_APERTURE}}</strong> </td></tr> <tr><td><strong>VideoFlags</strong></td><td>See <strong>{{MFVideoFlags}}</strong>.</td></tr> </table><p>?</p> <p> </p><p>Describes a 4:4:4:4 Y'Cb'Cr' sample.</p> <dd> <p>Cr (chroma difference) value.</p> </dd> <dd> <p>Cb (chroma difference) value.</p> </dd> <dd> <p>Y (luma) value.</p> </dd> <dd> <p>Alpha value.</p> </dd> <p> </p><p>Describes an {{ARGB}} color value.</p> <dd> <p>Blue value.</p> </dd> <dd> <p>Green value.</p> </dd> <dd> <p>Red value.</p> </dd> <dd> <p>Alpha value.</p> </dd> <p>Contains one palette entry in a color table.</p> <p>This union can be used to represent both {{RGB}} palettes and Y'Cb'Cr' palettes. The video format that defines the palette determines which union member should be used.</p> <dd> <p> <strong>{{MFARGB}}</strong> structure that contains an {{RGB}} color.</p> </dd> <dd> <p> <strong>{{MFAYUVSample}}</strong> structure that contains a Y'Cb'Cr' color.</p> </dd> <p> </p><p>Contains information about an uncompressed video format. This structure is used in the <strong>{{MFVIDEOFORMAT}}</strong> structure.</p> <p> </p><p>Contains information about a video compression format. This structure is used in the <strong>{{MFVIDEOFORMAT}}</strong> structure.</p> <p>For uncompressed video formats, set the structure members to zero.</p> <p> </p><p>Describes a video format.</p> <p>Applications should avoid using this structure. Instead, it is recommended that applications use attributes to describe the video format. For a list of media type attributes, see Media Type Attributes. With attributes, you can set just the format information that you know, which is easier (and more likely to be accurate) than trying to fill in complete format information for the <strong>{{MFVIDEOFORMAT}}</strong> structure.</p><p>To initialize a media type object from an <strong>{{MFVIDEOFORMAT}}</strong> structure, call <strong>{{MFInitMediaTypeFromMFVideoFormat}}</strong>.</p><p>You can use the <strong>{{MFVIDEOFORMAT}}</strong> structure as the format block for a DirectShow media type. Set the format {{GUID}} to {{FORMAT_MFVideoFormat}}.</p> <dd> <p>Size of the structure, in bytes. This value includes the size of the palette entries that may appear after the <strong>surfaceInfo</strong> member.</p> </dd> <dd> <p> <strong>{{MFVideoInfo}}</strong> structure. This structure contains information that applies to both compressed and uncompressed formats.</p> </dd> <dd> <p>Video subtype. See Video Subtype {{GUIDs}}.</p> </dd> <dd> <p> <strong>{{MFVideoCompressedInfo}}</strong> structure. This structure contains information that applies only to compressed formats.</p> </dd> <dd> <p> <strong>{{MFVideoSurfaceInfo}}</strong> structure. This structure contains information that applies only to uncompressed formats.</p> </dd> <p>Provides a generic way to store key/value pairs on an object. The keys are <strong>{{GUID}}</strong>s, and the values can be any of the following data types: <strong>{{UINT32}}</strong>, <strong>{{UINT64}}</strong>, <strong>double</strong>, <strong>{{GUID}}</strong>, wide-character string, byte array, or <strong>{{IUnknown}}</strong> reference. The standard implementation of this interface holds a thread lock while values are added, deleted, or retrieved.</p><p>For a list of predefined attribute <strong>{{GUID}}</strong>s, see Media Foundation Attributes. Each attribute <strong>{{GUID}}</strong> has an expected data type. The various "set" methods in <strong>{{IMFAttributes}}</strong> do not validate the type against the attribute <strong>{{GUID}}</strong>. It is the application's responsibility to set the correct type for the attribute.</p><p>To create an empty attribute store, call <strong>{{MFCreateAttributes}}</strong>.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p> </p><p>Retrieves the value associated with a key.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></dt> </dl> </td><td> <p> The specified key was not found. </p> </td></tr> </table><p>?</p> <dd> <p> A {{GUID}} that identifies which value to retrieve. </p> </dd> <dd> <p>A reference to a <strong>{{PROPVARIANT}}</strong> that receives the value. The method fills the <strong>{{PROPVARIANT}}</strong> with a copy of the stored value, if the value is found. Call <strong>PropVariantClear</strong> to free the memory allocated by this method. This parameter can be <strong>{{NULL}}</strong>. If this parameter is <strong>{{NULL}}</strong>, the method searches for the key and returns {{S_OK}} if the key is found, but does not copy the value.</p> </dd> <p> </p><p>Retrieves the data type of the value associated with a key.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></dt> </dl> </td><td> <p>The specified key is not stored in this object.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies which value to query.</p> </dd> <dd> <p>Receives a member of the <strong>{{MF_ATTRIBUTE_TYPE}}</strong> enumeration.</p> </dd> <p> </p><p>Queries whether a stored attribute value equals to a specified <strong>{{PROPVARIANT}}</strong>.</p> <p>The method sets <em>pbResult</em> to <strong>{{FALSE}}</strong> for any of the following reasons:</p><ul> <li> <p>No attribute is found whose key matches the one given in <em>guidKey</em>.</p> </li> <li> <p>The attribute's <strong>{{PROPVARIANT}}</strong> type does not match the type given in <em>Value</em>.</p> </li> <li> <p>The attribute value does not match the value given in <em>Value</em>.</p> </li> <li> <p>The method fails.</p> </li> </ul><p>Otherwise, the method sets <em>pbResult</em> to <strong>{{TRUE}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies which value to query.</p> </dd> <dd> <p><strong>{{PROPVARIANT}}</strong> that contains the value to compare.</p> </dd> <dd> <p>Receives a Boolean value indicating whether the attribute matches the value given in <em>Value</em>. See Remarks. This parameter must not be <strong>{{NULL}}</strong>. If this parameter is <strong>{{NULL}}</strong>, an access violation occurs.</p> </dd> <p> </p><p>Compares the attributes on this object with the attributes on another object.</p> <p>If <em>pThis</em> is the object whose <strong>Compare</strong> method is called, and <em>pTheirs</em> is the object passed in as the <em>pTheirs</em> parameter, the following comparisons are defined by <em>MatchType</em>.</p><table> <tr><th>Match type</th><th>Returns <strong>{{TRUE}}</strong> if and only if</th></tr> <tr><td><strong>{{MF_ATTRIBUTES_MATCH_OUR_ITEMS}}</strong></td><td>For every attribute in <em>pThis</em>, an attribute with the same key and value exists in <em>pTheirs</em>.</td></tr> <tr><td><strong>{{MF_ATTRIBUTES_MATCH_THEIR_ITEMS}}</strong></td><td>For every attribute in <em>pTheirs</em>, an attribute with the same key and value exists in <em>pThis</em>.</td></tr> <tr><td><strong>{{MF_ATTRIBUTES_MATCH_ALL_ITEMS}}</strong></td><td>The key/value pairs are identical in both objects.</td></tr> <tr><td><strong>{{MF_ATTRIBUTES_MATCH_INTERSECTION}}</strong></td><td>Take the intersection of the keys in <em>pThis</em> and the keys in <em>pTheirs</em>. The values associated with those keys are identical in both <em>pThis</em> and <em>pTheirs</em>.</td></tr> <tr><td><strong>{{MF_ATTRIBUTES_MATCH_SMALLER}}</strong></td><td>Take the object with the smallest number of attributes. For every attribute in that object, an attribute with the same key and value exists in the other object.</td></tr> </table><p>?</p><p>The <em>pTheirs</em> and <em>pbResult</em> parameters must not be <strong>{{NULL}}</strong>. If either parameter is <strong>{{NULL}}</strong>, an access violation occurs.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAttributes}}</strong> interface of the object to compare with this object.</p> </dd> <dd> <p>Member of the <strong>{{MF_ATTRIBUTES_MATCH_TYPE}}</strong> enumeration, specifying the type of comparison to make.</p> </dd> <dd> <p>Receives a Boolean value. The value is <strong>{{TRUE}}</strong> if the two sets of attributes match in the way specified by the <em>MatchType</em> parameter. Otherwise, the value is <strong>{{FALSE}}</strong>.</p> </dd> <p> </p><p>Retrieves a <strong>{{UINT32}}</strong> value associated with a key.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></dt> </dl> </td><td> <p>The specified key was not found.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDTYPE}}</strong></dt> </dl> </td><td> <p>The attribute value is not a <strong>{{UINT32}}</strong>.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies which value to retrieve. The attribute type must be <strong>{{MF_ATTRIBUTE_UINT32}}</strong>.</p> </dd> <dd> <p>Receives a <strong>{{UINT32}}</strong> value. If the key is found and the data type is <strong>{{UINT32}}</strong>, the method copies the value into this parameter. Otherwise, the original value of this parameter is not changed.</p> </dd> <p> </p><p>Retrieves a <strong>{{UINT64}}</strong> value associated with a key.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></dt> </dl> </td><td> <p> The specified key was not found. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDTYPE}}</strong></dt> </dl> </td><td> <p> The attribute value is not a <strong>{{UINT64}}</strong>. </p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies which value to retrieve. The attribute type must be <strong>{{MF_ATTRIBUTE_UINT64}}</strong>.</p> </dd> <dd> <p>Receives a <strong>{{UINT64}}</strong> value. If the key is found and the data type is <strong>{{UINT64}}</strong>, the method copies the value into this parameter. Otherwise, the original value of this parameter is not changed.</p> </dd> <p> </p><p>Retrieves a <strong>double</strong> value associated with a key.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></dt> </dl> </td><td> <p>The specified key was not found.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDTYPE}}</strong></dt> </dl> </td><td> <p>The attribute value is not a <strong>double</strong>.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies which value to retrieve. The attribute type must be <strong>{{MF_ATTRIBUTE_DOUBLE}}</strong>.</p> </dd> <dd> <p>Receives a <strong>double</strong> value. If the key is found and the data type is <strong>double</strong>, the method copies the value into this parameter. Otherwise, the original value of this parameter is not changed.</p> </dd> <p> </p><p>Retrieves a {{GUID}} value associated with a key.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></dt> </dl> </td><td> <p>The specified key was not found.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDTYPE}}</strong></dt> </dl> </td><td> <p>The attribute value is not a {{GUID}}.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies which value to retrieve. The attribute type must be <strong>{{MF_ATTRIBUTE_GUID}}</strong>.</p> </dd> <dd> <p>Receives a {{GUID}} value. If the key is found and the data type is {{GUID}}, the method copies the value into this parameter. Otherwise, the original value of this parameter is not changed.</p> </dd> <p> </p><p>Retrieves the length of a string value associated with a key.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></dt> </dl> </td><td> <p>The specified key was not found.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDTYPE}}</strong></dt> </dl> </td><td> <p>The attribute value is not a string.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies which value to retrieve. The attribute type must be <strong>{{MF_ATTRIBUTE_STRING}}</strong>.</p> </dd> <dd> <p>If the key is found and the value is a string type, this parameter receives the number of characters in the string, not including the terminating <strong>{{NULL}}</strong> character. To get the string value, call <strong>{{IMFAttributes::GetString}}</strong>.</p> </dd> <p> </p><p>Retrieves a wide-character string associated with a key.</p> <p>You can also use the <strong>{{IMFAttributes::GetAllocatedString}}</strong> method, which allocates the buffer to hold the string.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_OUTOFMEMORY}}</strong></dt> </dl> </td><td> <p>The length of the string is too large to fit in a <strong>{{UINT32}}</strong> value.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOT_SUFFICIENT_BUFFER}}</strong></dt> </dl> </td><td> <p>The buffer is not large enough to hold the string.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></dt> </dl> </td><td> <p>The specified key was not found.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDTYPE}}</strong></dt> </dl> </td><td> <p>The attribute value is not a string.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies which value to retrieve. The attribute type must be <strong>{{MF_ATTRIBUTE_STRING}}</strong>.</p> </dd> <dd> <p>Pointer to a wide-character array allocated by the caller. The array must be large enough to hold the string, including the terminating <strong>{{NULL}}</strong> character. If the key is found and the value is a string type, the method copies the string into this buffer. To find the length of the string, call <strong>{{IMFAttributes::GetStringLength}}</strong>.</p> </dd> <dd> <p>The size of the <em>pwszValue</em> array, in characters. This value includes the terminating {{NULL}} character.</p> </dd> <dd> <p>Receives the number of characters in the string, excluding the terminating <strong>{{NULL}}</strong> character. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <p> Gets a wide-character string associated with a key. This method allocates the memory for the string. </p> <p>To copy a string value into a caller-allocated buffer, use the <strong>{{IMFAttributes::GetString}}</strong> method.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul><strong>Note</strong>??An earlier version of the documentation incorrectly stated that the <em>pcchLength</em> parameter can be <strong>{{NULL}}</strong>. Setting this parameter to <strong>{{NULL}}</strong> might succeed in some cases, but is not guaranteed. The caller must pass a non-<strong>{{NULL}}</strong> reference for this parameter.? <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></dt> </dl> </td><td> <p> The specified key was not found. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDTYPE}}</strong></dt> </dl> </td><td> <p> The attribute value is not a string. </p> </td></tr> </table><p>?</p> <dd> <p>A {{GUID}} that identifies which value to retrieve. The attribute type must be <strong>{{MF_ATTRIBUTE_STRING}}</strong>. </p> </dd> <dd> <p>If the key is found and the value is a string type, this parameter receives a copy of the string. The caller must free the memory for the string by calling <strong>CoTaskMemFree</strong>. </p> </dd> <dd> <p> Receives the number of characters in the string, excluding the terminating <strong>{{NULL}}</strong> character. This parameter must not be <strong>{{NULL}}</strong>. </p> </dd> <p> </p><p>Retrieves the length of a byte array associated with a key.</p> <p>To get the byte array, call <strong>{{IMFAttributes::GetBlob}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></dt> </dl> </td><td> <p>The specified key was not found.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDTYPE}}</strong></dt> </dl> </td><td> <p>The attribute value is not a byte array.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies which value to retrieve. The attribute type must be <strong>{{MF_ATTRIBUTE_BLOB}}</strong>.</p> </dd> <dd> <p>If the key is found and the value is a byte array, this parameter receives the size of the array, in bytes.</p> </dd> <p> </p><p>Retrieves a byte array associated with a key. This method copies the array into a caller-allocated buffer.</p> <p>You can also use the <strong>{{IMFAttributes::GetAllocatedBlob}}</strong> method, which allocates the buffer to hold the byte array.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{E_NOT_SUFFICIENT_BUFFER}}</strong></strong></dt> </dl> </td><td> <p>The buffer is not large enough to the array.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></strong></dt> </dl> </td><td> <p>The specified key was not found.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{MF_E_INVALIDTYPE}}</strong></strong></dt> </dl> </td><td> <p>The attribute value is not a byte array.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies which value to retrieve. The attribute type must be <strong>{{MF_ATTRIBUTE_BLOB}}</strong>.</p> </dd> <dd> <p>Pointer to a buffer allocated by the caller. If the key is found and the value is a byte array, the method copies the array into this buffer. To find the required size of the buffer, call <strong>{{IMFAttributes::GetBlobSize}}</strong>.</p> </dd> <dd> <p>The size of the <em>pBuf</em> buffer, in bytes.</p> </dd> <dd> <p>Receives the size of the byte array. This parameter can be <strong>{{NULL}}</strong>.</p> </dd> <p>Provides a generic way to store key/value pairs on an object. The keys are <strong>{{GUID}}</strong>s, and the values can be any of the following data types: <strong>{{UINT32}}</strong>, <strong>{{UINT64}}</strong>, <strong>double</strong>, <strong>{{GUID}}</strong>, wide-character string, byte array, or <strong>{{IUnknown}}</strong> reference. The standard implementation of this interface holds a thread lock while values are added, deleted, or retrieved.</p><p>For a list of predefined attribute <strong>{{GUID}}</strong>s, see Media Foundation Attributes. Each attribute <strong>{{GUID}}</strong> has an expected data type. The various "set" methods in <strong>{{IMFAttributes}}</strong> do not validate the type against the attribute <strong>{{GUID}}</strong>. It is the application's responsibility to set the correct type for the attribute.</p><p>To create an empty attribute store, call <strong>{{MFCreateAttributes}}</strong>.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p> </p><p>Retrieves an interface reference associated with a key.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOINTERFACE}}</strong></dt> </dl> </td><td> <p>The attribute value is an <strong>{{IUnknown}}</strong> reference but does not support requested interface.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></dt> </dl> </td><td> <p>The specified key was not found.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDTYPE}}</strong></dt> </dl> </td><td> <p>The attribute value is not an <strong>{{IUnknown}}</strong> reference.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies which value to retrieve. The attribute type must be <strong>{{MF_ATTRIBUTE_IUNKNOWN}}</strong>.</p> </dd> <dd> <p>Interface identifier ({{IID}}) of the interface to retrieve.</p> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface.</p> </dd> <p> Adds an attribute value with a specified key. </p> <p> This method checks whether the <strong>{{PROPVARIANT}}</strong> type is one of the attribute types defined in <strong>{{MF_ATTRIBUTE_TYPE}}</strong>, and fails if an unsupported type is used. However, this method does not check whether the <strong>{{PROPVARIANT}}</strong> is the correct type for the specified attribute {{GUID}}. (There is no programmatic way to associate attribute {{GUIDs}} with property types.) For a list of Media Foundation attributes and their data types, see Media Foundation Attributes. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_OUTOFMEMORY}}</strong></dt> </dl> </td><td> <p> Insufficient memory. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDTYPE}}</strong></dt> </dl> </td><td> <p> Invalid attribute type. </p> </td></tr> </table><p>?</p> <dd> <p> A {{GUID}} that identifies the value to set. If this key already exists, the method overwrites the old value. </p> </dd> <dd> <p> A <strong>{{PROPVARIANT}}</strong> that contains the attribute value. The method copies the value. The <strong>{{PROPVARIANT}}</strong> type must be one of the types listed in the <strong>{{MF_ATTRIBUTE_TYPE}}</strong> enumeration. </p> </dd> <p> </p><p>Removes a key/value pair from the object's attribute list.</p> <p>If the specified key does not exist, the method returns <strong>{{S_OK}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies the value to delete.</p> </dd> <p> </p><p>Removes all key/value pairs from the object's attribute list.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Associates a <strong>{{UINT32}}</strong> value with a key.</p> <p>To retrieve the <strong>{{UINT32}}</strong> value, call <strong>{{IMFAttributes::GetUINT32}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies the value to set. If this key already exists, the method overwrites the old value.</p> </dd> <dd> <p>New value for this key.</p> </dd> <p> </p><p>Associates a <strong>{{UINT64}}</strong> value with a key.</p> <p>To retrieve the <strong>{{UINT64}}</strong> value, call <strong>{{IMFAttributes::GetUINT64}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies the value to set. If this key already exists, the method overwrites the old value.</p> </dd> <dd> <p>New value for this key.</p> </dd> <p> </p><p>Associates a <strong>double</strong> value with a key.</p> <p>To retrieve the double value, call <strong>{{IMFAttributes::GetDouble}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies the value to set. If this key already exists, the method overwrites the old value.</p> </dd> <dd> <p>New value for this key.</p> </dd> <p> </p><p>Associates a {{GUID}} value with a key.</p> <p>To retrieve the {{GUID}} value, call <strong>{{IMFAttributes::GetGUID}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_OUTOFMEMORY}}</strong></dt> </dl> </td><td> <p>Insufficient memory.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies the value to set. If this key already exists, the method overwrites the old value.</p> </dd> <dd> <p>New value for this key.</p> </dd> <p> </p><p>Associates a wide-character string with a key.</p> <p>To retrieve the string, call <strong>{{IMFAttributes::GetString}}</strong> or <strong>{{IMFAttributes::GetAllocatedString}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies the value to set. If this key already exists, the method overwrites the old value.</p> </dd> <dd> <p>Null-terminated wide-character string to associate with this key. The method stores a copy of the string.</p> </dd> <p> </p><p>Associates a byte array with a key.</p> <p>To retrieve the byte array, call <strong>{{IMFAttributes::GetBlob}}</strong> or <strong>{{IMFAttributes::GetAllocatedBlob}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies the value to set. If this key already exists, the method overwrites the old value.</p> </dd> <dd> <p>Pointer to a byte array to associate with this key. The method stores a copy of the array.</p> </dd> <dd> <p>Size of the array, in bytes.</p> </dd> <p> </p><p>Associates an <strong>{{IUnknown}}</strong> reference with a key.</p> <p>To retrieve the <strong>{{IUnknown}}</strong> reference, call <strong>{{IMFAttributes::GetUnknown}}</strong>.</p><p>It is not an error to call <strong>SetUnknown</strong> with <em>pUnknown</em> equal to <strong>{{NULL}}</strong>. However, <strong>GetUnknown</strong> will return <strong>{{MF_E_INVALIDTYPE}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>{{GUID}} that identifies the value to set. If this key already exists, the method overwrites the old value.</p> </dd> <dd> <p><strong>{{IUnknown}}</strong> reference to be associated with this key.</p> </dd> <p> </p><p>Locks the attribute store so that no other thread can access it. If the attribute store is already locked by another thread, this method blocks until the other thread unlocks the object. After calling this method, call <strong>{{IMFAttributes::UnlockStore}}</strong> to unlock the object.</p> <p>This method can cause a deadlock if a thread that calls <strong>LockStore</strong> waits on a thread that calls any other <strong>{{IMFAttributes}}</strong> methods on the same object.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Unlocks the attribute store after a call to the <strong>{{IMFAttributes::LockStore}}</strong> method. While the object is unlocked, multiple threads can access the object's attributes.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Retrieves the number of attributes that are set on this object.</p> <p>To enumerate all of the attributes, call <strong>{{IMFAttributes::GetItemByIndex}}</strong> for each index value.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of attributes. This parameter must not be <strong>{{NULL}}</strong>. If this parameter is <strong>{{NULL}}</strong>, an access violation occurs.</p> </dd> <p> </p><p>Retrieves an attribute at the specified index.</p> <p>To enumerate all of an object's attributes in a thread-safe way, do the following:</p><ol> <li> <p>Call <strong>{{IMFAttributes::LockStore}}</strong> to prevent another thread from adding or deleting attributes.</p> </li> <li> <p>Call <strong>{{IMFAttributes::GetCount}}</strong> to find the number of attributes.</p> </li> <li> <p>Call <strong>GetItemByIndex</strong> to get each attribute by index.</p> </li> <li> <p>Call <strong>{{IMFAttributes::UnlockStore}}</strong> to unlock the attribute store.</p> </li> </ol><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid index.</p> </td></tr> </table><p>?</p> <dd> <p>Index of the attribute to retrieve. To get the number of attributes, call <strong>{{IMFAttributes::GetCount}}</strong>.</p> </dd> <dd> <p>Receives the {{GUID}} that identifies this attribute.</p> </dd> <dd> <p>Pointer to a <strong>{{PROPVARIANT}}</strong> that receives the value. This parameter can be <strong>{{NULL}}</strong>. If it is not <strong>{{NULL}}</strong>, the method fills the <strong>{{PROPVARIANT}}</strong> with a copy of the attribute value. Call <strong>PropVariantClear</strong> to free the memory allocated by this method.</p> </dd> <p> Copies all of the attributes from this object into another attribute store. </p> <p> This method deletes all of the attributes originally stored in <em>pDest</em>. </p><strong>Note</strong>??<p>When you call <strong>CopyAllItems</strong> on an <strong>{{IMFSample}}</strong>, which inherits this method, the sample time, duration, and flags are not copied to the destination sample. You must copy these values to the new sample manually.</p>?<p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> A reference to the <strong>{{IMFAttributes}}</strong> interface of the attribute store that receives the copy. </p> </dd> <p>Represents a block of memory that contains media data. Use this interface to access the data in the buffer.</p> <p>If the buffer contains 2-D image data (such as an uncompressed video frame), you should query the buffer for the <strong>{{IMF2DBuffer}}</strong> interface. The methods on <strong>{{IMF2DBuffer}}</strong> are optimized for 2-D data.</p><p>To get a buffer from a media sample, call one of the following <strong>{{IMFSample}}</strong> methods:</p><ul> <li> <p> <strong>{{IMFSample::ConvertToContiguousBuffer}}</strong> </p> </li> <li> <p> <strong>{{IMFSample::GetBufferByIndex}}</strong> </p> </li> </ul><p>To create a new buffer object, use one of the following functions.</p><table> <tr><th>Function</th><th>Description</th></tr> <tr><td> <strong>{{MFCreateMemoryBuffer}}</strong> </td><td>Creates a buffer and allocates system memory.</td></tr> <tr><td> <strong>{{MFCreateMediaBufferWrapper}}</strong> </td><td>Creates a media buffer that wraps an existing media buffer.</td></tr> <tr><td> <strong>{{MFCreateDXSurfaceBuffer}}</strong> </td><td>Creates a buffer that manages a DirectX surface.</td></tr> <tr><td> <strong>{{MFCreateAlignedMemoryBuffer}}</strong> </td><td>Creates a buffer and allocates system memory with a specified alignment.</td></tr> </table><p>?</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p> </p><p>Gives the caller access to the memory in the buffer, for reading or writing</p> <p>This method gives the caller access to the entire buffer, up to the maximum size returned in the <em>pcbMaxLength</em> parameter. The value returned in <em>pcbCurrentLength</em> is the size of any valid data already in the buffer, which might be less than the total buffer size.</p><p>The reference returned in <em>ppbBuffer</em> is guaranteed to be valid, and can safely be accessed across the entire buffer for as long as the lock is held. When you are done accessing the buffer, call <strong>{{IMFMediaBuffer::Unlock}}</strong> to unlock the buffer. You must call <strong>Unlock</strong> once for each call to <strong>Lock</strong>. After you unlock the buffer, the reference returned in <em>ppbBuffer</em> is no longer valid, and should not be used. Generally, it is best to call <strong>Lock</strong> only when you need to access the buffer memory, and not earlier.</p><p>Locking the buffer does not prevent other threads from calling <strong>Lock</strong>, so you should not rely on this method to synchronize threads.</p><p>This method does not allocate any memory, or transfer ownership of the memory to the caller. Do not release or free the memory; the media buffer will free the memory when the media buffer is destroyed.</p><p>If you modify the contents of the buffer, update the current length by calling <strong>{{IMFMediaBuffer::SetCurrentLength}}</strong>.</p><p>If the buffer supports the <strong>{{IMF2DBuffer}}</strong> interface, you should use the <strong>{{IMF2DBuffer::Lock2D}}</strong> method to lock the buffer. For 2-D buffers, the <strong>Lock2D</strong> method is more efficient than the <strong>Lock</strong> method. If the buffer is locked using <strong>Lock2D</strong>, the Lock method might return <strong>{{MF_E_INVALIDREQUEST}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{D3DERR_INVALIDCALL}}</strong></dt> </dl> </td><td> <p>For Direct3D surface buffers, an error occurred when locking the surface.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The buffer cannot be locked at this time.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the start of the buffer.</p> </dd> <dd> <p>Receives the maximum amount of data that can be written to the buffer. This parameter can be <strong>{{NULL}}</strong>. The same value is returned by the <strong>{{IMFMediaBuffer::GetMaxLength}}</strong> method.</p> </dd> <dd> <p>Receives the length of the valid data in the buffer, in bytes. This parameter can be <strong>{{NULL}}</strong>. The same value is returned by the <strong>{{IMFMediaBuffer::GetCurrentLength}}</strong> method.</p> </dd> <p> </p><p>Unlocks a buffer that was previously locked. Call this method once for every call to <strong>{{IMFMediaBuffer::Lock}}</strong>.</p> <p>It is an error to call <strong>Unlock</strong> if you did not call <strong>Lock</strong> previously.</p><p>After calling this method, do not use the reference returned by the <strong>Lock</strong> method. It is no longer guaranteed to be valid.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{D3DERR_INVALIDCALL}}</strong></dt> </dl> </td><td> <p>For Direct3D surface buffers, an error occurred when unlocking the surface.</p> </td></tr> </table><p>?</p> <p> </p><p>Retrieves the length of the valid data in the buffer.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the length of the valid data, in bytes. If the buffer does not contain any valid data, the value is zero.</p> </dd> <p> </p><p>Sets the length of the valid data in the buffer.</p> <p>Call this method if you write data into the buffer.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>The specified length is greater than the maximum size of the buffer.</p> </td></tr> </table><p>?</p> <dd> <p>Length of the valid data, in bytes. This value cannot be greater than the allocated size of the buffer, which is returned by the <strong>{{IMFMediaBuffer::GetMaxLength}}</strong> method.</p> </dd> <p> </p><p>Retrieves the allocated size of the buffer.</p> <p>The buffer might or might not contain any valid data, and if there is valid data in the buffer, it might be smaller than the buffer's allocated size. To get the length of the valid data, call <strong>{{IMFMediaBuffer::GetCurrentLength}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the allocated size of the buffer, in bytes.</p> </dd> <p>Represents a media sample, which is a container object for media data. For video, a sample typically contains one video frame. For audio data, a sample typically contains multiple audio samples, rather than a single sample of audio.</p><p>A media sample contains zero or more buffers. Each buffer manages a block of memory, and is represented by the <strong>{{IMFMediaBuffer}}</strong> interface. A sample can have multiple buffers. The buffers are kept in an ordered list and accessed by index value. It is also valid to have an empty sample with no buffers.</p> <p>To create a new media sample, call <strong>{{MFCreateSample}}</strong>.</p><strong>Note</strong>??<p>When you call <strong>CopyAllItems</strong>, inherited from the <strong>{{IMFAttributes}}</strong> interface, on an <strong>{{IMFSample}}</strong>, the sample time, duration, and flags are not copied to the destination sample. You must copy these values to the new sample manually.</p>?<p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p> </p><p>Retrieves flags associated with the sample.</p><p>Currently no flags are defined. Instead, metadata for samples is defined using attributes. To get attibutes from a sample, use the <strong>{{IMFAttributes}}</strong> interface, which <strong>{{IMFSample}}</strong> inherits. For a list of sample attributes, see Sample Attributes.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Sets flags associated with the sample.</p><p>Currently no flags are defined. Instead, metadata for samples is defined using attributes. To set attibutes on a sample, use the <strong>{{IMFAttributes}}</strong> interface, which <strong>{{IMFSample}}</strong> inherits. For a list of sample attributes, see Sample Attributes.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Retrieves the presentation time of the sample.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NO_SAMPLE_TIMESTAMP}}</strong></dt> </dl> </td><td> <p>The sample does not have a presentation time.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the presentation time, in 100-nanosecond units.</p> </dd> <p> </p><p>Sets the presentation time of the sample.</p> <p>Some pipeline components require samples that have time stamps. Generally the component that generates the data for the sample also sets the time stamp. The Media Session might modify the time stamps.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The presentation time, in 100-nanosecond units.</p> </dd> <p> </p><p>Retrieves the duration of the sample.</p> <p>If the sample contains more than one buffer, the duration includes the data from all of the buffers.</p><p>If the retrieved duration is zero, or if the method returns <strong>{{MF_E_NO_SAMPLE_DURATION}}</strong>, the duration is unknown. In that case, it might be possible to calculate the duration from the media type?for example, by using the video frame rate or the audio sampling rate.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NO_SAMPLE_DURATION}}</strong></dt> </dl> </td><td> <p>The sample does not have a specified duration.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the duration, in 100-nanosecond units.</p> </dd> <p> </p><p>Sets the duration of the sample.</p> <p>This method succeeds if the duration is negative, although negative durations are probably not valid for most types of data. It is the responsibility of the object that consumes the sample to validate the duration.</p><p>The duration can also be zero. This might be valid for some types of data. For example, the sample might contain stream metadata with no buffers.</p><p>Until this method is called, the <strong>{{IMFSample::GetSampleDuration}}</strong> method returns <strong>{{MF_E_NO_SAMPLE_DURATION}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Duration of the sample, in 100-nanosecond units.</p> </dd> <p> </p><p>Retrieves the number of buffers in the sample.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of buffers in the sample. A sample might contain zero buffers.</p> </dd> <p> Gets a buffer from the sample, by index.</p><p> </p><strong>Note</strong>??In most cases, it is safer to use the <strong>{{IMFSample::ConvertToContiguousBuffer}}</strong> method. If the sample contains more than one buffer, the <strong>ConvertToContiguousBuffer</strong> method replaces them with a single buffer, copies the original data into that buffer, and returns the new buffer to the caller. The copy operation occurs at most once. On subsequent calls, no data is copied.? <p>A sample might contain more than one buffer. Use the <strong>GetBufferByIndex</strong> method to enumerate the individual buffers.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p><strong>{{NULL}}</strong> reference argument, or the index is out of range. </p> </td></tr> </table><p>?</p> <p> Converts a sample with multiple buffers into a sample with a single buffer. </p> <p>If the sample contains more than one buffer, this method copies the data from the original buffers into a new buffer, and replaces the original buffer list with the new buffer. The new buffer is returned in the <em>ppBuffer</em> parameter.</p><p> If the sample contains a single buffer, this method returns a reference to the original buffer. In typical use, most samples do not contain multiple buffers.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_UNEXPECTED}}</strong></dt> </dl> </td><td> <p>The sample does not contain any buffers.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the <strong>{{IMFMediaBuffer}}</strong> interface. The caller must release the interface.</p> </dd> <p> Adds a buffer to the end of the list of buffers in the sample. </p> <p>For uncompressed video data, each buffer should contain a single video frame, and samples should not contain multiple frames. In general, storing multiple buffers in a sample is discouraged.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>{{NULL}} reference argument.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the buffer's <strong>{{IMFMediaBuffer}}</strong> interface.</p> </dd> <p> </p><p>Removes a buffer at a specified index from the sample.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Index of the buffer. To find the number of buffers in the sample, call <strong>{{IMFSample::GetBufferCount}}</strong>. Buffers are indexed from zero.</p> </dd> <p> </p><p>Removes all of the buffers from the sample.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Retrieves the total length of the valid data in all of the buffers in the sample. The length is calculated as the sum of the values retrieved by the <strong>{{IMFMediaBuffer::GetCurrentLength}}</strong> method.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Copies the sample data to a buffer. This method concatenates the valid data from all of the buffers of the sample, in order.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>{{NULL}} reference argument.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_BUFFERTOOSMALL}}</strong></dt> </dl> </td><td> <p>The buffer is not large enough to contain the data.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFMediaBuffer}}</strong> interface of the destination buffer. The buffer must be large enough to hold the valid data in the sample. To get the size of the data in the sample, call <strong>{{IMFSample::GetTotalLength}}</strong>.</p> </dd> <p> Represents a buffer that contains a two-dimensional surface, such as a video frame. </p> <p>To get a reference to this interface, call <strong>QueryInterface</strong> on the media buffer.</p><p>To use a 2-D buffer, it is important to know the <em>stride</em>, which is the number of bytes needed to go from one row of pixels to the next. The stride may be larger than the image width, because the surface may contain padding bytes after each row of pixels. Stride can also be negative, if the pixels are oriented bottom-up in memory. For more information, see Image Stride.</p><p>Every video format defines a <em>contiguous</em> or <em>packed</em> representation. This representation is compatible with the standard layout of a DirectX surface in system memory, with no additional padding. For {{RGB}} video, the contiguous representation has a pitch equal to the image width in bytes, rounded up to the nearest <strong>{{DWORD}}</strong> boundary. For {{YUV}} video, the layout of the contiguous representation depends on the {{YUV}} format. For planar {{YUV}} formats, the Y plane might have a different pitch than the U and V planes.</p><p>If a media buffer supports the <strong>{{IMF2DBuffer}}</strong> interface, the underlying buffer is not guaranteed to have a contiguous representation, because there might be additional padding bytes after each row of pixels. When a buffer is non-contiguous, the <strong>Lock</strong> and <strong>Lock2D</strong> methods have different behaviors:</p><ul> <li> The <strong>Lock2D</strong> method returns a reference to the underlying buffer. The buffer might not be contiguous. </li> <li> The <strong>Lock</strong> method returns a buffer that is guaranteed to be contiguous. If the underlying buffer is not contiguous, the method copies the data into a new buffer, and the <strong>Unlock</strong> method copies it back into the original buffer. </li> </ul><p>Call the <strong>Lock2D</strong> method to access the 2-D buffer in its native format. The native format might not be contiguous. The buffer's <strong>{{IMFMediaBuffer::Lock}}</strong> method returns a contiguous representation of the buffer. However, this might require an internal copy from the native format. For 2-D buffers, therefore, you should use the <strong>Lock2D</strong> method and avoid the <strong>Lock</strong> method. Because the <strong>Lock</strong> method might cause up to two buffer copies, the <strong>Lock2D</strong> method is generally more efficient and should be used when possible. To find out if the underlying buffer is contiguous, call <strong>{{IMF2DBuffer::IsContiguousFormat}}</strong>.</p><p>For uncompressed images, the amount of valid data in the buffer is determined by the width, height, and pixel layout of the image. For this reason, if you call <strong>Lock2D</strong> to access the buffer, do not rely on the values returned by <strong>{{IMFMediaBuffer::GetCurrentLength}}</strong> or <strong>{{IMFMediaBuffer::GetMaxLength}}</strong>. Similarly, if you modify the data in the buffer, you do not have to call <strong>{{IMFMediaBuffer::SetCurrentLength}}</strong> to update the size. Generally, you should avoid mixing calls to <strong>{{IMF2DBuffer}}</strong> and <strong>{{IMFMediaBuffer}}</strong> methods on the same media buffer.</p> <p> </p><p>Gives the caller access to the memory in the buffer.</p> <p>If <em>p</em> is a reference to the first byte in a row of pixels, <em>p</em> + (*<em>plPitch</em>) points to the first byte in the next row of pixels. A buffer might contain padding after each row of pixels, so the stride might be wider than the width of the image in bytes. Do not access the memory that is reserved for padding bytes, because it might not be read-accessible or write-accessible. For more information, see Image Stride.</p><p>The reference returned in <em>pbScanline0</em> remains valid as long as the caller holds the lock. When you are done accessing the memory, call <strong>{{IMF2DBuffer::Unlock2D}}</strong> to unlock the buffer. You must call <strong>Unlock2D</strong> once for each call to <strong>Lock2D</strong>. After you unlock the buffer, the reference returned in <em>pbScanline0</em> is no longer valid and should not be used. Generally, it is best to call <strong>Lock2D</strong> only when you need to access the buffer memory, and not earlier.</p><p>The values returned by the <strong>{{IMFMediaBuffer::GetCurrentLength}}</strong> and <strong>{{IMFMediaBuffer::GetMaxLength}}</strong> methods do not apply to the buffer that is returned by the <strong>Lock2D</strong> method. For the same reason, you do not need to call <strong>{{IMFMediaBuffer::SetCurrentLength}}</strong> after manipulating the data in the buffer returned by the <strong>Lock2D</strong> method.</p><p>The <strong>{{IMFMediaBuffer::Lock}}</strong> method fails while the <strong>Lock2D</strong> lock is held, and vice-versa. Applications should use only one of these methods at a time.</p><p>When the underlying buffer is a Direct3D surface, the method fails if the surface is not lockable.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{D3DERR_INVALIDCALL}}</strong></dt> </dl> </td><td> <p>Cannot lock the Direct3D surface.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The buffer cannot be locked at this time.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the first byte of the top row of pixels in the image. The top row is defined as the top row when the image is presented to the viewer, and might not be the first row in memory.</p> </dd> <dd> <p>Receives the surface stride, in bytes. The stride might be negative, indicating that the image is oriented from the bottom up in memory.</p> </dd> <p> </p><p>Unlocks a buffer that was previously locked. Call this method once for each call to <strong>{{IMF2DBuffer::Lock2D}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Retrieves a reference to the buffer memory and the surface stride.</p> <p>Before calling this method, you must lock the buffer by calling <strong>{{IMF2DBuffer::Lock2D}}</strong>. The reference returned in <em>plPitch</em> is valid only while the buffer remains locked.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{ERROR_INVALID_FUNCTION}}</strong></dt> </dl> </td><td> <p>You must lock the buffer before calling this method.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the first byte of the top row of pixels in the image.</p> </dd> <dd> <p>Receives the stride, in bytes. For more information, see Image Stride.</p> </dd> <p> </p><p>Queries whether the buffer is contiguous in its native format.</p> <p>For a definition of contiguous as it applies to 2-D buffers, see the Remarks section in <strong>{{IMF2DBuffer}}</strong> interface. For non-contiguous buffers, the <strong>{{IMFMediaBuffer::Lock}}</strong> method must perform an internal copy.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a Boolean value. The value is <strong>{{TRUE}}</strong> if the buffer is contiguous, and <strong>{{FALSE}}</strong> otherwise.</p> </dd> <p> </p><p>Retrieves the number of bytes needed to store the contents of the buffer in contiguous format.</p> <p>For a definition of contiguous as it applies to 2-D buffers, see the Remarks section in <strong>{{IMF2DBuffer}}</strong> interface.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of bytes needed to store the contents of the buffer in contiguous format.</p> </dd> <p> </p><p>Copies this buffer into the caller's buffer, converting the data to contiguous format.</p> <p>If the original buffer is not contiguous, this method converts the contents into contiguous format during the copy. For a definition of contiguous as it applies to 2-D buffers, see the Remarks section in <strong>{{IMF2DBuffer}}</strong> interface.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid size specified in <em>pbDestBuffer</em>.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the destination buffer where the data will be copied. The caller allocates the buffer.</p> </dd> <dd> <p>Size of the destination buffer, in bytes. To get the required size, call <strong>{{IMF2DBuffer::GetContiguousLength}}</strong>.</p> </dd> <p> </p><p>Copies data to this buffer from a buffer that has a contiguous format.</p> <p>This method copies the contents of the source buffer into the buffer that is managed by this <strong>{{IMF2DBuffer}}</strong> object. The source buffer must be in contiguous format. While copying, the method converts the contents into the destination buffer's native format, correcting for the buffer's pitch if necessary.</p><p>For a definition of contiguous as it applies to 2-D buffers, see the Remarks section in the <strong>{{IMF2DBuffer}}</strong> interface topic.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the source buffer. The caller allocates the buffer.</p> </dd> <dd> <p>Size of the source buffer, in bytes. To get the maximum size of the buffer, call <strong>{{IMF2DBuffer::GetContiguousLength}}</strong>.</p> </dd> <p>Represents a buffer that contains a two-dimensional surface, such as a video frame.</p> <p>This interface extends the <strong>{{IMF2DBuffer}}</strong> interface and adds a safer version of the <strong>{{IMF2DBuffer::Lock2D}}</strong> method.</p> <p>Gives the caller access to the memory in the buffer.</p> <p>When you are done accessing the memory, call <strong>{{IMF2DBuffer::Unlock2D}}</strong> to unlock the buffer. You must call <strong>Unlock2D</strong> once for each call to <strong>Lock2DSize</strong>.</p><p>This method is equivalent to the <strong>{{IMF2DBuffer::Lock2D}}</strong> method. However, <strong>Lock2DSize</strong> is preferred because it enables the caller to validate memory references, and because it supports read-only locks. A buffer is not guaranteed to support the <strong>{{IMF2DBuffer2}}</strong> interface. To access a buffer, you should try the following methods in the order listed:</p><ol> <li><strong>{{IMF2DBuffer2::Lock2DSize}}</strong></li> <li> <strong>{{IMF2DBuffer::Lock2D}}</strong> </li> <li> <strong>{{IMFMediaBuffer::Lock}}</strong> </li> </ol><p>The <em>ppbBufferStart</em> and <em>pcbBufferLength</em> parameters receive the bounds of the buffer memory. Use these values to guard against buffer overruns. Use the values of <em>ppbScanline0</em> and <em>plPitch</em> to access the image data. If the image is bottom-up in memory, <em>ppbScanline0</em> will point to the last scan line in memory and <em>plPitch</em> will be negative. For more information, see Image Stride.</p><p>The <em>lockFlags</em> parameter specifies whether the buffer is locked for read-only access, write-only access, or read/write access. </p><ul> <li>If the buffer is already locked for read-only access, it cannot be locked for write access.</li> <li>If the buffer is already locked for write-only access, it cannot be locked for read access.</li> <li>If the buffer is already locked for read/write acess, it can be locked for read or write acess.</li> </ul><p>When possible, use a read-only or write-only lock, and avoid locking the buffer for read/write access. If the buffer represents a DirectX Graphics Infrastructure ({{DXGI}}) surface, a read/write lock can cause an extra copy between {{CPU}} memory and {{GPU}} memory.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>Invalid request. The buffer might already be locked with an incompatible locking flag. See Remarks.</p> </td></tr> <tr><td> <dl> <dt><strong> {{E_OUTOFMEMORY}}</strong></dt> </dl> </td><td> <p>There is insufficient memory to complete the operation. </p> </td></tr> </table><p>?</p> <dd> <p>A member of the <strong>{{MF2DBuffer_LockFlags}}</strong> enumeration that specifies whether to lock the buffer for reading, writing, or both.</p> </dd> <dd> <p>Receives a reference to the first byte of the top row of pixels in the image. The top row is defined as the top row when the image is presented to the viewer, and might not be the first row in memory. </p> </dd> <dd> <p>Receives the surface stride, in bytes. The stride might be negative, indicating that the image is oriented from the bottom up in memory. </p> </dd> <dd> <p>Receives a reference to the start of the accessible buffer in memory.</p> </dd> <dd> <p>Receives the length of the buffer, in bytes.</p> </dd> <p>Copies the buffer to another 2D buffer object.</p> <p>The destination buffer must be at least as large as the source buffer.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMF2DBuffer2}}</strong> interface of the destination buffer.</p> </dd> <p>Represents a buffer that contains a Microsoft DirectX Graphics Infrastructure ({{DXGI}}) surface.</p> <p>To create a {{DXGI}} media buffer, first create the {{DXGI}} surface. Then call <strong>{{MFCreateDXGISurfaceBuffer}}</strong>. </p> <p>Queries the Microsoft DirectX Graphics Infrastructure ({{DXGI}}) surface for an interface.</p> <p>You can use this method to get a reference to the <strong>{{ID3D11Texture2D}}</strong> interface of the surface. If the buffer is locked, the method returns <strong>{{MF_E_INVALIDREQUEST}}</strong>.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong> {{E_NOINTERFACE}}</strong></dt> </dl> </td><td> <p>The object does not support the specified interface.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>Invalid request.</p> </td></tr> </table><p>?</p> <dd> <p>The interface identifer ({{IID}}) of the interface being requested.</p> </dd> <dd> <p>Receives a reference to the interface. The caller must release the interface.</p> </dd> <p>Gets the index of the subresource that is associated with this media buffer.</p> <p>The subresource index is specified when you create the media buffer object. See <strong>{{MFCreateDXGISurfaceBuffer}}</strong>.</p><p>For more information about texture subresources, see <strong>{{ID3D11Device::CreateTexture2D}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the zero-based index of the subresource.</p> </dd> <p>Gets an <strong>{{IUnknown}}</strong> reference that was previously stored in the media buffer object.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong> {{E_NOINTERFACE}}</strong></dt> </dl> </td><td> <p>The object does not support the specified interface.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_FOUND}}</strong></dt> </dl> </td><td> <p>The specified key was not found.</p> </td></tr> </table><p>?</p> <p>Stores an arbitrary <strong>{{IUnknown}}</strong> reference in the media buffer object.</p> <p>To retrieve the reference from the object, call <strong>{{IMFDXGIBuffer::GetUnknown}}</strong>.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{ERROR_OBJECT_ALREADY_EXISTS}}</strong></dt> </dl> </td><td> <p>An item already exists with this key.</p> </td></tr> </table><p>?</p> <p> Represents a description of a media format. </p> <p> To create a new media type, call <strong>{{MFCreateMediaType}}</strong>. </p><p> All of the information in a media type is stored as attributes. To clone a media type, call <strong>{{IMFAttributes::CopyAllItems}}</strong>. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>Gets the major type of the format. </p> <p> This method is equivalent to getting the <strong>{{MF_MT_MAJOR_TYPE}}</strong> attribute from the media type. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></dt> </dl> </td><td> <p> The major type is not set. </p> </td></tr> </table><p>?</p> <dd> <p>Receives the major type <strong>{{GUID}}</strong>. The major type describes the broad category of the format, such as audio or video. For a list of possible values, see Major Media Types. </p> </dd> <p> Queries whether the media type is a temporally compressed format. Temporal compression uses information from previously decoded samples when decompressing the current sample.</p> <p> This method returns <strong>{{FALSE}}</strong> in <em>pfCompressed</em> if the media type's <strong>{{MF_MT_ALL_SAMPLES_INDEPENDENT}}</strong> attribute is <strong>{{TRUE}}</strong>. If the <strong>{{MF_MT_ALL_SAMPLES_INDEPENDENT}}</strong> attribute is <strong>{{FALSE}}</strong> or not set, the method returns <strong>{{TRUE}}</strong>. </p><p> If the method returns <strong>{{TRUE}}</strong> in <em>pfCompressed</em>, it is a hint that the format has temporal compression applied to it. If the method returns <strong>{{FALSE}}</strong>, the format does not use temporal compression, although it might use intra-frame compression. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a Boolean value. The value is <strong>{{TRUE}}</strong> if the format uses temporal compression, or <strong>{{FALSE}}</strong> if the format does not use temporal compression.</p> </dd> <p> Compares two media types and determines whether they are identical. If they are not identical, the method indicates how the two formats differ. </p> <p> Both of the media types must have a major type, or the method returns <strong>{{E_INVALIDARG}}</strong>. </p><p> If the method succeeds and all of the comparison flags are set in <em>pdwFlags</em>, the return value is <strong>{{S_OK}}</strong>. If the method succeeds but one or more comparison flags are not set, the method returns <strong>{{S_FALSE}}</strong>. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_FALSE}}</strong></dt> </dl> </td><td> <p> The types are not equal. Examine the <em>pdwFlags</em> parameter to determine how the types differ. </p> </td></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The types are equal. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p> One or both media types are invalid. </p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFMediaType}}</strong> interface of the media type to compare.</p> </dd> <dd> <p>Receives a bitwise <strong>{{OR}}</strong> of zero or more flags, indicating the degree of similarity between the two media types. The following flags are defined.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{MF_MEDIATYPE_EQUAL_MAJOR_TYPES}}</strong></dt> <dt>0x00000001</dt> </dl> </td><td> <p>The major types are the same. The major type is specified by the <strong>{{MF_MT_MAJOR_TYPE}}</strong> attribute.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_MEDIATYPE_EQUAL_FORMAT_TYPES}}</strong></dt> <dt>0x00000002</dt> </dl> </td><td> <p>The subtypes are the same, or neither media type has a subtype. The subtype is specified by the <strong>{{MF_MT_SUBTYPE}}</strong> attribute.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_MEDIATYPE_EQUAL_FORMAT_DATA}}</strong></dt> <dt>0x00000004</dt> </dl> </td><td> <p>The attributes in one of the media types are a subset of the attributes in the other, and the values of these attributes match, excluding the value of the <strong>{{MF_MT_USER_DATA}}</strong>, {{MF_MT_FRAME_RATE_RANGE_MIN}}, and {{MF_MT_FRAME_RATE_RANGE_MAX}} attributes.</p> <p>Specifically, the method takes the media type with the smaller number of attributes and checks whether each attribute from that type is present in the other media type and has the same value (not including <strong>{{MF_MT_USER_DATA}}</strong>, {{MF_MT_FRAME_RATE_RANGE_MIN}}, and {{MF_MT_FRAME_RATE_RANGE_MAX}}). </p> <p>To perform other comparisons, use the <strong>{{IMFAttributes::Compare}}</strong> method. For example, the <strong>Compare</strong> method can test for identical attributes, or test the intersection of the two attribute sets. For more information, see <strong>{{MF_ATTRIBUTES_MATCH_TYPE}}</strong>.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_MEDIATYPE_EQUAL_FORMAT_USER_DATA}}</strong></dt> <dt>0x00000008</dt> </dl> </td><td> <p>The user data is identical, or neither media type contains user data. User data is specified by the <strong>{{MF_MT_USER_DATA}}</strong> attribute.</p> </td></tr> </table> <p>?</p> </dd> <p> </p><p>Retrieves an alternative representation of the media type. Currently only the DirectShow <strong>{{AM_MEDIA_TYPE}}</strong> structure is supported.</p> <p> If you request a specific format structure in the <em>guidRepresentation</em> parameter, such as <strong>{{VIDEOINFOHEADER}}</strong>, you might lose some of the format information. </p><p> You can also use the <strong>{{MFInitAMMediaTypeFromMFMediaType}}</strong> function to convert a Media Foundation media type into a DirectShow media type. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></dt> </dl> </td><td> <p> The details of the media type do not match the requested representation. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDMEDIATYPE}}</strong></dt> </dl> </td><td> <p> The media type is not valid. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_REPRESENTATION}}</strong></dt> </dl> </td><td> <p> The media type does not support the requested representation. </p> </td></tr> </table><p>?</p> <dd> <p> {{GUID}} that specifies the representation to retrieve. The following values are defined. </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{AM_MEDIA_TYPE_REPRESENTATION}}</strong></dt> </dl> </td><td> <p> Convert the media type to a DirectShow <strong>{{AM_MEDIA_TYPE}}</strong> structure. The method selects the most appropriate format structure (<strong>pbFormat</strong>). </p> </td></tr> <tr><td><dl> <dt><strong>{{FORMAT_MFVideoFormat}}</strong></dt> </dl> </td><td> <p> Convert the media type to a DirectShow <strong>{{AM_MEDIA_TYPE}}</strong> structure with an <strong>{{MFVIDEOFORMAT}}</strong> format structure. </p> </td></tr> <tr><td><dl> <dt><strong>{{FORMAT_VideoInfo}}</strong></dt> </dl> </td><td> <p> Convert the media type to a DirectShow <strong>{{AM_MEDIA_TYPE}}</strong> structure with a <strong>{{VIDEOINFOHEADER}}</strong> format structure. </p> </td></tr> <tr><td><dl> <dt><strong>{{FORMAT_VideoInfo2}}</strong></dt> </dl> </td><td> <p> Convert the media type to a DirectShow <strong>{{AM_MEDIA_TYPE}}</strong> structure with a <strong>{{VIDEOINFOHEADER2}}</strong> format structure. </p> </td></tr> </table> <p>?</p> </dd> <dd> <p> Receives a reference to a structure that contains the representation. The method allocates the memory for the structure. The caller must release the memory by calling <strong>{{IMFMediaType::FreeRepresentation}}</strong>. </p> </dd> <p> </p><p>Retrieves an alternative representation of the media type. Currently only the DirectShow <strong>{{AM_MEDIA_TYPE}}</strong> structure is supported.</p> <p> If you request a specific format structure in the <em>guidRepresentation</em> parameter, such as <strong>{{VIDEOINFOHEADER}}</strong>, you might lose some of the format information. </p><p> You can also use the <strong>{{MFInitAMMediaTypeFromMFMediaType}}</strong> function to convert a Media Foundation media type into a DirectShow media type. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></dt> </dl> </td><td> <p> The details of the media type do not match the requested representation. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDMEDIATYPE}}</strong></dt> </dl> </td><td> <p> The media type is not valid. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_REPRESENTATION}}</strong></dt> </dl> </td><td> <p> The media type does not support the requested representation. </p> </td></tr> </table><p>?</p> <dd> <p> {{GUID}} that specifies the representation to retrieve. The following values are defined. </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{AM_MEDIA_TYPE_REPRESENTATION}}</strong></dt> </dl> </td><td> <p> Convert the media type to a DirectShow <strong>{{AM_MEDIA_TYPE}}</strong> structure. The method selects the most appropriate format structure (<strong>pbFormat</strong>). </p> </td></tr> <tr><td><dl> <dt><strong>{{FORMAT_MFVideoFormat}}</strong></dt> </dl> </td><td> <p> Convert the media type to a DirectShow <strong>{{AM_MEDIA_TYPE}}</strong> structure with an <strong>{{MFVIDEOFORMAT}}</strong> format structure. </p> </td></tr> <tr><td><dl> <dt><strong>{{FORMAT_VideoInfo}}</strong></dt> </dl> </td><td> <p> Convert the media type to a DirectShow <strong>{{AM_MEDIA_TYPE}}</strong> structure with a <strong>{{VIDEOINFOHEADER}}</strong> format structure. </p> </td></tr> <tr><td><dl> <dt><strong>{{FORMAT_VideoInfo2}}</strong></dt> </dl> </td><td> <p> Convert the media type to a DirectShow <strong>{{AM_MEDIA_TYPE}}</strong> structure with a <strong>{{VIDEOINFOHEADER2}}</strong> format structure. </p> </td></tr> </table> <p>?</p> </dd> <dd> <p> Receives a reference to a structure that contains the representation. The method allocates the memory for the structure. The caller must release the memory by calling <strong>{{IMFMediaType::FreeRepresentation}}</strong>. </p> </dd> <p>[<strong>{{IMFAudioMediaType}}</strong> is no longer available for use as of Windows?7. Instead, use the media type attributes to get the properties of the audio format.]</p><p> Represents a description of an audio format.</p> <p><strong>Windows Server?2008 and Windows?Vista:??</strong>If the major type of a media type is <strong>{{MFMediaType_Audio}}</strong>, you can query the media type object for the <strong>{{IMFAudioMediaType}}</strong> interface.</p><p> To convert an audio media type into a <strong>{{WAVEFORMATEX}}</strong> structure, call <strong>{{MFCreateWaveFormatExFromMFMediaType}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>[<strong>GetAudioFormat</strong> is no longer available for use as of Windows?7. Instead, use the media type attributes to get the properties of the audio format.]</p><p> Returns a reference to a <strong>{{WAVEFORMATEX}}</strong> structure that describes the audio format.</p> <p>If you need to convert the media type into a <strong>{{WAVEFORMATEX}}</strong> structure, call <strong>{{MFCreateWaveFormatExFromMFMediaType}}</strong>.</p><p> There are no guarantees about how long the returned reference is valid.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p> This method returns a reference to a <strong>{{WAVEFORMATEX}}</strong> structure.</p> <p>Represents a description of a video format.</p> <p>If the major type of a media type is {{MFMediaType_Video}}, you can query the media type object for the <strong>{{IMFVideoMediaType}}</strong> interface.</p><p>Applications should avoid using this interface except when a method or function requires an <strong>{{IMFVideoMediaType}}</strong> reference as a parameter. You can get all of the format information from a video media type through the <strong>{{IMFAttributes}}</strong> interface, which <strong>{{IMFMediaType}}</strong> inherits.</p> <p>Represents a description of a video format.</p> <p>If the major type of a media type is {{MFMediaType_Video}}, you can query the media type object for the <strong>{{IMFVideoMediaType}}</strong> interface.</p><p>Applications should avoid using this interface except when a method or function requires an <strong>{{IMFVideoMediaType}}</strong> reference as a parameter. You can get all of the format information from a video media type through the <strong>{{IMFAttributes}}</strong> interface, which <strong>{{IMFMediaType}}</strong> inherits.</p> <p>[This {{API}} is not supported and may be altered or unavailable in the future. Instead, applications should set the <strong>{{MF_MT_DEFAULT_STRIDE}}</strong> attribute on the media type to specify the surface stride and then call <strong>{{IMFMediaType::GetRepresentation}}</strong>.]</p><p> Retrieves an alternative representation of the media type.</p> <p>This method is equivalent to <strong>{{IMFMediaType::GetRepresentation}}</strong> but includes the <em>lStride</em> parameter.</p><p>Instead of calling this method, applications should set the <strong>{{MF_MT_DEFAULT_STRIDE}}</strong> attribute on the media type to specify the surface stride and then call <strong>{{IMFMediaType::GetRepresentation}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> Provides information about the result of an asynchronous operation. </p> <p>Use this interface to complete an asynchronous operation. You get a reference to this interface when your callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method is called. To complete the operation, pass the <strong>{{IMFAsyncResult}}</strong> reference to the <strong>End...</strong> method that corresponds to the <strong>Begin...</strong> method that starts the operation. For example, if the asynchronous method is named <strong>BeginRead</strong>, call the <strong>EndRead</strong> method. For more information, see Calling Asynchronous Methods.</p><p>If you are implementing an asynchronous method, call <strong>{{MFCreateAsyncResult}}</strong> to create an instance of this object. For more information, see Writing an Asynchronous Method.</p><p>Any custom implementation of this interface must inherit the <strong>{{MFASYNCRESULT}}</strong> structure.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p> </p><p>Returns the state object specified by the caller in the asynchronous <strong>Begin</strong> method.</p> <p>The caller of the asynchronous method specifies the state object, and can use it for any caller-defined purpose. The state object can be <strong>{{NULL}}</strong>. If the state object is <strong>{{NULL}}</strong>, <strong>GetState</strong> returns <strong>{{E_POINTER}}</strong>.</p><p>If you are implementing an asynchronous method, set the state object on the through the <em>punkState</em> parameter of the <strong>{{MFCreateAsyncResult}}</strong> function.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>There is no state object associated with this asynchronous result.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the state object's <strong>{{IUnknown}}</strong> interface. If the value is not <strong>{{NULL}}</strong>, the caller must release the interface.</p> </dd> <p> </p><p>Returns the status of the asynchronous operation.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The operation completed successfully.</p> </td></tr> </table><p>?</p> <p> </p><p>Sets the status of the asynchronous operation.</p> <p>If you implement an asynchronous method, call <strong>SetStatus</strong> to set the status code for the operation.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The status of the asynchronous operation.</p> </dd> <p> </p><p>Returns an object associated with the asynchronous operation. The type of object, if any, depends on the asynchronous method that was called.</p> <p>Typically, this object is used by the component that implements the asynchronous method. It provides a way for the function that invokes the callback to pass information to the asynchronous <strong>End...</strong> method that completes the operation.</p><p>If you are implementing an asynchronous method, you can set the object through the <em>punkObject</em> parameter of the <strong>{{MFCreateAsyncResult}}</strong> function.</p><p>If the asynchronous result object's internal <strong>{{IUnknown}}</strong> reference is <strong>{{NULL}}</strong>, the method returns <strong>{{E_POINTER}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>There is no object associated with this asynchronous result.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a reference to the object's <strong>{{IUnknown}}</strong> interface. If no object is associated with the operation, this parameter receives the value <strong>{{NULL}}</strong>. If the value is not <strong>{{NULL}}</strong>, the caller must release the interface.</p> </dd> <p> </p><p>Returns the state object specified by the caller in the asynchronous <strong>Begin</strong> method, without incrementing the object's reference count.</p> <p>This method cannot be called remotely.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>Returns a reference to the state object's <strong>{{IUnknown}}</strong> interface, or <strong>{{NULL}}</strong> if no object was set. This reference does not have an outstanding reference count. If you store this reference, you must call <strong>AddRef</strong> on the reference.</p> <p>Callback interface to notify the application when an asynchronous method completes. </p> <p> For more information about asynchronous methods in Microsoft Media Foundation, see Asynchronous Callback Methods. </p><p>This interface is also used to perform a work item in a Media Foundation work-queue. For more information, see Work Queues. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p> </p><p>Provides configuration information to the dispatching thread for a callback.</p> <p> The <strong>GetParameters</strong> method returns information about the callback so that the dispatching thread can optimize the process that it uses to invoke the callback. </p><p> If the method returns a value other than zero in the <em>pdwFlags</em> parameter, your <strong>Invoke</strong> method must meet the requirements described here. Otherwise, the callback might delay the pipeline.</p><p> If you want default values for both parameters, return <strong>{{E_NOTIMPL}}</strong>. The default values are given in the parameter descriptions on this page.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{E_NOTIMPL}}</strong></strong></dt> </dl> </td><td> <p> Not implemented. Assume the default behavior. </p> </td></tr> </table><p>?</p> <dd> <p>Receives a flag indicating the behavior of the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method. The following values are defined. The default value is zero.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>Zero</strong></dt> </dl> </td><td> <p>The callback does not take a long time to complete, but has no specific restrictions on what system calls it makes. The callback generally takes less than 30 milliseconds to complete.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MFASYNC_FAST_IO_PROCESSING_CALLBACK}}</strong></strong></dt> </dl> </td><td> <p>The callback does very minimal processing. It takes less than 1 millisecond to complete.</p> <p>The callback must be invoked from one of the following work queues:</p> <ul> <li><strong>{{MFASYNC_CALLBACK_QUEUE_IO}}</strong></li> <li><strong>{{MFASYNC_CALLBACK_QUEUE_TIMER}}</strong></li> </ul> </td></tr> <tr><td><dl> <dt><strong><strong>{{MFASYNC_SIGNAL_CALLBACK}}</strong></strong></dt> </dl> </td><td> <p>Implies <strong>{{MFASYNC_FAST_IO_PROCESSING_CALLBACK}}</strong>, with the additional restriction that the callback does no processing (less than 50 microseconds), and the only system call it makes is <strong>SetEvent</strong>.</p> <p>The callback must be invoked from one of the following work queues:</p> <ul> <li><strong>{{MFASYNC_CALLBACK_QUEUE_IO}}</strong></li> <li><strong>{{MFASYNC_CALLBACK_QUEUE_TIMER}}</strong></li> </ul> </td></tr> <tr><td><dl> <dt><strong><strong>{{MFASYNC_BLOCKING_CALLBACK}}</strong></strong></dt> </dl> </td><td> <p>Blocking callback.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MFASYNC_REPLY_CALLBACK}}</strong></strong></dt> </dl> </td><td> <p>Reply callback.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p> Receives the identifier of the work queue on which the callback is dispatched. </p> <p>This value can specify one of the standard Media Foundation work queues, or a work queue created by the application. For list of standard Media Foundation work queues, see <strong>Work Queue Identifiers</strong>. To create a new work queue, call <strong>{{MFAllocateWorkQueue}}</strong>. The default value is <strong>{{MFASYNC_CALLBACK_QUEUE_STANDARD}}</strong>.</p> <p>If the work queue is not compatible with the value returned in <em>pdwFlags</em>, the Media Foundation platform returns <strong>{{MF_E_INVALID_WORKQUEUE}}</strong> when it tries to dispatch the callback. (See <strong>{{MFPutWorkItem}}</strong>.)</p> </dd> <p> </p><p>Called when an asynchronous operation is completed.</p> <p>Within your implementation of <strong>Invoke</strong>, call the corresponding <strong>End...</strong> method.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. Pass this reference to the asynchronous <strong>End...</strong> method to complete the asynchronous call.</p> </dd> <p>Provides logging information about the parent object the async callback is associated with.</p> <p><strong>{{IMFAsyncCallbackLogging}}</strong> is primarily used for async callbacks to return an {{ID}} of the parent object that they are associated with.</p> <p>Gets the reference to the parent object the async callback is associated with. </p> <p>void reference to the object.</p> <p>Gets the tag of the parent object the async callback is associated object.</p> <p>The tag of the object.</p> <p>Represents an event generated by a Media Foundation object. Use this interface to get information about the event.</p><p>To get a reference to this interface, call <strong>{{IMFMediaEventGenerator::BeginGetEvent}}</strong> or <strong>{{IMFMediaEventGenerator::GetEvent}}</strong> on the event generator.</p> <p>If you are implementing an object that generates events, call the <strong>{{MFCreateMediaEvent}}</strong> function to create a new event object.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p> </p><p>Retrieves the event type. The event type indicates what happened to trigger the event. It also defines the meaning of the event value.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the event type. For a list of event types, see Media Foundation Events.</p> </dd> <p> </p><p>Retrieves the extended type of the event.</p> <p>To define a custom event, create a new extended-type {{GUID}} and send an {{MEExtendedType}} event with that {{GUID}}.</p><p>Some standard Media Foundation events also use the extended type to differentiate between types of event data.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives a <strong>{{GUID}}</strong> that identifies the extended type.</p> </dd> <p> </p><p>Retrieves an <strong>{{HRESULT}}</strong> that specifies the event status.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the event status. If the operation that generated the event was successful, the value is a success code. A failure code means that an error condition triggered the event.</p> </dd> <p> </p><p>Retrieves the value associated with the event, if any. The value is retrieved as a <strong>{{PROPVARIANT}}</strong> structure. The actual data type and the meaning of the value depend on the event.</p> <p>Before calling this method, call <strong>PropVariantInit</strong> to initialize the <strong>{{PROPVARIANT}}</strong> structure. After the method returns, call <strong>PropVariantClear</strong> to free the memory that was allocated for the <strong>{{PROPVARIANT}}</strong> data.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> </table><p>?</p> <dd> <p>Pointer to a <strong>{{PROPVARIANT}}</strong> structure. The method fills this structure with the data.</p> </dd> <p> Retrieves events from any Media Foundation object that generates events. </p> <p>An object that supports this interface maintains a queue of events. The client of the object can retrieve the events either synchronously or asynchronously. The synchronous method is <strong>GetEvent</strong>. The asynchronous methods are <strong>BeginGetEvent</strong> and <strong>EndGetEvent</strong>.</p> <p> </p><p>Retrieves the next event in the queue. This method is synchronous.</p> <p>This method executes synchronously.</p><p>If the queue already contains an event, the method returns {{S_OK}} immediately. If the queue does not contain an event, the behavior depends on the value of <em>dwFlags</em>:</p><ul> <li> <p>If <em>dwFlags</em> is 0, the method blocks indefinitely until a new event is queued, or until the event generator is shut down.</p> </li> <li> <p>If <em>dwFlags</em> is {{MF_EVENT_FLAG_NO_WAIT}}, the method fails immediately with the return code {{MF_E_NO_EVENTS_AVAILABLE}}.</p> </li> </ul><p>This method returns {{MF_E_MULTIPLE_SUBSCRIBERS}} if you previously called <strong>{{IMFMediaEventGenerator::BeginGetEvent}}</strong> and have not yet called <strong>{{IMFMediaEventGenerator::EndGetEvent}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>{{NULL}} reference argument.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_MULTIPLE_SUBSCRIBERS}}</strong></dt> </dl> </td><td> <p>There is a pending request.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NO_EVENTS_AVAILABLE}}</strong></dt> </dl> </td><td> <p>There are no events in the queue.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The object was shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Specifies one of the following values.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>0</strong></dt> </dl> </td><td> <p>The method blocks until the event generator queues an event.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_EVENT_FLAG_NO_WAIT}}</strong></dt> </dl> </td><td> <p>The method returns immediately.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaEvent}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Begins an asynchronous request for the next event in the queue.</p> <p>When a new event is available, the event generator calls the <strong>{{IMFAsyncCallback::Invoke}}</strong> method. The <strong>Invoke</strong> method should call <strong>{{IMFMediaEventGenerator::EndGetEvent}}</strong> to get a reference to the <strong>{{IMFMediaEvent}}</strong> interface, and use that interface to examine the event.</p><p>Do not call <strong>BeginGetEvent</strong> a second time before calling <strong>EndGetEvent</strong>. While the first call is still pending, additional calls to the same object will fail. Also, the <strong>{{IMFMediaEventGenerator::GetEvent}}</strong> method fails if an asynchronous request is still pending.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p><strong>{{NULL}}</strong> reference argument.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_MULTIPLE_BEGIN}}</strong></dt> </dl> </td><td> <p>There is a pending request with the same callback reference and a different state object.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_MULTIPLE_SUBSCRIBERS}}</strong></dt> </dl> </td><td> <p>There is a pending request with a different callback reference.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The object was shut down.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_S_MULTIPLE_BEGIN}}</strong></dt> </dl> </td><td> <p>There is a pending request with the same callback reference and state object.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The client must implement this interface.</p> </dd> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked.</p> </dd> <p> </p><p>Completes an asynchronous request for the next event in the queue.</p> <p>Call this method from inside your application's <strong>{{IMFAsyncCallback::Invoke}}</strong> method. For example code, see <strong>{{IMFMediaEventGenerator::BeginGetEvent}}</strong>.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The object was shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>Invoke</strong> method.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaEvent}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>Puts a new event in the object's queue.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The object was shut down.</p> </td></tr> </table><p>?</p> <dd> <p>Specifies the event type. The event type is returned by the event's <strong>{{IMFMediaEvent::GetType}}</strong> method. For a list of event types, see Media Foundation Events.</p> </dd> <dd> <p>The extended type. If the event does not have an extended type, use the value {{GUID_NULL}}. The extended type is returned by the event's <strong>{{IMFMediaEvent::GetExtendedType}}</strong> method.</p> </dd> <dd> <p>A success or failure code indicating the status of the event. This value is returned by the event's <strong>{{IMFMediaEvent::GetStatus}}</strong> method.</p> </dd> <dd> <p>Pointer to a <strong>{{PROPVARIANT}}</strong> that contains the event value. This parameter can be <strong>{{NULL}}</strong>. This value is returned by the event's <strong>{{IMFMediaEvent::GetValue}}</strong> method.</p> </dd> <p> </p><p>Used by the Microsoft Media Foundation proxy/stub {{DLL}} to marshal certain asynchronous method calls across process boundaries.</p><p>Applications do not use or implement this interface.</p> <p>Represents a byte stream from some data source, which might be a local file, a network file, or some other source. The <strong>{{IMFByteStream}}</strong> interface supports the typical stream operations, such as reading, writing, and seeking. </p> <p> The following functions return <strong>{{IMFByteStream}}</strong> references for local files: </p><ul> <li> <strong>{{MFBeginCreateFile}}</strong> </li> <li> <strong>{{MFCreateFile}}</strong> </li> <li> <strong>{{MFCreateTempFile}}</strong> </li> </ul><p> A byte stream for a media souce can be opened with read access. A byte stream for an archive media sink should be opened with both read and write access. (Read access may be required, because the archive sink might need to read portions of the file as it writes.) </p><p>Some implementations of this interface also expose one or more of the following interfaces:</p><ul> <li> <strong>{{IMFAttributes}}</strong> </li> <li> <strong>{{IMFByteStreamBuffering}}</strong> </li> <li> <strong>{{IMFByteStreamCacheControl}}</strong> </li> <li> <strong>{{IMFGetService}}</strong> </li> <li> <strong>{{IMFMediaEventGenerator}}</strong> </li> </ul><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p> Retrieves the characteristics of the byte stream. </p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a bitwise <strong>{{OR}}</strong> of zero or more flags. The following flags are defined.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{MFBYTESTREAM_IS_READABLE}}</strong></dt> <dt>0x00000001</dt> </dl> </td><td> <p> The byte stream can be read. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFBYTESTREAM_IS_WRITABLE}}</strong></dt> <dt>0x00000002</dt> </dl> </td><td> <p> The byte stream can be written to. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFBYTESTREAM_IS_SEEKABLE}}</strong></dt> <dt>0x00000004</dt> </dl> </td><td> <p> The byte stream can be seeked. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFBYTESTREAM_IS_REMOTE}}</strong></dt> <dt>0x00000008</dt> </dl> </td><td> <p> The byte stream is from a remote source, such as a network. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFBYTESTREAM_IS_DIRECTORY}}</strong></dt> <dt>0x00000080</dt> </dl> </td><td> <p> The byte stream represents a file directory. </p> </td></tr> <tr><td><dl> <dt><strong>{{MFBYTESTREAM_HAS_SLOW_SEEK}}</strong></dt> <dt>0x00000100</dt> </dl> </td><td> <p> Seeking within this stream might be slow. For example, the byte stream might download from a network.</p> </td></tr> <tr><td><dl> <dt><strong>{{MFBYTESTREAM_IS_PARTIALLY_DOWNLOADED}}</strong></dt> <dt>0x00000200</dt> </dl> </td><td> <p>The byte stream is currently downloading data to a local cache. Read operations on the byte stream might take longer until the data is completely downloaded.</p> <p>This flag is cleared after all of the data has been downloaded.</p> <p>If the <strong>{{MFBYTESTREAM_HAS_SLOW_SEEK}}</strong> flag is also set, it means the byte stream must download the entire file sequentially. Otherwise, the byte stream can respond to seek requests by restarting the download from a new point in the stream.</p> </td></tr> <tr><td><dl> <dt><strong>{{MFBYTESTREAM_SHARE_WRITE}}</strong></dt> <dt>0x00000400</dt> </dl> </td><td> <p>Another thread or process can open this byte stream for writing. If this flag is present, the length of the byte stream could change while it is being read. </p> <p>This flag can affect the behavior of byte-stream handlers. For more information, see {{MF_BYTESTREAMHANDLER_ACCEPTS_SHARE_WRITE}}.</p> <strong>Note</strong>??Requires Windows?7 or later. ? </td></tr> <tr><td><dl> <dt><strong>{{MFBYTESTREAM_DOES_NOT_USE_NETWORK}}</strong></dt> <dt>0x00000800</dt> </dl> </td><td> <p>The byte stream is not currently using the network to receive the content. Networking hardware may enter a power saving state when this bit is set.</p> <strong>Note</strong>??Requires Windows?8 or later. ? </td></tr> </table> <p>?</p> </dd> <p> Retrieves the length of the stream. </p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Receives the length of the stream, in bytes. If the length is unknown, this value is -1. </p> </dd> <p> </p><p>Sets the length of the stream.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Length of the stream in bytes. </p> </dd> <p> Retrieves the current read or write position in the stream. </p> <p> The methods that update the current position are <strong>Read</strong>, <strong>BeginRead</strong>, <strong>Write</strong>, <strong>BeginWrite</strong>, <strong>SetCurrentPosition</strong>, and <strong>Seek</strong>. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Receives the current position, in bytes. </p> </dd> <p> </p><p>Sets the current read or write position.</p> <p> If the new position is larger than the length of the stream, the method returns {{E_INVALIDARG}}. </p><p><strong> Implementation notes:</strong> This method should update the current position in the stream by setting the current position to the value passed in to the <em>qwPosition</em> parameter. Other methods that can update the current position are <strong>Read</strong>, <strong>BeginRead</strong>, <strong>Write</strong>, <strong>BeginWrite</strong>, and <strong>Seek</strong>. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p> Invalid argument. </p> </td></tr> </table><p>?</p> <dd> <p>New position in the stream, as a byte offset from the start of the stream.</p> </dd> <p> </p><p>Queries whether the current position has reached the end of the stream.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Receives the value <strong>{{TRUE}}</strong> if the end of the stream has been reached, or <strong>{{FALSE}}</strong> otherwise. </p> </dd> <p> Reads data from the stream. </p> <p> This method reads at most <em>cb</em> bytes from the current position in the stream and copies them into the buffer provided by the caller. The number of bytes that were read is returned in the <em>pcbRead</em> parameter. The method does not return an error code on reaching the end of the file, so the application should check the value in <em>pcbRead</em> after the method returns. </p><p> This method is synchronous. It blocks until the read operation completes. </p><p><strong> Implementation notes:</strong> This method should update the current position in the stream by adding the number of bytes that were read, which is specified by the value returned in the <em>pcbRead</em> parameter, to the current position. Other methods that can update the current position are <strong>Read</strong>, <strong>Write</strong>, <strong>BeginWrite</strong>, <strong>Seek</strong>, and <strong>SetCurrentPosition</strong>. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Pointer to a buffer that receives the data. The caller must allocate the buffer. </p> </dd> <dd> <p> Size of the buffer in bytes. </p> </dd> <dd> <p> Receives the number of bytes that are copied into the buffer. This parameter cannot be <strong>{{NULL}}</strong>. </p> </dd> <p> Begins an asynchronous read operation from the stream. </p> <p> When all of the data has been read into the buffer, the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method is called. At that point, the application should call <strong>{{IMFByteStream::EndRead}}</strong> to complete the asynchronous request. </p><p> Do not read from, write to, free, or reallocate the buffer while an asynchronous read is pending. </p><p><strong> Implementation notes:</strong> This method should update the current position in the stream by adding the number of bytes that will be read, which is specified by the value returned in the <em>pcbRead</em> parameter, to the current position. Other methods that can update the current position are <strong>BeginRead</strong>, <strong>Write</strong>, <strong>BeginWrite</strong>, <strong>Seek</strong>, and <strong>SetCurrentPosition</strong>. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Pointer to a buffer that receives the data. The caller must allocate the buffer. </p> </dd> <dd> <p> Size of the buffer in bytes. </p> </dd> <dd> <p> Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface. </p> </dd> <dd> <p> Pointer to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked. </p> </dd> <p> Completes an asynchronous read operation. </p> <p> Call this method after the <strong>{{IMFByteStream::BeginRead}}</strong> method completes asynchronously. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>{{IMFAsyncCallback::Invoke}}</strong> method. </p> </dd> <dd> <p> Receives the number of bytes that were read. </p> </dd> <p> </p><p>Writes data to the stream.</p> <p> This method writes the contents of the <em>pb</em> buffer to the stream, starting at the current stream position. The number of bytes that were written is returned in the <em>pcbWritten</em> parameter. </p><p> This method is synchronous. It blocks until the write operation completes. </p><p><strong>Implementation notes:</strong> This method should update the current position in the stream by adding the number of bytes that were written to the stream, which is specified by the value returned in the <em>pcbWritten</em>, to the current position offset. </p><p> Other methods that can update the current position are <strong>Read</strong>, <strong>BeginRead</strong>, <strong>BeginWrite</strong>, <strong>Seek</strong>, and <strong>SetCurrentPosition</strong>. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Pointer to a buffer that contains the data to write. </p> </dd> <dd> <p> Size of the buffer in bytes. </p> </dd> <dd> <p> Receives the number of bytes that are written. </p> </dd> <p> Begins an asynchronous write operation to the stream. </p> <p> When all of the data has been written to the stream, the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method is called. At that point, the application should call <strong>{{IMFByteStream::EndWrite}}</strong> to complete the asynchronous request. </p><p> Do not reallocate, free, or write to the buffer while an asynchronous write is still pending. </p><p><strong>Implementation notes:</strong> This method should update the current position in the stream by adding the number of bytes that will be written to the stream, which is specified by the value returned in the <em>pcbWritten</em>, to the current position. Other methods that can update the current position are <strong>Read</strong>, <strong>BeginRead</strong>, <strong>Write</strong>, <strong>Seek</strong>, and <strong>SetCurrentPosition</strong>. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Pointer to a buffer containing the data to write. </p> </dd> <dd> <p> Size of the buffer in bytes. </p> </dd> <dd> <p> Pointer to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface. </p> </dd> <dd> <p> Pointer to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked. </p> </dd> <p> </p><p>Completes an asynchronous write operation.</p> <p> Call this method when the <strong>{{IMFByteStream::BeginWrite}}</strong> method completes asynchronously. </p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Pointer to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>{{IMFAsyncCallback::Invoke}}</strong> method.</p> </dd> <dd> <p> Receives the number of bytes that were written. </p> </dd> <p> </p><p>Moves the current position in the stream by a specified offset.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul><p><strong> Implementation notes:</strong> This method should update the current position in the stream by adding the <em>qwSeekOffset</em> to the seek <em>SeekOrigin</em> position. This should be the same value passed back in the <em>pqwCurrentPosition</em> parameter. Other methods that can update the current position are <strong>Read</strong>, <strong>BeginRead</strong>, <strong>Write</strong>, <strong>BeginWrite</strong>, and <strong>SetCurrentPosition</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Specifies the origin of the seek as a member of the <strong>{{MFBYTESTREAM_SEEK_ORIGIN}}</strong> enumeration. The offset is calculated relative to this position. </p> </dd> <dd> <p> Specifies the new position, as a byte offset from the seek origin. </p> </dd> <dd> <p> Specifies zero or more flags. The following flags are defined. </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{MFBYTESTREAM_SEEK_FLAG_CANCEL_PENDING_IO}}</strong></dt> </dl> </td><td> <p> All pending I/O requests are canceled after the seek request completes successfully. </p> </td></tr> </table> <p>?</p> </dd> <dd> <p> Receives the new position after the seek. </p> </dd> <p> Clears any internal buffers used by the stream. If you are writing to the stream, the buffered data is written to the underlying file or device. </p> <p> If the byte stream is read-only, this method has no effect.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Closes the stream and releases any resources associated with the stream, such as sockets or file handles. This method also cancels any pending asynchronous I/O requests. </p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a proxy to a byte stream. The proxy enables a media source to read from a byte stream in another process.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFByteStream}}</strong> interface of the byte stream to proxy.</p> </dd> <dd> <p>Reserved. Set to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>The interface identifer ({{IID}}) of the interface being requested.</p> </dd> <dd> <p>Receives a reference to the interface. The caller must release the interface.</p> </dd> <p>Creates a proxy to a byte stream. The proxy enables a media source to read from a byte stream in another process.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFByteStream}}</strong> interface of the byte stream to proxy.</p> </dd> <dd> <p>Reserved. Set to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>The interface identifer ({{IID}}) of the interface being requested.</p> </dd> <dd> <p>Receives a reference to the interface. The caller must release the interface.</p> </dd> <p>Begins an asynchronous request to write a media sample to the stream.</p> <p>When the sample has been written to the stream, the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method is called. At that point, the caller should call <strong>{{IMFSampleOutputStream::EndWriteSample}}</strong> to complete the asynchronous request. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFSample}}</strong> interface of the sample.</p> </dd> <dd> <p>A reference to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface.</p> </dd> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked. </p> </dd> <p>Begins an asynchronous request to write a media sample to the stream.</p> <p>When the sample has been written to the stream, the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method is called. At that point, the caller should call <strong>{{IMFSampleOutputStream::EndWriteSample}}</strong> to complete the asynchronous request. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFSample}}</strong> interface of the sample.</p> </dd> <dd> <p>A reference to the <strong>{{IMFAsyncCallback}}</strong> interface of a callback object. The caller must implement this interface.</p> </dd> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of a state object, defined by the caller. This parameter can be <strong>{{NULL}}</strong>. You can use this object to hold state information. The object is returned to the caller when the callback is invoked. </p> </dd> <p>Completes an asynchronous request to write a media sample to the stream.</p> <p>Call this method when the <strong>{{IMFSampleOutputStream::BeginWriteSample}}</strong> method completes asynchronously. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFAsyncResult}}</strong> interface. Pass in the same reference that your callback object received in the <strong>{{IMFAsyncCallback::Invoke}}</strong> method. </p> </dd> Defines size, enumerators, and synchronization methods for all nongeneric collections. <p></p>Namespace: System.CollectionsAssembly: mscorlib (in mscorlib.dll)&lt;ComVisibleAttribute(True)&gt; _ Public Interface {{ICollection}} Inherits {{IEnumerableDim}} instance As {{ICollection}} [ComVisibleAttribute(true)] public interface {{ICollection}} : {{IEnumerable}}[ComVisibleAttribute(true)] public interface class {{ICollection}} : {{IEnumerable}}/** @attribute ComVisibleAttribute(true) */ public interface {{ICollection}} extends {{IEnumerableComVisibleAttribute}}(true) public interface {{ICollection}} extends {{IEnumerableNot}} applicable. <p>The {{ICollection}} interface is the base interface for classes in the System.Collections namespace.</p> <p>The {{ICollection}} interface extends {{IEnumerable}}; {{IDictionary}} and {{IList}} are more specialized interfaces that extend {{ICollection}}. An {{IDictionary}} implementation is a collection of key/value pairs, like the Hashtable class. An {{IList}} implementation is a collection of values and its members can be accessed by index, like the ArrayList class.</p> <p>Some collections that limit access to their elements, such as the Queue class and the Stack class, directly implement the {{ICollection}} interface.</p> <p>If neither the {{IDictionary}} interface nor the {{IList}} interface meet the requirements of the required collection, derive the new collection class from the {{ICollection}} interface instead for more flexibility.</p> <p>For the generic version of this interface, see System.Collections.Generic.{{ICollection}}.</p> <p>Windows 98, Windows Server 2000 {{SP4}}, Windows {{CE}}, Windows Millennium Edition, Windows Mobile for Pocket {{PC}}, Windows Mobile for Smartphone, Windows Server 2003, Windows {{XP}} Media Center Edition, Windows {{XP}} Professional x64 Edition, Windows {{XP}} {{SP2}}, Windows {{XP}} Starter Edition</p><p></p><p></p> The Microsoft .{{NET}} Framework 3.0 is supported on Windows Vista, Microsoft Windows {{XP}} {{SP2}}, and Windows Server 2003 {{SP1}}. .{{NET}} FrameworkSupported in: 3.0, 2.0, 1.1, 1.0.{{NET}} Compact FrameworkSupported in: 2.0, 1.0XNA FrameworkSupported in: 1.0ReferenceICollection MembersSystem.Collections NamespaceIDictionaryIListSystem.Collections.Generic.{{ICollection}} <p> </p><p>Retrieves the number of objects in the collection.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the number of objects in the collection.</p> </dd> <p> </p><p>Retrieves an object in the collection.</p> <p> This method does not remove the object from the collection. To remove an object, call <strong>{{IMFCollection::RemoveElement}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Zero-based index of the object to retrieve. Objects are indexed in the order in which they were added to the collection. </p> </dd> <dd> <p> Receives a reference to the object's <strong>{{IUnknown}}</strong> interface. The caller must release the interface. The retrieved reference value might be <strong>{{NULL}}</strong>. </p> </dd> <p> </p><p>Adds an object to the collection.</p> <p>If <em>pUnkElement</em> is <strong>{{NULL}}</strong>, a <strong>{{NULL}}</strong> reference is added to the collection.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the object's <strong>{{IUnknown}}</strong> interface.</p> </dd> <p> </p><p>Removes an object from the collection.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of the object to remove. Objects are indexed in the order in which they were added to the collection.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IUnknown}}</strong> interface of the object. The caller must release the interface. This parameter cannot be <strong>{{NULL}}</strong>, but the retrieved reference value might be <strong>{{NULL}}</strong>.</p> </dd> <p> </p><p>Adds an object at the specified index in the collection.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>The zero-based index where the object will be added to the collection.</p> </dd> <dd> <p>The object to insert.</p> </dd> <p> </p><p>Removes all items from the collection.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p>Provides an event queue for applications that need to implement the <strong>{{IMFMediaEventGenerator}}</strong> interface.</p><p>This interface is exposed by a helper object that implements an event queue. If you are writing a component that implements the <strong>{{IMFMediaEventGenerator}}</strong> interface, you can use this object in your implementation. The event queue object is thread safe and provides methods to queue events and to pull them from the queue either synchronously or asynchronously. To create the event queue object, call <strong>{{MFCreateEventQueue}}</strong>.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p> </p><p>Retrieves the next event in the queue. This method is synchronous.</p><p>Call this method inside your implementation of <strong>{{IMFMediaEventGenerator::GetEvent}}</strong>. Pass the parameters from that method directly to this method.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><p>Begins an asynchronous request for the next event in the queue.</p><p>Call this method inside your implementation of <strong>{{IMFMediaEventGenerator::BeginGetEvent}}</strong>. Pass the parameters from that method directly to this method.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><p>Completes an asynchronous request for the next event in the queue.</p><p>Call this method inside your implementation of <strong>{{IMFMediaEventGenerator::EndGetEvent}}</strong>. Pass the parameters from that method directly to this method.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><p>Puts an event in the queue.</p> <p>Call this method when your component needs to raise an event that contains attributes. To create the event object, call <strong>{{MFCreateMediaEvent}}</strong>. Add attributes to the event by using methods from the <strong>{{IMFAttributes}}</strong> interface. (The <strong>{{IMFMediaEvent}}</strong> interface inherits <strong>{{IMFAttributes}}</strong>.)</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFMediaEvent}}</strong> interface of the event to be put in the queue.</p> </dd> <p> </p><p>Creates an event, sets a <strong>{{PROPVARIANT}}</strong> as the event data, and puts the event in the queue.</p><p>Call this method inside your implementation of <strong>{{IMFMediaEventGenerator::QueueEvent}}</strong>. Pass the parameters from that method directly to this method.</p><p>You can also call this method when your component needs to raise an event that does not contain attributes. If the event data is an <strong>{{IUnknown}}</strong> reference, you can use <strong>{{IMFMediaEventQueue::QueueEventParamUnk}}</strong>. If the event contains attributes, use <strong>{{IMFMediaEventQueue::QueueEvent}}</strong> instead.</p> <p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <p> </p><p>Creates an event, sets an <strong>{{IUnknown}}</strong> reference as the event data, and puts the event in the queue.</p> <p>Call this method when your component needs to raise an event that contains an <strong>{{IUnknown}}</strong> reference value and no attributes. If the event contains attributes, use <strong>{{IMFMediaEventQueue::QueueEvent}}</strong> instead.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_SHUTDOWN}}</strong></dt> </dl> </td><td> <p>The <strong>Shutdown</strong> method was called.</p> </td></tr> </table><p>?</p> <dd> <p>Specifies the event type of the event to be added to the queue. The event type is returned by the event's <strong>{{IMFMediaEvent::GetType}}</strong> method. For a list of event types, see Media Foundation Events.</p> </dd> <dd> <p>The extended type of the event. If the event does not have an extended type, use the value {{GUID_NULL}}. The extended type is returned by the event's <strong>{{IMFMediaEvent::GetExtendedType}}</strong> method.</p> </dd> <dd> <p>A success or failure code indicating the status of the event. This value is returned by the event's <strong>{{IMFMediaEvent::GetStatus}}</strong> method.</p> </dd> <dd> <p>Pointer to the <strong>{{IUnknown}}</strong> interface. The method sets this reference as the event value. The reference is returned by the event's <strong>{{IMFMediaEvent::GetValue}}</strong> method.</p> </dd> <p> </p><p>Shuts down the event queue.</p> <p>Call this method when your component shuts down. After this method is called, all <strong>{{IMFMediaEventQueue}}</strong> methods return <strong>{{MF_E_SHUTDOWN}}</strong>.</p><p>This method removes all of the events from the queue.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p>Enables the application to defer the creation of an object. This interface is exposed by activation objects.</p> <p>Typically, the application calls some function that returns an <strong>{{IMFActivate}}</strong> reference and then passes that reference to another component. The other component calls <strong>ActivateObject</strong> at a later time to create the object. In the protected media path ({{PMP}}), the <strong>{{IMFActivate}}</strong> reference might be marshaled to the protected process, so that the object can be created in that process.</p> <p> Creates the object associated with this activation object. </p> <p>Some Microsoft Media Foundation objects must be shut down before being released. If so, the caller is responsible for shutting down the object that is returned in <em>ppv</em>. To shut down the object, do one of the following:</p><ul> <li>Call <strong>{{IMFActivate::ShutdownObject}}</strong> on the activation object, or</li> <li>Call the object-specific shutdown method. This method will depend on the type of object. Possibilities include:<ul> <li>Media sources: Call <strong>{{IMFMediaSource::Shutdown}}</strong>.</li> <li>Media sinks: Call <strong>{{IMFMediaSink::Shutdown}}</strong>.</li> <li>Any object that supports the <strong>{{IMFShutdown}}</strong> interface: Call <strong>{{IMFShutdown::Shutdown}}</strong>.</li> </ul> </li> </ul><p>The <strong>{{IMFActivate::ShutdownObject}}</strong> method is generic to all object types. If the object does not require a shutdown method, <strong>ShutdownObject</strong> succeeds and has no effect. If you do not know the specific shutdown method for the object (or do not know the object type), call <strong>{{IMFActivate::ShutdownObject}}</strong>.</p><p> After the first call to <strong>ActivateObject</strong>, subsequent calls return a reference to the same instance, until the client calls either <strong>ShutdownObject</strong> or <strong>{{IMFActivate::DetachObject}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Interface identifier ({{IID}}) of the requested interface. </p> </dd> <dd> <p> Receives a reference to the requested interface. The caller must release the interface. </p> </dd> <p> </p><p>Shuts down the created object.</p> <p>If you create an object by calling <strong>{{IMFActivate::ActivateObject}}</strong>, call <strong>ShutdownObject</strong> when you are done using the object.</p><p>The component that calls <strong>ActivateObject</strong>?not the component that creates the activation object?is responsible for calling <strong>ShutdownObject</strong>. For example, in a typical playback application, the application creates activation objects for the media sinks, but the Media Session calls <strong>ActivateObject</strong>. Therefore the Media Session, not the application, calls <strong>ShutdownObject</strong>.</p><p>After <strong>ShutdownObject</strong> is called, the activation object releases all of its internal references to the created object. If you call <strong>ActivateObject</strong> again, the activation object will create a new instance of the other object.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <p> </p><p>Detaches the created object from the activation object.</p> <p>The activation object releases all of its internal references to the created object. If you call <strong>ActivateObject</strong> again, the activation object will create a new instance of the other object.</p><p>The <strong>DetachObject</strong> method does not shut down the created object. If the <strong>DetachObject</strong> method succeeds, the client must shut down the created object. This rule applies only to objects that have a shutdown method or that support the <strong>{{IMFShutdown}}</strong> interface. See the remarks for <strong>{{IMFActivate::ActivateObject}}</strong>.</p><p>Implementation of this method is optional. If the activation object does not support this method, the method returns {{E_NOTIMPL}}.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p>Not implemented.</p> </td></tr> </table><p>?</p> <p>Controls how media sources and transforms are enumerated in Microsoft Media Foundation.</p><p>To get a reference to this interface, call <strong>{{MFGetPluginControl}}</strong>.</p> <p>Media Foundation provides a set of built-in media sources and decoders. Applications can enumerate them as follows: </p><ul> <li>Media sources are enumerated through the Source Resolver.</li> <li>Transforms, such as decoders, are enumerated through the <strong>{{MFTEnum}}</strong> and <strong>{{MFTEnumEx}}</strong> functions.</li> </ul><p>Applications might also enumerate these objects indirectly. For example, if an application uses the topology loader to resolve a partial topology, the topology loader calls <strong>{{MFTEnumEx}}</strong> to find the required decoders.</p><p>Third parties can implement their own custom media sources and decoders, and register them for enumeration so that other applications can use them.</p><p>To control the enumeration order, Media Foundation maintains two process-wide lists of {{CLSIDs:}} a preferred list and a blocked list. An object whose {{CLSID}} appears in the preferred list appears first in the enumeration order. An object whose {{CLSID}} appears on the blocked list is not enumerated.</p><p>The lists are initially populated from the registry. Applications can use the <strong>{{IMFPluginControl}}</strong> interface to modify the lists for the current process.</p><p>The preferred list contains a set of key/value pairs, where the keys are strings and the values are {{CLSIDs}}. These key/value pairs are defined as follows:</p><ul> <li>For media sources, the key name is a file name extension, protocol scheme, or {{MIME}} type. The value is the {{CLSID}} of a scheme handler or byte-stream handler for that media source.</li> <li>For decoders, the key name is a media subtype {{GUID}} in canonical string form. (For more information about media subtypes, see Media Types.) The value is the {{CLSID}} of the Media Foundation transform ({{MFT}}) that implements the decoder. </li> </ul><p>The following examples show the various types of key:</p><ul> <li>File extension: ".wmv"</li> <li>Scheme: "http:"</li> <li>{{MIME}} type: "video/mp4"</li> <li>Media subtype: "{47504A4D-0000-0010-8000-00AA00389B71}"</li> </ul><p>To search the preferred list by key name, call the <strong>{{IMFPluginControl::GetPreferredClsid}}</strong> method. To enumerate the entire list, call the <strong>{{IMFPluginControl::GetPreferredClsidByIndex}}</strong> method in a loop.</p><p>The blocked list contains a list of {{CLSIDs}}. To enumerate the entire list, call the <strong>{{IMFPluginControl::GetDisabledByIndex}}</strong> method in a loop. To check whether a specific {{CLSID}} appears on the list, call the <strong>{{IMFPluginControl::IsDisabled}}</strong> method.</p> <p>Searches the preferred list for a class identifier ({{CLSID}}) that matches a specified key name.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{E_INVALIDARG}}</strong></strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{HRESULT_FROM_WIN32}}({{ERROR_NOT_FOUND}})</strong></strong></dt> </dl> </td><td> <p>No {{CLSID}} matching this key was found.</p> </td></tr> </table><p>?</p> <dd> <p>Member of the <strong>{{MF_Plugin_Type}}</strong> enumeration, specifying the type of object.</p> </dd> <dd> <p>The key name to match. For more information about the format of key names, see the Remarks section of <strong>{{IMFPluginControl}}</strong>.</p> </dd> <dd> <p>Receives a {{CLSID}} from the preferred list.</p> </dd> <p>Gets a class identifier ({{CLSID}}) from the preferred list, specified by index value.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{E_INVALIDARG}}</strong></strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{HRESULT_FROM_WIN32}}({{ERROR_NO_MORE_ITEMS}})</strong></strong></dt> </dl> </td><td> <p>The <em>index</em> parameter is out of range.</p> </td></tr> </table><p>?</p> <dd> <p>Member of the <strong>{{MF_Plugin_Type}}</strong> enumeration, specifying the type of object to enumerate.</p> </dd> <dd> <p>The zero-based index of the {{CLSID}} to retrieve.</p> </dd> <dd> <p>Receives the key name associated with the {{CLSID}}. The caller must free the memory for the returned string by calling the <strong>CoTaskMemFree</strong> function. For more information about the format of key names, see the Remarks section of <strong>{{IMFPluginControl}}</strong>.</p> </dd> <dd> <p>Receives the {{CLSID}} at the specified index.</p> </dd> <p>Adds a class identifier ({{CLSID}}) to the preferred list or removes a {{CLSID}} from the list.</p> <p>The preferred list is global to the caller's process. Calling this method does not affect the list in other process.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Member of the <strong>{{MF_Plugin_Type}}</strong> enumeration, specifying the type of object.</p> </dd> <dd> <p>The key name for the {{CLSID}}. For more information about the format of key names, see the Remarks section of <strong>{{IMFPluginControl}}</strong>.</p> </dd> <dd> <p>The {{CLSID}} to add to the list. If this parameter is <strong>{{NULL}}</strong>, the key/value entry specified by the <em>selector</em> parameter is removed from the list. </p> </dd> <p>Queries whether a class identifier ({{CLSID}}) appears in the blocked list.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The specified {{CLSID}} appears in the blocked list.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{E_INVALIDARG}}</strong></strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{HRESULT_FROM_WIN32}}({{ERROR_NOT_FOUND}})</strong></strong></dt> </dl> </td><td> <p>The specified {{CLSID}} is not in the blocked list.</p> </td></tr> </table><p>?</p> <dd> <p>Member of the <strong>{{MF_Plugin_Type}}</strong> enumeration, specifying the type of object for the query.</p> </dd> <dd> <p>The {{CLSID}} to search for.</p> </dd> <p>Gets a class identifier ({{CLSID}}) from the blocked list.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{E_INVALIDARG}}</strong></strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{HRESULT_FROM_WIN32}}({{ERROR_NO_MORE_ITEMS}})</strong></strong></dt> </dl> </td><td> <p>The <em>index</em> parameter is out of range.</p> </td></tr> </table><p>?</p> <dd> <p>Member of the <strong>{{MF_Plugin_Type}}</strong> enumeration, specifying the type of object to enumerate.</p> </dd> <dd> <p>The zero-based index of the {{CLSID}} to retrieve.</p> </dd> <dd> <p>Receives the {{CLSID}} at the specified index.</p> </dd> <p>Adds a class identifier ({{CLSID}}) to the blocked list, or removes a {{CLSID}} from the list.</p> <p> The blocked list is global to the caller's process. Calling this method does not affect the list in other processes. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{E_INVALIDARG}}</strong></strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> </table><p>?</p> <dd> <p>Member of the <strong>{{MF_Plugin_Type}}</strong> enumeration, specifying the type of object.</p> </dd> <dd> <p>The {{CLSID}} to add or remove.</p> </dd> <dd> <p>Specifies whether to add or remove the {{CSLID}}. If the value is <strong>{{TRUE}}</strong>, the method adds the {{CLSID}} to the blocked list. Otherwise, the method removes it from the list.</p> </dd> <p>Controls how media sources and transforms are enumerated in Microsoft Media Foundation.</p><p>This interface extends the <strong>{{IMFPluginControl}}</strong> interface.</p> <p>To get a reference to this interface, call <strong>{{MFGetPluginControl}}</strong> and query the returned reference for <strong>{{IMFPluginControl2}}</strong>.</p> <p>Sets the policy for which media sources and transforms are enumerated.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A value from the <strong>{{MF_PLUGIN_CONTROL_POLICY}}</strong> enumeration that specifies the policy.</p> </dd> <p>Enables two threads to share the same Microsoft Direct3D?11 device.</p> <p>This interface is exposed by the Microsoft DirectX Graphics Infrastructure ({{DXGI}}) Device Manager. To create the {{DXGI}} Device Manager, call the <strong>{{MFCreateDXGIDeviceManager}}</strong> function.</p><p>When you create an <strong>{{IMFDXGIDeviceManager}}</strong> with <strong>{{MFCreateDXGIDeviceManager}}</strong>, a Direct3D?11 device is not associated with the device manager. To associate a Direct3D?11 device with the device manager, call <strong>{{IMFDXGIDeviceManager::ResetDevice}}</strong>, passing in the reference to the Direct3D?11 device. To create a Direct3D?11 device, call <strong>{{D3D11CreateDevice}}</strong>. The device should be created with the <strong>{{D3D11_CREATE_DEVICE_VIDEO_SUPPORT}}</strong> device creation flag which is defined in the <strong>{{D3D11_CREATE_DEVICE_FLAG}}</strong> enumeration.</p><p>For Microsoft Direct3D?9 devices, use the <strong>{{IDirect3DDeviceManager9}}</strong> interface.</p><p>Windows Store apps must use <strong>{{IMFDXGIDeviceManager}}</strong> and Direct3D 11 Video {{APIs}}. </p> <p>Enables two threads to share the same Microsoft Direct3D?11 device.</p> <p>This interface is exposed by the Microsoft DirectX Graphics Infrastructure ({{DXGI}}) Device Manager. To create the {{DXGI}} Device Manager, call the <strong>{{MFCreateDXGIDeviceManager}}</strong> function.</p><p>When you create an <strong>{{IMFDXGIDeviceManager}}</strong> with <strong>{{MFCreateDXGIDeviceManager}}</strong>, a Direct3D?11 device is not associated with the device manager. To associate a Direct3D?11 device with the device manager, call <strong>{{IMFDXGIDeviceManager::ResetDevice}}</strong>, passing in the reference to the Direct3D?11 device. To create a Direct3D?11 device, call <strong>{{D3D11CreateDevice}}</strong>. The device should be created with the <strong>{{D3D11_CREATE_DEVICE_VIDEO_SUPPORT}}</strong> device creation flag which is defined in the <strong>{{D3D11_CREATE_DEVICE_FLAG}}</strong> enumeration.</p><p>For Microsoft Direct3D?9 devices, use the <strong>{{IDirect3DDeviceManager9}}</strong> interface.</p><p>Windows Store apps must use <strong>{{IMFDXGIDeviceManager}}</strong> and Direct3D 11 Video {{APIs}}. </p> <p>Queries the Microsoft Direct3D device for an interface.</p> <p>If the method returns <strong>{{MF_E_DXGI_NEW_VIDEO_DEVICE}}</strong>, call <strong>{{IMFDXGIDeviceManager::CloseDeviceHandle}}</strong> to close the handle and then call <strong>OpenDeviceHandle</strong> again to get a new handle. The <strong>{{IMFDXGIDeviceManager::ResetDevice}}</strong> method invalidates all open device handles.</p><p>For more info see, Supporting Direct3D 11 Video Decoding in Media Foundation.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_HANDLE}}</strong></dt> </dl> </td><td> <p>The specified handle is not a Direct3D device handle.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_DXGI_DEVICE_NOT_INITIALIZED}}</strong></dt> </dl> </td><td> <p>The {{DXGI}} Device Manager was not initialized. The owner of the device must call <strong>{{IMFDXGIDeviceManager::ResetDevice}}</strong>.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_DXGI_NEW_VIDEO_DEVICE}}</strong></dt> </dl> </td><td> <p>The device handle is invalid. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOINTERFACE}}</strong></dt> </dl> </td><td> <p>If a <strong>{{ID3D11VideoDevice}}</strong> is specified and the {{D3D}} device created is using the reference rasterizer or {{WARP}}. Or it is a hardware device and you are using the Microsoft Basic Display Adapter.</p> </td></tr> </table><p>?</p> <dd> <p>A handle to the Direct3D device. To get the device handle, call <strong>{{IMFDXGIDeviceManager::OpenDeviceHandle}}</strong>.</p> </dd> <dd> <p>The interface identifier ({{IID}}) of the requested interface. The Direct3D device supports the following interfaces:</p> <ul> <li> <strong>{{ID3D11Device}}</strong>. To get a reference to the Direct3D11 device, use <strong>{{IID_ID3D11Device}}</strong> as the <em>riid</em>.</li> <li> <strong>{{ID3D11VideoDevice}}</strong>. To get a reference to the Direct3D11 video device, use <strong>{{IID_ID3D11VideoDevice}}</strong> as the <em>riid</em>.</li> </ul> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface.</p> </dd> <p>Gives the caller exclusive access to the Microsoft Direct3D device.</p> <p>When you are done using the Direct3D device, call <strong>{{IMFDXGIDeviceManager::UnlockDevice}}</strong> to unlock the device.</p><p>If the method returns <strong>{{MF_E_DXGI_NEW_VIDEO_DEVICE}}</strong>, call <strong>{{IMFDXGIDeviceManager::CloseDeviceHandle}}</strong> to close the handle and then call <strong>OpenDeviceHandle</strong> again to get a new handle. The <strong>{{IMFDXGIDeviceManager::ResetDevice}}</strong> method invalidates all open device handles.</p><p>If <em>fBlock</em> is <strong>{{TRUE}}</strong>, this method can potentially deadlock. For example, it will deadlock if a thread calls <strong>LockDevice</strong> and then waits on another thread that calls <strong>LockDevice</strong>. It will also deadlock if a thread calls <strong>LockDevice</strong> twice without calling <strong>UnlockDevice</strong> in between. </p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_HANDLE}}</strong></dt> </dl> </td><td> <p>The specified handle is not a Direct3D device handle.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_DXGI_DEVICE_NOT_INITIALIZED}}</strong></dt> </dl> </td><td> <p>The {{DXGI}} Device Manager was not initialized. The owner of the device must call <strong>{{IMFDXGIDeviceManager::ResetDevice}}</strong>.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_DXGI_NEW_VIDEO_DEVICE}}</strong></dt> </dl> </td><td> <p>The device handle is invalid. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_DXGI_VIDEO_DEVICE_LOCKED}}</strong></dt> </dl> </td><td> <p>The device is locked and <em>fBlock</em> is <strong>{{FALSE}}</strong>. </p> </td></tr> </table><p>?</p> <dd> <p>A handle to the Direct3D device. To get the device handle, call <strong>{{IMFDXGIDeviceManager::OpenDeviceHandle}}</strong>.</p> </dd> <dd> <p>The interface identifier ({{IID}}) of the requested interface. The Direct3D device will support the following interfaces:</p> <ul> <li> <strong>{{ID3D11Device}}</strong> </li> <li> <strong>{{ID3D11VideoContext}}</strong> </li> <li> <strong>{{ID3D11VideoDevice}}</strong> </li> </ul> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface.</p> </dd> <dd> <p>Specifies whether to wait for the device lock. If the device is already locked and this parameter is <strong>{{TRUE}}</strong>, the method blocks until the device is unlocked. Otherwise, if the device is locked and this parameter is <strong>{{FALSE}}</strong>, the method returns immediately with the error code <strong>{{DXVA2_E_VIDEO_DEVICE_LOCKED}}</strong>.</p> </dd> <p>Gets a handle to the Microsoft Direct3D device. </p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_DXGI_DEVICE_NOT_INITIALIZED}}</strong></dt> </dl> </td><td> <p>The {{DXGI}} Device Manager was not initialized. The owner of the device must call <strong>{{IMFDXGIDeviceManager::ResetDevice}}</strong>.</p> </td></tr> </table><p>?</p> <dd> <p>Receives the device handle.</p> </dd> <p>Enables two threads to share the same Microsoft Direct3D?11 device.</p> <p>This interface is exposed by the Microsoft DirectX Graphics Infrastructure ({{DXGI}}) Device Manager. To create the {{DXGI}} Device Manager, call the <strong>{{MFCreateDXGIDeviceManager}}</strong> function.</p><p>When you create an <strong>{{IMFDXGIDeviceManager}}</strong> with <strong>{{MFCreateDXGIDeviceManager}}</strong>, a Direct3D?11 device is not associated with the device manager. To associate a Direct3D?11 device with the device manager, call <strong>{{IMFDXGIDeviceManager::ResetDevice}}</strong>, passing in the reference to the Direct3D?11 device. To create a Direct3D?11 device, call <strong>{{D3D11CreateDevice}}</strong>. The device should be created with the <strong>{{D3D11_CREATE_DEVICE_VIDEO_SUPPORT}}</strong> device creation flag which is defined in the <strong>{{D3D11_CREATE_DEVICE_FLAG}}</strong> enumeration.</p><p>For Microsoft Direct3D?9 devices, use the <strong>{{IDirect3DDeviceManager9}}</strong> interface.</p><p>Windows Store apps must use <strong>{{IMFDXGIDeviceManager}}</strong> and Direct3D 11 Video {{APIs}}. </p> <p>Tests whether a Microsoft Direct3D device handle is valid.</p> <p>If the method returns <strong>{{MF_E_DXGI_NEW_VIDEO_DEVICE}}</strong>, call <strong>{{IMFDXGIDeviceManager::CloseDeviceHandle}}</strong> to close the handle and then call <strong>OpenDeviceHandle</strong> again to get a new handle. The <strong>{{IMFDXGIDeviceManager::ResetDevice}}</strong> method invalidates all open device handles.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_HANDLE}}</strong></dt> </dl> </td><td> <p>The specified handle is not a Direct3D device handle.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_DXGI_NEW_VIDEO_DEVICE}}</strong></dt> </dl> </td><td> <p>The device handle is invalid. </p> </td></tr> </table><p>?</p> <dd> <p>A handle to the Direct3D device. To get the device handle, call <strong>{{IMFDXGIDeviceManager::OpenDeviceHandle}}</strong>.</p> </dd> <p>Unlocks the Microsoft Direct3D device.</p> <p> Call this method to release the device after calling <strong>{{IMFDXGIDeviceManager::LockDevice}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A handle to the Direct3D device. To get the device handle, call <strong>{{IMFDXGIDeviceManager::OpenDeviceHandle}}</strong>.</p> </dd> <dd> <p>Reserved.</p> </dd> <p> Receives state-change notifications from the presentation clock. </p> <p>To receive state-change notifications from the presentation clock, implement this interface and call <strong>{{IMFPresentationClock::AddClockStateSink}}</strong> on the presentation clock.</p><p>This interface must be implemented by:</p><ul> <li> <p>Presentation time sources. The presentation clock uses this interface to request change states from the time source.</p> </li> <li> <p>Media sinks. Media sinks use this interface to get notifications when the presentation clock changes.</p> </li> </ul><p>Other objects that need to be notified can implement this interface.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the <strong>{{IMFAttributes}}</strong> for the substream with the specified index.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p> Invalid argument. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> The stream specified substream index is invalid. Call <strong>GetStreamCount</strong> to get the number of substreams managed by the multiplexed media source.</p> </td></tr> </table><p>?</p> <p>Represents a byte stream from some data source, which might be a local file, a network file, or some other source. The <strong>{{IMFByteStream}}</strong> interface supports the typical stream operations, such as reading, writing, and seeking. </p> <p> The following functions return <strong>{{IMFByteStream}}</strong> references for local files: </p><ul> <li> <strong>{{MFBeginCreateFile}}</strong> </li> <li> <strong>{{MFCreateFile}}</strong> </li> <li> <strong>{{MFCreateTempFile}}</strong> </li> </ul><p> A byte stream for a media souce can be opened with read access. A byte stream for an archive media sink should be opened with both read and write access. (Read access may be required, because the archive sink might need to read portions of the file as it writes.) </p><p>Some implementations of this interface also expose one or more of the following interfaces:</p><ul> <li> <strong>{{IMFAttributes}}</strong> </li> <li> <strong>{{IMFByteStreamBuffering}}</strong> </li> <li> <strong>{{IMFByteStreamCacheControl}}</strong> </li> <li> <strong>{{IMFGetService}}</strong> </li> <li> <strong>{{IMFMediaEventGenerator}}</strong> </li> </ul><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Provides the ability to retrieve <strong>{{IMFSample}}</strong> objects for individual substreams within the output of a multiplexed media source.</p> <p>Specifies the immediate value and destination address written using <strong>{{ID3D12CommandList2::WriteBufferImmediate}}</strong>.</p> <p></p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Provides the ability to retrieve <strong>{{IMFSample}}</strong> objects for individual substreams within the output of a multiplexed media source.</p> <p> </p><p>Writes the contents of an attribute store to a stream.</p> <p>If <em>dwOptions</em> contains the {{MF_ATTRIBUTE_SERIALIZE_UNKNOWN_BYREF}} flag, the function serializes <strong>{{IUnknown}}</strong> references in the attribute store, as follows:</p><ul> <li> <p>If the <strong>{{IStream}}</strong> reference exposes the <strong>{{IMFObjectReferenceStream}}</strong> interface (through <strong>QueryInterface</strong>), the function calls <strong>{{IMFObjectReferenceStream::SaveReference}}</strong> to serialize each reference.</p> </li> <li> <p>Otherwise, the function calls <strong>CoMarshalInterface</strong> to serialize a proxy for the object.</p> </li> </ul><p>If <em>dwOptions</em> does not include the {{MF_ATTRIBUTE_SERIALIZE_UNKNOWN_BYREF}} flag, the function skips <strong>{{IUnknown}}</strong> references in the attribute store.</p><p>To load the attributes from the stream, call <strong>{{MFDeserializeAttributesFromStream}}</strong>.</p><p>The main purpose of this function is to marshal attributes across process boundaries.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAttributes}}</strong> interface of the attribute store.</p> </dd> <dd> <p>Bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MF_ATTRIBUTE_SERIALIZE_OPTIONS}}</strong> enumeration.</p> </dd> <dd> <p>Pointer to the <strong>{{IStream}}</strong> interface of the stream where the attributes are saved.</p> </dd> <p> </p><p>Loads attributes from a stream into an attribute store.</p> <p>Use this function to deserialize an attribute store that was serialized with the <strong>{{MFSerializeAttributesToStream}}</strong> function.</p><p>If <em>dwOptions</em> contains the {{MF_ATTRIBUTE_SERIALIZE_UNKNOWN_BYREF}} flag, the function deserializes <strong>{{IUnknown}}</strong> references from the stream, as follows:</p><ul> <li> <p>If the <strong>{{IStream}}</strong> reference exposes the <strong>{{IMFObjectReferenceStream}}</strong> interface (through <strong>QueryInterface</strong>), the function calls <strong>{{IMFObjectReferenceStream::LoadReference}}</strong> to deserialize each reference.</p> </li> <li> <p>Otherwise, the function calls <strong>CoUnmarshalInterface</strong> to deserialize a proxy for the object.</p> </li> </ul><p>This function deletes any attributes that were previously stored in <em>pAttr</em>.</p> <p>The function returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> </table><p>?</p> <dd> <p>Pointer to the <strong>{{IMFAttributes}}</strong> interface of the attribute store.</p> </dd> <dd> <p>Bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MF_ATTRIBUTE_SERIALIZE_OPTIONS}}</strong> enumeration.</p> </dd> <dd> <p>Pointer to the <strong>{{IStream}}</strong> interface of the stream from which to read the attributes.</p> </dd> <p> </p><p>Defines flags for the <strong>{{IMFTransform::ProcessInput}}</strong> method. Currently no flags are defined.</p> <p> Defines flags for the <strong>{{IMFTransform::ProcessOutput}}</strong> method. </p> <p>The values in this enumeration are not bit flags, so they should not be combined with a bitwise <strong>{{OR}}</strong>. Also, the caller should test for these flags with the equality operator, not a bitwise <strong>{{AND}}</strong>:</p><code>// Correct. if (Buffer.dwStatus == {{MFT_OUTPUT_DATA_BUFFER_STREAM_END}}) { ... } // Incorrect. if ((Buffer.dwStatus &amp; {{MFT_OUTPUT_DATA_BUFFER_STREAM_END}}) != 0) { ... } </code> <p> </p><p>Indicates the status of an input stream on a Media Foundation transform ({{MFT}}).</p> <dd> <p>The input stream can receive more data at this time. To deliver more input data, call <strong>{{IMFTransform::ProcessInput}}</strong>.</p> </dd> <p> </p><p>Indicates whether a Media Foundation transform ({{MFT}}) can produce output data.</p> <dd> <p>There is a sample available for at least one output stream. To retrieve the available output samples, call <strong>{{IMFTransform::ProcessOutput}}</strong>.</p> </dd> <p> </p><p>Describes an input stream on a Media Foundation transform ({{MFT}}).</p> <p>Before the client sets the media types on the transform, the only flags guaranteed to be accurate are the {{MFT_INPUT_STREAM_REMOVABLE}} and {{MFT_INPUT_STREAM_OPTIONAL}} flags. For all other flags, the client should first set the media type on every non-optional stream.</p><p>In the default processing model, an {{MFT}} holds a reference count on the sample that it receives in <strong>ProcessInput</strong>. It does not process the sample immediately inside <strong>ProcessInput</strong>. When <strong>ProcessOutput</strong> is called, the {{MFT}} produces output data and then discards the input sample. The following variations on this model are defined:</p><ul> <li> <p>If an {{MFT}} never holds onto input samples between <strong>ProcessInput</strong> and <strong>ProcessOutput</strong>, it can set the {{MFT_INPUT_STREAM_DOES_NOT_ADDREF}}.</p> </li> <li> <p>If an {{MFT}} holds some input samples beyond the next call to <strong>ProcessOutput</strong>, it can set the {{MFT_INPUT_STREAM_HOLDS_BUFFERS}}.</p> </li> </ul> <dd> <p>Each media sample (<strong>{{IMFSample}}</strong> interface) of input data must contain complete, unbroken units of data. The definition of a <em>unit of data</em> depends on the media type: For uncompressed video, a video frame; for compressed data, a compressed packet; for uncompressed audio, a single audio frame.</p> <p>For uncompressed audio formats, this flag is always implied. (It is valid to set the flag, but not required.) An uncompressed audio frame should never span more than one media sample.</p> </dd> <dd> <p>Each media sample that the client provides as input must contain exactly one unit of data, as defined for the {{MFT_INPUT_STREAM_WHOLE_SAMPLES}} flag.</p> <p>If this flag is present, the {{MFT_INPUT_STREAM_WHOLE_SAMPLES}} flag must also be present.</p> <p>An {{MFT}} that processes uncompressed audio should not set this flag. The {{MFT}} should accept buffers that contain more than a single audio frame, for efficiency.</p> </dd> <dd> <p> All input samples must be the same size. The size is given in the <strong>cbSize</strong> member of the <strong>{{MFT_INPUT_STREAM_INFO}}</strong> structure. The {{MFT}} must provide this value. During processing, the {{MFT}} should verify the size of input samples, and may drop samples with incorrect size.</p> </dd> <dd> <p>The {{MFT}} might hold one or more input samples after <strong>{{IMFTransform::ProcessOutput}}</strong> is called. If this flag is present, the <strong>hnsMaxLatency</strong> member of the <strong>{{MFT_INPUT_STREAM_INFO}}</strong> structure gives the maximum latency, and the <strong>cbMaxLookahead</strong> member gives the maximum number of bytes of lookahead.</p> </dd> <dd> <p>The {{MFT}} does not hold input samples after the <strong>{{IMFTransform::ProcessInput}}</strong> method returns. It releases the sample before the <strong>ProcessInput</strong> method returns.</p> <p>If this flag is absent, the {{MFT}} might hold a reference count on the samples that are passed to the <strong>ProcessInput</strong> method. The client must not re-use or delete the buffer memory until the {{MFT}} releases the sample's <strong>{{IMFSample}}</strong> reference.</p> <p>If this flag is absent, it does not guarantee that the {{MFT}} holds a reference count on the input samples. It is valid for an {{MFT}} to release input samples in <strong>ProcessInput</strong> even if the {{MFT}} does not set this flag. However, setting this flag might enable to client to optimize how it re-uses buffers.</p> <p>An {{MFT}} should not set this flag if it ever holds onto an input sample after returning from <strong>ProcessInput</strong>.</p> </dd> <dd> <p>This input stream can be removed by calling <strong>{{IMFTransform::DeleteInputStream}}</strong>.</p> </dd> <dd> <p>This input stream is optional. The transform can produce output without receiving input from this stream. The caller can deselect the stream by not setting a media type or by setting a <strong>{{NULL}}</strong> media type. It is possible for every input stream on a transform to be optional, but at least one input must be selected in order to produce output.</p> </dd> <dd> <p>The {{MFT}} can perform in-place processing. In this mode, the {{MFT}} directly modifies the input buffer. When the client calls <strong>ProcessOutput</strong>, the same sample that was delivered to this stream is returned in the output stream that has a matching stream identifier. This flag implies that the {{MFT}} holds onto the input buffer, so this flag cannot combined with the {{MFT_INPUT_STREAM_DOES_NOT_ADDREF}} flag.</p> <p>If this flag is present, the {{MFT}} must set the {{MFT_OUTPUT_STREAM_PROVIDES_SAMPLES}} or {{MFT_OUTPUT_STREAM_CAN_PROVIDE_SAMPLES}} flag for the output stream that corresponds to this input stream. (See <strong>{{IMFTransform::GetOutputStreamInfo}}</strong>).</p> </dd> <p> </p><p>Describes an output stream on a Media Foundation transform ({{MFT}}).</p> <p>Before the client sets the media types on the {{MFT}}, the only flag guaranteed to be accurate is the {{MFT_OUTPUT_STREAM_OPTIONAL}} flag. For all other flags, the client should first set the media type on every non-optional stream.</p><p>The {{MFT_OUTPUT_STREAM_DISCARDABLE}} and {{MFT_OUTPUT_STREAM_LAZY_READ}} flags define different behaviors for how the {{MFT}} can discard output data.</p><ul> <li> <p>{{MFT_OUTPUT_STREAM_DISCARDABLE:}} The {{MFT}} discards output data only if the client calls <strong>ProcessOutput</strong> with the {{MFT_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER}} flag. The {{MFT}} never discards data when the client calls <strong>ProcessInput</strong>.</p> </li> <li> <p>{{MFT_OUTPUT_STREAM_LAZY_READ:}} If the client continues to call <strong>ProcessInput</strong> without collecting the output from this stream, the {{MFT}} eventually discards the output. If all output streams have the {{MFT_OUTPUT_STREAM_LAZY_READ}} flag, the {{MFT}} never refuses more input data.</p> </li> </ul><p>If neither of these flags is set, the {{MFT}} never discards output data.</p> <dd> <p>Each media sample (<strong>{{IMFSample}}</strong> interface) of output data from the {{MFT}} contains complete, unbroken units of data. The definition of a <em>unit of data</em> depends on the media type: For uncompressed video, a video frame; for compressed data, a compressed packet; for uncompressed audio, a single audio frame.</p> <p>For uncompressed audio formats, this flag is always implied. (It is valid to set the flag, but not required.) An uncompressed audio frame should never span more than one media sample.</p> </dd> <dd> <p>Each output sample contains exactly one unit of data, as defined for the {{MFT_OUTPUT_STREAM_WHOLE_SAMPLES}} flag.</p> <p>If this flag is present, the {{MFT_OUTPUT_STREAM_WHOLE_SAMPLES}} flag must also be present.</p> <p>An {{MFT}} that outputs uncompressed audio should not set this flag. For efficiency, it should output more than one audio frame at a time.</p> </dd> <dd> <p>All output samples are the same size.</p> </dd> <dd> <p>The {{MFT}} can discard the output data from this output stream, if requested by the client. To discard the output, set the {{MFT_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER}} flag in the <strong>{{IMFTransform::ProcessOutput}}</strong> method.</p> </dd> <dd> <p>This output stream is optional. The client can deselect the stream by not setting a media type or by setting a <strong>{{NULL}}</strong> media type. When an optional stream is deselected, it does not produce any output data.</p> </dd> <dd> <p>The {{MFT}} provides the output samples for this stream, either by allocating them internally or by operating directly on the input samples. The {{MFT}} cannot use output samples provided by the client for this stream.</p> <p>If this flag is not set, the {{MFT}} must set <strong>cbSize</strong> to a nonzero value in the <strong>{{MFT_OUTPUT_STREAM_INFO}}</strong> structure, so that the client can allocate the correct buffer size. For more information, see <strong>{{IMFTransform::GetOutputStreamInfo}}</strong>. This flag cannot be combined with the {{MFT_OUTPUT_STREAM_CAN_PROVIDE_SAMPLES}} flag.</p> </dd> <dd> <p>The {{MFT}} can either provide output samples for this stream or it can use samples that the client allocates. This flag cannot be combined with the {{MFT_OUTPUT_STREAM_PROVIDES_SAMPLES}} flag.</p> <p>If the {{MFT}} does not set this flag or the {{MFT_OUTPUT_STREAM_PROVIDES_SAMPLES}} flag, the client must allocate the samples for this output stream. The {{MFT}} will not provide its own samples.</p> </dd> <dd> <p>The {{MFT}} does not require the client to process the output for this stream. If the client continues to send input data without getting the output from this stream, the {{MFT}} simply discards the previous input.</p> </dd> <dd> <p>The {{MFT}} might remove this output stream during streaming. This flag typically applies to demultiplexers, where the input data contains multiple streams that can start and stop during streaming. For more information, see <strong>{{IMFTransform::ProcessOutput}}</strong>.</p> </dd> <p> </p><p>Defines flags for the setting or testing the media type on a Media Foundation transform ({{MFT}}).</p> <dd> <p>Test the proposed media type, but do not set it.</p> </dd> <p> </p><p>Defines flags for processing output samples in a Media Foundation transform ({{MFT}}).</p> <dd> <p>Do not produce output for streams in which the <strong>pSample</strong> member of the <strong>{{MFT_OUTPUT_DATA_BUFFER}}</strong> structure is <strong>{{NULL}}</strong>. This flag is not valid unless the {{MFT}} has marked the output stream with the {{MFT_OUTPUT_STREAM_DISCARDABLE}} or {{MFT_OUTPUT_STREAM_LAZY_READ}} flag. For more information, see <strong>{{IMFTransform::GetOutputStreamInfo}}</strong>.</p> </dd> <dd> <p>Regenerates the last output sample.</p> <p><strong>Note</strong> Requires Windows?8.</p> </dd> <p> </p><p>Indicates the status of a call to <strong>{{IMFTransform::ProcessOutput}}</strong>.</p> <p>If the {{MFT}} sets this flag, the <strong>ProcessOutput</strong> method returns {{MF_E_TRANSFORM_STREAM_CHANGE}} and no output data is produced. The client should respond as follows:</p><ol> <li> <p>Call <strong>{{IMFTransform::GetStreamCount}}</strong> to get the new number of streams.</p> </li> <li> <p>Call <strong>{{IMFTransform::GetStreamIDs}}</strong> to get the new stream identifiers.</p> </li> <li> <p>Call <strong>{{IMFTransform::GetOutputAvailableType}}</strong> and <strong>{{IMFTransform::SetOutputType}}</strong> to set the media types on the new streams.</p> </li> </ol><p>Until these steps are completed, all further calls to <strong>ProcessOutput</strong> return {{MF_E_TRANSFORM_STREAM_CHANGE}}.</p> <p> </p><p>Not supported.</p><strong>Note</strong>??Earlier versions of this documentation described the <strong>_MFT_DRAIN_TYPE</strong> enumeration incorrectly. The enumeration is not supported. For more information, see <strong>{{MFT_MESSAGE_TYPE}}</strong>.? <p>Defines messages for a Media Foundation transform ({{MFT}}). To send a message to an {{MFT}}, call <strong>{{IMFTransform::ProcessMessage}}</strong>.</p> <p>Some messages require specific actions from the {{MFT}}. These events have "{{MESSAGE}}" in the message name. Other messages are informational; they notify the {{MFT}} of some action by the client, and do not require any particular response from the {{MFT}}. These messages have "{{NOTIFY}}" in the messages name. Except where noted, an {{MFT}} should not rely on the client sending notification messages.</p> <p>The <strong>SetOutputStreamState</strong> method sets the Device {{MFT}} output stream state and media type.</p> <p>This interface method helps to transition the output stream to a specified state with specified media type set on the output stream. This will be used by the {{DTM}} when the Device Source requests a specific output stream?s state and media type to be changed. Device {{MFT}} should change the specified output stream?s media type and state to the requested media type.</p><p>If the incoming media type and stream state are same as the current media type and stream state the method return <strong>{{S_OK}}</strong>.</p><p>If the incoming media type and current media type of the stream are the same, Device {{MFT}} must change the stream?s state to the requested value and return the appropriate <strong>{{HRESULT}}</strong>.</p><p>When a change in the output stream?s media type requires a corresponding change in the input then Device {{MFT}} must post the {{METransformInputStreamStateChanged}} event to {{DTM}} to change the relevant input stream. The call must return only after changing the input stream?s media type and the appropriate <strong>{{HRESULT}}</strong>.</p><p>As an example, consider a Device {{MFT}} that has two input streams and three output streams. Let Output 1 and Output 2 source from Input 1 and stream at 720p. Now, let us say Output 2?s media type changes to 1080p. To satisfy this request, Device {{MFT}} must change the Input 1 media type to 1080p, by posting {{METransformInputStreamStateChanged}} event to the {{DTM}}. {{DTM}} would call <strong>SetInputStreamState</strong> to change the input stream? media type and state. After this call, the <strong>SetOutputStreamState</strong> must return.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include but not limited to values given in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Transitioning the stream state succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>Device {{MFT}} could not support the request at this time.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVAILIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>An invalid stream {{ID}} was passed.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALID_STREAM_STATE}}</strong></dt> </dl> </td><td> <p>The requested stream transition is not possible.</p> </td></tr> </table><p>?</p> <dd> <p>Stream {{ID}} of the input stream where the state and media type needs to be changed.</p> </dd> <dd> <p>Preferred media type for the input stream is passed in through this parameter. Device {{MFT}} should change the media type only if the incoming media type is different from the current media type.</p> </dd> <dd> <p>Specifies the <strong>DeviceStreamState</strong> which the input stream should transition to.</p> </dd> <dd> <p>Must be zero.</p> </dd> <p>Specifies how to output a 3D stereoscopic video stream.</p> <p>This enumeration is used with the {{MF_ENABLE_3DVIDEO_OUTPUT}} attribute.</p> <dd> <p>Output the base view only. Discard the other view.</p> </dd> <dd> <p>Output a stereo view (two buffers).</p> </dd> <p> </p><p>Contains information about an input stream on a Media Foundation transform ({{MFT}}). To get these values, call <strong>{{IMFTransform::GetInputStreamInfo}}</strong>.</p> <p>Before the media types are set, the only values that should be considered valid are the {{MFT_INPUT_STREAM_REMOVABLE}} and {{MFT_INPUT_STREAM_OPTIONAL}} flags in the <strong>dwFlags</strong> member.</p><ul> <li> <p>The {{MFT_INPUT_STREAM_REMOVABLE}} flag indicates that the stream can be deleted.</p> </li> <li> <p>The {{MFT_INPUT_STREAM_OPTIONAL}} flag indicates that the stream is optional and does not require a media type.</p> </li> </ul><p>After you set a media type on all of the input and output streams (not including optional streams), all of the values returned by the <strong>GetInputStreamInfo</strong> method are valid. They might change if you set different media types.</p> <p> </p><p>Contains information about an output stream on a Media Foundation transform ({{MFT}}). To get these values, call <strong>{{IMFTransform::GetOutputStreamInfo}}</strong>.</p> <p>Before the media types are set, the only values that should be considered valid is the {{MFT_OUTPUT_STREAM_OPTIONAL}} flag in the <strong>dwFlags</strong> member. This flag indicates that the stream is optional and does not require a media type.</p><p>After you set a media type on all of the input and output streams (not including optional streams), all of the values returned by the <strong>GetOutputStreamInfo</strong> method are valid. They might change if you set different media types.</p> <p> </p><p>Contains information about an output buffer for a Media Foundation transform. This structure is used in the <strong>{{IMFTransform::ProcessOutput}}</strong> method.</p> <p>You must provide an <strong>{{MFT_OUTPUT_DATA_BUFFER}}</strong> structure for each selected output stream.</p><p>{{MFTs}} can support two different allocation models for output samples:</p><ul> <li> The {{MFT}} allocates the output sample. </li> <li> The client allocates the output sample. </li> </ul><p>To find which model the {{MFT}} supports for a given output stream, call <strong>{{IMFTransform::GetOutputStreamInfo}}</strong> and check the value of <strong>dwFlags</strong>.</p><table> <tr><th>Flag</th><th>Allocation Model</th></tr> <tr><td>{{MFT_OUTPUT_STREAM_PROVIDES_SAMPLES}}</td><td>The {{MFT}} allocates the output samples for the stream. Set <strong>pSample</strong> to <strong>{{NULL}}</strong> for this stream.</td></tr> <tr><td>{{MFT_OUTPUT_STREAM_CAN_PROVIDE_SAMPLES}}</td><td>The {{MFT}} supports both allocation models.</td></tr> <tr><td>Neither (default)</td><td>The client must allocate the output samples for the stream.</td></tr> </table><p>?</p><p>The behavior of <strong>ProcessOutput</strong> depends on the initial value of <strong>pSample</strong> and the value of the <em>dwFlags</em> parameter in the <strong>ProcessOutput</strong> method.</p><ul> <li> <p>If <strong>pSample</strong> is <strong>{{NULL}}</strong> and <em>dwFlags</em> contains the {{MFT_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER}} flag, the {{MFT}} discards the output data.</p> <p>Restriction: This output stream must have the {{MFT_OUTPUT_STREAM_DISCARDABLE}} or {{MFT_OUTPUT_STREAM_LAZY_READ}} flag. (To get the flags for the output stream, call the <strong>{{IMFTransform::GetOutputStreamInfo}}</strong> method.)</p> </li> <li> <p>If <strong>pSample</strong> is <strong>{{NULL}}</strong> and <em>dwFlags</em> does not contain the {{MFT_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER}}, the {{MFT}} provides a sample for the output data. The {{MFT}} sets <strong>pSample</strong> to point to the sample that it provides. The {{MFT}} can either allocate a new sample or re-use an input sample.</p> <p>Restriction: This output stream must have the {{MFT_OUTPUT_STREAM_PROVIDES_SAMPLES}} or {{MFT_OUTPUT_STREAM_CAN_PROVIDE_SAMPLES}} flag.</p> </li> <li> <p>If <strong>pSample</strong> is non-<strong>{{NULL}}</strong>, the {{MFT}} uses the sample provided by the caller.</p> <p>Restriction: This output stream must not have the {{MFT_OUTPUT_STREAM_PROVIDES_SAMPLES}} flag.</p> </li> </ul><p>Any other combinations are invalid and cause <strong>ProcessOutput</strong> to return {{E_INVALIDARG}}.</p><p>Each call to <strong>ProcessOutput</strong> can produce zero or more events and up to one sample per output stream.</p> <p>Not for application use.</p> <p>This structure is used internally by the Microsoft Media Foundation {{AVStream}} proxy.</p> <dd> <p>Reserved.</p> </dd> <dd> <p>Reserved.</p> </dd> <p>Implemented by all Media Foundation Transforms ({{MFTs}}).</p> <p> Gets the minimum and maximum number of input and output streams for this Media Foundation transform ({{MFT}}). </p> <p> If the {{MFT}} has a fixed number of streams, the minimum and maximum values are the same. </p><p> It is not recommended to create an {{MFT}} that supports zero inputs or zero outputs. An {{MFT}} with no inputs or no outputs may not be compatible with the rest of the Media Foundation pipeline. You should create a Media Foundation sink or source for this purpose instead. </p><p> When an {{MFT}} is first created, it is not guaranteed to have the minimum number of streams. To find the actual number of streams, call <strong>{{IMFTransform::GetStreamCount}}</strong>. </p><p> This method should not be called with <strong>{{NULL}}</strong> parameters, although in practice some implementations may allow <strong>{{NULL}}</strong> parameters. </p><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTGetStreamLimits}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Receives the minimum number of input streams. </p> </dd> <dd> <p> Receives the maximum number of input streams. If there is no maximum, receives the value <strong>{{MFT_STREAMS_UNLIMITED}}</strong>. </p> </dd> <dd> <p> Receives the minimum number of output streams. </p> </dd> <dd> <p> Receives the maximum number of output streams. If there is no maximum, receives the value <strong>{{MFT_STREAMS_UNLIMITED}}</strong>. </p> </dd> <p> Gets the current number of input and output streams on this Media Foundation transform ({{MFT}}). </p> <p> The number of streams includes unselected streams?that is, streams with no media type or a <strong>{{NULL}}</strong> media type.</p><p> This method should not be called with <strong>{{NULL}}</strong> parameters, although in practice some implementations may allow <strong>{{NULL}}</strong> parameters. </p><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTGetStreamCount}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Receives the number of input streams. </p> </dd> <dd> <p> Receives the number of output streams. </p> </dd> <p> Gets the stream identifiers for the input and output streams on this Media Foundation transform ({{MFT}}). </p> <p> Stream identifiers are necessary because some {{MFTs}} can add or remove streams, so the index of a stream may not be unique. Therefore, <strong>{{IMFTransform}}</strong> methods that operate on streams take stream identifiers. </p><p>This method can return <strong>{{E_NOTIMPL}}</strong> if both of the following conditions are true:</p><ul> <li> The transform has a fixed number of streams. </li> <li> The streams are numbered consecutively from 0 to n ? 1, where n is the number of input streams or output streams. In other words, the first input stream is 0, the second is 1, and so on; and the first output stream is 0, the second is 1, and so on. </li> </ul><p>This method must be implemented if any of the following conditions is true:</p><ul> <li> The {{MFT}} can add or remove output streams. </li> <li> The {{MFT}} allows the client to add or remove input streams. </li> <li> The stream identifiers are not consecutive. </li> </ul><p> All input stream identifiers must be unique within an {{MFT}}, and all output stream identifiers must be unique. However, an input stream and an output stream can share the same identifier. </p><p> If the client adds an input stream, the client assigns the identifier, so the {{MFT}} must allow arbitrary identifiers, as long as they are unique. If the {{MFT}} creates an output stream, the {{MFT}} assigns the identifier. </p><p> By convention, if an {{MFT}} has exactly one fixed input stream and one fixed output stream, it should assign the identifier 0 to both streams. </p><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTGetStreamIDs}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p> Not implemented. See Remarks. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_BUFFERTOOSMALL}}</strong></dt> </dl> </td><td> <p> One or both of the arrays is too small. </p> </td></tr> </table><p>?</p> <dd> <p> Number of elements in the <em>pdwInputIDs</em> array. </p> </dd> <dd> <p> Pointer to an array allocated by the caller. The method fills the array with the input stream identifiers. The array size must be at least equal to the number of input streams. To get the number of input streams, call <strong>{{IMFTransform::GetStreamCount}}</strong>. </p> <p>If the caller passes an array that is larger than the number of input streams, the {{MFT}} must not write values into the extra array entries.</p> </dd> <dd> <p> Number of elements in the <em>pdwOutputIDs</em> array. </p> </dd> <dd> <p> Pointer to an array allocated by the caller. The method fills the array with the output stream identifiers. The array size must be at least equal to the number of output streams. To get the number of output streams, call <strong>GetStreamCount</strong>. </p> <p>If the caller passes an array that is larger than the number of output streams, the {{MFT}} must not write values into the extra array entries.</p> </dd> <p> Gets the buffer requirements and other information for an input stream on this Media Foundation transform ({{MFT}}). </p> <p>It is valid to call this method before setting the media types.</p><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTGetInputStreamInfo}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> Invalid stream identifier. </p> </td></tr> </table><p>?</p> <dd> <p> Input stream identifier. To get the list of stream identifiers, call <strong>{{IMFTransform::GetStreamIDs}}</strong>. </p> </dd> <dd> <p> Pointer to an <strong>{{MFT_INPUT_STREAM_INFO}}</strong> structure. The method fills the structure with information about the input stream. </p> </dd> <p> Gets the buffer requirements and other information for an output stream on this Media Foundation transform ({{MFT}}). </p> <p>It is valid to call this method before setting the media types.</p><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTGetOutputStreamInfo}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> Invalid stream number. </p> </td></tr> </table><p>?</p> <dd> <p> Output stream identifier. To get the list of stream identifiers, call <strong>{{IMFTransform::GetStreamIDs}}</strong>. </p> </dd> <dd> <p> Pointer to an <strong>{{MFT_OUTPUT_STREAM_INFO}}</strong> structure. The method fills the structure with information about the output stream. </p> </dd> <p> Gets the global attribute store for this Media Foundation transform ({{MFT}}). </p> <p> Use the <strong>{{IMFAttributes}}</strong> reference retrieved by this method to get or set attributes that apply to the entire {{MFT}}. To get the attribute store for an input stream, call <strong>{{IMFTransform::GetInputStreamAttributes}}</strong>. To get the attribute store for an output stream, call <strong>{{IMFTransform::GetOutputStreamAttributes}}</strong>. </p><p> Implementation of this method is optional unless the {{MFT}} needs to support a particular set of attributes. Exception: Hardware-based {{MFTs}} must implement this method. See Hardware {{MFTs}}.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p> The {{MFT}} does not support attributes. </p> </td></tr> </table><p>?</p> <dd> <p> Receives a reference to the <strong>{{IMFAttributes}}</strong> interface. The caller must release the interface. </p> </dd> <p> Gets the attribute store for an input stream on this Media Foundation transform ({{MFT}}). </p> <p> Implementation of this method is optional unless the {{MFT}} needs to support a particular set of attributes. </p><p> To get the attribute store for the entire {{MFT}}, call <strong>{{IMFTransform::GetAttributes}}</strong>. </p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p> The {{MFT}} does not support input stream attributes. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> Invalid stream identifier. </p> </td></tr> </table><p>?</p> <dd> <p> Input stream identifier. To get the list of stream identifiers, call <strong>{{IMFTransform::GetStreamIDs}}</strong>. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFAttributes}}</strong> interface. The caller must release the interface. </p> </dd> <p> Gets the attribute store for an output stream on this Media Foundation transform ({{MFT}}). </p> <p> Implementation of this method is optional unless the {{MFT}} needs to support a particular set of attributes. </p><p> To get the attribute store for the entire {{MFT}}, call <strong>{{IMFTransform::GetAttributes}}</strong>. </p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p> The {{MFT}} does not support output stream attributes. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> Invalid stream identifier. </p> </td></tr> </table><p>?</p> <dd> <p> Output stream identifier. To get the list of stream identifiers, call <strong>{{IMFTransform::GetStreamIDs}}</strong>. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFAttributes}}</strong> interface. The caller must release the interface. </p> </dd> <p> Removes an input stream from this Media Foundation transform ({{MFT}}). </p> <p> If the transform has a fixed number of input streams, the method returns <strong>{{E_NOTIMPL}}</strong>. </p><p> An {{MFT}} might support this method but not allow certain input streams to be removed. If an input stream can be removed, the <strong>{{IMFTransform::GetInputStreamInfo}}</strong> method returns the <strong>{{MFT_INPUT_STREAM_REMOVABLE}}</strong> flag for that stream. Otherwise, the stream cannot be removed, and the method returns <strong>{{MF_E_INVALIDREQUEST}}</strong>. The method also fails if the {{MFT}} currently has the minimum number of input streams that it requires. To find the minimum number of streams, call <strong>{{IMFTransform::GetStreamLimits}}</strong>. </p><p> If the transform still has unprocessed input for that stream, the method might succeed or it might return <strong>{{MF_E_TRANSFORM_INPUT_REMAINING}}</strong>. If the method succeeds, the {{MFT}} will continue to process the remaining input after the stream is removed. If the method returns <strong>{{MF_E_TRANSFORM_INPUT_REMAINING}}</strong>, you must clear the input buffers before removing the stream. To clear the input buffers, either call <strong>{{IMFTransform::ProcessOutput}}</strong> or else call <strong>{{IMFTransform::ProcessMessage}}</strong> with the <strong>{{MFT_MESSAGE_COMMAND_FLUSH}}</strong> to flush the {{MFT}}. Then call the <strong>DeleteInputStream</strong> again. An {{MFT}} should never discard input buffers when <strong>DeleteInputStream</strong> is called. </p><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTDeleteInputStream}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p> The transform has a fixed number of input streams. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p> The stream is not removable, or the transform currently has the minimum number of input streams it can support. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> Invalid stream identifier. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSFORM_INPUT_REMAINING}}</strong></dt> </dl> </td><td> <p> The transform has unprocessed input buffers for the specified stream. </p> </td></tr> </table><p>?</p> <dd> <p> Identifier of the input stream to remove. </p> </dd> <p> Adds one or more new input streams to this Media Foundation transform ({{MFT}}). </p> <p> If the new streams exceed the maximum number of input streams for this transform, the method returns <strong>{{E_INVALIDARG}}.</strong> To find the maximum number of input streams, call <strong>{{IMFTransform::GetStreamLimits}}</strong>. </p><p> If any of the new stream identifiers conflicts with an existing input stream, the method returns <strong>{{E_INVALIDARG}}</strong>. </p><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTAddInputStreams}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p> Invalid argument. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p> The {{MFT}} has a fixed number of input streams. </p> </td></tr> </table><p>?</p> <dd> <p> Number of streams to add. </p> </dd> <dd> <p> Array of stream identifiers. The new stream identifiers must not match any existing input streams. </p> </dd> <p> Gets an available media type for an input stream on this Media Foundation transform ({{MFT}}). </p> <p> The {{MFT}} defines a list of available media types for each input stream and orders them by preference. This method enumerates the available media types for an input stream. To enumerate the available types, increment <em>dwTypeIndex</em> until the method returns <strong>{{MF_E_NO_MORE_TYPES}}</strong>. </p><p> Setting the media type on one stream might change the available types for another stream, or change the preference order. However, an {{MFT}} is not required to update the list of available types dynamically. The only guaranteed way to test whether you can set a particular input type is to call <strong>{{IMFTransform::SetInputType}}</strong>. </p><p> In some cases, an {{MFT}} cannot return a list of input types until one or more output types are set. If so, the method returns <strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong>. </p><p> An {{MFT}} is not required to implement this method. However, most {{MFTs}} should implement this method, unless the supported types are simple and can be discovered through the <strong>{{MFTGetInfo}}</strong> function.</p><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTGetInputAvailableType}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p><p>For encoders, after the output type is set, <strong>GetInputAvailableType</strong> must return a list of input types that are compatible with the current output type. This means that all types returned by <strong>GetInputAvailableType</strong> after the output type is set must be valid types for <strong>SetInputType</strong>.</p><p>Encoders should reject input types if the attributes of the input media type and output media type do not match, such as resolution setting with {{MF_MT_FRAME_SIZE}}, nominal range setting with {{MF_MT_VIDEO_NOMINAL_RANGE}}, or frame rate setting with {{MF_MT_FRAME_SIZE}}</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p> The {{MFT}} does not have a list of available input types. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> Invalid stream identifier. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NO_MORE_TYPES}}</strong></dt> </dl> </td><td> <p> The <em>dwTypeIndex</em> parameter is out of range. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong></dt> </dl> </td><td> <p> You must set the output types before setting the input types. </p> </td></tr> </table><p>?</p> <dd> <p> Input stream identifier. To get the list of stream identifiers, call <strong>{{IMFTransform::GetStreamIDs}}</strong>. </p> </dd> <dd> <p> Index of the media type to retrieve. Media types are indexed from zero and returned in approximate order of preference. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFMediaType}}</strong> interface. </p> </dd> <p> Gets an available media type for an output stream on this Media Foundation transform ({{MFT}}). </p> <p> The {{MFT}} defines a list of available media types for each output stream and orders them by preference. This method enumerates the available media types for an output stream. To enumerate the available types, increment <em>dwTypeIndex</em> until the method returns {{MF_}}<strong>{{E_NO_MORE_TYPES}}</strong>. </p><p> Setting the media type on one stream can change the available types for another stream (or change the preference order). However, an {{MFT}} is not required to update the list of available types dynamically. The only guaranteed way to test whether you can set a particular input type is to call <strong>{{IMFTransform::SetOutputType}}</strong>. </p><p> In some cases, an {{MFT}} cannot return a list of output types until one or more input types are set. If so, the method returns <strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong>. </p><p> An {{MFT}} is not required to implement this method. However, most {{MFTs}} should implement this method, unless the supported types are simple and can be discovered through the <strong>{{MFTGetInfo}}</strong> function. </p><p> This method can return a <em>partial</em> media type. A partial media type contains an incomplete description of a format, and is used to provide a hint to the caller. For example, a partial type might include just the major type and subtype {{GUIDs}}. However, after the client sets the input types on the {{MFT}}, the {{MFT}} should generally return at least one complete output type, which can be used without further modification. For more information, see Complete and Partial Media Types.</p><p>Some {{MFTs}} cannot provide an accurate list of output types until the {{MFT}} receives the first input sample. For example, the {{MFT}} might need to read the first packet header to deduce the format. An {{MFT}} should handle this situation as follows:</p><ol> <li> Before the {{MFT}} receives any input, it offers a list of one or more output types that it could possibly produce. For example, an {{MPEG}}-2 decoder might return a media type that describes the {{MPEG}}-2 main profile/main level. </li> <li> The client selects one of these types (generally the first) and sets it on the output stream. </li> <li> The client delivers the first input sample by calling <strong>{{IMFTransform::ProcessInput}}</strong>. </li> <li> If the output type does not conform to the input data, the transform signals a format change in the <strong>ProcessOutput</strong> method. For more information about format changes, see <strong>{{IMFTransform::ProcessOutput}}</strong>. </li> <li> The calls <strong>GetOutputAvailableType</strong> again. At this point, the method should return an updated list of types that reflects the input data. </li> <li> The client selects a new output type from this list and calls <strong>SetOutputType</strong>. </li> </ol><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTGetOutputAvailableType}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p> The {{MFT}} does not have a list of available output types. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> Invalid stream identifier. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NO_MORE_TYPES}}</strong></dt> </dl> </td><td> <p> The <em>dwTypeIndex</em> parameter is out of range. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong></dt> </dl> </td><td> <p> You must set the input types before setting the output types. </p> </td></tr> </table><p>?</p> <dd> <p> Output stream identifier. To get the list of stream identifiers, call <strong>{{IMFTransform::GetStreamIDs}}</strong>. </p> </dd> <dd> <p> Index of the media type to retrieve. Media types are indexed from zero and returned in approximate order of preference. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFMediaType}}</strong> interface. The caller must release the interface. </p> </dd> <p> Sets, tests, or clears the media type for an input stream on this Media Foundation transform ({{MFT}}). </p> <p>This method can be used to set, test without setting, or clear the media type:</p><ul> <li> To set the media type, set <em>dwFlags</em> to zero and set <em>pType</em> to a non-<strong>{{NULL}}</strong> reference that specifies the media type. </li> <li> To test the media type without setting it, set <em>dwFlags</em> to <strong>{{MFT_SET_TYPE_TEST_ONLY}}</strong> and set <em>pType</em> to a non-<strong>{{NULL}}</strong> reference that specifies the media type. If the media type is acceptable, the method return <strong>{{S_OK}}</strong>. Otherwise, it returns <strong>{{MF_E_INVALIDMEDIATYPE}}</strong>. Regardless of the return value, the current media type does not change. </li> <li> To clear the media type, set <em>pType</em> to <strong>{{NULL}}</strong>. </li> </ul><p> Setting the media type on one stream may change the acceptable types on another stream. </p><p> An {{MFT}} may require the caller to set one or more output types before setting the input type. If so, the method returns <strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong>. </p><p> If the {{MFT}} supports DirectX Video Acceleration ({{DXVA}}) but is unable to find a suitable {{DXVA}} configuration (for example, if the graphics driver does not have the right capabilities), the method should return <strong>{{MF_E_UNSUPPORTED_D3D_TYPE}}</strong>. For more information, see Supporting {{DXVA}} 2.0 in Media Foundation. </p><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTSetInputType}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDMEDIATYPE}}</strong></dt> </dl> </td><td> <p> The {{MFT}} cannot use the proposed media type. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> Invalid stream identifier. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDTYPE}}</strong></dt> </dl> </td><td> <p> The proposed type is not valid. This error code indicates that the media type itself is not configured correctly; for example, it might contain mutually contradictory attributes. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSFORM_CANNOT_CHANGE_MEDIATYPE_WHILE_PROCESSING}}</strong></dt> </dl> </td><td> <p> The {{MFT}} cannot switch types while processing data. Try draining or flushing the {{MFT}}. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong></dt> </dl> </td><td> <p> You must set the output types before setting the input types. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_D3D_TYPE}}</strong></dt> </dl> </td><td> <p> The {{MFT}} could not find a suitable DirectX Video Acceleration ({{DXVA}}) configuration. </p> </td></tr> </table><p>?</p> <dd> <p> Input stream identifier. To get the list of stream identifiers, call <strong>{{IMFTransform::GetStreamIDs}}</strong>. </p> </dd> <dd> <p> Pointer to the <strong>{{IMFMediaType}}</strong> interface, or <strong>{{NULL}}</strong>. </p> </dd> <dd> <p> Zero or more flags from the <strong>_MFT_SET_TYPE_FLAGS</strong> enumeration. </p> </dd> <p> Sets, tests, or clears the media type for an output stream on this Media Foundation transform ({{MFT}}). </p> <p>This method can be used to set, test without setting, or clear the media type:</p><ul> <li> To set the media type, set <em>dwFlags</em> to zero and set <em>pType</em> to a non-<strong>{{NULL}}</strong> reference that specifies the media type. </li> <li> To test the media type without setting it, set <em>dwFlags</em> to <strong>{{MFT_SET_TYPE_TEST_ONLY}}</strong> and set <em>pType</em> to a non-<strong>{{NULL}}</strong> reference that specifies the media type. If the media type is acceptable, the method return <strong>{{S_OK}}</strong>. Otherwise, it returns <strong>{{MF_E_INVALIDMEDIATYPE}}</strong>. Regardless of the return value, the current media type does not change. </li> <li> To clear the media type, set <em>pType</em> to <strong>{{NULL}}</strong>. </li> </ul><p> Setting the media type on one stream may change the acceptable types on another stream. </p><p> An {{MFT}} may require the caller to set one or more input types before setting the output type. If so, the method returns <strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong>. </p><p>If the {{MFT}} supports DirectX Video Acceleration ({{DXVA}}) but is unable to find a suitable {{DXVA}} configuration (for example, if the graphics driver does not have the right capabilities), the method should return <strong>{{MF_E_UNSUPPORTED_D3D_TYPE}}</strong>. For more information, see Supporting {{DXVA}} 2.0 in Media Foundation.</p><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTSetOutputType}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDMEDIATYPE}}</strong></dt> </dl> </td><td> <p> The transform cannot use the proposed media type. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> Invalid stream identifier. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDTYPE}}</strong></dt> </dl> </td><td> <p> The proposed type is not valid. This error code indicates that the media type itself is not configured correctly; for example, it might contain mutually contradictory flags. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSFORM_CANNOT_CHANGE_MEDIATYPE_WHILE_PROCESSING}}</strong></dt> </dl> </td><td> <p> The {{MFT}} cannot switch types while processing data. Try draining or flushing the {{MFT}}. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong></dt> </dl> </td><td> <p> You must set the input types before setting the output types. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_D3D_TYPE}}</strong></dt> </dl> </td><td> <p> The {{MFT}} could not find a suitable DirectX Video Acceleration ({{DXVA}}) configuration. </p> </td></tr> </table><p>?</p> <dd> <p> Output stream identifier. To get the list of stream identifiers, call <strong>{{IMFTransform::GetStreamIDs}}</strong>. </p> </dd> <dd> <p> Pointer to the <strong>{{IMFMediaType}}</strong> interface, or <strong>{{NULL}}</strong>. </p> </dd> <dd> <p> Zero or more flags from the <strong>_MFT_SET_TYPE_FLAGS</strong> enumeration. </p> </dd> <p> Gets the current media type for an input stream on this Media Foundation transform ({{MFT}}). </p> <p> If the specified input stream does not yet have a media type, the method returns <strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong>. Most {{MFTs}} do not set any default media types when first created. Instead, the client must set the media type by calling <strong>{{IMFTransform::SetInputType}}</strong>. </p><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTGetInputCurrentType}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> Invalid stream identifier. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong></dt> </dl> </td><td> <p> The input media type has not been set. </p> </td></tr> </table><p>?</p> <dd> <p> Input stream identifier. To get the list of stream identifiers, call <strong>{{IMFTransform::GetStreamIDs}}</strong>. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFMediaType}}</strong> interface. The caller must release the interface. </p> </dd> <p> Gets the current media type for an output stream on this Media Foundation transform ({{MFT}}). </p> <p> If the specified output stream does not yet have a media type, the method returns <strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong>. Most {{MFTs}} do not set any default media types when first created. Instead, the client must set the media type by calling <strong>{{IMFTransform::SetOutputType}}</strong>. </p><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTGetOutputCurrentType}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> Invalid stream identifier. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong></dt> </dl> </td><td> <p> The output media type has not been set. </p> </td></tr> </table><p>?</p> <dd> <p> Output stream identifier. To get the list of stream identifiers, call <strong>{{IMFTransform::GetStreamIDs}}</strong>. </p> </dd> <dd> <p> Receives a reference to the <strong>{{IMFMediaType}}</strong> interface. The caller must release the interface. </p> </dd> <p> Queries whether an input stream on this Media Foundation transform ({{MFT}}) can accept more data. </p> <p> If the method returns the <strong>{{MFT_INPUT_STATUS_ACCEPT_DATA}}</strong> flag, you can deliver an input sample to the specified stream by calling <strong>{{IMFTransform::ProcessInput}}</strong>. If the method succeeds but does not return any flags in the <em>pdwFlags</em> parameter, it means the input stream already has as much data as it can accept. </p><p> Use this method to test whether the input stream is ready to accept more data, without incurring the overhead of allocating a new sample and calling <strong>ProcessInput</strong>. </p><p> After the client has set valid media types on all of the streams, the {{MFT}} should always be in one of two states: Able to accept more input, or able to produce more output (or both). </p><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTGetInputStatus}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> Invalid stream identifier. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong></dt> </dl> </td><td> <p> The media type is not set on one or more streams. </p> </td></tr> </table><p>?</p> <dd> <p> Input stream identifier. To get the list of stream identifiers, call <strong>{{IMFTransform::GetStreamIDs}}</strong>. </p> </dd> <dd> <p> Receives a member of the <strong>_MFT_INPUT_STATUS_FLAGS</strong> enumeration, or zero. If the value is <strong>{{MFT_INPUT_STATUS_ACCEPT_DATA}}</strong>, the stream specified in <em>dwInputStreamID</em> can accept more input data. </p> </dd> <p> Queries whether the Media Foundation transform ({{MFT}}) is ready to produce output data. </p> <p> If the method returns the <strong>{{MFT_OUTPUT_STATUS_SAMPLE_READY}}</strong> flag, it means you can generate one or more output samples by calling <strong>{{IMFTransform::ProcessOutput}}</strong>. </p><p> {{MFTs}} are not required to implement this method. If the method returns <strong>{{E_NOTIMPL}}</strong>, you must call <strong>ProcessOutput</strong> to determine whether the transform has output data. </p><p> If the {{MFT}} has more than one output stream, but it does not produce samples at the same time for each stream, it can set the <strong>{{MFT_OUTPUT_STATUS_SAMPLE_READY}}</strong> flag when just one stream is ready. However, if the {{MFT}} normally produces samples at the same time for each output stream, it should not set this flag until all streams are ready. </p><p> After the client has set valid media types on all of the streams, the {{MFT}} should always be in one of two states: Able to accept more input, or able to produce more output. </p><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTGetOutputStatus}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p> Not implemented. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong></dt> </dl> </td><td> <p> The media type is not set on one or more streams. </p> </td></tr> </table><p>?</p> <dd> <p> Receives a member of the <strong>_MFT_OUTPUT_STATUS_FLAGS</strong> enumeration, or zero. If the value is <strong>{{MFT_OUTPUT_STATUS_SAMPLE_READY}}</strong>, the {{MFT}} can produce an output sample. </p> </dd> <p> Sets the range of time stamps the client needs for output. </p> <p> This method can be used to optimize preroll, especially in formats that have gaps between time stamps, or formats where the data must start on a sync point, such as {{MPEG}}-2. Calling this method is optional, and implementation of this method by an {{MFT}} is optional. If the {{MFT}} does not implement the method, the return value is <strong>{{E_NOTIMPL}}</strong>.</p><p> If an {{MFT}} implements this method, it must limit its output data to the range of times specified by <em>hnsLowerBound</em> and <em>hnsUpperBound</em>. The {{MFT}} discards any input data that is not needed to produce output within this range. If the sample boundaries do not exactly match the range, the {{MFT}} should split the output samples, if possible. Otherwise, the output samples can overlap the range. </p><p> For example, suppose the output range is 100 to 150 milliseconds (ms), and the output format is video with each frame lasting 33 ms. A sample with a time stamp of 67 ms overlaps the range (67 + 33 = 100) and is produced as output. A sample with a time stamp of 66 ms is discarded (66 + 33 = 99). Similarly, a sample with a time stamp of 150 ms is produced as output, but a sample with a time stamp of 151 is discarded.</p><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTSetOutputBounds}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p> Not implemented. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong></dt> </dl> </td><td> <p> The media type is not set on one or more streams. </p> </td></tr> </table><p>?</p> <dd> <p> Specifies the earliest time stamp. The Media Foundation transform ({{MFT}}) will accept input until it can produce an output sample that begins at this time; or until it can produce a sample that ends at this time or later. If there is no lower bound, use the value <strong>{{MFT_OUTPUT_BOUND_LOWER_UNBOUNDED}}</strong>. </p> </dd> <dd> <p> Specifies the latest time stamp. The {{MFT}} will not produce an output sample with time stamps later than this time. If there is no upper bound, use the value <strong>{{MFT_OUTPUT_BOUND_UPPER_UNBOUNDED}}</strong>. </p> </dd> <p> Sends an event to an input stream on this Media Foundation transform ({{MFT}}). </p> <p> An {{MFT}} can handle sending the event downstream, or it can let the pipeline do this, as indicated by the return value: </p><ul> <li><strong>{{E_NOTIMPL}}</strong>: The {{MFT}} ignores all events, and the pipeline should send all events downstream. After the pipeline receives this return value, it might not call <strong>ProcessEvent</strong> again. </li> <li><strong>{{S_OK}}</strong>: The {{MFT}} has examined this event, but the pipeline should send the event downstream. Internally, the {{MFT}} might respond to the event in some way, or it might ignore the event. </li> <li><strong>{{MF_S_TRANSFORM_DO_NOT_PROPAGATE_EVENT}}</strong>: The pipeline should not propagate this event downstream. Either the {{MFT}} will send the event downstream, or else the {{MFT}} will consume the event and not send it downstream. The {{MFT}} should only consume the event if the event should stop at this {{MFT}} and not travel any further downstream. But in most cases, the event should travel downstream. </li> </ul><p> To send the event downstream, the {{MFT}} adds the event to the collection object that is provided by the client in the <strong>pEvents</strong> member of the <strong>{{MFT_OUTPUT_DATA_BUFFER}}</strong> structure, when the client calls <strong>{{IMFTransform::ProcessOutput}}</strong>. </p><p> Events must be serialized with the samples that come before and after them. Attach the event to the output sample that follows the event. (The pipeline will process the event first, and then the sample.) If an {{MFT}} holds back one or more samples between calls to <strong>{{IMFTransform::ProcessInput}}</strong> and <strong>ProcessOutput</strong>, the {{MFT}} should handle sending all events downstream, because in this situation the pipeline cannot correlate input samples with output samples. </p><p> If an {{MFT}} does not hold back samples and does not need to examine any events, it can return <strong>{{E_NOTIMPL}}</strong>. </p><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTProcessEvent}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p> Not implemented. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> Invalid stream number. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong></dt> </dl> </td><td> <p> The media type is not set on one or more streams. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_S_TRANSFORM_DO_NOT_PROPAGATE_EVENT}}</strong></dt> </dl> </td><td> <p> The pipeline should not propagate the event. </p> </td></tr> </table><p>?</p> <dd> <p> Input stream identifier. To get the list of stream identifiers, call <strong>{{IMFTransform::GetStreamIDs}}</strong>. </p> </dd> <dd> <p> Pointer to the <strong>{{IMFMediaEvent}}</strong> interface of an event object. </p> </dd> <p> Sends a message to the Media Foundation transform ({{MFT}}). </p> <p> Before calling this method, set the media types on all input and output streams. </p><p> The {{MFT}} might ignore certain message types. If so, the method returns <strong>{{S_OK}}</strong>. An error code indicates that the transform handles this message type but was unable to process the message in this instance. </p><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTProcessMessage}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> Invalid stream number. Applies to the <strong>{{MFT_MESSAGE_NOTIFY_END_OF_STREAM}}</strong> message. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong></dt> </dl> </td><td> <p> The media type is not set on one or more streams. </p> </td></tr> </table><p>?</p> <dd> <p> The message to send, specified as a member of the <strong>{{MFT_MESSAGE_TYPE}}</strong> enumeration. </p> </dd> <dd> <p> Message parameter. The meaning of this parameter depends on the message type. </p> </dd> <p> Delivers data to an input stream on this Media Foundation transform ({{MFT}}). </p> <p> In most cases, if the method succeeds, the {{MFT}} stores the sample and holds a reference count on the <strong>{{IMFSample}}</strong> reference. Do not re-use the sample until the {{MFT}} releases the sample. Instead of storing the sample, however, an {{MFT}} might copy the sample data into a new buffer. In that case, the {{MFT}} should set the <strong>{{MFT_INPUT_STREAM_DOES_NOT_ADDREF}}</strong> flag in the <strong>{{IMFTransform::GetInputStreamInfo}}</strong> method. </p><p> If the {{MFT}} already has enough input data to produce an output sample, it does not accept new input data, and <strong>ProcessInput</strong> returns <strong>{{MF_E_NOTACCEPTING}}</strong>. At that point, the client should clear the pending input data by doing one of the following: </p><ul> <li> Generate new output by calling <strong>{{IMFTransform::ProcessOutput}}</strong>. </li> <li> Flush the input data by calling <strong>{{IMFTransform::ProcessMessage}}</strong> with the {{MFT_}}<strong>{{MESSAGE_COMMAND_FLUSH}}</strong> message. </li> </ul><p> An exception to this rule is the <strong>{{MFT_OUTPUT_STREAM_LAZY_READ}}</strong> flag. When this flag is present, the transform will discard stored samples if you give it more input. For more information, see <strong>{{IMFTransform::GetOutputStreamInfo}}</strong>. A transform should never queue any more input data than is required to produce the correct output. </p><p> An {{MFT}} can process the input data in the <strong>ProcessInput</strong> method. However, most {{MFTs}} wait until the client calls <strong>ProcessOutput</strong>. </p><p> After the client has set valid media types on all of the streams, the {{MFT}} should always be in one of two states: Able to accept more input, or able to produce more output. It should never be in both states or neither state. An {{MFT}} should only accept as much input as it needs to generate at least one output sample, at which point <strong>ProcessInput</strong> returns <strong>{{MF_E_NOTACCEPTING}}</strong>. When <strong>ProcessInput</strong> returns <strong>{{MF_E_NOTACCEPTING}}</strong>, the client can assume that the {{MFT}} is ready to produce output. </p><p> If an {{MFT}} encounters a non-fatal error in the input data, it can simply drop the data and attempt to recover when it gets the more input data. To request more input data, the {{MFT}} returns <strong>{{MF_E_TRANSFORM_NEED_MORE_INPUT}}</strong> from the <strong>{{IMFTransform::ProcessOutput}}</strong> method. If the {{MFT}} drops any data, it should set the <strong>{{MFSampleExtension_Discontinuity}}</strong> attribute attribute on the next output sample, to notify the caller that there is a gap in the data stream. </p><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including mftransform.h, this method is renamed <strong>{{MFTProcessInput}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p> Invalid argument. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> Invalid stream identifier. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NO_SAMPLE_DURATION}}</strong></dt> </dl> </td><td> <p>The input sample requires a valid sample duration. To set the duration, call <strong>{{IMFSample::SetSampleDuration}}</strong>. </p> <p>Some {{MFTs}} require that input samples have valid durations. Some {{MFTs}} do not require sample durations.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NO_SAMPLE_TIMESTAMP}}</strong></dt> </dl> </td><td> <p>The input sample requires a time stamp. To set the time stamp, call <strong>{{IMFSample::SetSampleTime}}</strong>. </p> <p>Some {{MFTs}} require that input samples have valid time stamps. Some {{MFTs}} do not require time stamps.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOTACCEPTING}}</strong></dt> </dl> </td><td> <p> The transform cannot process more input at this time. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong></dt> </dl> </td><td> <p> The media type is not set on one or more streams. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_UNSUPPORTED_D3D_TYPE}}</strong></dt> </dl> </td><td> <p> The media type is not supported for DirectX Video Acceleration ({{DXVA}}). A {{DXVA}}-enabled decoder might return this error code. </p> </td></tr> </table><p>?</p><strong>Note</strong>??If you are converting a DirectX Media Object ({{DMO}}) to an {{MFT}}, be aware that <strong>{{S_FALSE}}</strong> is not a valid return code for <strong>{{IMFTransform::ProcessInput}}</strong>, unlike the <strong>{{IMediaObject::ProcessInput}}</strong> method.? <dd> <p> Input stream identifier. To get the list of stream identifiers, call <strong>{{IMFTransform::GetStreamIDs}}</strong>. </p> </dd> <dd> <p> Pointer to the <strong>{{IMFSample}}</strong> interface of the input sample. The sample must contain at least one media buffer that contains valid input data. </p> </dd> <dd> <p> Reserved. Must be zero. </p> </dd> <p> Generates output from the current input data. </p> <p> The size of the <em>pOutputSamples</em> array must be equal to or greater than the number of <em>selected</em> output streams. The number of selected output streams equals the total number of output streams minus the number of <em>deselected</em> streams. A stream is deselected if it has the <strong>{{MFT_OUTPUT_STREAM_OPTIONAL}}</strong> flag and the caller does not set a media type (or sets the media type to <strong>{{NULL}}</strong>). For more information, see <strong>_MFT_OUTPUT_STREAM_INFO_FLAGS</strong> enumeration. </p><p>This method generates output samples and can also generate events. If the method succeeds, at least one of the following conditions is true:</p><ul> <li> One or more samples in the <em>pOutputSamples</em> array contains output data. </li> <li> One or more members of the <em>pOutputSamples</em> array contains a non-empty collection of events. </li> </ul><p>If <strong>{{MFT_UNIQUE_METHOD_NAMES}}</strong> is defined before including Mftransform.h, this method is renamed <strong>{{MFTProcessOutput}}</strong>. See Creating Hybrid {{DMO}}/{{MFT}} Objects.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_UNEXPECTED}}</strong></dt> </dl> </td><td> <p>The <strong>ProcessOutput</strong> method was called on an asynchronous {{MFT}} that was not expecting this method call.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p> Invalid stream identifier in the <strong>dwStreamID</strong> member of one or more <strong>{{MFT_OUTPUT_DATA_BUFFER}}</strong> structures. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSFORM_NEED_MORE_INPUT}}</strong></dt> </dl> </td><td> <p> The transform cannot produce output data until it receives more input data. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSFORM_STREAM_CHANGE}}</strong></dt> </dl> </td><td> <p> The format has changed on an output stream, or there is a new preferred format, or there is a new output stream. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_TRANSFORM_TYPE_NOT_SET}}</strong></dt> </dl> </td><td> <p> You must set the media type on one or more streams of the {{MFT}}. </p> </td></tr> </table><p>?</p><strong>Note</strong>??If you are converting a DirectX Media Object ({{DMO}}) to an {{MFT}}, be aware that <strong>{{S_FALSE}}</strong> is not a valid return code for <strong>{{IMFTransform::ProcessOutput}}</strong>, unlike the <strong>{{IMediaObject::ProcessOutput}}</strong> method.? <dd> <p> Bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>_MFT_PROCESS_OUTPUT_FLAGS</strong> enumeration. </p> </dd> <dd> <p> Number of elements in the <em>pOutputSamples</em> array. The value must be at least 1. </p> </dd> <dd> <p> Pointer to an array of <strong>{{MFT_OUTPUT_DATA_BUFFER}}</strong> structures, allocated by the caller. The {{MFT}} uses this array to return output data to the caller. </p> </dd> <dd> <p> Receives a bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>_MFT_PROCESS_OUTPUT_STATUS</strong> enumeration. </p> </dd> <p> </p> <p>The <strong>SetInputStreamState</strong> method sets the Device {{MFT}} input stream state and media type.</p> <p>This interface function helps to transition the input stream to a specified state with a specified media type set on the input stream. This will be used by device transform manager ({{DTM}}) when the Device {{MFT}} requests a specific input stream?s state and media type to be changed. Device {{MFT}} would need to request such a change when one of the Device {{MFT}}'s output changes.</p><p>As an example, consider a Device {{MFT}} that has two input streams and three output streams. Let Output 1 and Output 2 source from Input 1 and stream at 720p. Now, if Output 2?s media type changes to 1080p, Device {{MFT}} has to change Input 1's media type to 1080p. To achieve this, Device {{MFT}} should request {{DTM}} to call this method using the {{METransformInputStreamStateChanged}} message. </p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include but not limited to values given in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Initialization succeeded</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>Device {{MFT}} could not support the request at this time.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVAILIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>An invalid stream {{ID}} was passed.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALID_STREAM_STATE}}</strong></dt> </dl> </td><td> <p>The requested stream transition is not possible.</p> </td></tr> </table><p>?</p> <dd> <p>Stream {{ID}} of the input stream where the state and media type needs to be changed.</p> </dd> <dd> <p>Preferred media type for the input stream is passed in through this parameter. Device {{MFT}} should change the media type only if the incoming media type is different from the current media type.</p> </dd> <dd> <p>Specifies the <strong>DeviceStreamState</strong> which the input stream should transition to.</p> </dd> <dd> <p>When <strong>{{S_OK}}</strong> is returned, perform the state change operation. Otherwise, this contains an error that occurred while setting the media type on the devproxy output pin. In this case, propagate the error appropriately.</p> </dd> <p>The <strong>SetOutputStreamState</strong> method sets the Device {{MFT}} output stream state and media type.</p> <p>This interface method helps to transition the output stream to a specified state with specified media type set on the output stream. This will be used by the {{DTM}} when the Device Source requests a specific output stream?s state and media type to be changed. Device {{MFT}} should change the specified output stream?s media type and state to the requested media type.</p><p>If the incoming media type and stream state are same as the current media type and stream state the method return <strong>{{S_OK}}</strong>.</p><p>If the incoming media type and current media type of the stream are the same, Device {{MFT}} must change the stream?s state to the requested value and return the appropriate <strong>{{HRESULT}}</strong>.</p><p>When a change in the output stream?s media type requires a corresponding change in the input then Device {{MFT}} must post the {{METransformInputStreamStateChanged}} event to {{DTM}} to change the relevant input stream. The call must return only after changing the input stream?s media type and the appropriate <strong>{{HRESULT}}</strong>.</p><p>As an example, consider a Device {{MFT}} that has two input streams and three output streams. Let Output 1 and Output 2 source from Input 1 and stream at 720p. Now, let us say Output 2?s media type changes to 1080p. To satisfy this request, Device {{MFT}} must change the Input 1 media type to 1080p, by posting {{METransformInputStreamStateChanged}} event to the {{DTM}}. {{DTM}} would call <strong>SetInputStreamState</strong> to change the input stream? media type and state. After this call, the <strong>SetOutputStreamState</strong> must return.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include but not limited to values given in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Transitioning the stream state succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>Device {{MFT}} could not support the request at this time.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVAILIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>An invalid stream {{ID}} was passed.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALID_STREAM_STATE}}</strong></dt> </dl> </td><td> <p>The requested stream transition is not possible.</p> </td></tr> </table><p>?</p> <dd> <p>Stream {{ID}} of the input stream where the state and media type needs to be changed.</p> </dd> <dd> <p>Preferred media type for the input stream is passed in through this parameter. Device {{MFT}} should change the media type only if the incoming media type is different from the current media type.</p> </dd> <dd> <p>Specifies the <strong>DeviceStreamState</strong> which the input stream should transition to.</p> </dd> <dd> <p>Must be zero.</p> </dd> <p>Creates a generic activation object for Media Foundation transforms ({{MFTs}}).</p> <p>Most applications will not use this function; it is used internally by the <strong>{{MFTEnumEx}}</strong> function. </p><p>An <em>activation object</em> is a helper object that creates another object, somewhat similar to a class factory. The <strong>{{MFCreateTransformActivate}}</strong> function creates an activation object for {{MFTs}}. Before this activation object can create an {{MFT}}, the caller must initialize the activation object by setting one or more attributes on it.</p><table> <tr><th>Attribute</th><th>Description</th></tr> <tr><td> {{MFT_TRANSFORM_CLSID_Attribute}} </td><td>Required. Contains the {{CLSID}} of the {{MFT}}. The activation object creates the {{MFT}} by passing this {{CLSID}} to the <strong>CoCreateInstance</strong> function.</td></tr> <tr><td> {{MF_TRANSFORM_CATEGORY_Attribute}} </td><td>Optional. Specifies the category of the {{MFT}}.</td></tr> <tr><td> {{MF_TRANSFORM_FLAGS_Attribute}} </td><td>Contains various flags that describe the {{MFT}}. For hardware-based {{MFTs}}, set the <strong>{{MFT_ENUM_FLAG_HARDWARE}}</strong> flag. Otherwise, this attribute is optional.</td></tr> <tr><td> {{MFT_CODEC_MERIT_Attribute}} </td><td> <p>Optional. Contains the merit value of a hardware codec.</p> <p>If this attribute is set and its value is greater than zero, the activation object calls <strong>{{MFGetMFTMerit}}</strong> to get the trusted merit value for the {{MFT}}. If the trusted merit is less than the value of this attribute, the activation object's <strong>{{IMFActivate::ActivateObject}}</strong> method fails and returns <strong>{{MF_E_INVALID_CODEC_MERIT}}</strong>.</p> </td></tr> <tr><td> {{MFT_ENUM_HARDWARE_URL_Attribute}} </td><td>Required for hardware-based {{MFTs}}. Specifies the symbolic link for the hardware device. The device proxy uses this value to configure the {{MFT}}.</td></tr> <tr><td> {{MFT_FIELDOFUSE_UNLOCK_Attribute}} </td><td> <p>Optional. Contains an <strong>{{IMFFieldOfUseMFTUnlock}}</strong> reference, which can be used to unlock the {{MFT}}. The <strong>{{IMFFieldOfUseMFTUnlock}}</strong> interface is used with {{MFTs}} that have usage restrictions.</p> <p>If this attribute is set and the {{MF_TRANSFORM_FLAGS_Attribute}} attribute contains the <strong>{{MFT_ENUM_FLAG_FIELDOFUSE}}</strong> flag, the activation object calls <strong>{{IMFFieldOfUseMFTUnlock::Unlock}}</strong> when it creates the {{MFT}}. An application can also set the {{MFT_FIELDOFUSE_UNLOCK_Attribute}} attribute without setting the <strong>{{MFT_ENUM_FLAG_FIELDOFUSE}}</strong> flag. In that case, the application must call <strong>Unlock</strong>.</p> </td></tr> <tr><td> {{MFT_PREFERRED_ENCODER_PROFILE}} </td><td> <p>Optional. Contains the encoding profile for an encoder. The value of this attribute is an <strong>{{IMFAttributes}}</strong> reference.</p> <p>If this attribute is set and the value of the {{MF_TRANSFORM_CATEGORY_Attribute}} attribute is <strong>{{MFT_CATEGORY_AUDIO_ENCODER}}</strong> or <strong>{{MFT_CATEGORY_VIDEO_ENCODER}}</strong>, the activation object uses the encoding profile to configure the {{MFT}}. The {{MFT}} must expose either <strong>{{ICodecAPI}}</strong> or <strong>{{IPropertyStore}}</strong> for this purpose.</p> </td></tr> <tr><td> {{MFT_PREFERRED_OUTPUTTYPE_Attribute}} </td><td> <p>Optional. Specifies the preferred output format for an encoder.</p> <p>If this attribute set and the value of the {{MF_TRANSFORM_CATEGORY_Attribute}} attribute is <strong>{{MFT_CATEGORY_AUDIO_ENCODER}}</strong> or <strong>{{MFT_CATEGORY_VIDEO_ENCODER}}</strong>, the activation object sets this media type on the {{MFT}}.</p> </td></tr> </table><p>?</p><p>For more information about activation objects, see Activation Objects. </p> <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the <strong>{{IMFActivate}}</strong> interface. The caller must release the interface.</p> </dd> <p> </p><p>The <code>{{DMO_INPUT_DATA_BUFFER_FLAGS}}</code> enumeration defines flags that describe an input buffer.</p> <dd> <p>The beginning of the data is a synchronization point.</p> </dd> <dd> <p>The buffer's time stamp is valid.</p> <p>The buffer's indicated time length is valid.</p> </dd> <dd> <p>The buffer's indicated time length is valid.</p> </dd> <p>Media Foundation transforms ({{MFTs}}) are an evolution of the transform model first introduced with DirectX Media Objects ({{DMOs}}). This topic summarizes the main ways in which {{MFTs}} differ from {{DMOs}}. Read this topic if you are already familiar with the {{DMO}} interfaces, or if you want to convert an existing {{DMO}} into an {{MFT}}.</p><p>This topic contains the following sections:</p><p> </p><ul> <li>{{Number}}</li> <li>{{Format}}</li> <li>{{Streaming}}<ul> <li>{{Allocating}}</li> <li>{{Processing}}</li> <li>{{Flushing}}</li> <li>{{Stream}}</li> </ul> </li> <li>{{Miscellaneous}}</li> <li>{{Flags}}<ul> <li>{{ProcessInput}}</li> <li>{{ProcessOutput}}</li> <li>{{GetInputStatus}}</li> <li>{{GetOutputStatus}}</li> <li>{{GetInputStreamInfo}}</li> <li>{{GetOutputStreamInfo}}</li> <li>{{SetInputType/SetOutputType}}</li> </ul> </li> <li>{{Error}}</li> <li>{{Creating}}</li> <li>{{Related}}</li> </ul> <p> </p><p>The <code>{{DMO_INPUT_STREAM_INFO_FLAGS}}</code> enumeration defines flags that describe an input stream.</p> <dd> <p>The stream requires whole samples. Samples must not span multiple buffers, and buffers must not contain partial samples.</p> </dd> <dd> <p>Each buffer must contain exactly one sample.</p> </dd> <dd> <p>All the samples in this stream must be the same size.</p> </dd> <dd> <p>The {{DMO}} performs lookahead on the incoming data, and may hold multiple input buffers for this stream.</p> </dd> <p> </p><p>The <code>{{DMO_SET_TYPE_FLAGS}}</code> enumeration defines flags for setting the media type on a stream.</p> <p>The {{DMO_SET_TYPEF_TEST_ONLY}} and {{DMO_SET_TYPEF_CLEAR}} flags are mutually exclusive. Do not set both flags.</p> <dd> <p>Test the media type but do not set it.</p> </dd> <dd> <p>Clear the media type that was set for the stream.</p> </dd> <p> </p><p>The <code>{{DMO_PROCESS_OUTPUT_FLAGS}}</code> enumeration defines flags that specify output processing requests.</p> <dd> <p>Discard the output when the reference to the output buffer is <strong>{{NULL}}</strong>.</p> </dd> <p> </p><p>The <strong>{{DMO_MEDIA_TYPE}}</strong> structure describes the format of the data used by a stream in a Microsoft DirectX Media Object ({{DMO}}).</p> <p>This structure is identical to the DirectShow <strong>{{AM_MEDIA_TYPE}}</strong> structure. The <strong>bFixedSizeSamples</strong>, <strong>bTemporalCompression</strong>, and <strong>lSampleSize</strong> members are for compatibility with DirectShow. Other {{DMO}} clients are not required to use them.</p> <dd> <p>Major type {{GUID}} of the stream.</p> </dd> <dd> <p>Subtype {{GUID}} of the stream.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, samples are of a fixed size. This field is informational only. For audio, it is generally set to <strong>{{TRUE}}</strong>. For video, it is usually <strong>{{TRUE}}</strong> for uncompressed video and <strong>{{FALSE}}</strong> for compressed video.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, samples are compressed using temporal (interframe) compression. (A value of <strong>{{TRUE}}</strong> indicates that not all frames are key frames.) This field is informational only.</p> </dd> <dd> <p>Size of the sample in bytes. For compressed data, the value can be zero.</p> </dd> <dd> <p>{{GUID}} specifying the format type. The <strong>pbFormat</strong> member points to the corresponding format structure. Format types include the following.</p> <table> <tr><th>Format type</th><th>Format structure</th></tr> <tr><td><dl> <dt><strong>{{FORMAT_DvInfo}}</strong></dt> </dl> </td><td> <p> <strong>{{DVINFO}}</strong> </p> </td></tr> <tr><td><dl> <dt><strong>{{FORMAT_MPEG2Video}}</strong></dt> </dl> </td><td> <p> <strong>{{MPEG2VIDEOINFO}}</strong> </p> </td></tr> <tr><td><dl> <dt><strong>{{FORMAT_MPEGVideo}}</strong></dt> </dl> </td><td> <p> <strong>{{MPEG1VIDEOINFO}}</strong> </p> </td></tr> <tr><td><dl> <dt><strong>{{FORMAT_None}}</strong></dt> </dl> </td><td> <p>None.</p> </td></tr> <tr><td><dl> <dt><strong>{{FORMAT_VideoInfo}}</strong></dt> </dl> </td><td> <p> <strong>{{VIDEOINFOHEADER}}</strong> </p> </td></tr> <tr><td><dl> <dt><strong>{{FORMAT_VideoInfo2}}</strong></dt> </dl> </td><td> <p> <strong>{{VIDEOINFOHEADER2}}</strong> </p> </td></tr> <tr><td><dl> <dt><strong>{{FORMAT_WaveFormatEx}}</strong></dt> </dl> </td><td> <p> <strong>{{WAVEFORMATEX}}</strong> </p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Not used. Set to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Size of the format block of the media type.</p> </dd> <dd> <p>Pointer to the format structure. The structure type is specified by the <strong>formattype</strong> member. The format structure must be present, unless <strong>formattype</strong> is {{GUID_NULL}} or {{FORMAT_None}}.</p> </dd> <p> </p><p>The <code>{{IMediaBuffer}}</code> interface provides methods for manipulating a data buffer. Buffers passed to the <strong>{{IMediaObject::ProcessInput}}</strong> and <strong>ProcessOutput</strong> methods must implement this interface.</p> <p> </p><p>The <code>{{IMediaObject}}</code> interface provides methods for manipulating a Microsoft DirectX Media Object ({{DMO}}).</p> <p> </p><p>The <code>GetOutputStreamInfo</code> method retrieves information about an output stream; for example, whether the stream is discardable, and whether it uses a fixed sample size. This information never changes.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Possible values include those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{DMO_E_INVALIDSTREAMINDEX}}</strong></dt> </dl> </td><td> <p>Invalid stream index</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p><strong>{{NULL}}</strong> reference argument</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of an output stream on the {{DMO}}.</p> </dd> <dd> <p>Pointer to a variable that receives a bitwise combination of zero or more <strong>{{DMO_OUTPUT_STREAM_INFO_FLAGS}}</strong> flags.</p> </dd> <p> </p><p>The <code>GetInputType</code> method retrieves a preferred media type for a specified input stream.</p> <p>Call this method to enumerate an input stream's preferred media types. The {{DMO}} assigns each media type an index value in order of preference. The most preferred type has an index of zero. To enumerate all the types, make successive calls while incrementing the type index until the method returns {{DMO_E_NO_MORE_ITEMS}}. The {{DMO}} is not guaranteed to enumerate every media type that it supports.</p><p>The format block in the returned type might be <strong>{{NULL}}</strong>. If so, the format type is {{GUID_NULL}}. Check the format type before dereferencing the format block.</p><p>If the method succeeds, call <strong>MoFreeMediaType</strong> to free the format block. (This function is also safe to call when the format block is <strong>{{NULL}}</strong>.)</p><p>To set the media type, call the <strong>{{IMediaObject::SetInputType}}</strong> method. Setting the media type on one stream can change another stream's preferred types. In fact, a stream might not have a preferred type until the type is set on another stream. For example, a decoder might not have a preferred output type until the input type is set. However, the {{DMO}} is not required to update its preferred types dynamically in this fashion. Thus, the types returned by this method are not guaranteed to be valid; they might fail when used in the <strong>SetInputType</strong> method.</p><p>To test whether a particular media type is acceptable, call <strong>SetInputType</strong> with the {{DMO_SET_TYPEF_TEST_ONLY}} flag.</p><p>To test whether the <em>dwTypeIndex</em> parameter is in range, set <em>pmt</em> to <strong>{{NULL}}</strong>. The method returns {{S_OK}} if the index is in range, or {{DMO_E_NO_MORE_ITEMS}} if the index is out of range.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Possible values include those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{DMO_E_INVALIDSTREAMINDEX}}</strong></dt> </dl> </td><td> <p>Invalid stream index.</p> </td></tr> <tr><td> <dl> <dt><strong>{{DMO_E_NO_MORE_ITEMS}}</strong></dt> </dl> </td><td> <p>Type index is out of range.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_OUTOFMEMORY}}</strong></dt> </dl> </td><td> <p>Insufficient memory.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p><strong>{{NULL}}</strong> reference argument.</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of an input stream on the {{DMO}}.</p> </dd> <dd> <p>Zero-based index on the set of acceptable media types.</p> </dd> <dd> <p>Pointer to a <strong>{{DMO_MEDIA_TYPE}}</strong> structure allocated by the caller, or <strong>{{NULL}}</strong>. If this parameter is non-<strong>{{NULL}}</strong>, the method fills the structure with the media type. You can use the value <strong>{{NULL}}</strong> to test whether the type index is in range, by checking the return code.</p> </dd> <p> </p><p>The <code>SetInputType</code> method sets the media type on an input stream, or tests whether a media type is acceptable.</p> <p>Call this method to test, set, or clear the media type on an input stream:</p><ul> <li>To test the media type without setting it, use the {{DMO_SET_TYPEF_TEST_ONLY}} flag. If the media type is not acceptable, the method returns {{S_FALSE}}.</li> <li>To set the media type, set <em>dwFlags</em> to zero. If the media type is not acceptable, the method returns {{DMO_E_TYPE_NOT_ACCEPTED}}.</li> <li>To clear the current media type (if any), use the {{DMO_SET_TYPEF_CLEAR}} flag and set <em>pmt</em> to <strong>{{NULL}}</strong>. When the method returns, the stream no longer has a media type. The {{DMO}} cannot process samples until the application sets a new media type.</li> </ul><p>The media types that are currently set on other streams can affect whether the media type is acceptable.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Possible values include those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{DMO_E_INVALIDSTREAMINDEX}}</strong></dt> </dl> </td><td> <p>Invalid stream index</p> </td></tr> <tr><td> <dl> <dt><strong>{{DMO_E_TYPE_NOT_ACCEPTED}}</strong></dt> </dl> </td><td> <p>Media type was not accepted</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_FALSE}}</strong></dt> </dl> </td><td> <p>Media type is not acceptable</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Media type was set successfully, or is acceptable</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of an input stream on the {{DMO}}.</p> </dd> <dd> <p>Pointer to a <strong>{{DMO_MEDIA_TYPE}}</strong> structure that specifies the media type.</p> </dd> <dd> <p>Bitwise combination of zero or more flags from the <strong>{{DMO_SET_TYPE_FLAGS}}</strong> enumeration.</p> </dd> <p> </p><p>The <code>GetInputCurrentType</code> method retrieves the media type that was set for an input stream, if any.</p> <p>The caller must set the media type for the stream before calling this method. To set the media type, call the <strong>{{IMediaObject::SetInputType}}</strong> method.</p><p>If the method succeeds, call <strong>MoFreeMediaType</strong> to free the format block.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Possible values include those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{DMO_E_INVALIDSTREAMINDEX}}</strong></dt> </dl> </td><td> <p>Invalid stream index.</p> </td></tr> <tr><td> <dl> <dt><strong>{{DMO_E_TYPE_NOT_SET}}</strong></dt> </dl> </td><td> <p>Media type was not set.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_OUTOFMEMORY}}</strong></dt> </dl> </td><td> <p>Insufficient memory.</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of an input stream on the {{DMO}}.</p> </dd> <dd> <p>Pointer to a <strong>{{DMO_MEDIA_TYPE}}</strong> structure allocated by the caller. The method fills the structure with the media type.</p> </dd> <p> </p><p>The <code>GetInputSizeInfo</code> method retrieves the buffer requirements for a specified input stream.</p> <p>The buffer requirements may depend on the media types of the various streams. Before calling this method, set the media type of each stream by calling the <strong>{{IMediaObject::SetInputType}}</strong> and <strong>{{IMediaObject::SetOutputType}}</strong> methods. If the media types have not been set, this method might return an error.</p><p>If the {{DMO}} performs lookahead on the input stream, it returns the {{DMO_INPUT_STREAMF_HOLDS_BUFFERS}} flag in the <strong>{{IMediaObject::GetInputStreamInfo}}</strong> method. During processing, the {{DMO}} holds up to the number of bytes indicated by the <em>pcbMaxLookahead</em> parameter. The application must allocate enough buffers for the {{DMO}} to hold this much data.</p><p>A buffer is <em>aligned</em> if the buffer's start address is a multiple of <em>*pcbAlignment</em>. The alignment must be a power of two. Depending on the microprocessor, reads and writes to an aligned buffer might be faster than to an unaligned buffer. Also, some microprocessors do not support unaligned reads and writes.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Possible values include those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{DMO_E_INVALIDSTREAMINDEX}}</strong></dt> </dl> </td><td> <p>Invalid stream index.</p> </td></tr> <tr><td> <dl> <dt><strong>{{DMO_E_TYPE_NOT_SET}}</strong></dt> </dl> </td><td> <p>Media type was not set.</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of an input stream on the {{DMO}}.</p> </dd> <dd> <p>Pointer to a variable that receives the minimum size of an input buffer for this stream, in bytes.</p> </dd> <dd> <p>Pointer to a variable that receives the maximum amount of data that the {{DMO}} will hold for lookahead, in bytes. If the {{DMO}} does not perform lookahead on the stream, the value is zero.</p> </dd> <dd> <p>Pointer to a variable that receives the required buffer alignment, in bytes. If the input stream has no alignment requirement, the value is 1.</p> </dd> <p> </p><p>The <code>Flush</code> method flushes all internally buffered data.</p> <p>The {{DMO}} performs the following actions when this method is called:</p><ul> <li>Releases any <strong>{{IMediaBuffer}}</strong> references it holds.</li> <li>Discards any values that specify the time stamp or sample length for a media buffer.</li> <li>Reinitializes any internal states that depend on the contents of a media sample.</li> </ul><p>Media types, maximum latency, and locked state do not change.</p><p>When the method returns, every input stream accepts data. Output streams cannot produce any data until the application calls the <strong>{{IMediaObject::ProcessInput}}</strong> method on at least one input stream.</p> <p>Returns {{S_OK}} if successful. Otherwise, returns an <strong>{{HRESULT}}</strong> value indicating the cause of the error.</p> <p> </p><p>The <code>Discontinuity</code> method signals a discontinuity on the specified input stream.</p> <p>A discontinuity represents a break in the input. A discontinuity might occur because no more data is expected, the format is changing, or there is a gap in the data. After a discontinuity, the {{DMO}} does not accept further input on that stream until all pending data has been processed. The application should call the <strong>{{IMediaObject::ProcessOutput}}</strong> method until none of the streams returns the {{DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE}} flag.</p><p>This method might fail if it is called before the client sets the input and output types on the {{DMO}}.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Possible values include those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{DMO_E_INVALIDSTREAMINDEX}}</strong></dt> </dl> </td><td> <p>Invalid stream index</p> </td></tr> <tr><td> <dl> <dt><strong>{{DMO_E_NOTACCEPTING}}</strong></dt> </dl> </td><td> <p>The {{DMO}} is not accepting input.</p> </td></tr> <tr><td> <dl> <dt><strong>{{DMO_E_TYPE_NOT_SET}}</strong></dt> </dl> </td><td> <p>The input and output types have not been set.</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of an input stream on the {{DMO}}.</p> </dd> <p> </p><p>The <code>ProcessInput</code> method delivers a buffer to the specified input stream.</p> <p>The input buffer specified in the <em>pBuffer</em> parameter is read-only. The {{DMO}} will not modify the data in this buffer. All write operations occur on the output buffers, which are given in a separate call to the <strong>{{IMediaObject::ProcessOutput}}</strong> method.</p><p>If the {{DMO}} does not process all the data in the buffer, it keeps a reference count on the buffer. It releases the buffer once it has generated all the output, unless it needs to perform lookahead on the data. (To determine whether a {{DMO}} performs lookahead, call the <strong>{{IMediaObject::GetInputStreamInfo}}</strong> method.)</p><p>If this method returns {{DMO_E_NOTACCEPTING}}, call <strong>ProcessOutput</strong> until the input stream can accept more data. To determine whether the stream can accept more data, call the <strong>{{IMediaObject::GetInputStatus}}</strong> method.</p><p>If the method returns {{S_FALSE}}, no output was generated from this input and the application does not need to call <strong>ProcessOutput</strong>. However, a {{DMO}} is not required to return {{S_FALSE}} in this situation; it might return {{S_OK}}.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Possible values include those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{DMO_E_INVALIDSTREAMINDEX}}</strong></dt> </dl> </td><td> <p>Invalid stream index.</p> </td></tr> <tr><td> <dl> <dt><strong>{{DMO_E_NOTACCEPTING}}</strong></dt> </dl> </td><td> <p>Data cannot be accepted.</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_FALSE}}</strong></dt> </dl> </td><td> <p>No output to process.</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of an input stream on the {{DMO}}.</p> </dd> <dd> <p>Pointer to the buffer's <strong>{{IMediaBuffer}}</strong> interface.</p> </dd> <dd> <p>Bitwise combination of zero or more flags from the <strong>{{DMO_INPUT_DATA_BUFFER_FLAGS}}</strong> enumeration.</p> </dd> <dd> <p>Time stamp that specifies the start time of the data in the buffer. If the buffer has a valid time stamp, set the {{DMO_INPUT_DATA_BUFFERF_TIME}} flag in the <em>dwFlags</em> parameter. Otherwise, the {{DMO}} ignores this value.</p> </dd> <dd> <p>Reference time specifying the duration of the data in the buffer. If this value is valid, set the {{DMO_INPUT_DATA_BUFFERF_TIMELENGTH}} flag in the <em>dwFlags</em> parameter. Otherwise, the {{DMO}} ignores this value.</p> </dd> <p> </p><p>The <code>ProcessOutput</code> method generates output from the current input data.</p> <p>The <em>pOutputBuffers</em> parameter points to an array of <strong>{{DMO_OUTPUT_DATA_BUFFER}}</strong> structures. The application must allocate one structure for each output stream. To determine the number of output streams, call the <strong>{{IMediaObject::GetStreamCount}}</strong> method. Set the <em>cOutputBufferCount</em> parameter to this number.</p><p>Each <strong>{{DMO_OUTPUT_DATA_BUFFER}}</strong> structure contains a reference to a buffer's <strong>{{IMediaBuffer}}</strong> interface. The application allocates these buffers. The other members of the structure are status fields. The {{DMO}} sets these fields if the method succeeds. If the method fails, their values are undefined.</p><p>When the application calls <code>ProcessOutput</code>, the {{DMO}} processes as much input data as possible. It writes the output data to the output buffers, starting from the end of the data in each buffer. (To find the end of the data, call the <strong>{{IMediaBuffer::GetBufferAndLength}}</strong> method.) The {{DMO}} never holds a reference count on an output buffer.</p><p>If the {{DMO}} fills an entire output buffer and still has input data to process, the {{DMO}} returns the {{DMO_OUTPUT_DATA_BUFFERF_INCOMPLETE}} flag in the <strong>{{DMO_OUTPUT_DATA_BUFFER}}</strong> structure. The application should check for this flag by testing the <strong>dwStatus</strong> member of each structure.</p><p>If the method returns {{S_FALSE}}, no output was generated. However, a {{DMO}} is not required to return {{S_FALSE}} in this situation; it might return {{S_OK}}.</p><p><strong>Discarding data:</strong></p><p>You can discard data from a stream by setting the {{DMO_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER}} flag in the <em>dwFlags</em> parameter. For each stream that you want to discard, set the <strong>pBuffer</strong> member of the <strong>{{DMO_OUTPUT_DATA_BUFFER}}</strong> structure to <strong>{{NULL}}</strong>.</p><p>For each stream in which <strong>pBuffer</strong> is <strong>{{NULL}}</strong>:</p><ul> <li>If the {{DMO_PROCESS_OUTPUT_DISCARD_WHEN_NO_BUFFER}} flag is set, and the stream is discardable or optional, the {{DMO}} discards the data.</li> <li>If the flag is set but the stream is neither discardable nor optional, the {{DMO}} discards the data if possible. It is not guaranteed to discard the data.</li> <li>If the flag is not set, the {{DMO}} does not produce output data for that stream, but does not discard the data.</li> </ul><p>To check whether a stream is discardable or optional, call the <strong>{{IMediaObject::GetOutputStreamInfo}}</strong> method.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Possible values include those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{E_FAIL}}</strong></dt> </dl> </td><td> <p>Failure</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid argument</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p><strong>{{NULL}}</strong> reference argument</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_FALSE}}</strong></dt> </dl> </td><td> <p>No output was generated</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success</p> </td></tr> </table><p>?</p> <dd> <p>Bitwise combination of zero or more flags from the <strong>{{DMO_PROCESS_OUTPUT_FLAGS}}</strong> enumeration.</p> </dd> <dd> <p>Number of output buffers.</p> </dd> <dd> <p>Pointer to an array of <strong>{{DMO_OUTPUT_DATA_BUFFER}}</strong> structures containing the output buffers. Specify the size of the array in the <em>cOutputBufferCount</em> parameter.</p> </dd> <dd> <p>Pointer to a variable that receives a reserved value (zero). The application should ignore this value.</p> </dd> <p> </p><p>The <code>Lock</code> method acquires or releases a lock on the {{DMO}}. Call this method to keep the {{DMO}} serialized when performing multiple operations.</p> <p>This method prevents other threads from calling methods on the {{DMO}}. If another thread calls a method on the {{DMO}}, the thread blocks until the lock is released.</p><p>If you are using the Active Template Library ({{ATL}}) to implement a {{DMO}}, the name of the Lock method conflicts with the <strong>{{CComObjectRootEx::Lock}}</strong> method. To work around this problem, define the preprocessor symbol {{FIX_LOCK_NAME}} before including the header file Dmo.h:</p><pre> #define {{FIX_LOCK_NAME}} #include &lt;dmo.h&gt; </pre><p>This directive causes the preprocessor to rename the <strong>{{IMediaObject}}</strong> method to <em>{{DMOLock}}</em>. In your {{DMO}}, implement the method as <em>{{DMOLock}}</em>. In your implementation, call the {{ATL}} <strong>Lock</strong> or <strong>Unlock</strong> method, depending on the value of <em>bLock</em>. Applications can still invoke the method using the name <em>Lock</em> because the vtable order does not change.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Possible values include those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{E_FAIL}}</strong></dt> </dl> </td><td> <p>Failure</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success</p> </td></tr> </table><p>?</p> <dd> <p>Value that specifies whether to acquire or release the lock. If the value is non-zero, a lock is acquired. If the value is zero, the lock is released.</p> </dd> <p> </p><p>The <code>Next</code> method retrieves a specified number of items in the enumeration sequence.</p> <p>If the method succeeds, the arrays given by the <em>pCLSID</em> and <em>Names</em> parameters are filled with {{CLSIDs}} and wide-character strings. The value of *<em>pcItemsFetched</em> specifies the number of items returned in these arrays.</p><p>The method returns {{S_OK}} if it retrieves the requested number of items (in other words, if *<em>pcItemsFetched</em> equals <em>cItemsToFetch</em>). Otherwise, it returns {{S_FALSE}} or an error code.</p><p>The caller must free the memory allocated for each string returned in the <em>Names</em> parameter, using the <strong>CoTaskMemFree</strong> function.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Possible values include those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_OUTOFMEMORY}}</strong></dt> </dl> </td><td> <p>Insufficient memory.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p><strong>{{NULL}}</strong> reference argument.</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_FALSE}}</strong></dt> </dl> </td><td> <p>Retrieved fewer items than requested.</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Retrieved the requested number of items.</p> </td></tr> </table><p>?</p> <dd> <p>Number of items to retrieve.</p> </dd> <dd> <p>Array of size <em>cItemsToFetch</em> that is filled with the {{CLSIDs}} of the enumerated {{DMOs}}.</p> </dd> <dd> <p>Array of size <em>cItemsToFetch</em> that is filled with the friendly names of the enumerated {{DMOs}}.</p> </dd> <dd> <p>Pointer to a variable that receives the actual number of items retrieved. Can be <strong>{{NULL}}</strong> if <em>cItemsToFetch</em> equals 1.</p> </dd> <p> </p><p>The <code>Reset</code> method resets the enumeration sequence to the beginning.</p> <p>Returns {{S_OK}}.</p> <p> </p><p>The <code>Clone</code> method creates a copy of the {{DMO}} in its current state.</p> <p>If the method succeeds, the <strong>{{IMediaObjectInPlace}}</strong> interface that it returns has an outstanding reference count. Be sure to release the interface when you are finished using it.</p> <p>Returns {{S_OK}} if successful. Otherwise, returns an <strong>{{HRESULT}}</strong> value indicating the cause of the error.</p> <dd> <p>Address of a reference to receive the new {{DMO}}'s <strong>{{IMediaObjectInPlace}}</strong> interface.</p> </dd> <p> </p><p>The <code>GetLatency</code> method retrieves the latency introduced by this {{DMO}}.</p> <p>This method returns the average time required to process each buffer. This value usually depends on factors in the run-time environment, such as the processor speed and the {{CPU}} load. One possible way to implement this method is for the {{DMO}} to keep a running average based on historical data.</p> <p>Returns {{S_OK}} if successful. Otherwise, returns an <strong>{{HRESULT}}</strong> value indicating the cause of the error.</p> <dd> <p>Pointer to a variable that receives the latency, in 100-nanosecond units.</p> </dd> <p> </p><p>The <code>GetCurrentOperationMode</code> method retrieves the optimization features in effect.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Possible values include those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{DMO_E_INVALIDSTREAMINDEX}}</strong></dt> </dl> </td><td> <p>Invalid stream index</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p><strong>{{NULL}}</strong> reference argument</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of an output stream on the {{DMO}}.</p> </dd> <dd> <p>Pointer to a variable that receives the current features. The returned value is a bitwise combination of zero or more flags from the <strong>{{DMO_VIDEO_OUTPUT_STREAM_FLAGS}}</strong> enumeration.</p> </dd> <p> </p><p>The <code>GetCurrentSampleRequirements</code> method retrieves the optimization features required to process the next sample, given the features already agreed to by the application.</p> <p>After an application calls the <strong>{{IDMOVideoOutputOptimizations::SetOperationMode}}</strong> method, it must provide all the features it has agreed to. However, the {{DMO}} might not require every feature on every sample. This method enables the {{DMO}} to waive an agreed-upon feature for one sample.</p><p>Before processing a sample, the application can call this method. If the {{DMO}} does not require a given feature in order to process the next sample, it omits the corresponding flag from the <em>pdwRequestedFeatures</em> parameter. For the next sample only, the application can ignore the feature. The results of this method are valid only for the next call to the <strong>{{IMediaObject::ProcessOutput}}</strong> method.</p><p>The {{DMO}} will return only the flags that were agreed to in the <strong>SetOperationMode</strong> method. In other words, you cannot dynamically enable new features with this method.</p> <p>Returns an <strong>{{HRESULT}}</strong> value. Possible values include those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{DMO_E_INVALIDSTREAMINDEX}}</strong></dt> </dl> </td><td> <p>Invalid stream index</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p><strong>{{NULL}}</strong> reference argument</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success</p> </td></tr> </table><p>?</p> <dd> <p>Zero-based index of an output stream on the {{DMO}}.</p> </dd> <dd> <p>Pointer to a variable that receives the required features. The returned value is a bitwise combination of zero or more flags from the <strong>{{DMO_VIDEO_OUTPUT_STREAM_FLAGS}}</strong> enumeration.</p> </dd> <p>Defines error status codes for the Media Engine.</p> <p>The values greater than zero correspond to error codes defined for the <strong>MediaError</strong> object in {{HTML5}}.</p> <dd> <p>No error.</p> </dd> <dd> <p>The process of fetching the media resource was stopped at the user's request. </p> </dd> <dd> <p>A network error occurred while fetching the media resource. </p> </dd> <dd> <p>An error occurred while decoding the media resource. </p> </dd> <dd> <p>The media resource is not supported. </p> </dd> <dd> <p>An error occurred while encrypting the media resource.</p> <p>Supported in Windows?8.1 and later.</p> </dd> <p>Defines event codes for the Media Engine. </p> <p>The application receives Media Engine events through the <strong>{{IMFMediaEngineNotify::EventNotify}}</strong> method. The <strong>EventNotify</strong> method includes two event parameters, <em>param1</em> and <em>param2</em>. The meaning of the parameters depends on the event code. If the event description does not list any parameters, ignore the values of <em>param1</em> and <em>param2</em>.</p><p>Values below 1000 correspond to events defined in {{HTML}} 5 for media elements.</p> <dd> <p>The Media Engine has started to load the source. See <strong>{{IMFMediaEngine::Load}}</strong>.</p> </dd> <dd> <p>The Media Engine is loading the source.</p> </dd> <dd> <p>The Media Engine has suspended a load operation.</p> </dd> <dd> <p>The Media Engine cancelled a load operation that was in progress. </p> </dd> <dd> <p>An error occurred.</p> <table> <tr><th>Event Parameter</th><th>Description</th></tr> <tr><td><em>param1</em></td><td>A member of the <strong>{{MF_MEDIA_ENGINE_ERR}}</strong> enumeration.</td></tr> <tr><td><em>param2</em></td><td>An <strong>{{HRESULT}}</strong> error code, or zero.</td></tr> </table> <p>?</p> </dd> <dd> <p>The Media Engine has switched to the <strong>{{MF_MEDIA_ENGINE_NETWORK_EMPTY}}</strong> state. This can occur when the <strong>{{IMFMediaEngine::Load}}</strong> method is called, or if an error occurs during the <strong>Load</strong> method. See <strong>{{IMFMediaEngine::GetNetworkState}}</strong>.</p> </dd> <dd> <p>The <strong>Load</strong> algorithm is stalled, waiting for data.</p> </dd> <dd> <p>The Media Engine is switching to the playing state. See <strong>{{IMFMediaEngine::Play}}</strong>.</p> </dd> <dd> <p>The media engine has paused. See <strong>{{IMFMediaEngine::Pause}}</strong>.</p> </dd> <dd> <p>The Media Engine has loaded enough source data to determine the duration and dimensions of the source.</p> </dd> <dd> <p>The Media Engine has loaded enough data to render some content (for example, a video frame).</p> </dd> <dd> <p>Playback has stopped because the next frame is not available.</p> </dd> <dd> <p>Playback has started. See <strong>{{IMFMediaEngine::Play}}</strong>.</p> </dd> <dd> <p>Playback can start, but the Media Engine might need to stop to buffer more data.</p> </dd> <dd> <p>The Media Engine can probably play through to the end of the resource, without stopping to buffer data.</p> </dd> <dd> <p>The Media Engine has started seeking to a new playback position. See <strong>{{IMFMediaEngine::SetCurrentTime}}</strong>.</p> </dd> <dd> <p>The Media Engine has seeked to a new playback position. See <strong>{{IMFMediaEngine::SetCurrentTime}}</strong>.</p> </dd> <dd> <p>The playback position has changed. See <strong>{{IMFMediaEngine::GetCurrentTime}}</strong>.</p> </dd> <dd> <p>Playback has reached the end of the source. This event is not sent if the <strong>GetLoop</strong>is <strong>{{TRUE}}</strong>.</p> </dd> <dd> <p>The playback rate has changed. See <strong>{{IMFMediaEngine::SetPlaybackRate}}</strong>.</p> </dd> <dd> <p>The duration of the media source has changed. See <strong>{{IMFMediaEngine::GetDuration}}</strong>.</p> </dd> <dd> <p>The audio volume changed. See <strong>{{IMFMediaEngine::SetVolume}}</strong>.</p> </dd> <dd> <p>The output format of the media source has changed.</p> <table> <tr><th>Event Parameter</th><th>Description</th></tr> <tr><td><em>param1</em></td><td>Zero if the video format changed, 1 if the audio format changed.</td></tr> <tr><td><em>param2</em></td><td>Zero.</td></tr> </table> <p>?</p> </dd> <dd> <p>The Media Engine flushed any pending events from its queue.</p> </dd> <dd> <p>The playback position reached a timeline marker. See <strong>{{IMFMediaEngineEx::SetTimelineMarkerTimer}}</strong>.</p> </dd> <dd> <p>The audio balance changed. See <strong>{{IMFMediaEngineEx::SetBalance}}</strong>.</p> </dd> <dd> <p>The Media Engine has finished downloading the source data.</p> </dd> <dd> <p>The media source has started to buffer data.</p> </dd> <dd> <p>The media source has stopped buffering data.</p> </dd> <dd> <p>The <strong>{{IMFMediaEngineEx::FrameStep}}</strong> method completed.</p> </dd> <dd> <p>The Media Engine's <strong>Load</strong> algorithm is waiting to start.</p> <table> <tr><th>Event Parameter</th><th>Description</th></tr> <tr><td><em>param1</em></td><td>A handle to a waitable event, of type <strong>{{HANDLE}}</strong>.</td></tr> <tr><td><em>param2</em></td><td>Zero.</td></tr> </table> <p>?</p> <p>If Media Engine is created with the <strong>{{MF_MEDIA_ENGINE_WAITFORSTABLE_STATE}}</strong> flag, the Media Engine sends the <strong>{{MF_MEDIA_ENGINE_EVENT_NOTIFYSTABLESTATE}}</strong> event at the start of the <strong>Load</strong> algorithm. The <em>param1</em> parameter is a handle to a waitable event. The <strong>Load</strong> thread waits for the application to signal the event by calling <strong>SetEvent</strong>.</p> <p>If the Media Engine is not created with the <strong>{{MF_MEDIA_ENGINE_WAITFORSTABLE_STATE}}</strong>, it does not send this event, and the <strong>Load</strong> thread does not wait to be signalled.</p> </dd> <dd> <p>The first frame of the media source is ready to render.</p> </dd> <dd> <p>Raised when a new track is added or removed.</p> <p>Supported in Windows?8.1 and later.</p> </dd> <dd> <p>Raised when there is new information about the Output Protection Manager ({{OPM}}). </p> <p>This event will be raised when an {{OPM}} failure occurs, but {{ITA}} allows fallback without the {{OPM}}. In this case, constriction can be applied. </p> <p>This event will not be raised when there is an {{OPM}} failure and the fallback also fails. For example, if {{ITA}} blocks playback entirely when {{OPM}} cannot be established.</p> <p>Supported in Windows?8.1 and later.</p> </dd> <dd> <p>Raised when one of the component streams of a media stream fails. This event is only raised if the media stream contains other component streams that did not fail.</p> </dd> <p>Defines network status codes for the Media Engine.</p> <dd> <p>The initial state.</p> </dd> <dd> <p>The Media Engine has started the resource selection algorithm, and has selected a media resource, but is not using the network.</p> </dd> <dd> <p>The Media Engine is loading a media resource.</p> </dd> <dd> <p>The Media Engine has started the resource selection algorithm, but has not selected a media resource.</p> </dd> <p>Defines ready-state values for the Media Engine.</p> <p>These values correspond to constants defined for the <strong>{{HTMLMediaElement}}.readyState</strong> attribute in {{HTML5}}.</p> <dd> <p>No data is available.</p> </dd> <dd> <p>Some metadata is available, including the duration and, for video files, the video dimensions. No media data is available.</p> </dd> <dd> <p>There is media data for the current playback position, but not enough data for playback or seeking.</p> </dd> <dd> <p>There is enough media data to enable some playback or seeking. The amount of data might be a little as the next video frame.</p> </dd> <dd> <p>There is enough data to play the resource, based on the current rate at which the resource is being fetched. </p> </dd> <p>Specifies the likelihood that the Media Engine can play a specified type of media resource.</p> <dd> <p>The Media Engine cannot play the resource.</p> </dd> <dd> <p>The Media Engine might be able to play the resource.</p> </dd> <dd> <p>The Media Engine can probably play the resource.</p> </dd> <p>Defines preload hints for the Media Engine. These values correspond to the <strong>preload</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p> <dd> <p>The <strong>preload</strong> attribute is missing. </p> </dd> <dd> <p>The <strong>preload</strong> attribute is an empty string. This value is equivalent to <strong>{{MF_MEDIA_ENGINE_PRELOAD_AUTOMATIC}}</strong>.</p> </dd> <dd> <p>The <strong>preload</strong> attribute is "none". This value is a hint to the user agent not to preload the resource.</p> </dd> <dd> <p>The <strong>preload</strong> attribute is "metadata". This value is a hint to the user agent to fetch the resource metadata.</p> </dd> <dd> <p>The <strong>preload</strong> attribute is "auto". This value is a hint to the user agent to preload the entire resource.</p> </dd> <p>Specifies the layout for a packed 3D video frame.</p> <dd> <p>None.</p> </dd> <dd> <p>The views are packed side-by-side in a single frame.</p> </dd> <dd> <p>The views are packed top-to-bottom in a single frame.</p> </dd> <p>Identifies statistics that the Media Engine tracks during playback. To get a playback statistic from the Media Engine, call <strong>{{IMFMediaEngineEx::GetStatistics}}</strong>.</p><p>In the descriptions that follow, the data type and value-type tag for the <strong>{{PROPVARIANT}}</strong> are listed in parentheses.</p> <p>Defines values for the media engine seek mode.</p> <p>This enumeration is used with the <strong>MediaEngineEx::SetCurrentTimeEx</strong>.</p> <dd> <p>Specifies normal seek.</p> </dd> <dd> <p>Specifies an approximate seek. </p> </dd> <p>Specifies media engine extension types.</p> <dd></dd> <dd></dd> <p>Specifies the content protection requirements for a video frame.</p> <dd> <p>The video frame should be protected.</p> </dd> <dd> <p>Direct3D surface protection must be applied to any surface that contains the frame.</p> </dd> <dd> <p>Direct3D anti-screen-scrape protection must be applied to any surface that contains the frame.</p> </dd> <p>Defines the different ready states of the Media Source Extension.</p> <dd> <p>The media source is closed.</p> </dd> <dd> <p>The media source is open.</p> </dd> <dd> <p>The media source is ended.</p> </dd> <p>Defines the different error states of the Media Source Extension.</p> <dd> <p>Specifies no error.</p> </dd> <dd> <p>Specifies an error with the network.</p> </dd> <dd> <p>Specifies an error with decoding.</p> </dd> <dd> <p>Specifies an unknown error.</p> </dd> <p>Defines media key error codes for the media engine.</p> <p><strong>{{MF_MEDIA_ENGINE_KEYERR}}</strong> is used with the <em>code</em> parameter of <strong>{{IMFMediaKeySessionNotify::KeyError}}</strong> and the <em>code</em> value returned from <strong>{{IMFMediaKeySession::GetError}}</strong>.</p> <dd> <p>Unknown error occurred.</p> </dd> <dd> <p>An error with the client occurred.</p> </dd> <dd> <p>An error with the service occurred.</p> </dd> <dd> <p>An error with the output occurred.</p> </dd> <dd> <p>An error occurred related to a hardware change.</p> </dd> <dd> <p>An error with the domain occurred.</p> </dd> <p>Defines the status of the Output Protection Manager ({{OPM}}).</p> <p>Contains flags for the <strong>{{IMFMediaEngineClassFactory::CreateInstance}}</strong> method.</p> <p>Contains flags that specify whether the Media Engine will play protected content, and whether the Media Engine will use the Protected Media Path ({{PMP}}).</p> <p>These flags are used with the {{MF_MEDIA_ENGINE_CONTENT_PROTECTION_FLAGS}} attribute.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Specifies the kind of timed text track.</p> <dd> <p>The kind of timed text track is unknown.</p> </dd> <dd> <p>The kind of timed text track is subtitles.</p> </dd> <dd> <p>The kind of timed text track is closed captions.</p> </dd> <dd> <p>The kind of timed text track is metadata.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Specifies the units in which the timed text is measured.</p> <dd> <p>The timed text is measured in pixels.</p> </dd> <dd> <p>The timed text is measured as a percentage.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Specifies the font style of the timed text.</p> <dd> <p>The font style is normal, sometimes referred to as roman.</p> </dd> <dd> <p>The font style is oblique.</p> </dd> <dd> <p>The font style is italic.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Specifies how text is aligned in its parent block element. </p> <dd> <p>Text is aligned at the start of its parent block element.</p> </dd> <dd> <p>Text is aligned at the end of its parent block element.</p> </dd> <dd> <p>Text is aligned in the center of its parent block element.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Specifies how text is aligned with the display. </p> <dd> <p>Text is aligned before an element.</p> </dd> <dd> <p>Text is aligned after an element.</p> </dd> <dd> <p>Text is aligned in the center between elements.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Specifies how text is decorated (underlined and so on). </p> <dd> <p>Text isn't decorated.</p> </dd> <dd> <p>Text is underlined.</p> </dd> <dd> <p>Text has a line through it.</p> </dd> <dd> <p>Text has a line over it.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Specifies the sequence in which text is written on its parent element.</p> <dd> <p>Text is written from left to right and top to bottom.</p> </dd> <dd> <p>Text is written from right to left and top to bottom.</p> </dd> <dd> <p>Text is written from top to bottom and right to left.</p> </dd> <dd> <p>Text is written from top to bottom and left to right.</p> </dd> <dd> <p>Text is written from left to right.</p> </dd> <dd> <p>Text is written from right to left.</p> </dd> <dd> <p>Text is written from top to bottom.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Specifies how text appears when the parent element is scrolled.</p> <dd> <p>Text pops on when the parent element is scrolled.</p> </dd> <dd> <p>Text rolls up when the parent element is scrolled.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Specifies the kind error that occurred with a timed text track.</p> <p>This enumeration is used to return error information from the <strong>{{IMFTimedTextTrack::GetErrorCode}}</strong> method.</p> <dd> <p>No error occurred.</p> </dd> <dd> <p>A fatal error occurred.</p> </dd> <dd> <p>An error occurred with the data format of the timed text track.</p> </dd> <dd> <p>A network error occurred when trying to load the timed text track.</p> </dd> <dd> <p>An internal error occurred.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Specifies the type of a timed text cue event.</p> <dd> <p>The cue has become active.</p> </dd> <dd> <p>The cue has become inactive.</p> </dd> <dd> <p>All cues have been deactivated.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Identifies the kind of media stream that failed.</p> <dd> <p>The stream type is unknown.</p> </dd> <dd> <p>The stream is an audio stream.</p> </dd> <dd> <p>The stream is a video stream.</p> </dd> <p>Provides the current error status for the Media Engine.</p> <p>The <strong>{{IMFMediaError}}</strong> interface corresponds to the <strong>MediaError</strong> object in {{HTML5}}.</p><p>To get a reference to this interface, call <strong>{{IMFMediaEngine::GetError}}</strong>.</p> <p>Gets the error code.</p> <p>Returns a value from the <strong>{{MF_MEDIA_ENGINE_ERR}}</strong> enumeration.</p> <p>Gets the extended error code.</p> <p>Returns an <strong>{{HRESULT}}</strong> value that gives additional information about the last error.</p> <p>Sets the error code.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The error code, specified as an <strong>{{MF_MEDIA_ENGINE_ERR}}</strong> value.</p> </dd> <p>Sets the extended error code.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An <strong>{{HRESULT}}</strong> value that gives additional information about the last error.</p> </dd> <p>Represents a list of time ranges, where each range is defined by a start and end time.</p> <p>The <strong>{{IMFMediaTimeRange}}</strong> interface corresponds to the <strong>TimeRanges</strong> interface in {{HTML5}}.</p><p>Several <strong>{{IMFMediaEngine}}</strong> methods return <strong>{{IMFMediaTimeRange}}</strong> references.</p> <p>Gets the number of time ranges contained in the object.</p> <p>This method corresponds to the <strong>TimeRanges.length</strong> attribute in {{HTML5}}.</p> <p>Returns the number of time ranges.</p> <p>Gets the start time for a specified time range.</p> <p>This method corresponds to the <strong>TimeRanges.start</strong> method in {{HTML5}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the time range to query. To get the number of time ranges, call <strong>{{IMFMediaTimeRange::GetLength}}</strong>.</p> </dd> <dd> <p>Receives the start time, in seconds.</p> </dd> <p>Gets the end time for a specified time range.</p> <p>This method corresponds to the <strong>TimeRanges.end</strong> method in {{HTML5}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the time range to query. To get the number of time ranges, call <strong>{{IMFMediaTimeRange::GetLength}}</strong>.</p> </dd> <dd> <p>Receives the end time, in seconds.</p> </dd> <p>Queries whether a specified time falls within any of the time ranges.</p> <p>This method returns <strong>{{TRUE}}</strong> if the following condition holds for any time range in the list:</p><dl> <dd>(<em>start</em> &lt;= <em>time</em>) &amp;&amp; (<em>time</em> &lt;= <em>end</em>)</dd> </dl> <p>Returns <strong>{{TRUE}}</strong> if any time range contained in this object spans the value of the <em>time</em> parameter. Otherwise, returns <strong>{{FALSE}}</strong>.</p> <dd> <p>The time, in seconds.</p> </dd> <p>Adds a new range to the list of time ranges.</p> <p>If the new range intersects a range already in the list, the two ranges are combined. Otherwise, the new range is added to the list.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The start time, in seconds.</p> </dd> <dd> <p>The end time, in seconds.</p> </dd> <p>Clears the list of time ranges.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Callback interface for the <strong>{{IMFMediaEngine}}</strong> interface. </p> <p>To set the callback reference on the Media Engine, set the {{MF_MEDIA_ENGINE_CALLBACK}} attribute in the <strong>{{IMFMediaEngineClassFactory::CreateInstance}}</strong> method.</p> <p>Notifies the application when a playback event occurs.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A member of the <strong>{{MF_MEDIA_ENGINE_EVENT}}</strong> enumeration that specifies the event.</p> </dd> <dd> <p>The first event parameter. The meaning of this parameter depends on the event code.</p> </dd> <dd> <p>The second event parameter. The meaning of this parameter depends on the event code.</p> </dd> <p>Provides the Media Engine with a list of media resources.</p> <p>The <strong>{{IMFMediaEngineSrcElements}}</strong> interface represents an ordered list of media resources.</p><p>This interface enables the application to provide the same audio/video content in several different encoding formats, such as H.264 and Windows Media Video. If a particular codec is not present on the user's computer, the Media Engine will try the next {{URL}} in the list. To use this interface, do the following:</p><ol> <li>Create an implementation of this interface.</li> <li>Initialize your implementation with a list of {{URLs}}. Optionally, provide {{MIME}} types and media query strings for each {{URL}}.</li> <li>Call the <strong>{{IMFMediaEngine::SetSourceElements}}</strong> method.</li> </ol> <p>Gets the number of source elements in the list.</p> <p>Returns the number of source elements.</p> <p>Gets the {{URL}} of an element in the list.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the source element. To get the number of source elements, call <strong>{{IMFMediaEngineSrcElements::GetLength}}</strong>.</p> </dd> <dd> <p>Receives a <strong>{{BSTR}}</strong> that contains the {{URL}} of the source element. The caller must free the <strong>{{BSTR}}</strong> by calling <strong>SysFreeString</strong>. If no {{URL}} is set, this parameter receives the value <strong>{{NULL}}</strong>.</p> </dd> <p>Gets the {{MIME}} type of an element in the list.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the source element. To get the number of source elements, call <strong>{{IMFMediaEngineSrcElements::GetLength}}</strong>.</p> </dd> <dd> <p>Receives a <strong>{{BSTR}}</strong> that contains the {{MIME}} type. The caller must free the <strong>{{BSTR}}</strong> by calling <strong>SysFreeString</strong>. If no {{MIME}} type is set, this parameter receives the value <strong>{{NULL}}</strong>.</p> </dd> <p>Gets the intended media type of an element in the list.</p> <p>The string returned in <em>pMedia</em> should be a media-query string that conforms to the {{W3C}} <em>Media Queries</em> specification.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the source element. To get the number of source elements, call <strong>{{IMFMediaEngineSrcElements::GetLength}}</strong>.</p> </dd> <dd> <p>Receives a <strong>{{BSTR}}</strong> that contains a media-query string. The caller must free the <strong>{{BSTR}}</strong> by calling <strong>SysFreeString</strong>. If no media type is set, this parameter receives the value <strong>{{NULL}}</strong>.</p> </dd> <p>Adds a source element to the end of the list.</p> <p>Any of the parameters to this method can be <strong>{{NULL}}</strong>.</p><p>This method allocates copies of the <strong>{{BSTR}}</strong>s that are passed in.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{URL}} of the source element, or <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>The {{MIME}} type of the source element, or <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>A media-query string that specifies the intended media type, or <strong>{{NULL}}</strong>. If specified, the string should conform to the {{W3C}} <em>Media Queries</em> specification.</p> </dd> <p>Removes all of the source elements from the list.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Enables an application to play audio or video files.</p> <p>The Media Engine implements this interface. To create an instance of the Media Engine, call <strong>{{IMFMediaEngineClassFactory::CreateInstance}}</strong>.</p><p>This interface is extended with <strong>{{IMFMediaEngineEx}}</strong>.</p> <p>Gets the most recent error status.</p> <p>This method returns the last error status, if any, that resulted from loading the media source. If there has not been an error, <em>ppError</em> receives the value <strong>{{NULL}}</strong>.</p><p>This method corresponds to the <strong>error</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives either a reference to the <strong>{{IMFMediaError}}</strong> interface, or the value <strong>{{NULL}}</strong>. If the value is <strong>non-{{NULL}}</strong>, the caller must release the interface.</p> </dd> <p>Sets the current error code.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The error code, as an <strong>{{MF_MEDIA_ENGINE_ERR}}</strong> value.</p> </dd> <p>Sets a list of media sources.</p> <p>This method corresponds to adding a list of <strong>source</strong> elements to a media element in {{HTML5}}. </p><p>The Media Engine tries to load each item in the <em>pSrcElements</em> list, until it finds one that loads successfully. After this method is called, the application can use the <strong>{{IMFMediaEngineSrcElements}}</strong> interface to update the list at any time. To reload the list, call <strong>{{IMFMediaEngine::Load}}</strong>.</p><p>This method completes asynchronously. When the operation starts, the Media Engine sends an <strong>{{MF_MEDIA_ENGINE_EVENT_LOADSTART}}</strong> event. If no errors occur during the <strong>Load</strong> operation, several other events are generated, including the following.</p><ul> <li><strong>{{MF_MEDIA_ENGINE_EVENT_LOADEDMETADATA}}</strong></li> <li><strong>{{MF_MEDIA_ENGINE_EVENT_LOADEDDATA}}</strong></li> <li><strong>{{MF_MEDIA_ENGINE_EVENT_CANPLAY}}</strong></li> <li><strong>{{MF_MEDIA_ENGINE_EVENT_CANPLAYTHROUGH}}</strong></li> </ul><p>If the Media Engine is unable to load a {{URL}}, it sends an <strong>{{MF_MEDIA_ENGINE_EVENT_ERROR}}</strong> event. </p><p>For more information about event handling in the Media Engine, see <strong>{{IMFMediaEngineNotify}}</strong>.</p><p>If the application also calls <strong>{{IMFMediaEngine::SetSource}}</strong>, the {{URL}} passed to <strong>SetSource</strong> takes precedence over the list given to <strong>SetSourceElements</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFMediaEngineSrcElements}}</strong> interface. The caller must implement this interface. </p> </dd> <p>Sets the {{URL}} of a media resource.</p> <p>This method corresponds to setting the <strong>src</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p><p>The {{URL}} specified by this method takes precedence over media resources specified in the <strong>{{IMFMediaEngine::SetSourceElements}}</strong> method. To load the {{URL}}, call <strong>{{IMFMediaEngine::Load}}</strong>.</p><p>This method asynchronously loads the {{URL}}. When the operation starts, the Media Engine sends an <strong>{{MF_MEDIA_ENGINE_EVENT_LOADSTART}}</strong> event. If no errors occur during the <strong>Load</strong> operation, several other events are generated, including the following.</p><ul> <li><strong>{{MF_MEDIA_ENGINE_EVENT_LOADEDMETADATA}}</strong></li> <li><strong>{{MF_MEDIA_ENGINE_EVENT_LOADEDDATA}}</strong></li> <li><strong>{{MF_MEDIA_ENGINE_EVENT_CANPLAY}}</strong></li> <li><strong>{{MF_MEDIA_ENGINE_EVENT_CANPLAYTHROUGH}}</strong></li> </ul><p>If the Media Engine is unable to load the {{URL}}, the Media Engine sends an <strong>{{MF_MEDIA_ENGINE_EVENT_ERROR}}</strong> event. </p><p>For more information about event handling in the Media Engine, see <strong>{{IMFMediaEngineNotify}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{URL}} of the media resource.</p> </dd> <p>Gets the {{URL}} of the current media resource, or an empty string if no media resource is present.</p> <p>This method corresponds to the <strong>currentSrc</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p><p>Initially, the current media resource is empty. It is updated when the Media Engine performs the resource selection algorithm.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a <strong>{{BSTR}}</strong> that contains the {{URL}} of the current media resource. If there is no media resource, <em>ppUrl</em> receives an empty string. The caller must free the <strong>{{BSTR}}</strong> by calling <strong>SysFreeString</strong>.</p> </dd> <p>Gets the current network state of the media engine.</p> <p>This method corresponds to the <strong>networkState</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p> <p>Returns an <strong>{{MF_MEDIA_ENGINE_NETWORK}}</strong> enumeration value.</p> <p>Gets the preload flag.</p> <p>This method corresponds to the <strong>preload</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}. The value is a hint to the user-agent whether to preload the media resource.</p> <p>Returns an <strong>{{MF_MEDIA_ENGINE_PRELOAD}}</strong> enumeration value.</p> <p>Sets the preload flag.</p> <p>This method corresponds to setting the <strong>preload</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}. The value is a hint to the user-agent whether to preload the media resource.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An <strong>{{MF_MEDIA_ENGINE_PRELOAD}}</strong> value equal to the preload flag.</p> </dd> <p>Queries how much resource data the media engine has buffered.</p> <p>This method corresponds to the <strong>buffered</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p><p>The returned <strong>{{IMFMediaTimeRange}}</strong> interface represents a list of time ranges. The time ranges indicate which portions of the media resource have been downloaded. The time range list can be empty.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the <strong>{{IMFMediaTimeRange}}</strong> interface. The caller must release the interface.</p> </dd> <p>Loads the current media source.</p> <p>The main purpose of this method is to reload a list of source elements after updating the list. For more information, see <strong>SetSourceElements</strong>. Otherwise, calling this method is generally not required. To load a new media source, call <strong>{{IMFMediaEngine::SetSource}}</strong> or <strong>{{IMFMediaEngine::SetSourceElements}}</strong>.</p><p>The <strong>Load</strong> method explictly invokes the Media Engine's media resource loading algorithm. Before calling this method, you must set the media resource by calling <strong>{{IMFMediaEngine::SetSource}}</strong> or <strong>{{IMFMediaEngine::SetSourceElements}}</strong>. </p><p>This method completes asynchronously. When the <strong>Load</strong> operation starts, the Media Engine sends an <strong>{{MF_MEDIA_ENGINE_EVENT_LOADSTART}}</strong> event. If no errors occur during the <strong>Load</strong> operation, several other events are generated, including the following.</p><ul> <li><strong>{{MF_MEDIA_ENGINE_EVENT_LOADEDMETADATA}}</strong></li> <li><strong>{{MF_MEDIA_ENGINE_EVENT_LOADEDDATA}}</strong></li> <li><strong>{{MF_MEDIA_ENGINE_EVENT_CANPLAY}}</strong></li> <li><strong>{{MF_MEDIA_ENGINE_EVENT_CANPLAYTHROUGH}}</strong></li> </ul><p>If the Media Engine is unable to load the file, the Media Engine sends an <strong>{{MF_MEDIA_ENGINE_EVENT_ERROR}}</strong> event. </p><p>For more information about event handling in the Media Engine, see <strong>{{IMFMediaEngineNotify}}</strong>.</p><p>This method corresponds to the <strong>load</strong> method of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Queries how likely it is that the Media Engine can play a specified type of media resource.</p> <p>This method corresponds to the <strong>canPlayType</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p><p>The <strong>canPlayType</strong> attribute defines the following values.</p><table> <tr><th>Value</th><th>Description</th></tr> <tr><td>"" (empty string)</td><td>The user-agent cannot play the resource, or the resource type is "application/octet-stream".</td></tr> <tr><td>"probably"</td><td>The user-agent probably can play the resource.</td></tr> <tr><td>"maybe"</td><td>Neither of the previous values applies.</td></tr> </table><p>?</p><p>The value "probably" is used because a {{MIME}} type for a media resource is generally not a complete description of the resource. For example, "video/mp4" specifies an {{MP4}} file with video, but does not describe the codec. Even with the optional codecs parameter, the {{MIME}} type omits some information, such as the actual coded bit rate. Therefore, it is usually impossible to be certain that playback is possible until the actual media resource is opened.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A string that contains a {{MIME}} type with an optional codecs parameter, as defined in {{RFC}} 4281.</p> </dd> <dd> <p>Receives an <strong>{{MF_MEDIA_ENGINE_CANPLAY}}</strong> enumeration value.</p> </dd> <p>Gets the ready state, which indicates whether the current media resource can be rendered.</p> <p>This method corresponds to the <strong>readyState</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p> <p>Returns an <strong>{{MF_MEDIA_ENGINE_READY}}</strong> enumeration value.</p> <p>Queries whether the Media Engine is currently seeking to a new playback position.</p> <p>This method corresponds to the <strong>seeking</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p> <p>Returns <strong>{{TRUE}}</strong> if the Media Engine is seeking, or <strong>{{FALSE}}</strong> otherwise.</p> <p>Gets the current playback position.</p> <p>This method corresponds to the <strong>currentTime</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}. </p> <p>Returns the playback position, in seconds.</p> <p>Seeks to a new playback position.</p> <p>This method corresponds to setting the <strong>currentTime</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p><p>The method completes asynchronously. When the seek operation starts, the Media Engine sends an <strong>{{MF_MEDIA_ENGINE_EVENT_SEEKING}}</strong> event. When the seek operation completes, the Media Engine sends an <strong>{{MF_MEDIA_ENGINE_EVENT_SEEKED}}</strong> event. See <strong>{{IMFMediaEventNotify::EventNotify}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The new playback position, in seconds.</p> </dd> <p>Gets the initial playback position.</p> <p>This method corresponds to the <strong>initialTime</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p> <p>Returns the initial playback position, in seconds.</p> <p>Gets the duration of the media resource.</p> <p>This method corresponds to the <strong>duration</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p><p>If the duration changes, the Media Engine sends an <strong>{{MF_MEDIA_ENGINE_EVENT_DURATIONCHANGE}}</strong> event. See <strong>{{IMFMediaEngineNotify::EventNotify}}</strong>.</p> <p>Returns the duration, in seconds. If no media data is available, the method returns not-a-number (NaN). If the duration is unbounded, the method returns an infinite value.</p> <p>Queries whether playback is currently paused.</p> <p>This method corresponds to the <strong>paused</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p> <p>Returns <strong>{{TRUE}}</strong> if playback is paused, or <strong>{{FALSE}}</strong> otherwise.</p> <p>Gets the default playback rate.</p> <p>This method corresponds to getting the <strong>defaultPlaybackRate</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}. </p><p>The default playback rate is used for the next call to the <strong>{{IMFMediaEngine::Play}}</strong> method. To change the current playback rate, call <strong>{{IMFMediaEngine::SetPlaybackRate}}</strong>.</p> <p>Returns the default playback rate, as a multiple of normal (1?) playback. A negative value indicates reverse playback.</p> <p>Sets the default playback rate.</p> <p>This method corresponds to setting the <strong>defaultPlaybackRate</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The default playback rate, as a multiple of normal (1?) playback. A negative value indicates reverse playback.</p> </dd> <p>Gets the current playback rate.</p> <p>This method corresponds to getting the <strong>playbackRate</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}. </p> <p>Returns the playback rate, as a multiple of normal (1?) playback. A negative value indicates reverse playback.</p> <p>Sets the current playback rate.</p> <p>This method corresponds to setting the <strong>playbackRate</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The playback rate, as a multiple of normal (1?) playback. A negative value indicates reverse playback.</p> </dd> <p>Gets the time ranges that have been rendered.</p> <p>This method corresponds to the <strong>played</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the <strong>{{IMFMediaTimeRange}}</strong> interface. The caller must release the interface.</p> </dd> <p>Gets the time ranges to which the Media Engine can currently seek.</p> <p>This method corresponds to the <strong>seekable</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p><p>To find out whether the media source supports seeking, call <strong>{{IMFMediaEngineEx::GetResourceCharacteristics}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the <strong>{{IMFMediaTimeRange}}</strong> interface. The caller must release the interface.</p> </dd> <p>Queries whether playback has ended.</p> <p>This method corresponds to the <strong>ended</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p> <p>Returns <strong>{{TRUE}}</strong> if the direction of playback is forward and playback has reached the end of the media resource. Returns <strong>{{FALSE}}</strong> otherwise.</p> <p>Queries whether the Media Engine automatically begins playback.</p> <p>This method corresponds to the <strong>autoplay</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p><p>If this method returns <strong>{{TRUE}}</strong>, playback begins automatically after the <strong>{{IMFMediaEngine::Load}}</strong> method completes. Otherwise, playback begins when the application calls <strong>{{IMFMediaEngine::Play}}</strong>.</p> <p>Returns <strong>{{TRUE}}</strong> if the Media Engine automatically begins playback, or <strong>{{FALSE}}</strong> otherwise.</p> <p>Specifies whether the Media Engine automatically begins playback.</p> <p>This method corresponds to setting the <strong>autoplay</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>If <strong>{{TRUE}}</strong>, the Media Engine automatically begins playback after it loads a media source. Otherwise, playback does not begin until the application calls <strong>{{IMFMediaEngine::Play}}</strong>.</p> </dd> <p>Queries whether the Media Engine will loop playback.</p> <p>This method corresponds to getting the <strong>loop</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p><p>If looping is enabled, the Media Engine seeks to the start of the content when playback reaches the end.</p> <p>Returns <strong>{{TRUE}}</strong> if looping is enabled, or <strong>{{FALSE}}</strong> otherwise.</p> <p>Specifies whether the Media Engine loops playback.</p> <p>If <em>Loop</em> is <strong>{{TRUE}}</strong>, playback loops back to the beginning when it reaches the end of the source.</p><p>This method corresponds to setting the <strong>loop</strong> attribute of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Specify <strong>{{TRUE}}</strong> to enable looping, or <strong>{{FALSE}}</strong> to disable looping.</p> </dd> <p>Starts playback.</p> <p>This method corresponds to the <strong>play</strong> method of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p><p>The method completes asynchronously. When the operation starts, the Media Engine sends an <strong>{{MF_MEDIA_ENGINE_EVENT_PLAY}}</strong> event. When playback is under way, the Media Engine sends an <strong>{{MF_MEDIA_ENGINE_EVENT_PLAYING}}</strong> event. See <strong>{{IMFMediaEventNotify::EventNotify}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Pauses playback.</p> <p>This method corresponds to the <strong>pause</strong> method of the <strong>{{HTMLMediaElement}}</strong> interface in {{HTML5}}.</p><p>The method completes asynchronously. When the transition to paused is complete, the Media Engine sends an <strong>{{MF_MEDIA_ENGINE_EVENT_PAUSE}} </strong> event. See <strong>{{IMFMediaEventNotify::EventNotify}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Queries whether the audio is muted. </p> <p>Returns <strong>{{TRUE}}</strong> if the audio is muted, or <strong>{{FALSE}}</strong> otherwise.</p> <p>Mutes or unmutes the audio. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Specify <strong>{{TRUE}}</strong> to mute the audio, or <strong>{{FALSE}}</strong> to unmute the audio. </p> </dd> <p>Gets the audio volume level.</p> <p>Returns the volume level. Volume is expressed as an attenuation level, where 0.0 indicates silence and 1.0 indicates full volume (no attenuation).</p> <p>Sets the audio volume level.</p> <p>When the audio balance changes, the Media Engine sends an <strong>{{MF_MEDIA_ENGINE_EVENT_VOLUMECHANGE}}</strong> event. See <strong>{{IMFMediaEventNotify::EventNotify}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The volume level. Volume is expressed as an attenuation level, where 0.0 indicates silence and 1.0 indicates full volume (no attenuation). </p> </dd> <p>Queries whether the current media resource contains a video stream.</p> <p>Returns <strong>{{TRUE}}</strong> if the current media resource contains a video stream. Returns <strong>{{FALSE}}</strong> if there is no media resource or the media resource does not contain a video stream.</p> <p>Queries whether the current media resource contains an audio stream.</p> <p>Returns <strong>{{TRUE}}</strong> if the current media resource contains an audio stream. Returns <strong>{{FALSE}}</strong> if there is no media resource or the media resource does not contain an audio stream.</p> <p>Gets the size of the video frame, adjusted for aspect ratio.</p> <p>This method adjusts for the correct picture aspect ratio. For example, if the encoded frame is 720 ? 420 and the picture aspect ratio is 4:3, the method will return a size equal to 640 ? 480 pixels.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the width in pixels.</p> </dd> <dd> <p>Receives the height in pixels.</p> </dd> <p>Gets the picture aspect ratio of the video stream.</p> <p>The Media Engine automatically converts the pixel aspect ratio to 1:1 (square pixels).</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the x component of the aspect ratio.</p> </dd> <dd> <p>Receives the y component of the aspect ratio.</p> </dd> <p>Shuts down the Media Engine and releases the resources it is using. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Copies the current video frame to a {{DXGI}} surface or {{WIC}} bitmap.</p> <p>In frame-server mode, call this method to blit the video frame to a {{DXGI}} or {{WIC}} surface. The application can call this method at any time after the Media Engine loads a video resource. Typically, however, the application calls <strong>{{IMFMediaEngine::OnVideoStreamTick}}</strong> first, to determine whether a new frame is available. If <strong>OnVideoStreamTick</strong> returns <strong>{{S_OK}}</strong>, the application then calls <strong>TransferVideoFrame</strong>.</p><p>The Media Engine scales and letterboxes the video to fit the destination rectangle. It fills the letterbox area with the border color.</p><p>For protected content, call the <strong>{{IMFMediaEngineProtectedContent::TransferVideoFrame}}</strong> method instead of this method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of the destination surface. </p> </dd> <dd> <p>A reference to an <strong>{{MFVideoNormalizedRect}}</strong> structure that specifies the source rectangle.</p> </dd> <dd> <p>A reference to a <strong>{{RECT}}</strong> structure that specifies the destination rectangle.</p> </dd> <dd> <p>A reference to an <strong>{{MFARGB}}</strong> structure that specifies the border color. </p> </dd> <p>Queries the Media Engine to find out whether a new video frame is ready.</p> <p>In frame-server mode, the application should call this method whenever a vertical blank occurs in the display device. If the method returns <strong>{{S_OK}}</strong>, call <strong>{{IMFMediaEngine::TransferVideoFrame}}</strong> to blit the frame to the render target. If the method returns <strong>{{S_FALSE}}</strong>, wait for the next vertical blank and call the method again.</p><p>Do not call this method in rendering mode or audio-only mode. </p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_FALSE}}</strong></dt> </dl> </td><td> <p>The method succeeded, but the Media Engine does not have a new frame.</p> </td></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>A new video frame is ready for display.</p> </td></tr> </table><p>?</p> <dd> <p>If a new frame is ready, receives the presentation time of the frame.</p> </dd> <p>Extends the <strong>{{IMFMediaEngine}}</strong> interface.</p> <p>The <strong>{{IMFMediaEngine}}</strong> interface contains methods that map to the {{HTML5}} media elements. The <strong>{{IMFMediaEngineEx}}</strong> provides additional functionality that does not correspond directly to {{HTML5}}.</p> <p>Opens a media resource from a byte stream.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFByteStream}}</strong> interface of the byte stream.</p> </dd> <dd> <p>The {{URL}} of the byte stream.</p> </dd> <p>Gets a playback statistic from the Media Engine.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A member of the <strong>{{MF_MEDIA_ENGINE_STATISTIC}}</strong> enumeration that identifies the statistic to get.</p> </dd> <dd> <p>A reference to a <strong>{{PROPVARIANT}}</strong> that receives the statistic. The data type and meaning of this value depends on the value of <em>StatisticID</em>. The caller must free the <strong>{{PROPVARIANT}}</strong> by calling <strong>PropVariantClear</strong>.</p> </dd> <p>Updates the source rectangle, destination rectangle, and border color for the video.</p> <p>In rendering mode, call this method to reposition the video, update the border color, or repaint the video frame. If all of the parameters are <strong>{{NULL}}</strong>, the method repaints the most recent video frame.</p><p>In frame-server mode, this method has no effect.</p><p>See <strong>Video Processor {{MFT}}</strong> for info regarding source and destination rectangles in the <strong>Video Processor {{MFT}}</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to an <strong>{{MFVideoNormalizedRect}}</strong> structure that specifies the source rectangle. The source rectangle defines the area of the video frame that is displayed. If this parameter is <strong>{{NULL}}</strong>, the entire video frame is displayed.</p> </dd> <dd> <p>A reference to a <strong>{{RECT}}</strong> structure that specifies the destination rectangle. The destination rectangle defines the area of the window or DirectComposition visual where the video is drawn.</p> </dd> <dd> <p>A reference to an <strong>{{MFARGB}}</strong> structure that specifies the border color. </p> </dd> <p>Gets the audio balance. </p> <p>Returns the balance. The value can be any number in the following range (inclusive). </p><table> <tr><th>Return value</th><th>Description</th></tr> <tr><td> <dl> <dt>-1</dt> </dl> </td><td> <p>The left channel is at full volume; the right channel is silent. </p> </td></tr> <tr><td> <dl> <dt>1</dt> </dl> </td><td> <p>The right channel is at full volume; the left channel is silent. </p> </td></tr> </table><p>?</p><p>If the value is zero, the left and right channels are at equal volumes. The default value is zero. </p> <p>Sets the audio balance.</p> <p>When the audio balance changes, the Media Engine sends an <strong>{{MF_MEDIA_ENGINE_EVENT_BALANCECHANGE}}</strong> event. See <strong>{{IMFMediaEventNotify::EventNotify}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The audio balance. The value can be any number in the following range (inclusive). </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>-1</dt> </dl> </td><td> <p>The left channel is at full volume; the right channel is silent. </p> </td></tr> <tr><td> <dl> <dt>1</dt> </dl> </td><td> <p>The right channel is at full volume; the left channel is silent. </p> </td></tr> </table> <p>?</p> <p>If the value is zero, the left and right channels are at equal volumes. The default value is zero. </p> </dd> <p>Queries whether the Media Engine can play at a specified playback rate.</p> <p>Playback rates are expressed as a ratio of the current rate to the normal rate. For example, 1.0 is normal playback speed, 0.5 is half speed, and 2.0 is 2? speed. Positive values mean forward playback, and negative values mean reverse playback.</p><p>The results of this method can vary depending on the media resource that is currently loaded. Some media formats might support faster playback rates than others. Also, some formats might not support reverse play.</p> <p>Returns <strong>{{TRUE}}</strong> if the playback rate is supported, or <strong>{{FALSE}}</strong> otherwise.</p> <dd> <p>The requested playback rate.</p> </dd> <p>Steps forward or backward one frame.</p> <p>The frame-step direction is independent of the current playback direction.</p><p>This method completes asynchronously. When the operation completes, the Media Engine sends an <strong>{{MF_MEDIA_ENGINE_EVENT_FRAMESTEPCOMPLETED}}</strong> event and enters the paused state.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Specify <strong>{{TRUE}}</strong> to step forward or <strong>{{FALSE}}</strong> to step backward.</p> </dd> <p>Gets various flags that describe the media resource.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MFMEDIASOURCE_CHARACTERISTICS}} enumeration</strong>.</p> </dd> <p>Gets a presentation attribute from the media resource.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The attribute to query. For a list of presentation attributes, see Presentation Descriptor Attributes.</p> </dd> <dd> <p>A reference to a <strong>{{PROPVARIANT}}</strong> that receives the value. The method fills the <strong>{{PROPVARIANT}}</strong> with a copy of the stored value. The caller must free the <strong>{{PROPVARIANT}}</strong> by calling <strong>PropVariantClear</strong>. </p> </dd> <p>Gets the number of streams in the media resource.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the number of streams.</p> </dd> <p>Gets a stream-level attribute from the media resource.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the stream. To get the number of streams, call <strong>{{IMFMediaEngineEx::GetNumberOfStreams}}</strong>.</p> </dd> <dd> <p>The attribute to query. Possible values are listed in the following topics: </p> <ul> <li> Stream Descriptor Attributes </li> <li> Media Type Attributes </li> </ul> </dd> <dd> <p>A reference to a <strong>{{PROPVARIANT}}</strong> that receives the value. The method fills the <strong>{{PROPVARIANT}}</strong> with a copy of the stored value. Call <strong>PropVariantClear</strong> to free the memory allocated by the method. </p> </dd> <p>Queries whether a stream is selected to play.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the stream. To get the number of streams, call <strong>{{IMFMediaEngineEx::GetNumberOfStreams}}</strong>.</p> </dd> <dd> <p>Receives a Boolean value.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong><strong>{{TRUE}}</strong></strong></dt> </dl> </td><td> <p>The stream is selected. During playback, this stream will play.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{FALSE}}</strong></strong></dt> </dl> </td><td> <p>The stream is not selected. During playback, this stream will not play. </p> </td></tr> </table> <p>?</p> </dd> <p>Selects or deselects a stream for playback. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the stream. To get the number of streams, call <strong>{{IMFMediaEngineEx::GetNumberOfStreams}}</strong>.</p> </dd> <dd> <p>Specifies whether to select or deselect the stream.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong><strong>{{TRUE}}</strong></strong></dt> </dl> </td><td> <p>The stream is selected. During playback, this stream will play.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{FALSE}}</strong></strong></dt> </dl> </td><td> <p>The stream is not selected. During playback, this stream will not play.</p> </td></tr> </table> <p>?</p> </dd> <p>Applies the stream selections from previous calls to <strong>SetStreamSelection</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Queries whether the media resource contains protected content. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if the media resource contains protected content, or <strong>{{FALSE}}</strong> otherwise.</p> </dd> <p>Inserts a video effect.</p> <p>The effect is applied when the next media resource is loaded.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The maximum number of video effects was reached.</p> </td></tr> </table><p>?</p> <dd> <p>One of the following: </p> <ul> <li>A reference to the <strong>{{IMFTransform}}</strong> interface of a Media Foundation transform ({{MFT}}) that implements the video effect.</li> <li>A reference to the <strong>{{IMFActivate}}</strong> interface of an activation object. The activation object must create an {{MFT}} for the video effect.</li> </ul> </dd> <dd> <p>Specifies whether the effect is optional.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong><strong>{{TRUE}}</strong></strong></dt> </dl> </td><td> <p>The effect is optional. If the Media Engine cannot add the effect, it ignores the effect and continues playback.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{FALSE}}</strong></strong></dt> </dl> </td><td> <p>The effect is required. If the Media Engine object cannot add the effect, a playback error occurs.</p> </td></tr> </table> <p>?</p> </dd> <p>Inserts an audio effect.</p> <p>The effect is applied when the next media resource is loaded.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The maximum number of audio effects was reached.</p> </td></tr> </table><p>?</p> <dd> <p>One of the following: </p> <ul> <li>A reference to the <strong>{{IMFTransform}}</strong> interface of a Media Foundation transform ({{MFT}}) that implements the audio effect.</li> <li>A reference to the <strong>{{IMFActivate}}</strong> interface of an activation object. The activation object must create an {{MFT}} for the audio effect.</li> </ul> </dd> <dd> <p>Specifies whether the effect is optional.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong><strong>{{TRUE}}</strong></strong></dt> </dl> </td><td> <p>The effect is optional. If the Media Engine cannot add the effect, it ignores the effect and continues playback.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{FALSE}}</strong></strong></dt> </dl> </td><td> <p>The effect is required. If the Media Engine object cannot add the effect, a playback error occurs.</p> </td></tr> </table> <p>?</p> </dd> <p>Removes all audio and video effects.</p> <p> Call this method to remove all of the effects that were added with the <strong>InsertAudioEffect</strong> and <strong>InsertVideoEffect</strong> methods. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Specifies a presentation time when the Media Engine will send a marker event.</p> <p>When playback reaches the time specified by <em>timeToFire</em>, the Media Engine sends an <strong>{{MF_MEDIA_ENGINE_EVENT_TIMELINE_MARKER}}</strong> event through the <strong>{{IMFMediaEngineNotify::EventNotify}}</strong> method. Calling this method cancels any previous marker that is still pending. </p><p>If the application seeks past the marker point, the Media Engine cancels the marker and does not send the event.</p><p>During forward playback, set <em>timeToFire</em> to a value greater than the current playback position. During reverse playback, set <em>timeToFire</em> to a value less than the playback position.</p><p>To cancel a marker, call <strong>{{IMFMediaEngineEx::CancelTimelineMarkerTimer}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The presentation time for the marker event, in seconds.</p> </dd> <p>Gets the time of the next timeline marker, if any.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the marker time, in seconds. If no marker is set, this parameter receives the value <strong>NaN</strong>.</p> </dd> <p>Cancels the next pending timeline marker.</p> <p>Call this method to cancel the <strong>{{IMFMediaEngineEx::SetTimelineMarkerTimer}}</strong> method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Queries whether the media resource contains stereoscopic 3D video.</p> <p>Returns <strong>{{TRUE}}</strong> if the media resource contains 3D video, or <strong>{{FALSE}}</strong> otherwise.</p> <p>For stereoscopic 3D video, gets the layout of the two views within a video frame.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a member of the <strong>{{MF_MEDIA_ENGINE_S3D_PACKING_MODE}}</strong> enumeration.</p> </dd> <p>For stereoscopic 3D video, sets the layout of the two views within a video frame.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A member of the <strong>{{MF_MEDIA_ENGINE_S3D_PACKING_MODE}}</strong> enumeration that specifies the layout. The two views can be arranged side-by-side, or top-to-bottom.</p> </dd> <p>For stereoscopic 3D video, queries how the Media Engine renders the 3D video content.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a member of the <strong>{{MF3DVideoOutputType}}</strong> enumeration.</p> </dd> <p>For stereoscopic 3D video, specifies how the Media Engine renders the 3D video content.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A member of the <strong>{{MF3DVideoOutputType}}</strong> enumeration that specifies the 3D video rendering mode.</p> </dd> <p>Enables or disables windowless swap-chain mode.</p> <p>In windowless swap-chain mode, the Media Engine creates a windowless swap chain and presents video frames to the swap chain. To render the video, call <strong>{{IMFMediaEngineEx::GetVideoSwapchainHandle}}</strong> to get a handle to the swap chain, and then associate the handle with a Microsoft DirectComposition visual. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>If <strong>{{TRUE}}</strong>, windowless swap-chain mode is enabled. </p> </dd> <p>Gets a handle to the windowless swap chain.</p> <p>To enable windowless swap-chain mode, call <strong>{{IMFMediaEngineEx::EnableWindowlessSwapchainMode}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a handle to the swap chain.</p> </dd> <p>Enables or disables mirroring of the video.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>If <strong>{{TRUE}}</strong>, the video is mirrored horizontally. Otherwise, the video is displayed normally.</p> </dd> <p>Gets the audio stream category used for the next call to <strong>SetSource</strong> or <strong>Load</strong>. </p> <p>For information on audio stream categories, see <strong>{{AUDIO_STREAM_CATEGORY}} enumeration</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Sets the audio stream category for the next call to <strong>SetSource</strong> or <strong>Load</strong>. </p> <p>For information on audio stream categories, see <strong>{{AUDIO_STREAM_CATEGORY}} enumeration</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets the audio device endpoint role used for the next call to <strong>SetSource</strong> or <strong>Load</strong>. </p> <p>For information on audio endpoint roles, see <strong>{{ERole}} enumeration</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Sets the audio device endpoint used for the next call to <strong>SetSource</strong> or <strong>Load</strong>. </p> <p>For information on audio endpoint roles, see <strong>{{ERole}} enumeration</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets the real time mode used for the next call to <strong>SetSource</strong> or <strong>Load</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Sets the real time mode used for the next call to <strong>SetSource</strong> or <strong>Load</strong>. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Seeks to a new playback position using the specified <strong>{{MF_MEDIA_ENGINE_SEEK_MODE}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Enables or disables the time update timer.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>If <strong>{{TRUE}}</strong>, the update timer is enabled. Otherwise, the timer is disabled.</p> </dd> <p>Enables an application to load media resources in the Media Engine.</p> <p>To use this interface, set the {{MF_MEDIA_ENGINE_EXTENSION}} attribute when you call the <strong>{{IMFMediaEngineClassFactory::CreateInstance}}</strong> method.</p> <p>Queries whether the object can load a specified type of media resource.</p> <p>Implement this method if your Media Engine extension supports one or more {{MIME}} types.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>If <strong>{{TRUE}}</strong>, the Media Engine is set to audio-only mode. Otherwise, the Media Engine is set to audio-video mode.</p> </dd> <dd> <p>A string that contains a {{MIME}} type with an optional codecs parameter, as defined in {{RFC}} 4281.</p> </dd> <dd> <p>Receives a member of the <strong>{{MF_MEDIA_ENGINE_CANPLAY}}</strong> enumeration.</p> </dd> <p>Begins an asynchronous request to create either a byte stream or a media source.</p> <p>This method requests the object to create either a byte stream or a media source, depending on the value of the <em>type</em> parameter:</p><ul> <li>If <em>type</em> is <strong>{{MF_OBJECT_BYTESTREAM}}</strong>, the method creates a byte stream for the {{URL}} that is specified in <em>bstrURL</em>. In this case, the <em>pByteStream</em> parameter is <strong>{{NULL}}</strong>. </li> <li>If <em>type</em> is <strong>{{MF_OBJECT_MEDIASOURCE}}</strong>, the method creates a media source, using the byte stream that is specified in the <em>pByteStream</em> parameter. Note that <em>pByteStream</em> can also be <strong>{{NULL}}</strong> in this case.</li> </ul><p>The method is performed asynchronously. The Media Engine calls the <strong>{{IMFMediaEngineExtension::EndCreateObject}}</strong> method to complete the operation.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{URL}} of the media resource.</p> </dd> <dd> <p>A reference to the <strong>{{IMFByteStream}}</strong> interface.</p> <p>If the <em>type</em> parameter equals <strong>{{MF_OBJECT_BYTESTREAM}}</strong>, this parameter is <strong>{{NULL}}</strong>. </p> <p>If <em>type</em> equals <strong>{{MF_OBJECT_MEDIASOURCE}}</strong>, this parameter either contains a reference to a byte stream or is <strong>{{NULL}}</strong>. See Remarks for more information.</p> </dd> <dd> <p>A member of the <strong>{{MF_OBJECT_TYPE}}</strong> enumeration that specifies which type of object to create.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{MF_OBJECT_BYTESTREAM}}</strong></dt> </dl> </td><td> <p>Create a byte stream. The byte stream must support the <strong>{{IMFByteStream}}</strong> interface.</p> </td></tr> <tr><td><dl> <dt><strong>{{MF_OBJECT_MEDIASOURCE}}</strong></dt> </dl> </td><td> <p>Create a media source. The media source must support the <strong>{{IMFMediaSource}}</strong> interface.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Receives a reference to the <strong>{{IUnknown}}</strong> interface. This reference can be used to cancel the asynchronous operation, by passing the reference to the <strong>{{IMFMediaEngineExtension::CancelObjectCreation}}</strong> method. </p> <p>The caller must release the interface. This parameter can be {{NULL}}.</p> </dd> <dd> <p>A reference to the <strong>{{IMFAsyncCallback}}</strong> interface. This interface is used to signal the completion of the asynchronous operation.</p> </dd> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of an object impemented by the caller. You can use this object to hold state information for the callback. The object is returned to the caller when the callback is invoked. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <p>Cancels the current request to create an object.</p> <p>This method attempts to cancel a previous call to <strong>BeginCreateObject</strong>. Because that method is asynchronous, however, it might complete before the operation can be canceled.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The reference that was returned in the the <em>ppIUnknownCancelCookie</em> parameter of the <strong>{{IMFMediaEngineExtension::BeginCreateObject}}</strong> method. </p> </dd> <p>Completes an asynchronous request to create a byte stream or media source.</p> <p>The Media Engine calls this method to complete the <strong>{{IMFMediaEngineExtension::BeginCreateObject}}</strong> method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFAsyncResult}}</strong> interface.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IUnknown}}</strong> interface of the byte stream or media source. The caller must release the interface</p> </dd> <p>Copies a protected video frame to a {{DXGI}} surface.</p> <p>For protected content, call this method instead of the <strong>{{IMFMediaEngine::TransferVideoFrame}}</strong> method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of the destination surface.</p> </dd> <dd> <p>A reference to an <strong>{{MFVideoNormalizedRect}}</strong> structure that specifies the source rectangle.</p> </dd> <dd> <p>A reference to a <strong>{{RECT}}</strong> structure that specifies the destination rectangle.</p> </dd> <dd> <p>A reference to an <strong>{{MFARGB}}</strong> structure that specifies the border color. </p> </dd> <dd> <p>Receives a bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MF_MEDIA_ENGINE_FRAME_PROTECTION_FLAGS}}</strong> enumeration. These flags indicate which content protections the application must apply before presenting the surface.</p> </dd> <p>Enables the Media Engine to access protected content while in frame-server mode.</p> <p>In frame-server mode, this method enables the Media Engine to share protected content with the Direct3D?11 device.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the Direct3D?11 device content. The Media Engine queries this reference for the <strong>{{ID3D11VideoContext}}</strong> interface. </p> </dd> <p>Gets the content protections that must be applied in frame-server mode.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MF_MEDIA_ENGINE_FRAME_PROTECTION_FLAGS}}</strong> enumeration.</p> </dd> <p>Specifies the window that should receive output link protections.</p> <p>In frame-server mode, call this method to specify the destination window for protected video content. The Media Engine uses this window to set link protections, using the Output Protection Manager ({{OPM}}).</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A handle to the window.</p> </dd> <p>Copies a protected video frame to a {{DXGI}} surface.</p> <p>For protected content, call this method instead of the <strong>{{IMFMediaEngine::TransferVideoFrame}}</strong> method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of the destination surface.</p> </dd> <dd> <p>A reference to an <strong>{{MFVideoNormalizedRect}}</strong> structure that specifies the source rectangle.</p> </dd> <dd> <p>A reference to a <strong>{{RECT}}</strong> structure that specifies the destination rectangle.</p> </dd> <dd> <p>A reference to an <strong>{{MFARGB}}</strong> structure that specifies the border color. </p> </dd> <dd> <p>Receives a bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MF_MEDIA_ENGINE_FRAME_PROTECTION_FLAGS}}</strong> enumeration. These flags indicate which content protections the application must apply before presenting the surface.</p> </dd> <p>Sets the content protection manager ({{CPM}}).</p> <p>The Media Engine uses the {{CPM}} to handle events related to protected content, such as license acquisition.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFContentProtectionManager}}</strong> interface, implemented by the caller.</p> </dd> <p>Sets the application's certificate.</p> <p>Call this method to access protected video content in frame-server mode.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a buffer that contains the certificate in X.509 format, followed by the application identifier signed with a {{SHA}}-256 signature using the private key from the certificate.</p> </dd> <dd> <p>The size of the <em>pbBlob</em> buffer, in bytes.</p> </dd> <p><em>Media sources</em> are objects that generate media data in the Media Foundation pipeline. This section describes the media source {{APIs}} in detail. Read this section if you are implementing a custom media source, or using a media source outside of the Media Foundation pipeline.</p><p>If your application uses the control layer, it needs to use only a limited subset of the media source {{APIs}}. For information, see the topic Using Media Sources with the Media Session.</p><p> </p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Enables playback of web audio.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets a value indicating if the connecting to Web audio should delay the page's load event.</p> <p>True if connection to Web audio should delay the page's load event; otherwise, false.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Connects web audio to Media Engine using the specified sample rate.</p> <p>Returns {{S_OK}} on successful completion.</p> <dd> <p>The sample rate of the web audio.</p> </dd> <dd> <p>The sample rate of the web audio.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Disconnects web audio from the Media Engine </p> <p>Returns {{S_OK}} on successful completion.</p> <p>Provides functionality for raising events associated with <strong>{{IMFMediaSourceExtension}}</strong>.</p> <p>Used to indicate that the media source has opened.</p> <p>This method does not return a value.</p> <p>Used to indicate that the media source has ended.</p> <p>This method does not return a value.</p> <p>Used to indicate that the media source has closed.</p> <p>This method does not return a value.</p> <p>Enables <strong>{{IMFSourceBufferList}}</strong> object to notify its clients of important state changes.</p> <p>Indicates that a <strong>{{IMFSourceBuffer}}</strong> has been added.</p> <p>This method does not return a value.</p> <p>Indicates that a <strong>{{IMFSourceBuffer}}</strong> has been removed.</p> <p>This method does not return a value.</p> <p>Provides functionality for raising events associated with <strong>{{IMFSourceBuffer}}</strong>.</p> <p>Used to indicate that the source buffer has started updating.</p> <p>This method does not return a value.</p> <p>Used to indicate that the source buffer has been aborted.</p> <p>This method does not return a value.</p> <p>Used to indicate that an error has occurred with the source buffer.</p> <p>This method does not return a value.</p> <dd></dd> <p>Used to indicate that the source buffer is updating.</p> <p>This method does not return a value.</p> <p>Used to indicate that the source buffer has finished updating.</p> <p>This method does not return a value.</p> <p>Represents a buffer which contains media data for a <strong>{{IMFMediaSourceExtension}}</strong>. </p> <p><strong>{{IMFSourceBuffer}}</strong> is used in conjunction with the <strong>{{IMFMediaSourceExtension}}</strong>.</p> <p>Gets a value that indicates if <strong>Append</strong>, <strong>AppendByteStream</strong>, or <strong>Remove</strong> is in process.</p> <p><strong>true</strong> if <strong>Append</strong>, <strong>AppendByteStream</strong>, or <strong>Remove</strong>; otherwise, <strong>false</strong>.</p> <p>Gets the buffered time range.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The buffered time range.</p> </dd> <p>Gets the timestamp offset for media segments appended to the <strong>{{IMFSourceBuffer}}</strong>.</p> <p>The timestamp offset.</p> <p>Sets the timestamp offset for media segments appended to the <strong>{{IMFSourceBuffer}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets the timestamp for the start of the append window.</p> <p>The timestamp for the start of the append window.</p> <p>Sets the timestamp for the start of the append window.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The timestamp for the start of the append window.</p> </dd> <p>Gets the timestamp for the end of the append window.</p> <p>The timestamp for the end of the append window.</p> <p>Sets the timestamp for the end of the append window.</p> <p>The timestamp for the end of the append window.</p> <dd></dd> <p>Appends the specified media segment to the <strong>{{IMFSourceBuffer}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Appends the media segment from the specified byte stream to the <strong>{{IMFSourceBuffer}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Aborts the processing of the current media segment. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Removes the media segments defined by the specified time range from the <strong>{{IMFSourceBuffer}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Represents a collection of <strong>{{IMFSourceBuffer}}</strong> objects.</p> <p>Gets the number of <strong>{{IMFSourceBuffer}}</strong> objects in the list.</p> <p>The number of source buffers in the list.</p> <p>Gets the <strong>{{IMFSourceBuffer}}</strong> at the specified index in the list.</p> <p>The source buffer.</p> <p>Provides functionality for the Media Source Extension ({{MSE}}).</p> <p> Media Source Extensions ({{MSE}}) is a World Wide Web Consortium ({{W3C}}) standard that extends the {{HTML5}} media elements to enable dynamically changing the media stream without the use of plug-ins. The <strong>{{IMFMediaSourceExtension}}</strong> interface and the related Microsoft Win32 {{API}} implement {{MSE}} and are expected to only be called by web browsers implementing {{MSE}}. </p><p>The {{MSE}} media source keeps track of the ready state of the of the source as well as a list of <strong>{{IMFSourceBuffer}}</strong> objects which provide media data for the source.</p> <p>Gets the collection of source buffers associated with this media source.</p> <p>The collection of source buffers.</p> <p>Gets the source buffers that are actively supplying media data to the media source.</p> <p>The list of active source buffers.</p> <p>Gets the ready state of the media source.</p> <p>The ready state of the media source.</p> <p>Gets the duration of the media source in 100-nanosecond units.</p> <p>The duration of the media source in 100-nanosecond units. </p> <p>Sets the duration of the media source in 100-nanosecond units.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The duration of the media source in 100-nanosecond units.</p> </dd> <p>Adds a <strong>{{IMFSourceBuffer}}</strong> to the collection of buffers associated with the <strong>{{IMFMediaSourceExtension}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Removes the specified source buffer from the collection of source buffers managed by the <strong>{{IMFMediaSourceExtension}}</strong> object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Indicate that the end of the media stream has been reached. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Used to pass error information.</p> </dd> <p>Gets a value that indicates if the specified {{MIME}} type is supported by the media source.</p> <p><strong>true</strong> if the media type is supported; otherwise, <strong>false</strong>.</p> <dd> <p>The media type to check support for.</p> </dd> <p>Gets the <strong>{{IMFSourceBuffer}}</strong> at the specified index in the collection of buffers.</p> <p>The source buffer.</p> <p>Implemented by the media engine to add encrypted media extensions methods.</p> <p>Gets the media keys object associated with the media engine or <strong>null</strong> if there is not a media keys object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The media keys object associated with the media engine or <strong>null</strong> if there is not a media keys object.</p> </dd> <p>Sets the media keys object to use with the media engine.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The media keys.</p> </dd> <p>Extends the <strong>{{IMFMediaEngineSrcElements}}</strong> interface to provide additional capabilities.</p> <p>Provides an enhanced version of <strong>{{IMFMediaEngineSrcElements::AddElement}}</strong> to add the key system intended to be used with content to an element.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets the key system for the given source element index.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The source element index.</p> </dd> <dd> <p>The {{MIME}} type of the source element.</p> </dd> <p>Represents a callback to the media engine to notify key request data.</p> <p>Notifies the application that a key or keys are needed along with any initialization data.</p> <p>This method does not return a value.</p> <dd> <p>The initialization data.</p> </dd> <dd> <p>The count in bytes of <em>initData</em>.</p> </dd> <p>Represents a media keys used for decrypting media data using a Digital Rights Management ({{DRM}}) key system. </p> <p>Creates a media key session object using the specified initialization data and custom data. . </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{MIME}} type of the media container used for the content.</p> </dd> <dd> <p>The initialization data for the key system. </p> </dd> <dd> <p>The count in bytes of <em>initData</em>.</p> </dd> <dd> <p>Custom data sent to the key system.</p> </dd> <dd> <p>The count in bytes of <em>cbCustomData</em>.</p> </dd> <dd> <p>notify</p> </dd> <dd> <p>The media key session.</p> </dd> <p>Gets the key system string the <strong>{{IMFMediaKeys}}</strong> object was created with.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p></p> <p><strong>Shutdown</strong> should be called by the application before final release. The Content Decryption Module ({{CDM}}) reference and any other resources is released at this point. However, related sessions are not freed or closed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets the suspend notify interface of the Content Decryption Module ({{CDM}}).</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The suspend notify interface of the Content Decryption Module ({{CDM}}).</p> </dd> <p>Represents a session with the Digital Rights Management ({{DRM}}) key system.</p> <p>Gets the error state associated with the media key session.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The error code.</p> </dd> <dd> <p>Platform specific error information.</p> </dd> <p>Gets the name of the key system name the media keys object was created with.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The name of the key system.</p> </dd> <p>Gets a unique session id created for this session.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The media key session id.</p> </dd> <p>Passes in a key value with any associated data required by the Content Decryption Module for the given key system.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd></dd> <dd> <p>The count in bytes of <em>key</em>.</p> </dd> <p>Closes the media key session and must be called before the key session is released.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Provides a mechanism for notifying the app about information regarding the media key session. </p> <p>Passes information to the application so it can initiate a key acquisition.</p> <p>This method does not return a value.</p> <dd> <p>The {{URL}} to send the message to.</p> </dd> <dd> <p>The message to send to the application.</p> </dd> <dd> <p>The length in bytes of <em>message</em>.</p> </dd> <p>Notifies the application that the key has been added. </p> <p><strong>KeyAdded</strong> can also be called if the keys requested for the session have already been acquired.</p> <p>This method does not return a value.</p> <p>Notifies the application that an error occurred while processing the key.</p> <p>This method does not return a value.</p> <dd></dd> <dd></dd> <p>Used to enable the client to notify the Content Decryption Module ({{CDM}}) when global resources should be brought into a consistent state prior to suspending. </p> <p>Indicates that the suspend process is starting and resources should be brought into a consistent state. </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>The actual suspend is about to occur and no more calls will be made into the Content Decryption Module ({{CDM}}).</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Provides methods for getting information about the Output Protection Manager ({{OPM}}).</p> <p>To get a reference to this interface, call <strong>QueryInterface</strong> on the Media Engine.</p><p>The <strong>{{MF_MEDIA_ENGINE_EVENT_OPMINFO}}</strong> <strong>{{IMFMediaEvent}}</strong> event is raised when there is a change in the {{OPM}} status.</p> <p>Gets status information about the Output Protection Manager ({{OPM}}).</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded</p> </td></tr> <tr><td> <dl> <dt><strong>{{INVALIDARG}}</strong></dt> </dl> </td><td> <p>If any of the parameters are <strong>{{NULL}}</strong>.</p> </td></tr> </table><p>?</p> <p>Creates a new instance of the Media Engine.</p> <p>Before calling this method, call <strong>{{MFStartup}}</strong>.</p><p>The Media Engine supports three distinct modes:</p><table> <tr><th>Mode</th><th>Description</th></tr> <tr><td>Frame-server mode</td><td> <p>In this mode, the Media Engine delivers uncompressed video frames to the application. The application is responsible for displaying each frame, using Microsoft Direct3D or any other rendering technique. </p> <p>The Media Engine renders the audio; the application is not responsible for audio rendering.</p> <p>Frame-server mode is the default mode. </p> </td></tr> <tr><td>Rendering mode</td><td> <p>In this mode, the Media Engine renders both audio and video. The video is rendered to a window or Microsoft DirectComposition visual provided by the application.</p> <p>To enable rendering mode, set either the {{MF_MEDIA_ENGINE_PLAYBACK_HWND}} attribute or the {{MF_MEDIA_ENGINE_PLAYBACK_VISUAL}} attribute.</p> </td></tr> <tr><td>Audio mode</td><td> <p>In this mode, the Media Engine renders audio only, with no video.</p> <p>To enable audio mode, set the <strong>{{MF_MEDIA_ENGINE_AUDIOONLY}}</strong> flag in the <em>dwFlags</em> parameter.</p> </td></tr> </table><p>?</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></dt> </dl> </td><td> <p>A required attribute was missing from <em>pAttr</em>, or an invalid combination of attributes was used.</p> </td></tr> </table><p>?</p> <dd> <p>A bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MF_MEDIA_ENGINE_CREATEFLAGS}}</strong> enumeration.</p> </dd> <dd> <p>A reference to the <strong>{{IMFAttributes}}</strong> interface of an attribute store. </p> <p>This parameter specifies configuration attributes for the Media Engine. Call <strong>{{MFCreateAttributes}}</strong> to create the attribute store. Then, set one or more attributes from the list of Media Engine Attributes. For details, see Remarks.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaEngine}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates a new instance of the Media Engine.</p> <p>Before calling this method, call <strong>{{MFStartup}}</strong>.</p><p>The Media Engine supports three distinct modes:</p><table> <tr><th>Mode</th><th>Description</th></tr> <tr><td>Frame-server mode</td><td> <p>In this mode, the Media Engine delivers uncompressed video frames to the application. The application is responsible for displaying each frame, using Microsoft Direct3D or any other rendering technique. </p> <p>The Media Engine renders the audio; the application is not responsible for audio rendering.</p> <p>Frame-server mode is the default mode. </p> </td></tr> <tr><td>Rendering mode</td><td> <p>In this mode, the Media Engine renders both audio and video. The video is rendered to a window or Microsoft DirectComposition visual provided by the application.</p> <p>To enable rendering mode, set either the {{MF_MEDIA_ENGINE_PLAYBACK_HWND}} attribute or the {{MF_MEDIA_ENGINE_PLAYBACK_VISUAL}} attribute.</p> </td></tr> <tr><td>Audio mode</td><td> <p>In this mode, the Media Engine renders audio only, with no video.</p> <p>To enable audio mode, set the <strong>{{MF_MEDIA_ENGINE_AUDIOONLY}}</strong> flag in the <em>dwFlags</em> parameter.</p> </td></tr> </table><p>?</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_ATTRIBUTENOTFOUND}}</strong></dt> </dl> </td><td> <p>A required attribute was missing from <em>pAttr</em>, or an invalid combination of attributes was used.</p> </td></tr> </table><p>?</p> <dd> <p>A bitwise <strong>{{OR}}</strong> of zero or more flags from the <strong>{{MF_MEDIA_ENGINE_CREATEFLAGS}}</strong> enumeration.</p> </dd> <dd> <p>A reference to the <strong>{{IMFAttributes}}</strong> interface of an attribute store. </p> <p>This parameter specifies configuration attributes for the Media Engine. Call <strong>{{MFCreateAttributes}}</strong> to create the attribute store. Then, set one or more attributes from the list of Media Engine Attributes. For details, see Remarks.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaEngine}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates a time range object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the <strong>{{IMFMediaTimeRange}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates a media error object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the <strong>{{IMFMediaError}}</strong> interface. The caller must release the interface.</p> </dd> <p>Gets a value that indicates if the specified key system supports the specified media type.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{MIME}} type to check support for.</p> </dd> <dd> <p>The key system to check support for.</p> </dd> <dd> <p><strong>true</strong> if type is supported by <em>keySystem</em>; otherwise, <strong>false.</strong></p> </dd> <p>Creates an instance of <strong>{{IMFMediaSourceExtension}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Creates a media keys object based on the specified key system.</p> <p> Checks if <em>keySystem</em> is a supported key system and creates the related Content Decryption Module ({{CDM}}). </p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The media keys system.</p> </dd> <dd> <p>Points to a location to store Content Decryption Module ({{CDM}}) data which might be locked by multiple process and so might be incompatible with store app suspension.</p> </dd> <dd> <p>The media keys.</p> </dd> <p>Gets a value that indicates if the specified key system supports the specified media type.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{MIME}} type to check support for.</p> </dd> <dd> <p>The key system to check support for.</p> </dd> <dd> <p><strong>true</strong> if type is supported by <em>keySystem</em>; otherwise, <strong>false.</strong></p> </dd> <p>Creates an instance of the <strong>{{IMFMediaKeys}}</strong> object.</p> <p>Creates a media keys object based on the specified key system.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The media key system.</p> </dd> <dd> <p>Points to the default file location for the store Content Decryption Module ({{CDM}}) data.</p> </dd> <dd> <p>Points to a the inprivate location for the store Content Decryption Module ({{CDM}}) data. Specifying this path allows the {{CDM}} to comply with the application?s privacy policy by putting personal information in the file location indicated by this path.</p> </dd> <dd> <p>Receives the media keys.</p> </dd> <p>Enables the media source to be transferred between the media engine and the sharing engine for Play To.</p> <p>Specifies wether or not the source should be transferred.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p><strong>true</strong> if the source should be transferred; otherwise, <strong>false</strong>.</p> </dd> <p>Detaches the media source.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the byte stream.</p> </dd> <dd> <p>Receives the media source.</p> </dd> <dd> <p>Receives the media source extension.</p> </dd> <p>Attaches the media source.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Specifies the byte stream. </p> </dd> <dd> <p>Specifies the media source.</p> </dd> <dd> <p>Specifies the media source extension.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>A timed-text object represents a component of timed text.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Registers a timed-text notify object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFTimedTextNotify}}</strong> interface for the timed-text notify object to register.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Selects or deselects a track of text in the timed-text component.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The identifier of the track to select. </p> </dd> <dd> <p>Specifies whether to select or deselect a track of text. Specify <strong>{{TRUE}}</strong> to select the track or <strong>{{FALSE}}</strong> to deselect the track. </p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Adds a timed-text data source.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFByteStream}}</strong> interface for the data source to add.</p> </dd> <dd> <p>Null-terminated wide-character string that contains the label of the data source.</p> </dd> <dd> <p>Null-terminated wide-character string that contains the language of the data source.</p> </dd> <dd> <p>A <strong>{{MF_TIMED_TEXT_TRACK_KIND}}</strong>-typed value that specifies the kind of timed-text track.</p> </dd> <dd> <p>Specifies whether to add the default data source. Specify <strong>{{TRUE}}</strong> to add the default data source or <strong>{{FALSE}}</strong> otherwise.</p> </dd> <dd> <p>Receives a reference to the unique identifier for the added track.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Adds a timed-text data source from the specified {{URL}}.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{URL}} of the timed-text data source.</p> </dd> <dd> <p>Null-terminated wide-character string that contains the label of the data source.</p> </dd> <dd> <p>Null-terminated wide-character string that contains the language of the data source.</p> </dd> <dd> <p>A <strong>{{MF_TIMED_TEXT_TRACK_KIND}}</strong>-typed value that specifies the kind of timed-text track.</p> </dd> <dd> <p>Specifies whether to add the default data source. Specify <strong>{{TRUE}}</strong> to add the default data source or <strong>{{FALSE}}</strong> otherwise.</p> </dd> <dd> <p>Receives a reference to the unique identifier for the added track.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Removes the timed-text track with the specified identifier.</p> <p>Get the identifier for a track by calling <strong>GetId</strong>. </p><p>When a track is removed, all buffered data from the track is also removed.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The identifier of the track to remove.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the offset to the cue time.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives the offset to the cue time.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Sets the offset to the cue time.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The offset to the cue time.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Retrieves a list of all timed-text tracks registered with the <strong>{{IMFTimedText}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the list of active timed-text tracks in the timed-text component.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a memory block that receives a reference to the <strong>{{IMFTimedTextTrackList}}</strong> interface that can enumerate the list of active timed-text tracks.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the list of all the timed-text tracks in the timed-text component.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a memory block that receives a reference to the <strong>{{IMFTimedTextTrackList}}</strong> interface that can enumerate the list of all of the timed-text tracks.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the list of the timed-metadata tracks in the timed-text component.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a memory block that receives a reference to the <strong>{{IMFTimedTextTrackList}}</strong> interface that can enumerate the list of the timed-metadata tracks.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Enables or disables inband mode.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p> Specifies whether inband mode is enabled. If <strong>{{TRUE}}</strong>, inband mode is enabled. If <strong>{{FALSE}}</strong>, inband mode is disabled. </p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Determines whether inband mode is enabled.</p> <p>Returns whether inband mode is enabled. If <strong>{{TRUE}}</strong>, inband mode is enabled. If <strong>{{FALSE}}</strong>, inband mode is disabled. </p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Interface that defines callbacks for Microsoft Media Foundation Timed Text notifications.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Called when a text track is added</p> <p>This method does not return a value.</p> <dd> <p>The identifier of the track that was added. </p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Called when a text track is removed.</p> <p>This method does not return a value.</p> <dd> <p>The identifier of the track that was removed. </p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Called when a track is selected or deselected.</p> <p>This method does not return a value.</p> <dd> <p>The identifier of the track that was selected or deselected. </p> </dd> <dd> <p><strong>{{TRUE}}</strong> if the track was selected. <strong>{{FALSE}}</strong> if the track was deselected. </p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Called when an error occurs in a text track.</p> <p>This method does not return a value.</p> <dd> <p>An {{MF_TIMED_TEXT_ERROR_CODE}} representing the last error.</p> </dd> <dd> <p>The extended error code for the last error.</p> </dd> <dd> <p>The identifier of the track on which the error occurred.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Called when a cue event occurs in a text track.</p> <p>This method does not return a value.</p> <dd> <p>A value specifying the type of event that has occured.</p> </dd> <dd> <p>The current time when the cue event occurred.</p> </dd> <dd> <p>The <strong>{{IMFTimedTextCue}}</strong> object representing the cue.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Resets the timed-text-notify object.</p> <p>This method does not return a value.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Represents a track of timed text.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the identifier of the track of timed text.</p> <p>Returns the identifier of the track. </p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the label of the track.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives the null-terminated wide-character string that contains the label of the track.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Sets the label of a timed-text track.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a null-terminated wide-character string that contains the label of the track.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the language of the track.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives the null-terminated wide-character string that contains the language of the track.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the kind of timed-text track.</p> <p>Returns a <strong>{{MF_TIMED_TEXT_TRACK_KIND}}</strong>-typed value that specifies the kind of timed-text track.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Determines whether the timed-text track is inband.</p> <p>Returns whether the timed-text track is inband. If <strong>{{TRUE}}</strong>, the timed-text track is inband; otherwise, <strong>{{FALSE}}</strong>. </p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the in-band metadata of the track.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives the null-terminated wide-character string that contains the in-band metadata of the track.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Determines whether the timed-text track is active.</p> <p>Returns whether the timed-text track is active. If <strong>{{TRUE}}</strong>, the timed-text track is active; otherwise, <strong>{{FALSE}}</strong>. </p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets a value indicating the error type of the latest error associated with the track.</p> <p>A value indicating the error type of the latest error associated with the track.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the extended error code for the latest error associated with the track.</p> <p>If the most recent error was associated with a track, this value will be the same <strong>{{HRESULT}}</strong> as returned by the <strong>{{IMFTimedTextNotify::Error}}</strong> method.</p> <p>The extended error code for the latest error associated with the track.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets a {{GUID}} that identifies the track's underlying data format.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A {{GUID}} that identifies the track's underlying data format.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Represents a list of timed-text tracks.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the length, in tracks, of the timed-text-track list.</p> <p>Returns the length, in tracks, of the timed-text-track list.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets a text track in the list from the index of the track.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The index of the track in the list to retrieve. </p> </dd> <dd> <p>A reference to a memory block that receives a reference to the <strong>{{IMFTimedTextTrack}}</strong> interface for the timed-text track.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets a text track in the list from the identifier of the track.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The identifier of the track in the list to retrieve. </p> </dd> <dd> <p>A reference to a memory block that receives a reference to the <strong>{{IMFTimedTextTrack}}</strong> interface for the timed-text track.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the data content of the timed-text cue.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a memory block that receives a reference to the <strong>{{IMFTimedTextBinary}}</strong> interface for the data content of the timed-text cue. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the identifier of a timed-text cue.</p> <p>The identifier is retrieved by this method is dynamically generated by the system and is guaranteed to uniquely identify a cue within a single timed-text track. It is not guaranteed to be unique across tracks. If a cue already has an identifier that is provided in the text-track data format, this {{ID}} can be retrieved by calling <strong>GetOriginalId</strong>.</p> <p>The identifier of a timed-text cue.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the cue identifier that is provided in the text-track data format, if available.</p> <p>This method retrieves an identifier for the cue that is included in the source data, if one was specified. The system dynamically generates identifiers for cues that are guaranteed to be unique within a single time-text track. To obtain this system-generated {{ID}}, call <strong>GetId</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The cue identifier that is provided in the text-track data format.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the kind of timed-text cue.</p> <p>Returns a <strong>{{MF_TIMED_TEXT_TRACK_KIND}}</strong>-typed value that specifies the kind of timed-text cue.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the start time of the cue in the track.</p> <p>Returns the start time of the cue in the track.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the duration time of the cue in the track.</p> <p>Returns the duration time of the cue in the track.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the identifier of the timed-text cue.</p> <p>Returns the identifier of the timed-text cue.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the data content of the timed-text cue.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a memory block that receives a reference to the <strong>{{IMFTimedTextBinary}}</strong> interface for the data content of the timed-text cue. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets info about the display region of the timed-text cue.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a memory block that receives a reference to the <strong>{{IMFTimedTextRegion}}</strong> interface for the timed-text region. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <p>Specifies the supported protection schemes for encrypted samples.</p> <p>The encryption scheme for a sample is specified using the {{MFSampleExtension_Encryption_ProtectionScheme}} attribute.</p> <dd> <p>No encryption scheme.</p> </dd> <dd> <p>The encryption scheme is {{AES}} counter mode ({{CTR}}).</p> </dd> <dd> <p>The encryption scheme is Cipher Block Chaining ({{CBC}}).</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets info about the style of the timed-text cue.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a memory block that receives a reference to the <strong>{{IMFTimedTextStyle}}</strong> interface for the timed-text style. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the number of lines of text in the timed-text cue.</p> <p>Returns the number of lines of text.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets a line of text in the cue from the index of the line.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The index of the line of text in the cue to retrieve. </p> </dd> <dd> <p>A reference to a memory block that receives a reference to the <strong>{{IMFTimedTextFormattedText}}</strong> interface for the line of text in the cue.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Represents a block of formatted timed-text.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the text in the formatted timed-text object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives the null-terminated wide-character string that contains the text.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the number of subformats in the formatted timed-text object.</p> <p>Returns the number of subformats. </p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets a subformat in the formatted timed-text object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The index of the subformat in the formatted timed-text object.</p> </dd> <dd> <p>A reference to a variable that receives the first character of the subformat. </p> </dd> <dd> <p>A reference to a variable that receives the length, in characters, of the subformat. </p> </dd> <dd> <p>A reference to a memory block that receives a reference to the <strong>{{IMFTimedTextStyle}}</strong> interface for the subformat's timed-text style. This parameter can be <strong>{{NULL}}</strong>. </p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the color of the timed-text style.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a <strong>{{MFARGB}}</strong> structure that describes the color.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the name of the timed-text style.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives the null-terminated wide-character string that contains the name of the style.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Determines whether the timed-text style is external.</p> <p>Returns whether the timed-text style is external. If <strong>{{TRUE}}</strong>, the timed-text style is external; otherwise, <strong>{{FALSE}}</strong>. </p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the font family of the timed-text style.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives the null-terminated wide-character string that contains the font family of the style.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the font size of the timed-text style.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives the font size of the timed-text style.</p> </dd> <dd> <p>A reference to a variable that receives a <strong>{{MF_TIMED_TEXT_UNIT_TYPE}}</strong>-typed value that specifies the units in which the timed-text style is measured.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the color of the timed-text style.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a <strong>{{MFARGB}}</strong> structure that describes the color.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the background color of the timed-text style.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a <strong>{{MFARGB}}</strong> structure that describes the background color.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Determines whether the style of timed text always shows the background.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a value that specifies whether the style of timed text always shows the background. The variable specifies <strong>{{TRUE}}</strong> if the background is always shown; otherwise, <strong>{{FALSE}}</strong>. </p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the font style of the timed-text style.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a <strong>{{MF_TIMED_TEXT_FONT_STYLE}}</strong>-typed value that specifies the font style.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Determines whether the style of timed text is bold.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a value that specifies whether the style of timed text is bold. The variable specifies <strong>{{TRUE}}</strong> if the style is bold; otherwise, <strong>{{FALSE}}</strong>. </p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Determines whether the right to left writing mode of the timed-text style is enabled.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a value that specifies whether the right to left writing mode is enabled. The variable specifies <strong>{{TRUE}}</strong> if the right to left writing mode is enabled; otherwise, <strong>{{FALSE}}</strong>. </p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the text alignment of the timed-text style.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a <strong>{{MF_TIMED_TEXT_ALIGNMENT}}</strong>-typed value that specifies the text alignment.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets how text is decorated for the timed-text style.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a combination of <strong>{{MF_TIMED_TEXT_DECORATION}}</strong>-typed values that are combined by using a bitwise {{OR}} operation. The resulting value specifies how text is decorated.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the text outline for the timed-text style.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a <strong>{{MFARGB}}</strong> structure that describes the color.</p> </dd> <dd> <p>A reference to a variable that receives the thickness.</p> </dd> <dd> <p>A reference to a variable that receives the blur radius.</p> </dd> <dd> <p>A reference to a variable that receives a <strong>{{MF_TIMED_TEXT_UNIT_TYPE}}</strong>-typed value that specifies the units in which the timed-text is measured.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Represents the display region of a timed-text object.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the name of the region.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives the null-terminated wide-character string that contains the name of the region.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the position of the region.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives the X-coordinate of the position.</p> </dd> <dd> <p>A reference to a variable that receives the Y-coordinate of the position.</p> </dd> <dd> <p>A reference to a variable that receives a <strong>{{MF_TIMED_TEXT_UNIT_TYPE}}</strong>-typed value that specifies the units in which the timed-text region is measured.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the extent of the region.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives the width of the region.</p> </dd> <dd> <p>A reference to a variable that receives the height of the region.</p> </dd> <dd> <p>A reference to a variable that receives a <strong>{{MF_TIMED_TEXT_UNIT_TYPE}}</strong>-typed value that specifies the units in which the timed-text region is measured.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the background color of the region.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a <strong>{{MFARGB}}</strong> structure that describes the background color.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the writing mode of the region.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a <strong>{{MF_TIMED_TEXT_WRITING_MODE}}</strong>-typed value that specifies the writing mode of the region.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the display alignment of the region.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a <strong>{{MF_TIMED_TEXT_DISPLAY_ALIGNMENT}}</strong>-typed value that specifies the display alignment of the region.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the height of each line of text in the region.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives the height of each line of text in the region.</p> </dd> <dd> <p>A reference to a variable that receives a <strong>{{MF_TIMED_TEXT_UNIT_TYPE}}</strong>-typed value that specifies the units in which the timed-text region is measured.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Determines whether a clip of text overflowed the region.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a value that specifies whether a clip of text overflowed the region. The variable specifies <strong>{{TRUE}}</strong> if the clip overflowed; otherwise, <strong>{{FALSE}}</strong>. </p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the padding that surrounds the region.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives the padding before the start of the region.</p> </dd> <dd> <p>A reference to a variable that receives the start of the region.</p> </dd> <dd> <p>A reference to a variable that receives the padding after the end of the region.</p> </dd> <dd> <p>A reference to a variable that receives the end of the region.</p> </dd> <dd> <p>A reference to a variable that receives a <strong>{{MF_TIMED_TEXT_UNIT_TYPE}}</strong>-typed value that specifies the units in which the timed-text region is measured.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Determines whether the word wrap feature is enabled in the region.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a value that specifies whether the word wrap feature is enabled in the region. The variable specifies <strong>{{TRUE}}</strong> if word wrap is enabled; otherwise, <strong>{{FALSE}}</strong>. </p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the Z-index (depth) of the region.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives the Z-index (depth) of the region.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the scroll mode of the region.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a variable that receives a <strong>{{MF_TIMED_TEXT_SCROLL_MODE}}</strong>-typed value that specifies the scroll mode of the region.</p> </dd> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Represents the data content of a timed-text object.</p> <p>[Some information relates to pre-released product which may be substantially modified before it's commercially released. Microsoft makes no warranties, express or implied, with respect to the information provided here.]</p><p>Gets the data content of the timed-text object.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a memory block that receives a reference to the data content of the timed-text object.</p> </dd> <dd> <p>A reference to a variable that receives the length in bytes of the data content.</p> </dd> <p>Specifies a type of capture device.</p> <dd> <p>An audio capture device, such as a microphone.</p> </dd> <dd> <p>A video capture device, such as a webcam.</p> </dd> <p>Specifies a type of capture sink.</p> <dd> <p>A recording sink, for capturing audio and video to a file.</p> </dd> <dd> <p>A preview sink, for previewing live audio or video.</p> </dd> <dd> <p>A photo sink, for capturing still images.</p> </dd> <p>Defines the values for the source stream category.</p> <dd> <p>Specifies a video preview stream.</p> </dd> <dd> <p>Specifies a video capture stream.</p> </dd> <dd> <p>Specifies an independent photo stream.</p> </dd> <dd> <p>Specifies a dependent photo stream.</p> </dd> <dd> <p>Specifies an audio stream.</p> </dd> <dd> <p>Specifies an unsupported stream.</p> </dd> <p>Callback interface for receiving events from the capture engine.</p> <p>To set the callback interface on the capture engine, call the <strong>{{IMFCaptureEngine::Initialize}}</strong> method.</p> <p>Called by the capture engine to notify the application of a capture event.</p> <p>To get the type of event, call <strong>{{IMFMediaEvent::GetExtendedType}}</strong>. This method returns one of the following {{GUIDs}}.</p><table> <tr><th>{{GUID}}</th><th>Description</th></tr> <tr><td><strong>{{MF_CAPTURE_ENGINE_ALL_EFFECTS_REMOVED}}</strong></td><td>The <strong>{{IMFCaptureSource::RemoveAllEffects}}</strong> method completed.</td></tr> <tr><td><strong>{{MF_CAPTURE_ENGINE_CAMERA_STREAM_BLOCKED}}</strong></td><td>Video capture has been blocked by the driver.</td></tr> <tr><td><strong>{{MF_CAPTURE_ENGINE_CAMERA_STREAM_UNBLOCKED}}</strong></td><td>Video capture has been restored by the driver after having been blocked.</td></tr> <tr><td><strong>{{MF_CAPTURE_ENGINE_EFFECT_ADDED}}</strong></td><td>The <strong>{{IMFCaptureSource::AddEffect}}</strong> method completed.</td></tr> <tr><td><strong>{{MF_CAPTURE_ENGINE_EFFECT_REMOVED}}</strong></td><td>The <strong>{{IMFCaptureSource::RemoveEffect}}</strong> method completed.</td></tr> <tr><td><strong>{{MF_CAPTURE_ENGINE_ERROR}}</strong></td><td>An error occurred during capture.</td></tr> <tr><td><strong>{{MF_CAPTURE_ENGINE_INITIALIZED}}</strong></td><td>The <strong>{{IMFCaptureEngine::Initialize}}</strong> method completed.</td></tr> <tr><td><strong>{{MF_CAPTURE_ENGINE_PHOTO_TAKEN}}</strong></td><td>The <strong>{{IMFCaptureEngine::TakePhoto}}</strong> method completed.</td></tr> <tr><td><strong>{{MF_CAPTURE_ENGINE_PREVIEW_STARTED}}</strong></td><td>The <strong>{{IMFCaptureEngine::StartPreview}}</strong> method completed.</td></tr> <tr><td><strong>{{MF_CAPTURE_ENGINE_PREVIEW_STOPPED}}</strong></td><td>The <strong>{{IMFCaptureEngine::StopPreview}}</strong> method completed.</td></tr> <tr><td><strong>{{MF_CAPTURE_ENGINE_RECORD_STARTED}}</strong></td><td>The <strong>{{IMFCaptureEngine::StartRecord}}</strong> method completed.</td></tr> <tr><td><strong>{{MF_CAPTURE_ENGINE_RECORD_STOPPED}}</strong></td><td>The <strong>{{IMFCaptureEngine::StopRecord}}</strong> method completed.</td></tr> <tr><td><strong>{{MF_CAPTURE_SINK_PREPARED}}</strong></td><td>The <strong>{{IMFCaptureSink::Prepare}}</strong> method completed.</td></tr> <tr><td><strong>{{MF_CAPTURE_SOURCE_CURRENT_DEVICE_MEDIA_TYPE_SET}}</strong></td><td>The <strong>{{IMFCaptureSource::SetCurrentDeviceMediaType}}</strong> method completed.</td></tr> </table><p>?</p><p>This method may be called from a worker thread. The implementation should be thread-safe.</p><p>To get the status code for the event, call <strong>{{IMFMediaEvent::GetStatus}}</strong>. If the status code is an error code, it indicates that the requested operation failed.</p><p>In addition, the event object specified by <em>pEvent</em> might contain any of the following attributes.</p><ul> <li> {{MF_CAPTURE_ENGINE_EVENT_GENERATOR_GUID}} </li> <li> {{MF_CAPTURE_ENGINE_EVENT_STREAM_INDEX}} </li> </ul><p>To get event attributes, use the <strong>{{IMFAttributes}}</strong> interface, which <strong>{{IMFMediaEvent}}</strong> inherits.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFMediaEvent}}</strong> interface. Use this interface to get information about the event, as described in Remarks.</p> </dd> <p>Callback interface to receive data from the capture engine.</p> <p>To set the callback interface, call one of the following methods.</p><ul> <li> <strong>{{IMFCapturePhotoSink::SetSampleCallback}}</strong> </li> <li> <strong>{{IMFCapturePreviewSink::SetSampleCallback}}</strong> </li> <li> <strong>{{IMFCaptureRecordSink::SetSampleCallback}}</strong> </li> </ul> <p>Called when the capture sink receives a sample.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFSample}}</strong> interface. Use this interface to get the time stamp, duration, and stream data. For more information, see Media Samples. This parameter can be <strong>{{NULL}}</strong>, so make sure to check for a <strong>{{NULL}}</strong> value before you dereference the reference.</p> </dd> <p>Controls a capture sink, which is an object that receives one or more streams from a capture device.</p> <p>The capture engine creates the following capture sinks.</p><ul> <li>Photo sink. Encodes still image files.</li> <li>Preview sink. Previews live audio or video.</li> <li>Recording sink. Creates compressed audio/video files or compressed audio/video streams.</li> </ul><p>To get a reference to a capture sink, call <strong>{{IMFCaptureEngine::GetSink}}</strong>. Each capture sink implements an interface that derives from <strong>{{IMFCaptureSink}}</strong>. Call <strong>QueryInterface</strong> to get a reference to the derived interface.</p><table> <tr><th>Sink</th><th>Interface</th></tr> <tr><td>Photo sink</td><td> <strong>{{IMFCapturePhotoSink}}</strong> </td></tr> <tr><td>Preview sink</td><td> <strong>{{IMFCapturePreviewSink}}</strong> </td></tr> <tr><td>Recording sink</td><td> <strong>{{IMFCaptureRecordSink}}</strong> </td></tr> </table><p>?</p><p>Applications cannot directly create the capture sinks.</p><p>If an image stream native media type is set to {{JPEG}}, the photo sink should be configured with a format identical to native source format. {{JPEG}} native type is passthrough only.</p><p>If an image stream native type is set to {{JPEG}}, to add an effect, change the native type on the image stream to an uncompressed video media type (such as {{NV12}} or {{RGB32}}) and then add the effect.</p><p>If the native type is H.264 for the record stream, the record sink should be configured with the same media type. H.264 native type is passthrough only and cannot be decoded.</p><p>Record streams that expose H.264 do not expose any other type. H.264 record streams cannot be used in conjunction with effects. To add effects, instead connect the preview stream to the recordsink using <strong>AddStream</strong>.</p> <p>Gets the output format for a stream on this capture sink.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>The <em>dwSinkStreamIndex</em> parameter is invalid.</p> </td></tr> </table><p>?</p> <dd> <p>The zero-based index of the stream to query. The index is returned in the <em>pdwSinkStreamIndex</em> parameter of the <strong>{{IMFCaptureSink::AddStream}}</strong> method.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaType}}</strong> interface. The caller must release the reference.</p> </dd> <p>Queries the underlying Sink Writer object for an interface.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>Invalid request.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>Invalid stream number.</p> </td></tr> </table><p>?</p> <p>Connects a stream from the capture source to this capture sink.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDMEDIATYPE}}</strong></dt> </dl> </td><td> <p>The format specified in <em>pMediaType</em> is not valid for this capture sink.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>The <em>dwSourceStreamIndex</em> parameter is invalid, or the specified source stream was already connected to this sink.</p> </td></tr> </table><p>?</p> <dd> <p>The source stream to connect. The value can be any of the following.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0?0xFFFFFFFB</dt> </dl> </td><td> <p>The zero-based index of a stream. To get the number of streams, call <strong>{{IMFCaptureSource::GetDeviceStreamCount}}</strong>.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_PHOTO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFB</dt> </dl> </td><td> <p>The first image stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_VIDEO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFC</dt> </dl> </td><td> <p>The first video stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_AUDIO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFD</dt> </dl> </td><td> <p>The first audio stream.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>An <strong>{{IMFMediaType}}</strong> reference that specifies the desired format of the output stream. The details of the format will depend on the capture sink.</p> <ul> <li>Photo sink: A still image format compatible with Windows Imaging Component ({{WIC}}).</li> <li>Preview sink: An uncompressed audio or video format.</li> <li>Record sink: The audio or video format that will be written to the output file.</li> </ul> </dd> <dd> <p>A reference to the <strong>{{IMFAttributes}}</strong> interface. For compressed streams, you can use this parameter to configure the encoder. This parameter can also be <strong>{{NULL}}</strong>. For the preview sink, set this parameter to <strong>{{NULL}}</strong>.</p> </dd> <dd> <p>Receives the index of the new stream on the capture sink. Note that this index will not necessarily match the value of <em>dwSourceStreamIndex</em>. </p> </dd> <p>Prepares the capture sink by loading any required pipeline components, such as encoders, video processors, and media sinks.</p> <p>Calling this method is optional. This method gives the application an opportunity to configure the pipeline components before they are used. The method is asynchronous. If the method returns a success code, the caller will receive an <strong>{{MF_CAPTURE_SINK_PREPARED}}</strong> event through the <strong>{{IMFCaptureEngineOnEventCallback::OnEvent}}</strong> method. After this event is received, call <strong>{{IMFCaptureSink::GetService}}</strong> to configure individual components.</p><p>Before calling this method, configure the capture sink by adding at least one stream. To add a stream, call <strong>{{IMFCaptureSink::AddStream}}</strong>.</p><p>The <strong>Prepare</strong> method fails if the capture sink is currently in use. For example, calling <strong>Prepare</strong> on the preview sink fails if the capture engine is currently previewing.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>Invalid request.</p> </td></tr> </table><p>?</p> <p>Removes all streams from the capture sink.</p> <p>You can use this method to reconfigure the sink.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Controls the recording sink. The recording sink creates compressed audio/video files or compressed audio/video streams.</p> <p>The recording sink can deliver samples to one of the following destinations:</p><ul> <li>Byte stream.</li> <li>Output file.</li> <li>Application-provided callback interface.</li> </ul><p>The application must specify a single destination. Multiple destinations are not supported. (However, if a callback is used, you can provide a separate callback for each stream.)</p><p>If the destination is a byte stream or an output file, the application specifies a container type, such as {{MP4}} or {{ASF}}. The capture engine then multiplexes the audio and video to produce the format defined by the container type. If the destination is a callback interface, however, the capture engine does not multiplex or otherwise interleave the samples. The callback option gives you the most control over the recorded output, but requires more work by the application.</p><p>To start the recording, call <strong>{{IMFCaptureEngine::StartRecord}}</strong>.</p> <p>Specifies a byte stream that will receive the data for the recording.</p> <p>Calling this method overrides any previous call to <strong>{{IMFCaptureRecordSink::SetOutputFileName}}</strong> or <strong>{{IMFCaptureRecordSink::SetSampleCallback}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFByteStream}}</strong> interface of a byte stream. The byte stream must be writable.</p> </dd> <dd> <p>A {{GUID}} that specifies the file container type. Possible values are documented in the {{MF_TRANSCODE_CONTAINERTYPE}} attribute.</p> </dd> <p>Specifies the name of the output file for the recording.</p> <p>The capture engine uses the file name extension to select the container type for the output file. For example, if the file name extension is ."mp4", the capture engine creates an {{MP4}} file.</p><p>Calling this method overrides any previous call to <strong>{{IMFCaptureRecordSink::SetOutputByteStream}}</strong> or <strong>{{IMFCaptureRecordSink::SetSampleCallback}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A null-terminated string that contains the {{URL}} of the output file. </p> </dd> <p>Sets a callback to receive the recording data for one stream.</p> <p>Calling this method overrides any previous call to <strong>{{IMFCaptureRecordSink::SetOutputByteStream}}</strong> or <strong>{{IMFCaptureRecordSink::SetOutputFileName}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the stream. The index is returned in the <em>pdwSinkStreamIndex</em> parameter of the <strong>{{IMFCaptureSink::AddStream}}</strong> method.</p> </dd> <dd> <p>A reference to the <strong>{{IMFCaptureEngineOnSampleCallback}}</strong> interface. The caller must implement this interface.</p> </dd> <p>Sets a custom media sink for recording.</p> <p>This method overrides the default selection of the media sink for recording.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFMediaSink}}</strong> interface of the media sink.</p> </dd> <p>Gets the rotation that is currently being applied to the recorded video stream.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the stream. You must specify a video stream.</p> </dd> <dd> <p>Receives the image rotation, in degrees.</p> </dd> <p>Rotates the recorded video stream.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the stream to rotate. You must specify a video stream.</p> </dd> <dd> <p>The amount to rotate the video, in degrees. Valid values are 0, 90, 180, and 270. The value zero restores the video to its original orientation.</p> </dd> <p>Controls the preview sink. The preview sink enables the application to preview audio and video from the camera.</p> <p>To start preview, call <strong>{{IMFCaptureEngine::StartPreview}}</strong>.</p> <p>Specifies a window for preview.</p> <p>Calling this method overrides any previous call to <strong>{{IMFCapturePreviewSink::SetSampleCallback}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A handle to the window. The preview sink draws the video frames inside this window.</p> </dd> <p>Specifies a Microsoft DirectComposition visual for preview.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to a DirectComposition visual that implements the <strong>{{IDCompositionVisual}}</strong> interface.</p> </dd> <p>Updates the video frame. Call this method when the preview window receives a <strong>{{WM_PAINT}}</strong> or <strong>{{WM_SIZE}}</strong> message.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Sets a callback to receive the preview data for one stream.</p> <p>Calling this method overrides any previous call to <strong>{{IMFCapturePreviewSink::SetRenderHandle}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the stream. The index is returned in the <em>pdwSinkStreamIndex</em> parameter of the <strong>{{IMFCaptureSink::AddStream}}</strong> method.</p> </dd> <dd> <p>A reference to the <strong>{{IMFCaptureEngineOnSampleCallback}}</strong> interface. The caller must implement this interface.</p> </dd> <p>Gets the current mirroring state of the video preview stream.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if mirroring is enabled, or <strong>{{FALSE}}</strong> if mirroring is disabled.</p> </dd> <p>Enables or disables mirroring of the video preview stream.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>If <strong>{{TRUE}}</strong>, mirroring is enabled. If <strong>{{FALSE}}</strong>, mirror is disabled.</p> </dd> <p>Gets the rotation of the video preview stream.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the stream. You must specify a video stream.</p> </dd> <dd> <p>Receives the image rotation, in degrees.</p> </dd> <p>Rotates the video preview stream.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the stream to rotate. You must specify a video stream.</p> </dd> <dd> <p>The amount to rotate the video, in degrees. Valid values are 0, 90, 180, and 270. The value zero restores the video to its original orientation.</p> </dd> <p>Sets a custom media sink for preview.</p> <p>This method overrides the default selection of the media sink for preview.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFMediaSink}}</strong> interface of the media sink.</p> </dd> <p>Controls the photo sink. The photo sink captures still images from the video stream.</p> <p>The photo sink can deliver samples to one of the following destinations:</p><ul> <li>Byte stream.</li> <li>Output file.</li> <li>Application-provided callback interface.</li> </ul><p>The application must specify a single destination. Multiple destinations are not supported.</p><p>To capture an image, call <strong>{{IMFCaptureEngine::TakePhoto}}</strong>.</p> <p>Specifies the name of the output file for the still image.</p> <p>Calling this method overrides any previous call to <strong>{{IMFCapturePhotoSink::SetOutputByteStream}}</strong> or <strong>{{IMFCapturePhotoSink::SetSampleCallback}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A null-terminated string that contains the {{URL}} of the output file. </p> </dd> <p>Sets a callback to receive the still-image data.</p> <p>Calling this method overrides any previous call to <strong>{{IMFCapturePhotoSink::SetOutputByteStream}}</strong> or <strong>{{IMFCapturePhotoSink::SetOutputFileName}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFCaptureEngineOnSampleCallback}}</strong> interface. The caller must implement this interface.</p> </dd> <p>Specifies a byte stream that will receive the still image data.</p> <p>Calling this method overrides any previous call to <strong>{{IMFCapturePhotoSink::SetOutputFileName}}</strong> or <strong>{{IMFCapturePhotoSink::SetSampleCallback}}</strong>.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A reference to the <strong>{{IMFByteStream}}</strong> interface of a byte stream. The byte stream must be writable.</p> </dd> <p>Controls the capture source object. The capture source manages the audio and video capture devices.</p> <p>To get a reference to the capture source, call <strong>{{IMFCaptureEngine::GetSource}}</strong>.</p> <p>Gets the current capture device's <strong>{{IMFMediaSource}}</strong> object reference.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p> Gets the current capture device's <strong>{{IMFActivate}}</strong> object reference.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets a reference to the underlying Source Reader object.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The capture source was not initialized. Possibly there is no capture device on the system.</p> </td></tr> </table><p>?</p> <p>Adds an effect to a capture stream.</p> <p>The effect must be implemented as a Media Foundation Transform ({{MFT}}). The <em>pUnknown</em> parameter can point to an instance of the {{MFT}}, or to an activation object for the {{MFT}}. For more information, see Activation Objects.</p><p>The effect is applied to the stream before the data reaches the capture sinks. </p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDMEDIATYPE}}</strong></dt> </dl> </td><td> <p>No compatible media type could be found.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>The <em>dwSourceStreamIndex</em> parameter is invalid.</p> </td></tr> </table><p>?</p> <dd> <p>The capture stream. The value can be any of the following.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0?0xFFFFFFFB</dt> </dl> </td><td> <p>The zero-based index of a stream. To get the number of streams, call <strong>{{IMFCaptureSource::GetDeviceStreamCount}}</strong>.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_PHOTO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFB</dt> </dl> </td><td> <p>The first image stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_VIDEO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFC</dt> </dl> </td><td> <p>The first video stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_AUDIO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFD</dt> </dl> </td><td> <p>The first audio stream.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A reference to one of the following: </p> <ul> <li>A Media Foundation transform ({{MFT}}) that exposes the <strong>{{IMFTransform}}</strong> interface.</li> <li>An {{MFT}} activation object that exposes the <strong>{{IMFActivate}}</strong> interface.</li> </ul> </dd> <p>Removes an effect from a capture stream.</p> <p>This method removes an effect that was previously added using the <strong>{{IMFCaptureSource::AddEffect}}</strong> method.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>Invalid request. Possibly the specified effect could not be found.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>The <em>dwSourceStreamIndex</em> parameter is invalid.</p> </td></tr> </table><p>?</p> <dd> <p>The capture stream. The value can be any of the following.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0?0xFFFFFFFB</dt> </dl> </td><td> <p>The zero-based index of a stream. To get the number of streams, call <strong>{{IMFCaptureSource::GetDeviceStreamCount}}</strong>.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_PHOTO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFB</dt> </dl> </td><td> <p>The first image stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_VIDEO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFC</dt> </dl> </td><td> <p>The first video stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_AUDIO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFD</dt> </dl> </td><td> <p>The first audio stream.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A reference to the <strong>{{IUnknown}}</strong> interface of the effect object. </p> </dd> <p>Removes all effects from a capture stream.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>The <em>dwSourceStreamIndex</em> parameter is invalid.</p> </td></tr> </table><p>?</p> <dd> <p>The capture stream. The value can be any of the following.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0?0xFFFFFFFB</dt> </dl> </td><td> <p>The zero-based index of a stream. To get the number of streams, call <strong>{{IMFCaptureSource::GetDeviceStreamCount}}</strong>.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_PHOTO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFB</dt> </dl> </td><td> <p>The first image stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_VIDEO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFC</dt> </dl> </td><td> <p>The first video stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_AUDIO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFD</dt> </dl> </td><td> <p>The first audio stream.</p> </td></tr> </table> <p>?</p> </dd> <p>Gets a format that is supported by one of the capture streams.</p> <p>To enumerate all of the available formats on a stream, call this method in a loop while incrementing <em>dwMediaTypeIndex</em>, until the method returns <strong>{{MF_E_NO_MORE_TYPES}}</strong>.</p><p>Some cameras might support a range of frame rates. The minimum and maximum frame rates are stored in the {{MF_MT_FRAME_RATE_RANGE_MIN}} and {{MF_MT_FRAME_RATE_RANGE_MAX}} attributes on the media type.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>The <em>dwSourceStreamIndex</em> parameter is invalid.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NO_MORE_TYPES}}</strong></dt> </dl> </td><td> <p>The <em>dwMediaTypeIndex</em> parameter is out of range. </p> </td></tr> </table><p>?</p> <dd> <p>The stream to query. The value can be any of the following.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0?0xFFFFFFFB</dt> </dl> </td><td> <p>The zero-based index of a stream. To get the number of streams, call <strong>{{IMFCaptureSource::GetDeviceStreamCount}}</strong>.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_PHOTO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFB</dt> </dl> </td><td> <p>The first image stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_VIDEO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFC</dt> </dl> </td><td> <p>The first video stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_AUDIO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFD</dt> </dl> </td><td> <p>The first audio stream.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>The zero-based index of the media type to retrieve.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaType}}</strong> interface. The caller must release the interface. </p> </dd> <p>Sets the output format for a capture stream.</p> <p>This method sets the native output type on the capture device. The device must support the specified format. To get the list of available formats, call <strong>{{IMFCaptureSource::GetAvailableDeviceMediaType}}</strong>.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>The <em>dwSourceStreamIndex</em> parameter is invalid.</p> </td></tr> </table><p>?</p> <dd> <p>The capture stream to set. The value can be any of the following.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0?0xFFFFFFFB</dt> </dl> </td><td> <p>The zero-based index of a stream. To get the number of streams, call <strong>{{IMFCaptureSource::GetDeviceStreamCount}}</strong>.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_PHOTO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFB</dt> </dl> </td><td> <p>The first image stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_VIDEO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFC</dt> </dl> </td><td> <p>The first video stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_AUDIO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFD</dt> </dl> </td><td> <p>The first audio stream.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A reference to the <strong>{{IMFMediaType}}</strong> interface.</p> </dd> <p>Gets the current media type for a capture stream.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDSTREAMNUMBER}}</strong></dt> </dl> </td><td> <p>The <em>dwSourceStreamIndex</em> parameter is invalid.</p> </td></tr> </table><p>?</p> <dd> <p>Specifies which stream to query. The value can be any of the following.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td> <dl> <dt>0?0xFFFFFFFB</dt> </dl> </td><td> <p>The zero-based index of a stream. To get the number of streams, call <strong>{{IMFCaptureSource::GetDeviceStreamCount}}</strong>.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_PHOTO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFB</dt> </dl> </td><td> <p>The first image stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_VIDEO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFC</dt> </dl> </td><td> <p>The first video stream.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_AUDIO_STREAM}}</strong></strong></dt> <dt>0xFFFFFFFD</dt> </dl> </td><td> <p>The first audio stream.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFMediaType}}</strong> interface. The caller must release the interface. </p> </dd> <p>Gets the number of device streams.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives the number of device streams.</p> </dd> <p>Gets the stream category for the specified source stream index.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The index of the source stream.</p> </dd> <dd> <p>Receives the {{MF_CAPTURE_ENGINE_STREAM_CATEGORY}} of the specified source stream.</p> </dd> <p>Gets the current mirroring state of the video preview stream.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The zero-based index of the stream.</p> </dd> <dd> <p>Receives the value <strong>{{TRUE}}</strong> if mirroring is enabled, or <strong>{{FALSE}}</strong> if mirroring is disabled.</p> </dd> <p>Enables or disables mirroring of the video preview stream.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_NOTIMPL}}</strong></dt> </dl> </td><td> <p>The device stream does not have mirroring capability.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The source is not initialized.</p> </td></tr> </table><p>?</p> <dd> <p>The zero-based index of the stream.</p> </dd> <dd> <p>If <strong>{{TRUE}}</strong>, mirroring is enabled; if <strong>{{FALSE}}</strong>, mirroring is disabled.</p> </dd> <p>Gets the actual device stream index translated from a friendly stream name.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The friendly name. Can be one of the following:</p> <ul> <li>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_AUDIO_STREAM}}</li> <li>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_VIDEO_STREAM}}</li> <li>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_PHOTO_STREAM}}</li> <li>{{MF_CAPTURE_ENGINE_PREFERRED_SOURCE_VIDEO_STREAM_FOR_RECORD}}</li> <li>{{MF_CAPTURE_ENGINE_PREFERRED_SOURCE_VIDEO_STREAM_FOR_PREVIEW}}</li> <li>{{MF_CAPTURE_ENGINE_FIRST_SOURCE_INDEPENDENT_PHOTO_STREAM}}</li> </ul> </dd> <dd> <p>Receives the value of the stream index that corresponds to the friendly name.</p> </dd> <p>Controls one or more capture devices. The capture engine implements this interface. To get a reference to this interface, call either <strong>{{MFCreateCaptureEngine}}</strong> or <strong>{{IMFCaptureEngineClassFactory::CreateInstance}}</strong>.</p> <p><strong>{{IMFCaptureEngine}}</strong> only supports one pass {{CBR}} encoding.</p> <p>Initializes the capture engine.</p> <p>You must call this method once before using the capture engine. Calling the method a second time returns <strong>{{MF_E_INVALIDREQUEST}}</strong>.</p><p>This method is asynchronous. If the method returns a success code, the caller will receive an <strong>{{MF_CAPTURE_ENGINE_INITIALIZED}}</strong> event through the <strong>{{IMFCaptureEngineOnEventCallback::OnEvent}}</strong> method. The operation can fail asynchronously after the method succeeds. If so, the error code is conveyed through the <strong>OnEvent</strong> method.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The <strong>Initialize</strong> method was already called.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NO_CAPTURE_DEVICES_AVAILABLE}}</strong></dt> </dl> </td><td> <p>No capture devices are available.</p> </td></tr> </table><p>?</p> <dd> <p>A reference to the <strong>{{IMFCaptureEngineOnEventCallback}}</strong> interface. The caller must implement this interface. The capture engine uses this interface to send asynchronous events to the caller.</p> </dd> <dd> <p>A reference to the <strong>{{IMFAttributes}}</strong> interface. This parameter can be <strong>{{NULL}}</strong>. </p> <p>You can use this parameter to configure the capture engine. Call <strong>{{MFCreateAttributes}}</strong> to create an attribute store, and then set any of the following attributes.</p> <ul> <li> {{MF_CAPTURE_ENGINE_D3D_MANAGER}} </li> <li> {{MF_CAPTURE_ENGINE_DISABLE_DXVA}} </li> <li> {{MF_CAPTURE_ENGINE_DISABLE_HARDWARE_TRANSFORMS}} </li> <li> {{MF_CAPTURE_ENGINE_ENCODER_MFT_FIELDOFUSE_UNLOCK_Attribute}} </li> <li> {{MF_CAPTURE_ENGINE_EVENT_GENERATOR_GUID}} </li> <li> {{MF_CAPTURE_ENGINE_EVENT_STREAM_INDEX}} </li> <li> {{MF_CAPTURE_ENGINE_MEDIASOURCE_CONFIG}} </li> <li> {{MF_CAPTURE_ENGINE_RECORD_SINK_AUDIO_MAX_PROCESSED_SAMPLES}} </li> <li> {{MF_CAPTURE_ENGINE_RECORD_SINK_AUDIO_MAX_UNPROCESSED_SAMPLES}} </li> <li> {{MF_CAPTURE_ENGINE_RECORD_SINK_VIDEO_MAX_PROCESSED_SAMPLES}} </li> <li> {{MF_CAPTURE_ENGINE_RECORD_SINK_VIDEO_MAX_UNPROCESSED_SAMPLES}} </li> <li> {{MF_CAPTURE_ENGINE_USE_AUDIO_DEVICE_ONLY}} </li> <li> {{MF_CAPTURE_ENGINE_USE_VIDEO_DEVICE_ONLY}} </li> </ul> </dd> <dd> <p>An <strong>{{IUnknown}}</strong> reference that specifies an audio-capture device. This parameter can be <strong>{{NULL}}</strong>.</p> <p>If you set the {{MF_CAPTURE_ENGINE_USE_VIDEO_DEVICE_ONLY}} attribute to <strong>{{TRUE}}</strong> in <em>pAttributes</em>, the capture engine does not use an audio device, and the <em>pAudioSource</em> parameter is ignored.</p> <p>Otherwise, if <em>pAudioSource</em> is <strong>{{NULL}}</strong>, the capture engine selects the microphone that is built into the video camera specified by <em>pVideoSource</em>. If the video camera does not have a microphone, the capture engine enumerates the audio-capture devices on the system and selects the first one.</p> <p>To override the default audio device, set <em>pAudioSource</em> to an <strong>{{IMFMediaSource}}</strong> or <strong>{{IMFActivate}}</strong> reference for the device. For more information, see Audio/Video Capture in Media Foundation.</p> </dd> <dd> <p>An <strong>{{IUnknown}}</strong> reference that specifies a video-capture device. This parameter can be <strong>{{NULL}}</strong>.</p> <p>If you set the {{MF_CAPTURE_ENGINE_USE_AUDIO_DEVICE_ONLY}} attribute to <strong>{{TRUE}}</strong> in <em>pAttributes</em>, the capture engine does not use a video device, and the <em>pVideoSource</em> parameter is ignored.</p> <p>Otherwise, if <em>pVideoSource</em> is <strong>{{NULL}}</strong>, the capture engine enumerates the video-capture devices on the system and selects the first one.</p> <p>To override the default video device, set <em>pVideoSource</em> to an <strong>{{IMFMediaSource}}</strong> or <strong>{{IMFActivate}}</strong> reference for the device. For more information, see Enumerating Video Capture Devices.</p> </dd> <p>Starts preview.</p> <p>Before calling this method, configure the preview sink by calling <strong>{{IMFCaptureSink::AddStream}}</strong>. To get a reference to the preview sink, call <strong>{{IMFCaptureEngine::GetSink}}</strong>. </p><p>This method is asynchronous. If the method returns a success code, the caller will receive an <strong>{{MF_CAPTURE_ENGINE_PREVIEW_STARTED}}</strong> event through the <strong>{{IMFCaptureEngineOnEventCallback::OnEvent}}</strong> method. The operation can fail asynchronously after the method succeeds. If so, the error code is conveyed through the <strong>OnEvent</strong> method.</p><p>After the preview sink is configured, you can stop and start preview by calling <strong>{{IMFCaptureEngine::StopPreview}}</strong> and <strong>{{IMFCaptureEngine::StartPreview}}</strong>.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The preview sink was not initialized.</p> </td></tr> </table><p>?</p> <p>Stops preview.</p> <p>This method is asynchronous. If the method returns a success code, the caller will receive an <strong>{{MF_CAPTURE_ENGINE_PREVIEW_STOPPED}}</strong> event through the <strong>{{IMFCaptureEngineOnEventCallback::OnEvent}}</strong> method. The operation can fail asynchronously after the method succeeds. If so, the error code is conveyed through the <strong>OnEvent</strong> method.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The capture engine is not currently previewing.</p> </td></tr> </table><p>?</p> <p>Starts recording audio and/or video to a file.</p> <p>Before calling this method, configure the recording sink by calling <strong>{{IMFCaptureSink::AddStream}}</strong>. To get a reference to the recording sink, call <strong>{{IMFCaptureEngine::GetSink}}</strong>.</p><p>This method is asynchronous. If the method returns a success code, the caller will receive an <strong>{{MF_CAPTURE_ENGINE_RECORD_STARTED}}</strong> event through the <strong>{{IMFCaptureEngineOnEventCallback::OnEvent}}</strong> method. The operation can fail asynchronously after the method succeeds. If so, the error code is conveyed through the <strong>OnEvent</strong> method.</p><p>To stop recording, call <strong>{{IMFCaptureEngine::StopRecord}}</strong>.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The recording sink was not initialized.</p> </td></tr> </table><p>?</p> <p>Stops recording.</p> <p>This method is asynchronous. If the method returns a success code, the caller will receive an <strong>{{MF_CAPTURE_ENGINE_RECORD_STOPPED}}</strong> event through the <strong>{{IMFCaptureEngineOnEventCallback::OnEvent}}</strong> method. The operation can fail asynchronously after the method succeeds. If so, the error code is conveyed through the <strong>OnEvent</strong> method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>A Boolean value that specifies whether to finalize the output file. To create a valid output file, specify <strong>{{TRUE}}</strong>. Specify <strong>{{FALSE}}</strong> only if you want to interrupt the recording and discard the output file. If the value is <strong>{{FALSE}}</strong>, the operation completes more quickly, but the file will not be playable. </p> </dd> <dd> <p>A Boolean value that specifies if the unprocessed samples waiting to be encoded should be flushed.</p> </dd> <p>Captures a still image from the video stream.</p> <p>Before calling this method, configure the photo sink by calling <strong>{{IMFCaptureSink::AddStream}}</strong>. To get a reference to the photo sink, call <strong>{{IMFCaptureEngine::GetSink}}</strong>. </p><p>This method is asynchronous. If the method returns a success code, the caller will receive an <strong>{{MF_CAPTURE_ENGINE_PHOTO_TAKEN}}</strong> event through the <strong>{{IMFCaptureEngineOnEventCallback::OnEvent}}</strong> method. The operation can fail asynchronously after the method succeeds. If so, the error code is conveyed through the <strong>OnEvent</strong> method.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets a reference to one of the capture sink objects. You can use the capture sinks to configure preview, recording, or still-image capture.</p> <p>This method can return one of these values.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>Success.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>Invalid argument.</p> </td></tr> </table><p>?</p> <dd> <p>An <strong>{{MF_CAPTURE_ENGINE_SINK_TYPE}}</strong> value that specifies the capture sink to retrieve.</p> </dd> <dd> <p>Receives a reference to the <strong>{{IMFCaptureSink}}</strong> interface. The caller must release the interface.</p> </dd> <p>Gets a reference to the capture source object. Use the capture source to configure the capture devices.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Receives a reference to the <strong>{{IMFCaptureSource}}</strong> interface. The caller must release the interface.</p> </dd> <p>Creates an instance of the capture engine.</p> <p>To get a reference to this interface, call the CoCreateInstance function and specify the {{CLSID}} equal to <strong>{{CLSID_MFCaptureEngineClassFactory}}</strong>. </p><p>Calling the <strong>{{MFCreateCaptureEngine}}</strong> function is equivalent to calling <strong>{{IMFCaptureEngineClassFactory::CreateInstance}}</strong>.</p> <p>Creates an instance of the capture engine.</p> <p>Before calling this method, call the <strong>{{MFStartup}}</strong> function.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The {{CLSID}} of the object to create. Currently, this parameter must equal <strong>{{CLSID_MFCaptureEngine}}</strong>.</p> </dd> <dd> <p>The {{IID}} of the requested interface. The capture engine supports the <strong>{{IMFCaptureEngine}}</strong> interface.</p> </dd> <dd> <p>Receives a reference to the requested interface. The caller must release the interface.</p> </dd> <p>Extensions for the <strong>{{IMFCaptureEngineOnSampleCallback}}</strong> callback interface that is used to receive data from the capture engine.</p> <p>Called by the capture sink when the format of the sample is changed.</p> <p>The return value is ignored.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>The new media type.</p> </dd> <p>Extends the <strong>{{IMFCaptureSink}}</strong> interface to provide functionality for dynamically setting the output media type of the record sink or preview sink.</p> <p>Dynamically sets the output media type of the record sink or preview sink.</p> <p>This is an asynchronous call. Listen to the {{MF_CAPTURE_ENGINE_OUTPUT_MEDIA_TYPE_SET}} event to be notified when the output media type has been set.</p> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALID_MEDIATYPE}}</strong></dt> </dl> </td><td> <p>The sink does not support the media type.</p> </td></tr> </table><p>?</p> <dd> <p>The stream index to change the output media type on.</p> </dd> <dd> <p>The new output media type.</p> </dd> <dd> <p>The new encoder attributes. This can be <strong>null</strong>.</p> </dd> <p>Contains the header information that is part of the raw input data. </p> <p>To get more information on the device, use <strong>hDevice</strong> in a call to <strong>GetRawInputDeviceInfo</strong>.</p> <dd> <p>The type of raw input. It can be one of the following values. </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{RIM_TYPEHID}}</strong></dt> <dt>2</dt> </dl> </td><td> <p>Raw input comes from some device that is not a keyboard or a mouse.</p> </td></tr> <tr><td><dl> <dt><strong>{{RIM_TYPEKEYBOARD}}</strong></dt> <dt>1</dt> </dl> </td><td> <p>Raw input comes from the keyboard.</p> </td></tr> <tr><td><dl> <dt><strong>{{RIM_TYPEMOUSE}}</strong></dt> <dt>0</dt> </dl> </td><td> <p>Raw input comes from the mouse.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>The size, in bytes, of the entire input packet of data. This includes <strong>{{RAWINPUT}}</strong> plus possible extra input reports in the <strong>{{RAWHID}}</strong> variable length array. </p> </dd> <dd> <p>A handle to the device generating the raw input data. </p> </dd> <dd> <p>The value passed in the <em>wParam</em> parameter of the <strong>{{WM_INPUT}}</strong> message. </p> </dd> <p>Contains information about the state of the keyboard. </p> <dd> <p>The scan code from the key depression. The scan code for keyboard overrun is <strong>{{KEYBOARD_OVERRUN_MAKE_CODE}}</strong>. </p> </dd> <dd> <p>Flags for scan code information. It can be one or more of the following.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{RI_KEY_BREAK}}</strong></dt> <dt>1</dt> </dl> </td><td> <p>The key is up.</p> </td></tr> <tr><td><dl> <dt><strong>{{RI_KEY_E0}}</strong></dt> <dt>2</dt> </dl> </td><td> <p>The scan code has the {{E0}} prefix. </p> </td></tr> <tr><td><dl> <dt><strong>{{RI_KEY_E1}}</strong></dt> <dt>4</dt> </dl> </td><td> <p>The scan code has the {{E1}} prefix. </p> </td></tr> <tr><td><dl> <dt><strong>{{RI_KEY_MAKE}}</strong></dt> <dt>0</dt> </dl> </td><td> <p>The key is down.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>Reserved; must be zero. </p> </dd> <dd> <p>Windows message compatible virtual-key code. For more information, see Virtual Key Codes. </p> </dd> <dd> <p>The corresponding window message, for example <strong>{{WM_KEYDOWN}}</strong>, <strong>{{WM_SYSKEYDOWN}}</strong>, and so forth. </p> </dd> <dd> <p>The device-specific additional information for the event. </p> </dd> <p>Describes the format of the raw input from a Human Interface Device ({{HID}}). </p> <p>Each <strong>{{WM_INPUT}}</strong> can indicate several inputs, but all of the inputs come from the same {{HID}}. The size of the <strong>bRawData</strong> array is <strong>dwSizeHid</strong> * <strong>dwCount</strong>.</p> <dd> <p>The size, in bytes, of each {{HID}} input in <strong>bRawData</strong>. </p> </dd> <dd> <p>The number of {{HID}} inputs in <strong>bRawData</strong>.</p> </dd> <dd> <p>The raw input data, as an array of bytes. </p> </dd> <p>This section describes how the system provides raw input to your application and how an application receives and processes that input. Raw input is sometimes referred to as generic input. </p> <p>Defines the raw input data coming from the specified mouse.</p> <p>For the mouse, the Usage Page is 1 and the Usage is 2.</p> <dd> <p>The identifier of the mouse device.</p> </dd> <dd> <p>The number of buttons for the mouse.</p> </dd> <dd> <p>The number of data points per second. This information may not be applicable for every mouse device.</p> </dd> <dd> <p><strong>{{TRUE}}</strong> if the mouse has a wheel for horizontal scrolling; otherwise, <strong>{{FALSE}}</strong>. </p> <p><strong>Windows?{{XP:}}??</strong>This member is only supported starting with Windows?Vista.</p> </dd> <p>Defines the raw input data coming from the specified keyboard. </p> <p>For the keyboard, the Usage Page is 1 and the Usage is 6. </p> <dd> <p>The type of the keyboard. </p> </dd> <dd> <p>The subtype of the keyboard. </p> </dd> <dd> <p>The scan code mode. </p> </dd> <dd> <p>The number of function keys on the keyboard.</p> </dd> <dd> <p>The number of {{LED}} indicators on the keyboard.</p> </dd> <dd> <p>The total number of keys on the keyboard. </p> </dd> <p>Defines the raw input data coming from the specified Human Interface Device ({{HID}}). </p> <dd> <p>The vendor identifier for the {{HID}}. </p> </dd> <dd> <p>The product identifier for the {{HID}}. </p> </dd> <dd> <p>The version number for the {{HID}}. </p> </dd> <dd> <p>The top-level collection Usage Page for the device. </p> </dd> <dd> <p>The top-level collection Usage for the device. </p> </dd> <p>Defines the raw input data coming from any device. </p> <dd> <p>The size, in bytes, of the <strong>{{RID_DEVICE_INFO}}</strong> structure. </p> </dd> <dd> <p>The type of raw input data. This member can be one of the following values. </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{RIM_TYPEHID}}</strong></dt> <dt>2</dt> </dl> </td><td> <p>Data comes from an {{HID}} that is not a keyboard or a mouse.</p> </td></tr> <tr><td><dl> <dt><strong>{{RIM_TYPEKEYBOARD}}</strong></dt> <dt>1</dt> </dl> </td><td> <p>Data comes from a keyboard.</p> </td></tr> <tr><td><dl> <dt><strong>{{RIM_TYPEMOUSE}}</strong></dt> <dt>0</dt> </dl> </td><td> <p>Data comes from a mouse.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>If <strong>dwType</strong> is <strong>{{RIM_TYPEMOUSE}}</strong>, this is the <strong>{{RID_DEVICE_INFO_MOUSE}}</strong> structure that defines the mouse. </p> </dd> <dd> <p>If <strong>dwType</strong> is <strong>{{RIM_TYPEKEYBOARD}}</strong>, this is the <strong>{{RID_DEVICE_INFO_KEYBOARD}}</strong> structure that defines the keyboard. </p> </dd> <dd> <p>If <strong>dwType</strong> is <strong>{{RIM_TYPEHID}}</strong>, this is the <strong>{{RID_DEVICE_INFO_HID}}</strong> structure that defines the {{HID}} device. </p> </dd> <p>Defines information for the raw input devices. </p> <p>If <strong>{{RIDEV_NOLEGACY}}</strong> is set for a mouse or a keyboard, the system does not generate any legacy message for that device for the application. For example, if the mouse {{TLC}} is set with <strong>{{RIDEV_NOLEGACY}}</strong>, <strong>{{WM_LBUTTONDOWN}}</strong> and related legacy mouse messages are not generated. Likewise, if the keyboard {{TLC}} is set with <strong>{{RIDEV_NOLEGACY}}</strong>, <strong>{{WM_KEYDOWN}}</strong> and related legacy keyboard messages are not generated.</p><p>If <strong>{{RIDEV_REMOVE}}</strong> is set and the <strong>hwndTarget</strong> member is not set to <strong>{{NULL}}</strong>, then parameter validation will fail.</p> <dd> <p>Top level collection Usage page for the raw input device. </p> </dd> <dd> <p>Top level collection Usage for the raw input device. </p> </dd> <dd> <p>Mode flag that specifies how to interpret the information provided by <strong>usUsagePage</strong> and <strong>usUsage</strong>. It can be zero (the default) or one of the following values. By default, the operating system sends raw input from devices with the specified top level collection ({{TLC}}) to the registered application as long as it has the window focus. </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{RIDEV_APPKEYS}}</strong></dt> <dt>0x00000400</dt> </dl> </td><td> <p>If set, the application command keys are handled. <strong>{{RIDEV_APPKEYS}}</strong> can be specified only if <strong>{{RIDEV_NOLEGACY}}</strong> is specified for a keyboard device.</p> </td></tr> <tr><td><dl> <dt><strong>{{RIDEV_CAPTUREMOUSE}}</strong></dt> <dt>0x00000200</dt> </dl> </td><td> <p>If set, the mouse button click does not activate the other window.</p> </td></tr> <tr><td><dl> <dt><strong>{{RIDEV_DEVNOTIFY}}</strong></dt> <dt>0x00002000</dt> </dl> </td><td> <p>If set, this enables the caller to receive <strong>{{WM_INPUT_DEVICE_CHANGE}}</strong> notifications for device arrival and device removal.</p> <p><strong>Windows?{{XP:}}??</strong>This flag is not supported until Windows?Vista</p> </td></tr> <tr><td><dl> <dt><strong>{{RIDEV_EXCLUDE}}</strong></dt> <dt>0x00000010</dt> </dl> </td><td> <p>If set, this specifies the top level collections to exclude when reading a complete usage page. This flag only affects a {{TLC}} whose usage page is already specified with <strong>{{RIDEV_PAGEONLY}}</strong>. </p> </td></tr> <tr><td><dl> <dt><strong>{{RIDEV_EXINPUTSINK}}</strong></dt> <dt>0x00001000</dt> </dl> </td><td> <p>If set, this enables the caller to receive input in the background only if the foreground application does not process it. In other words, if the foreground application is not registered for raw input, then the background application that is registered will receive the input.</p> <p><strong>Windows?{{XP:}}??</strong>This flag is not supported until Windows?Vista</p> </td></tr> <tr><td><dl> <dt><strong>{{RIDEV_INPUTSINK}}</strong></dt> <dt>0x00000100</dt> </dl> </td><td> <p>If set, this enables the caller to receive the input even when the caller is not in the foreground. Note that <strong>hwndTarget</strong> must be specified.</p> </td></tr> <tr><td><dl> <dt><strong>{{RIDEV_NOHOTKEYS}}</strong></dt> <dt>0x00000200</dt> </dl> </td><td> <p>If set, the application-defined keyboard device hotkeys are not handled. However, the system hotkeys; for example, {{ALT}}+{{TAB}} and {{CTRL}}+{{ALT}}+{{DEL}}, are still handled. By default, all keyboard hotkeys are handled. <strong>{{RIDEV_NOHOTKEYS}}</strong> can be specified even if <strong>{{RIDEV_NOLEGACY}}</strong> is not specified and <strong>hwndTarget</strong> is <strong>{{NULL}}</strong>.</p> </td></tr> <tr><td><dl> <dt><strong>{{RIDEV_NOLEGACY}}</strong></dt> <dt>0x00000030</dt> </dl> </td><td> <p>If set, this prevents any devices specified by <strong>usUsagePage</strong> or <strong>usUsage</strong> from generating legacy messages. This is only for the mouse and keyboard. See Remarks.</p> </td></tr> <tr><td><dl> <dt><strong>{{RIDEV_PAGEONLY}}</strong></dt> <dt>0x00000020</dt> </dl> </td><td> <p>If set, this specifies all devices whose top level collection is from the specified <strong>usUsagePage</strong>. Note that <strong>usUsage</strong> must be zero. To exclude a particular top level collection, use <strong>{{RIDEV_EXCLUDE}}</strong>.</p> </td></tr> <tr><td><dl> <dt><strong>{{RIDEV_REMOVE}}</strong></dt> <dt>0x00000001</dt> </dl> </td><td> <p>If set, this removes the top level collection from the inclusion list. This tells the operating system to stop reading from a device which matches the top level collection.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A handle to the target window. If <strong>{{NULL}}</strong> it follows the keyboard focus.</p> </dd> <p>Contains information about a raw input device.</p> <dd> <p>A handle to the raw input device. </p> </dd> <dd> <p>The type of device. This can be one of the following values. </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{RIM_TYPEHID}}</strong></dt> <dt>2</dt> </dl> </td><td> <p>The device is an {{HID}} that is not a keyboard and not a mouse.</p> </td></tr> <tr><td><dl> <dt><strong>{{RIM_TYPEKEYBOARD}}</strong></dt> <dt>1</dt> </dl> </td><td> <p>The device is a keyboard.</p> </td></tr> <tr><td><dl> <dt><strong>{{RIM_TYPEMOUSE}}</strong></dt> <dt>0</dt> </dl> </td><td> <p>The device is a mouse.</p> </td></tr> </table> <p>?</p> </dd> <p>Retrieves the raw input from the specified device.</p> <p><strong>GetRawInputData</strong> gets the raw input one <strong>{{RAWINPUT}}</strong> structure at a time. In contrast, <strong>GetRawInputBuffer</strong> gets an array of <strong>{{RAWINPUT}}</strong> structures.</p> <p>If <em>pData</em> is <strong>{{NULL}}</strong> and the function is successful, the return value is 0. If <em>pData</em> is not <strong>{{NULL}}</strong> and the function is successful, the return value is the number of bytes copied into pData.</p><p>If there is an error, the return value is (<strong>{{UINT}}</strong>)-1.</p> <dd> <p>A handle to the <strong>{{RAWINPUT}}</strong> structure. This comes from the <em>lParam</em> in <strong>{{WM_INPUT}}</strong>. </p> </dd> <dd> <p>The command flag. This parameter can be one of the following values. </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{RID_HEADER}}</strong></dt> <dt>0x10000005</dt> </dl> </td><td> <p>Get the header information from the <strong>{{RAWINPUT}}</strong> structure.</p> </td></tr> <tr><td><dl> <dt><strong>{{RID_INPUT}}</strong></dt> <dt>0x10000003</dt> </dl> </td><td> <p>Get the raw data from the <strong>{{RAWINPUT}}</strong> structure.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A reference to the data that comes from the <strong>{{RAWINPUT}}</strong> structure. This depends on the value of <em>uiCommand</em>. If <em>pData</em> is <strong>{{NULL}}</strong>, the required size of the buffer is returned in *<em>pcbSize</em>. </p> </dd> <dd> <p>The size, in bytes, of the data in <em>pData</em>. </p> </dd> <dd> <p>The size, in bytes, of the <strong>{{RAWINPUTHEADER}}</strong> structure. </p> </dd> <p>Retrieves information about the raw input device.</p> <p>If successful, this function returns a non-negative number indicating the number of bytes copied to <em>pData</em>. </p><p>If <em>pData</em> is not large enough for the data, the function returns -1. If <em>pData</em> is <strong>{{NULL}}</strong>, the function returns a value of zero. In both of these cases, <em>pcbSize</em> is set to the minimum size required for the <em>pData</em> buffer.</p><p>Call <strong>GetLastError</strong> to identify any other errors.</p> <dd> <p>A handle to the raw input device. This comes from the <strong>hDevice</strong> member of <strong>{{RAWINPUTHEADER}}</strong> or from <strong>GetRawInputDeviceList</strong>. </p> </dd> <dd> <p>Specifies what data will be returned in <em>pData</em>. This parameter can be one of the following values. </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{RIDI_DEVICENAME}}</strong></dt> <dt>0x20000007</dt> </dl> </td><td> <p><em>pData</em> points to a string that contains the device name. </p> <p>For this <em>uiCommand</em> only, the value in <em>pcbSize</em> is the character count (not the byte count).</p> </td></tr> <tr><td><dl> <dt><strong>{{RIDI_DEVICEINFO}}</strong></dt> <dt>0x2000000b</dt> </dl> </td><td> <p><em>pData</em> points to an <strong>{{RID_DEVICE_INFO}}</strong> structure.</p> </td></tr> <tr><td><dl> <dt><strong>{{RIDI_PREPARSEDDATA}}</strong></dt> <dt>0x20000005</dt> </dl> </td><td> <p><em>pData</em> points to the previously parsed data.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p>A reference to a buffer that contains the information specified by <em>uiCommand</em>. If <em>uiCommand</em> is <strong>{{RIDI_DEVICEINFO}}</strong>, set the <strong>cbSize</strong> member of <strong>{{RID_DEVICE_INFO}}</strong> to <code>sizeof({{RID_DEVICE_INFO}})</code> before calling <strong>GetRawInputDeviceInfo</strong>. </p> </dd> <dd> <p>The size, in bytes, of the data in <em>pData</em>. </p> </dd> <p>Performs a buffered read of the raw input data.</p> <p>Using <strong>GetRawInputBuffer</strong>, the raw input data is buffered in the array of <strong>{{RAWINPUT}}</strong> structures. For an unbuffered read, use the <strong>GetMessage</strong> function to read in the raw input data. </p><p>The <strong>{{NEXTRAWINPUTBLOCK}}</strong> macro allows an application to traverse an array of <strong>{{RAWINPUT}}</strong> structures.</p><strong>Note</strong>??To get the correct size of the raw input buffer, do not use *<em>pcbSize</em>, use *<em>pcbSize</em> * 8 instead. To ensure <strong>GetRawInputBuffer</strong> behaves properly on {{WOW64}}, you must align the <strong>{{RAWINPUT}}</strong> structure by 8 bytes. The following code shows how to align <strong>{{RAWINPUT}}</strong> for {{WOW64}}. <pre>[StructLayout(LayoutKind.Explicit)] internal struct {{RAWINPUT}} { [FieldOffset(0)] public {{RAWINPUTHEADER}} header; [FieldOffset(16+8)] public {{RAWMOUSE}} mouse; [FieldOffset(16+8)] public {{RAWKEYBOARD}} keyboard; [FieldOffset(16+8)] public {{RAWHID}} hid; } </pre>? <p>If <em>pData</em> is {{NULL}} and the function is successful, the return value is zero. If <em>pData</em> is not {{NULL}} and the function is successful, the return value is the number of <strong>{{RAWINPUT}}</strong> structures written to <em>pData</em>.</p><p>If an error occurs, the return value is (<strong>{{UINT}}</strong>)-1. Call <strong>GetLastError</strong> for the error code.</p> <dd> <p>A reference to a buffer of <strong>{{RAWINPUT}}</strong> structures that contain the raw input data. If <strong>{{NULL}}</strong>, the minimum required buffer, in bytes, is returned in *<em>pcbSize</em>. </p> </dd> <dd> <p>The size, in bytes, of a <strong>{{RAWINPUT}}</strong> structure. </p> </dd> <dd> <p>The size, in bytes, of the <strong>{{RAWINPUTHEADER}}</strong> structure. </p> </dd> <p>Registers the devices that supply the raw input data.</p> <p>To receive <strong>{{WM_INPUT}}</strong> messages, an application must first register the raw input devices using <strong>RegisterRawInputDevices</strong>. By default, an application does not receive raw input.</p><p>To receive <strong>{{WM_INPUT_DEVICE_CHANGE}}</strong> messages, an application must specify the {{RIDEV_DEVNOTIFY}} flag for each device class that is specified by the usUsagePage and usUsage fields of the <strong>{{RAWINPUTDEVICE}}</strong> structure . By default, an application does not receive <strong>{{WM_INPUT_DEVICE_CHANGE}}</strong> notifications for raw input device arrival and removal.</p><p>If a <strong>{{RAWINPUTDEVICE}}</strong> structure has the {{RIDEV_REMOVE}} flag set and the hwndTarget parameter is not set to {{NULL}}, then parameter validation will fail. </p> <p><strong>{{TRUE}}</strong> if the function succeeds; otherwise, <strong>{{FALSE}}</strong>. If the function fails, call <strong>GetLastError</strong> for more information.</p> <dd> <p>An array of <strong>{{RAWINPUTDEVICE}}</strong> structures that represent the devices that supply the raw input.</p> </dd> <dd> <p>The number of <strong>{{RAWINPUTDEVICE}}</strong> structures pointed to by <em>pRawInputDevices</em>.</p> </dd> <dd> <p>The size, in bytes, of a <strong>{{RAWINPUTDEVICE}}</strong> structure.</p> </dd> <p>Retrieves the information about the raw input devices for the current application.</p> <p>To receive raw input from a device, an application must register it by using <strong>RegisterRawInputDevices</strong>. </p> <p>If successful, the function returns a non-negative number that is the number of <strong>{{RAWINPUTDEVICE}}</strong> structures written to the buffer. </p><p>If the <em>pRawInputDevices</em> buffer is too small or <strong>{{NULL}}</strong>, the function sets the last error as <strong>{{ERROR_INSUFFICIENT_BUFFER}}</strong>, returns -1, and sets <em>puiNumDevices</em> to the required number of devices. If the function fails for any other reason, it returns -1. For more details, call <strong>GetLastError</strong>. </p> <dd> <p>An array of <strong>{{RAWINPUTDEVICE}}</strong> structures for the application. </p> </dd> <dd> <p>The number of <strong>{{RAWINPUTDEVICE}}</strong> structures in *<em>pRawInputDevices</em>. </p> </dd> <dd> <p>The size, in bytes, of a <strong>{{RAWINPUTDEVICE}}</strong> structure. </p> </dd> <p>Enumerates the raw input devices attached to the system. </p> <p>The devices returned from this function are the mouse, the keyboard, and other Human Interface Device ({{HID}}) devices.</p><p>To get more detailed information about the attached devices, call <strong>GetRawInputDeviceInfo</strong> using the hDevice from <strong>{{RAWINPUTDEVICELIST}}</strong>. </p> <p>If the function is successful, the return value is the number of devices stored in the buffer pointed to by <em>pRawInputDeviceList</em>.</p><p>On any other error, the function returns (<strong>{{UINT}}</strong>) -1 and <strong>GetLastError</strong> returns the error indication.</p> <dd> <p>An array of <strong>{{RAWINPUTDEVICELIST}}</strong> structures for the devices attached to the system. If <strong>{{NULL}}</strong>, the number of devices are returned in *<em>puiNumDevices</em>. </p> </dd> <dd> <p>If <em>pRawInputDeviceList</em> is <strong>{{NULL}}</strong>, the function populates this variable with the number of devices attached to the system; otherwise, this variable specifies the number of <strong>{{RAWINPUTDEVICELIST}}</strong> structures that can be contained in the buffer to which <em>pRawInputDeviceList</em> points. If this value is less than the number of devices attached to the system, the function returns the actual number of devices in this variable and fails with <strong>{{ERROR_INSUFFICIENT_BUFFER}}</strong>.</p> </dd> <dd> <p>The size of a <strong>{{RAWINPUTDEVICELIST}}</strong> structure, in bytes.</p> </dd> <p>Indicates the filter type.</p> <strong>Note</strong>??Note that the DirectX {{SDK}} versions of {{XAUDIO2}} do not support the <strong>LowPassOnePoleFilter</strong> or the <strong>HighPassOnePoleFilter</strong>.? <dd> <p>Attenuates (reduces) frequencies above the cutoff frequency.</p> </dd> <dd> <p>Attenuates frequencies outside a given range.</p> </dd> <dd> <p>Attenuates frequencies below the cutoff frequency.</p> </dd> <dd> <p>Attenuates frequencies inside a given range.</p> </dd> <dd> <p>Attenuates frequencies above the cutoff frequency. This is a one-pole filter, and <strong>{{XAUDIO2_FILTER_PARAMETERS}}</strong>.<strong>OneOverQ</strong> has no effect.</p> </dd> <dd> <p>Attenuates frequencies below the cutoff frequency. This is a one-pole filter, and <strong>{{XAUDIO2_FILTER_PARAMETERS}}</strong>.<strong>OneOverQ</strong> has no effect.</p> </dd> <p>Contains information about the creation flags, input channels, and sample rate of a voice.</p> <p>Note the DirectX {{SDK}} versions of {{XAUDIO2}} do not support the <strong>ActiveFlags</strong> member.</p> <dd> <p>Flags used to create the voice; see the individual voice interfaces for more information.</p> </dd> <dd> <p>Flags that are currently set on the voice.</p> </dd> <dd> <p>The number of input channels the voice expects.</p> </dd> <dd> <p>The input sample rate the voice expects.</p> </dd> <p>Defines a destination voice that is the target of a send from another voice and specifies whether a filter should be used.</p> <dd> <p>Indicates whether a filter should be used on data sent to the voice pointed to by <strong>pOutputVoice</strong>. Flags can be 0 or {{XAUDIO2_SEND_USEFILTER}}.</p> </dd> <dd> <p>A reference to an <strong>{{IXAudio2Voice}}</strong> that will be the target of the send. The <strong>pOutputVoice</strong> member cannot be {{NULL}}.</p> </dd> <p>Defines a set of voices to receive data from a single output voice.</p> <p>If <strong>pSends</strong> is not {{NULL}} all of its elements must be non-{{NULL}}. To send output to the default mastering voice call <strong>{{IXAudio2Voice::SetOutputVoices}}</strong> with the pSendList argument set to {{NULL}}. </p><p>Setting <strong>SendCount</strong> to 0 is useful for certain effects such as volume meters or file writers that don't generate any audio output to pass on to another voice. </p><p>If needed, a voice will perform a single sample rate conversion, from the voice's input sample rate to the input sample rate of the voice's output voices. Because only one sample rate conversion will be performed, all the voice's output voices must have the same input sample rate. If the input sample rates of the voice and its output voices are the same, no sample rate conversion is performed. </p> <dd> <p>Number of voices to receive the output of the voice. An <strong>OutputCount</strong> value of 0 indicates the voice should not send output to any voices.</p> </dd> <dd> <p>Array of <strong>{{XAUDIO2_SEND_DESCRIPTOR}}</strong> structures describing destination voices and the filters that should be used when sending to the voices. This array should contain <strong>SendCount</strong> elements. If <strong>SendCount</strong> is 0 <strong>pSends</strong> should be {{NULL}}. Note that <strong>pSends</strong> cannot contain the same voice more than once.</p> </dd> <p>Contains information about an {{XAPO}} for use in an effect chain.</p> <p>{{XAPO}} instances are passed to {{XAudio2}} as <strong>{{IUnknown}}</strong> interfaces and {{XAudio2}} uses <strong>{{IXAPO::QueryInterface}}</strong> to acquire an <strong>{{IXAPO}}</strong> interface and to detect whether the {{XAPO}} implements the <strong>{{IXAPOParameters}}</strong> interface. </p><p>For additional information on using {{XAPOs}} with {{XAudio2}} see How to: Create an Effect Chain and How to: Use an {{XAPO}} in {{XAudio2}}.</p> <p>Defines an effect chain.</p> <dd> <p>Number of effects in the effect chain for the voice.</p> </dd> <dd> <p>Array of <strong>{{XAUDIO2_EFFECT_DESCRIPTOR}}</strong> structures containing references to {{XAPO}} instances.</p> </dd> <p>Defines filter parameters for a source voice.</p> <p>Setting {{XAUDIO2_FILTER_PARAMETERS}} with the following values is acoustically equivalent to the filter being fully bypassed.</p><pre>{{XAUDIO2_FILTER_PARAMETERS}} FilterParams; FilterParams.Frequency = 1.0f; FilterParams.OneOverQ = 1.0f; FilterParams.Type = LowPassFilter; </pre><p>The following formulas show the relationship between the members of {{XAUDIO2_FILTER_PARAMETERS}} and the per-voice filter.</p><pre>Yl( n ) = {{F1}} yb( n ) + yl( n - 1 ) Yb( n ) = {{F1}} yh( n ) + yb( n - 1 ) Yh( n ) = x( n ) - yl( n ) - OneOverQ(yb( n - 1 ) Yn( n ) = Yl(n) + Yh(n) </pre><p>Where:</p><pre>Yl = lowpass output Yb = bandpass output Yh = highpass output Yn = notch output {{F1}} = {{XAUDIO2_FILTER_PARAMETERS}}.Frequency OneOverQ = {{XAUDIO2_FILTER_PARAMETERS}}.OneOverQ</pre> <dd> <p>The <strong>{{XAUDIO2_FILTER_TYPE}}</strong>.</p> </dd> <dd> <p>Filter radian frequency calculated as (2 * sin(pi * (desired filter cutoff frequency) / sampleRate)). The frequency must be greater than or equal to 0 and less than or equal to {{XAUDIO2_MAX_FILTER_FREQUENCY}}. The maximum frequency allowable is equal to the source sound's sample rate divided by six which corresponds to the maximum filter radian frequency of 1. For example, if a sound's sample rate is 48000 and the desired cutoff frequency is the maximum allowable value for that sample rate, 8000, the value for <strong>Frequency</strong> will be 1. If {{XAUDIO2_HELPER_FUNCTIONS}} is defined, {{XAudio2}}.h will include the <strong>{{XAudio2RadiansToCutoffFrequency}}</strong> and <strong>{{XAudio2CutoffFrequencyToRadians}}</strong> helper functions for converting between hertz and radian frequencies. Defining {{XAUDIO2_HELPER_FUNCTIONS}} will also include <strong>{{XAudio2CutoffFrequencyToOnePoleCoefficient}}</strong> for converting between hertz and a one-pole coefficient suitable for use with the LowPassOnePoleFilter and HighPassOnePoleFilter. </p> </dd> <dd> <p>Reciprocal of Q factor. Controls how quickly frequencies beyond Frequency are dampened. Larger values result in quicker dampening while smaller values cause dampening to occur more gradually. Must be greater than 0 and less than or equal to {{XAUDIO2_MAX_FILTER_ONEOVERQ}}.</p> </dd> <p>Represents an audio data buffer, used with <strong>{{IXAudio2SourceVoice::SubmitSourceBuffer}}</strong>.</p> <p>{{XAudio2}} audio data is interleaved, data from each channel is adjacent for a particular sample number. For example if there was a 4 channel wave playing into an {{XAudio2}} source voice, the audio data would be a sample of channel 0, a sample of channel 1, a sample of channel 2, a sample of channel 3, and then the next sample of channels 0, 1, 2, 3, etc. </p><p>The <strong>AudioBytes</strong> and <strong>pAudioData</strong> members of <strong>{{XAUDIO2_BUFFER}}</strong> correspond to the size in bytes and contents of the 'data' {{RIFF}} chunk of the file being played. The contents of the chunk may need to be byte swapped when loading the file on Xbox 360. </p><p>Memory allocated to hold a <strong>{{XAUDIO2_BUFFER}}</strong> or <strong>{{XAUDIO2_BUFFER_WMA}}</strong> structure can be freed as soon as the <strong>{{IXAudio2SourceVoice::SubmitSourceBuffer}}</strong> call it is passed to returns. The data the structure points to (<strong>pAudioData</strong> and <strong>pDecodedPacketCumulativeBytes</strong>, respectively) can't be freed until the buffer completes (as signaled by the <strong>{{IXAudio2VoiceCallback::OnBufferEnd}}</strong> callback) or the voice is stopped or destroyed. </p> <p>Used with <strong>{{IXAudio2SourceVoice::SubmitSourceBuffer}}</strong> when submitting xWMA data.</p> <p>When streaming an xWMA file a few packets at a time, {{XAUDIO2_END_OF_STREAM}} should be specified on the last packet. Alternatively, the application may call <strong>{{IXAudio2SourceVoice::Discontinuity}}</strong> after submitting the last packet. </p><p>In addition, when streaming an xWMA file a few packets at a time, the application should subtract <strong>pDecodedPacketCumulativeBytes</strong>[<strong>PacketCount</strong>-1] of the previous packet from all the entries of the currently submitted packet. </p><p>The members of <strong>{{XAUDIO2_BUFFER_WMA}}</strong> correspond to values contained in the 'dpds' {{RIFF}} chunk of the xWMA file being played. <strong>PacketCount</strong> will correspond to the size in {{UINT32s}} of the chunk. <strong>pDecodedPacketCumulativeBytes</strong> will correspond to a {{UINT32}} buffer containing the contents of the chunk. The contents of the buffer will need to be byte swapped when loading the buffer on Xbox 360. </p><p>Memory allocated to hold a <strong>{{XAUDIO2_BUFFER}}</strong> or <strong>{{XAUDIO2_BUFFER_WMA}}</strong> structure can be freed as soon as the <strong>{{IXAudio2SourceVoice::SubmitSourceBuffer}}</strong> call it is passed to returns. The data the structure points to (<strong>pAudioData</strong> and <strong>pDecodedPacketCumulativeBytes</strong>, respectively) can't be freed until the buffer completes (as signaled by the <strong>{{IXAudio2VoiceCallback::OnBufferEnd}}</strong> callback) or the voice is stopped and destroyed. </p><p>{{XAUDIO}} 2.8 in Windows 8.x does not support xWMA decoding. Use Windows Media Foundation {{APIs}} to perform the decoding from {{WMA}} to {{PCM}} instead. This functionality is available in the DirectX {{SDK}} versions of {{XAUDIO}} and in {{XAUDIO}} 2.9 in Windows?10.</p> <p>Returns the voice's current state and cursor position data.</p> <p>For all encoded formats, including constant bit rate ({{CBR}}) formats such as adaptive differential pulse code modulation ({{ADPCM}}), <strong>SamplesPlayed</strong> is expressed in terms of decoded samples. For pulse code modulation ({{PCM}}) formats, <strong>SamplesPlayed</strong> is expressed in terms of either input or output samples. There is a one-to-one mapping from input to output for {{PCM}} formats. </p><p>If a client needs to get the correlated positions of several voices?that is, to know exactly which sample of a particular voice is playing when a specified sample of another voice is playing?it must make the <strong>{{IXAudio2SourceVoice::GetState}}</strong> calls in an {{XAudio2}} engine callback. Doing this ensures that none of the voices advance while the calls are made.</p> <dd> <p>Pointer to a buffer context provided in the <strong>{{XAUDIO2_BUFFER}}</strong> that is processed currently, or, if the voice is stopped currently, to the next buffer due to be processed. <strong>pCurrentBufferContext</strong> is {{NULL}} if there are no buffers in the queue.</p> </dd> <dd> <p>Number of audio buffers currently queued on the voice, including the one that is processed currently.</p> </dd> <dd> <p>Total number of samples processed by this voice since it last started, or since the last audio stream ended (as marked with the {{XAUDIO2_END_OF_STREAM}} flag). This total includes samples played multiple times due to looping. Theoretically, if all audio emitted by the voice up to this time is captured, this parameter would be the length of the audio stream in samples. If you specify <strong>{{XAUDIO2_VOICE_NOSAMPLESPLAYED}}</strong> when you call <strong>{{IXAudio2SourceVoice::GetState}}</strong>, this member won't be calculated, and its value is unspecified on return from <strong>{{IXAudio2SourceVoice::GetState}}</strong>. <strong>{{IXAudio2SourceVoice::GetState}}</strong> takes about one-third as much time to complete when you specify <strong>{{XAUDIO2_VOICE_NOSAMPLESPLAYED}}</strong>. </p> </dd> <p>Contains performance information.</p> <p>{{CPU}} cycles are recorded using . Use to convert these values.</p> <dd> <p>{{CPU}} cycles spent on audio processing since the last call to the <strong>{{IXAudio2::StartEngine}}</strong> or <strong>{{IXAudio2::GetPerformanceData}}</strong> function.</p> </dd> <dd> <p>Total {{CPU}} cycles elapsed since the last call. </p> <strong>Note</strong>??This only counts cycles on the {{CPU}} on which {{XAudio2}} is running. ? </dd> <dd> <p>Fewest {{CPU}} cycles spent on processing any single audio quantum since the last call.</p> </dd> <dd> <p>Most {{CPU}} cycles spent on processing any single audio quantum since the last call.</p> </dd> <dd> <p>Total memory currently in use.</p> </dd> <dd> <p>Minimum delay that occurs between the time a sample is read from a source buffer and the time it reaches the speakers. </p> <table> <tr><th>Windows</th></tr> <tr><td>The delay reported is a variable value equal to the rough distance between the last sample submitted to the driver by {{XAudio2}} and the sample currently playing. The following factors can affect the delay: playing multichannel audio on a hardware-accelerated device; the type of audio device (WavePci, WaveCyclic, or WaveRT); and, to a lesser extent, audio hardware implementation. </td></tr> </table> <p>?</p> <table> <tr><th>Xbox 360</th></tr> <tr><td>The delay reported is a fixed value, which is normally 1,024 samples (21.333 ms at 48 kHz). If <strong>{{XOverrideSpeakerConfig}}</strong> has been called using the <strong>{{XAUDIOSPEAKERCONFIG_LOW_LATENCY}}</strong> flag, the delay reported is 512 samples (10.667 ms at 48 kHz). </td></tr> </table> <p>?</p> </dd> <dd> <p>Total audio dropouts since the engine started.</p> </dd> <dd> <p>Number of source voices currently playing. </p> </dd> <dd> <p>Total number of source voices currently in existence. </p> </dd> <dd> <p>Number of submix voices currently playing.</p> </dd> <dd> <p>Number of resampler xAPOs currently active.</p> </dd> <dd> <p>Number of matrix mix xAPOs currently active.</p> </dd> <dd> <table> <tr><th>Windows</th></tr> <tr><td>Unsupported.</td></tr> </table> <p>?</p> <table> <tr><th>Xbox 360</th></tr> <tr><td>Number of source voices decoding {{XMA}} data.</td></tr> </table> <p>?</p> </dd> <dd> <table> <tr><th>Windows</th></tr> <tr><td>Unsupported.</td></tr> </table> <p>?</p> <table> <tr><th>Xbox 360</th></tr> <tr><td>A voice can use more than one {{XMA}} stream.</td></tr> </table> <p>?</p> </dd> <p>Contains the new global debug configuration for {{XAudio2}}. Used with the <strong>SetDebugConfiguration</strong> function.</p> <p>Debugging messages can be completely turned off by initializing <strong>{{XAUDIO2_DEBUG_CONFIGURATION}}</strong> to all zeroes.</p><strong>Note</strong>??For this version of {{XAudio2}}, only the <strong>{{XAUDIO2_LOG_ERRORS}}</strong> value is supported on <strong>TraceMask</strong> or <strong>BreakMask</strong>. All other members and values are ignored.? <p>{{IXAudio2}} is the interface for the {{XAudio2}} object that manages all audio engine states, the audio processing thread, the voice graph, and so forth. </p><p>This is the only {{XAudio2}} interface that is derived from the {{COM}} <strong>{{IUnknown}}</strong> interface. It controls the lifetime of the {{XAudio2}} object using two methods derived from <strong>{{IUnknown}}</strong>: <strong>{{IXAudio2::AddRef}}</strong> and <strong>{{IXAudio2::Release}}</strong>. No other {{XAudio2}} objects are reference-counted; their lifetimes are explicitly controlled using <em>create</em> and <em>destroy</em> calls, and are bounded by the lifetime of the {{XAudio2}} object that owns them.</p> <p>The DirectX {{SDK}} versions of {{XAUDIO2}} included three member functions that are not present in the Windows 8 version: <strong>GetDeviceCount</strong>, <strong>GetDeviceDetails</strong>, and <strong>Initialize</strong>. These enumeration methods are no longer provided and standard Windows Audio {{APIs}} should be used for device enumeration instead.</p> <p>Adds an <strong>{{IXAudio2EngineCallback}}</strong> reference to the <strong>{{XAudio2}}</strong> engine callback list.</p> <p>This method can be called multiple times, allowing different components or layers of the same application to manage their own engine callback implementations separately. </p><p>It is invalid to call <strong>RegisterForCallbacks</strong> from within a callback (that is, <strong>{{IXAudio2EngineCallback}}</strong> or <strong>{{IXAudio2VoiceCallback}}</strong>). If <strong>RegisterForCallbacks</strong> is called within a callback, it returns {{XAUDIO2_E_INVALID_CALL}}. </p> <p>Returns {{S_OK}} if successful, an error code otherwise. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of {{XAudio2}} specific error codes.</p> <p>Removes an <strong>{{IXAudio2EngineCallback}}</strong> reference from the <strong>{{XAudio2}}</strong> engine callback list.</p> <p>It is invalid to call <strong>UnregisterForCallbacks</strong> from within a callback (that is, <strong>{{IXAudio2EngineCallback}}</strong> or <strong>{{IXAudio2VoiceCallback}}</strong>). </p> <p>This method does not return a value.</p> <p>Creates and configures a source voice.</p> <p>Source voices read audio data from the client. They process the data and send it to the {{XAudio2}} processing graph. </p><p>A source voice includes a variable-rate sample rate conversion, to convert data from the source format sample rate to the output rate required for the voice send list. If you use a {{NULL}} send list, the target sample rate will be the mastering voice's input sample rate. If you provide a single voice in pSendList, that voice's input sample rate is the target rate. If you provide multiple voices in the pSendList, all the source voice's output voices must be running at the same input sample rate. </p><p>You cannot create any source or submix voices until a mastering voice exists, and you cannot destory a mastering voice if any source or submix voices still exist. </p><p>Source voices are always processed before any submix or mastering voices. This means that you do not need a ProcessingStage parameter to control the processing order. </p><p>When first created, source voices are in the stopped state. </p><p>{{XAudio2}} uses an internal memory pooler for voices with the same format. This means memory allocation for voices will occur less frequently as more voices are created and then destroyed. To minimize just-in-time allocations, a title can create the anticipated maximum number of voices needed up front, and then delete them as necessary. Voices will then be reused from the {{XAudio2}} pool. The memory pool is tied to an {{XAudio2}} engine instance. You can reclaim all the memory used by an instance of the {{XAudio2}} engine by destroying the {{XAudio2}} object and recreating it as necessary (forcing the memory pool to grow via preallocation would have to be reapplied as needed). </p><p>It is invalid to call <strong>CreateSourceVoice</strong> from within a callback (that is, <strong>{{IXAudio2EngineCallback}}</strong> or <strong>{{IXAudio2VoiceCallback}}</strong>). If you call <strong>CreateSourceVoice</strong> within a callback, it returns {{XAUDIO2_E_INVALID_CALL}}. </p><p>The <strong>{{XAUDIO2_EFFECT_CHAIN}}</strong> that is passed in as the pEffectChain argument and any <strong>{{XAUDIO2_EFFECT_DESCRIPTOR}}</strong> information contained within it are no longer needed after <strong>CreateSourceVoice</strong> successfully completes, and may be deleted immediately after <strong>CreateSourceVoice</strong> is called. </p> <p>Returns {{S_OK}} if successful; otherwise, an error code. </p><p>See <strong>{{XAudio2}} Error Codes</strong> for descriptions of {{XAudio2}}-specific error codes.</p> <dd> <p>If successful, returns a reference to the new <strong>{{IXAudio2SourceVoice}}</strong> object.</p> </dd> <dd> <p>Pointer to a one of the structures in the table below. This structure contains the expected format for all audio buffers submitted to the source voice. {{XAudio2}} supports {{PCM}} and {{ADPCM}} voice types. </p> <table> <tr><th>Format tag</th><th>Wave format structure</th><th>Size (in bytes)</th></tr> <tr><td>{{WAVE_FORMAT_PCM}} (0x0001) </td><td> <strong>{{PCMWAVEFORMAT}}</strong> </td><td>16</td></tr> <tr><td>-or-</td><td> <strong>{{WAVEFORMATEX}}</strong> </td><td>18</td></tr> <tr><td>{{WAVE_FORMAT_IEEE_FLOAT}} (0x0003) [32-bit]</td><td> <strong>{{PCMWAVEFORMAT}}</strong> </td><td>18</td></tr> <tr><td>{{WAVE_FORMAT_ADPCM}} (0x0002) [{{MS}}-{{ADPCM}}]</td><td> <strong>{{ADPCMWAVEFORMAT}}</strong> </td><td>50</td></tr> <tr><td>{{WAVE_FORMAT_EXTENSIBLE}} (0xFFFE)</td><td> <strong>{{WAVEFORMATEXTENSIBLE}}</strong> </td><td>40</td></tr> </table> <p>?</p> <p>{{XAudio2}} supports the following {{PCM}} formats. </p> <ul> <li>8-bit (unsigned) integer {{PCM}} </li> <li>16-bit integer {{PCM}} (optimal format for {{XAudio2}}) </li> <li>20-bit integer {{PCM}} (either in 24 or 32 bit containers) </li> <li>24-bit integer {{PCM}} (either in 24 or 32 bit containers) </li> <li>32-bit integer {{PCM}} </li> <li>32-bit float {{PCM}} (preferred format after 16-bit integer) </li> </ul> <p>The number of channels in a source voice must be less than or equal to {{XAUDIO2_MAX_AUDIO_CHANNELS}}. The sample rate of a source voice must be between {{XAUDIO2_MIN_SAMPLE_RATE}} and {{XAUDIO2_MAX_SAMPLE_RATE}}.</p> <strong>Note</strong>??{{PCM}} data formats such as <strong>{{PCMWAVEFORMAT}}</strong> and <strong>{{ADPCMWAVEFORMAT}}</strong> that require more information than provided by <strong>{{WAVEFORMATEX}}</strong> have a <strong>{{WAVEFORMATEX}}</strong> structure as the first member in their format structures. When you create a source voice with one of those formats, cast the format's structure as a <strong>{{WAVEFORMATEX}}</strong> structure and use it as the value for <em>pSourceFormat</em>. ? </dd> <dd> <p>Flags that specify the behavior of the source voice. A flag can be 0 or a combination of one or more of the following:</p> <table> <tr><th>Value</th><th>Description</th></tr> <tr><td>{{XAUDIO2_VOICE_NOPITCH}}</td><td>No pitch control is available on the voice.?</td></tr> <tr><td>{{XAUDIO2_VOICE_NOSRC}}</td><td>No sample rate conversion is available on the voice. The voice's outputs must have the same sample rate.<strong>Note</strong>??The {{XAUDIO2_VOICE_NOSRC}} flag causes the voice to behave as though the {{XAUDIO2_VOICE_NOPITCH}} flag also is specified. ? </td></tr> <tr><td>{{XAUDIO2_VOICE_USEFILTER}}</td><td>The filter effect should be available on this voice.?</td></tr> </table> <p>?</p> <strong>Note</strong>??The {{XAUDIO2_VOICE_MUSIC}} flag is not supported on Windows. ? </dd> <dd> <p>Highest allowable frequency ratio that can be set on this voice. The value for this argument must be between {{XAUDIO2_MIN_FREQ_RATIO}} and {{XAUDIO2_MAX_FREQ_RATIO}}. Subsequent calls to <strong>{{IXAudio2SourceVoice::SetFrequencyRatio}}</strong> are clamped between {{XAUDIO2_MIN_FREQ_RATIO}} and <strong>MaxFrequencyRatio</strong>. The maximum value for this argument is defined as {{XAUDIO2_MAX_FREQ_RATIO}}, which allows pitch to be raised by up to 10 octaves. </p> <p>If <em>MaxFrequencyRatio</em> is less than 1.0, the voice will use that ratio immediately after being created (rather than the default of 1.0). </p> <p> </p><table> <tr><th>Xbox 360</th></tr> <tr><td>For {{XMA}} voices, there is one more restriction on the <em>MaxFrequencyRatio</em> argument and the voice's sample rate. The product of these two numbers cannot exceed {{XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MONO}} for one-channel voices or {{XAUDIO2_MAX_RATIO_TIMES_RATE_XMA_MULTICHANNEL}} for voices with any other number of channels. If the value specified for <em>MaxFrequencyRatio</em> is too high for the specified format, the call to <strong>CreateSourceVoice</strong> fails and produces a debug message. </td></tr> </table> <p>?</p> <strong>Note</strong>??You can use the lowest possible <em>MaxFrequencyRatio</em> value to reduce {{XAudio2}}'s memory usage. ? </dd> <dd> <p>Pointer to a client-provided callback interface, <strong>{{IXAudio2VoiceCallback}}</strong>.</p> </dd> <dd> <p>Pointer to a list of <strong>{{XAUDIO2_VOICE_SENDS}}</strong> structures that describe the set of destination voices for the source voice. If pSendList is {{NULL}}, the send list defaults to a single output to the first mastering voice created.</p> </dd> <dd> <p>Pointer to a list of <strong>{{XAUDIO2_EFFECT_CHAIN}}</strong> structures that describe an effect chain to use in the source voice.</p> </dd> <p>Creates and configures a submix voice.</p> <p>Submix voices receive the output of one or more source or submix voices. They process the output, and then send it to another submix voice or to a mastering voice. </p><p>A submix voice performs a sample rate conversion from the input sample rate to the input rate of its output voices in <em>pSendList</em>. If you specify multiple voice sends, they must all have the input same sample rate. </p><p>You cannot create any source or submix voices until a mastering voice exists, and you cannot destroy a mastering voice if any source or submix voices still exist. </p><p>When first created, submix voices are in the started state. </p><p>{{XAudio2}} uses an internal memory pooler for voices with the same format. This means that memory allocation for voices will occur less frequently as more voices are created and then destroyed. To minimize just-in-time allocations, a title can create the anticipated maximum number of voices needed up front, and then delete them as necessary. Voices will then be reused from the {{XAudio2}} pool. The memory pool is tied to an {{XAudio2}} engine instance. You can reclaim all the memory used by an instance of the {{XAudio2}} engine by destroying the {{XAudio2}} object and recreating it as necessary (forcing the memory pool to grow via preallocation would have to be reapplied as needed). </p><p>It is invalid to call <strong>CreateSubmixVoice</strong> from within a callback (that is, <strong>{{IXAudio2EngineCallback}}</strong> or <strong>{{IXAudio2VoiceCallback}}</strong>). If you call <strong>CreateSubmixVoice</strong> within a callback, it returns {{XAUDIO2_E_INVALID_CALL}}. </p><p>The <strong>{{XAUDIO2_EFFECT_CHAIN}}</strong> that is passed in as the <em>pEffectChain</em> argument and any <strong>{{XAUDIO2_EFFECT_DESCRIPTOR}}</strong> information contained within it are no longer needed after <strong>CreateSubmixVoice</strong> successfully completes, and may be deleted immediately after <strong>CreateSubmixVoice</strong> is called.</p> <p>Returns {{S_OK}} if successful; otherwise, an error code. </p><p>See <strong>{{XAudio2}} Error Codes</strong> for descriptions of {{XAudio2}} specific error codes. </p> <dd> <p>On success, returns a reference to the new <strong>{{IXAudio2SubmixVoice}}</strong> object.</p> </dd> <dd> <p>Number of channels in the input audio data of the submix voice. <em>InputChannels</em> must be less than or equal to {{XAUDIO2_MAX_AUDIO_CHANNELS}}. </p> </dd> <dd> <p>Sample rate of the input audio data of submix voice. This rate must be a multiple of {{XAUDIO2_QUANTUM_DENOMINATOR}}. <em>InputSampleRate</em> must be between {{XAUDIO2_MIN_SAMPLE_RATE}} and {{XAUDIO2_MAX_SAMPLE_RATE}}. </p> </dd> <dd> <p>Flags that specify the behavior of the submix voice. It can be 0 or the following:</p> <table> <tr><th>Value</th><th>Description</th></tr> <tr><td>{{XAUDIO2_VOICE_USEFILTER}}</td><td>The filter effect should be available on this voice.</td></tr> </table> <p>?</p> </dd> <dd> <p>An arbitrary number that specifies when this voice is processed with respect to other submix voices, if the {{XAudio2}} engine is running other submix voices. The voice is processed after all other voices that include a smaller <em>ProcessingStage</em> value and before all other voices that include a larger <em>ProcessingStage</em> value. Voices that include the same <em>ProcessingStage</em> value are processed in any order. A submix voice cannot send to another submix voice with a lower or equal <em>ProcessingStage</em> value. This prevents audio being lost due to a submix cycle. </p> </dd> <dd> <p>Pointer to a list of <strong>{{XAUDIO2_VOICE_SENDS}}</strong> structures that describe the set of destination voices for the submix voice. If <em>pSendList</em> is {{NULL}}, the send list will default to a single output to the first mastering voice created.</p> </dd> <dd> <p>Pointer to a list of <strong>{{XAUDIO2_EFFECT_CHAIN}}</strong> structures that describe an effect chain to use in the submix voice. </p> </dd> <p>Creates and configures a mastering voice.</p> <p>Mastering voices receive the output of one or more source or submix voices. They process the data, and send it to the audio output device. </p><p>Typically, you should create a mastering voice with an input sample rate that will be used by the majority of the title's audio content. The mastering voice performs a sample rate conversion from this input sample rate to the actual device output rate. </p><p>You cannot create a source or submix voices until a mastering voice exists. You cannot destroy a mastering voice if any source or submix voices still exist. </p><p>Mastering voices are always processed after all source and submix voices. This means that you need not specify a <em>ProcessingStage</em> parameter to control the processing order. </p><p>{{XAudio2}} only allows one mastering voice to exist at once. If you attempt to create more than one voice, {{XAUDIO2_E_INVALID_CALL}} is returned. If an additional mastering voice is needed, for example for an output device with a different audio category set, you will need to create an additional {{XAudio2}} instance. </p><p>When first created, mastering voices are in the started state. </p><p>It is invalid to call <strong>CreateMasteringVoice</strong> from within a callback (that is, <strong>{{IXAudio2EngineCallback}}</strong> or <strong>{{IXAudio2VoiceCallback}}</strong>). If you call <strong>CreateMasteringVoice</strong> within a callback, it returns {{XAUDIO2_E_INVALID_CALL}}. </p><p>The <strong>{{XAUDIO2_EFFECT_CHAIN}}</strong> that is passed in as the pEffectChain argument and any <strong>{{XAUDIO2_EFFECT_DESCRIPTOR}}</strong> information contained within it are no longer needed after <strong>CreateMasteringVoice</strong> successfully completes, and may be deleted immediately after <strong>CreateMasteringVoice</strong> is called. </p><p>Note that the DirectX {{SDK}} {{XAUDIO2}} version of <strong>CreateMasteringVoice</strong> took a DeviceIndex argument instead of a szDeviceId and a StreamCategory argument. This reflects the changes needed for the standard Windows device enumeration model.</p> <p>Returns {{S_OK}} if successful; otherwise, an error code. Returns {{ERROR_NOT_FOUND}} if no default audio device exists and {{NULL}} is passed in as the szDeviceId parameter. </p><p>See <strong>{{XAudio2}} Error Codes</strong> for descriptions of {{XAudio2}} specific error codes. </p> <dd> <p> If successful, returns a reference to the new <strong>{{IXAudio2MasteringVoice}}</strong> object.</p> </dd> <dd> <p>Number of channels the mastering voice expects in its input audio. <em>InputChannels</em> must be less than or equal to {{XAUDIO2_MAX_AUDIO_CHANNELS}}. </p> <p>You can set <em>InputChannels</em> to {{XAUDIO2_DEFAULT_CHANNELS}}, which causes {{XAudio2}} to try to detect the system speaker configuration setup. </p> </dd> <dd> <p>Sample rate of the input audio data of the mastering voice. This rate must be a multiple of {{XAUDIO2_QUANTUM_DENOMINATOR}}. <em>InputSampleRate</em> must be between {{XAUDIO2_MIN_SAMPLE_RATE}} and {{XAUDIO2_MAX_SAMPLE_RATE}}. </p> <p>You can set <em>InputSampleRate</em> to {{XAUDIO2_DEFAULT_SAMPLERATE}}, with the default being determined by the current platform. </p> <p>Windows {{XP}} defaults to 44100. </p> <p>Windows Vista and Windows 7 default to the setting specified in the Sound Control Panel. The default for this setting is 44100 (or 48000 if required by the driver). Flags </p> </dd> <dd> <p> Flags that specify the behavior of the mastering voice. Must be 0.</p> </dd> <dd> <p>Identifier of the device to receive the output audio. Specifying the default value of {{NULL}} causes {{XAudio2}} to select the global default audio device.</p> </dd> <dd> <p>Pointer to an <strong>{{XAUDIO2_EFFECT_CHAIN}}</strong> structure that describes an effect chain to use in the mastering voice, or {{NULL}} to use no effects.</p> </dd> <dd> <p>The audio stream category to use for this mastering voice.</p> </dd> <p>Starts the audio processing thread.</p> <p>After <strong>StartEngine</strong> is called, all started voices begin to consume audio. All enabled effects start running, and the resulting audio is sent to any connected output devices. When {{XAudio2}} is first initialized, the engine is already in the started state. </p><p>It is invalid to call <strong>StartEngine</strong> from within a callback (that is, <strong>{{IXAudio2EngineCallback}}</strong> or <strong>{{IXAudio2VoiceCallback}}</strong>). If <strong>StartEngine</strong> is called within a callback, it returns {{XAUDIO2_E_INVALID_CALL}}. </p> <p>Returns {{S_OK}} if successful, an error code otherwise. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of {{XAudio2}} specific error codes. </p> <p>Stops the audio processing thread.</p> <p>When <strong>StopEngine</strong> is called, all output is stopped immediately. However, the audio graph is left untouched, preserving effect parameters, effect histories (for example, the data stored by a reverb effect in order to emit echoes of a previous sound), voice states, pending source buffers, cursor positions, and so forth. When the engine is restarted, the resulting audio output will be identical?apart from a period of silence?to the output that would have been produced if the engine had never been stopped. </p><p>It is invalid to call <strong>StopEngine</strong> from within a callback (that is, <strong>{{IXAudio2EngineCallback}}</strong> or <strong>{{IXAudio2VoiceCallback}}</strong>).</p> <p>This method does not return a value.</p> <p>Atomically applies a set of operations that are tagged with a given identifier.</p> <p><strong>CommitChanges</strong> does nothing if no operations are tagged with the given identifier. </p><p>See the {{XAudio2}} Operation Sets overview about working with <strong>CommitChanges</strong> and {{XAudio2}} interface methods that may be deferred. </p> <p>Returns {{S_OK}} if successful; returns an error code otherwise. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of {{XAudio2}} specific error codes.</p> <dd> <p>Identifier of the set of operations to be applied. To commit all pending operations, pass <strong>{{XAUDIO2_COMMIT_ALL}}</strong>. </p> </dd> <p>Returns current resource usage details, such as available memory or {{CPU}} usage.</p> <p>For specific information on the statistics returned by <strong>GetPerformanceData</strong>, see the <strong>{{XAUDIO2_PERFORMANCE_DATA}}</strong> structure reference. </p> <p>This method does not return a value.</p> <dd> <p>On success, reference to an <strong>{{XAUDIO2_PERFORMANCE_DATA}}</strong> structure that is returned. </p> </dd> <p>Changes global debug logging options for {{XAudio2}}.</p> <p>SetDebugConfiguration sets the debug configuration for the given instance of {{XAudio2}} engine. See <strong>{{XAUDIO2_DEBUG_CONFIGURATION}}</strong> Structure for supported debug options. By default, {{XAudio2}} does not log debug output or break on errors. </p> <p>This method does not return a value.</p> <dd> <p>Pointer to a <strong>{{XAUDIO2_DEBUG_CONFIGURATION}}</strong> structure that contains the new debug configuration.</p> </dd> <dd> <p>This parameter is reserved and must be {{NULL}}.</p> </dd> <p><strong>{{IXAudio2Voice}}</strong> represents the base interface from which <strong>{{IXAudio2SourceVoice}}</strong>, <strong>{{IXAudio2SubmixVoice}}</strong> and <strong>{{IXAudio2MasteringVoice}}</strong> are derived. The methods listed below are common to all voice subclasses.</p><ul> <li>{{Methods}}</li> </ul> <p>Returns information about the creation flags, input channels, and sample rate of a voice.</p> <p>This method does not return a value.</p> <dd> <p> <strong>{{XAUDIO2_VOICE_DETAILS}}</strong> structure containing information about the voice.</p> </dd> <p>Designates a new set of submix or mastering voices to receive the output of the voice.</p> <p>This method is only valid for source and submix voices. Mastering voices can not send audio to another voice. </p><p>After calling <strong>SetOutputVoices</strong> a voice's current send levels will be replaced by a default send matrix. The <strong>{{IXAudio2Voice::SetOutputMatrix}}</strong> method must be called to set a custom matrix for the new sendlist. </p><p>It is invalid to call <strong>SetOutputVoices</strong> from within a callback (that is, <strong>{{IXAudio2EngineCallback}}</strong> or <strong>{{IXAudio2VoiceCallback}}</strong>). If <strong>SetOutputVoices</strong> is called within a callback, it returns {{XAUDIO2_E_INVALID_CALL}}.</p><strong>Note</strong>??Calling <strong>SetOutputVoices</strong> invalidates any send matrices previously set with <strong>{{IXAudio2Voice::SetOutputMatrix}}</strong>.? <p>Returns {{S_OK}} if successful, an error code otherwise. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of {{XAudio2}} specific error codes. </p> <dd> <p>Array of <strong>{{XAUDIO2_VOICE_SENDS}}</strong> structure references to destination voices. If <em>pSendList</em> is {{NULL}}, the voice will send its output to the current mastering voice. To set the voice to not send its output anywhere set the <strong>OutputCount</strong> member of <strong>{{XAUDIO2_VOICE_SENDS}}</strong> to 0. All of the voices in a send list must have the same input sample rate, see {{XAudio2}} Sample Rate Conversions for additional information.</p> </dd> <p>Replaces the effect chain of the voice.</p> <p>The number of output channels allowed for a voice's effect chain is locked at creation of the voice. If you create the voice with an effect chain, any new effect chain passed to <strong>SetEffectChain</strong> must have the same number of input and output channels as the original effect chain. If you create the voice without an effect chain, the number of output channels allowed for the effect chain will default to the number of input channels for the voice. If any part of effect chain creation fails, none of it is applied. </p><p>After you attach an effect to an {{XAudio2}} voice, {{XAudio2}} takes control of the effect, and the client should not make any further calls to it. The simplest way to ensure this is to release all references to the effect. </p><p>It is invalid to call <strong>SetEffectChain</strong> from within a callback (that is, <strong>{{IXAudio2EngineCallback}}</strong> or <strong>{{IXAudio2VoiceCallback}}</strong>). If you call <strong>SetEffectChain</strong> within a callback, it returns {{XAUDIO2_E_INVALID_CALL}}. </p><p>The <strong>{{XAUDIO2_EFFECT_CHAIN}}</strong> that is passed in as the pEffectChain argument and any <strong>{{XAUDIO2_EFFECT_DESCRIPTOR}}</strong> information contained within it are no longer needed after <strong>SetEffectChain</strong> successfully completes, and may be deleted immediately after <strong>SetEffectChain</strong> is called.</p> <p>Returns {{S_OK}} if successful; otherwise, an error code. </p><p>See <strong>{{XAudio2}} Error Codes</strong> for descriptions of {{XAudio2}} specific error codes.</p> <dd> <p>Pointer to an <strong>{{XAUDIO2_EFFECT_CHAIN}}</strong> structure that describes the new effect chain to use. If {{NULL}} is passed, the current effect chain is removed.</p> <strong>Note</strong>??If <em>pEffectChain</em> is non-{{NULL}}, the <strong>{{XAUDIO2_EFFECT_CHAIN}}</strong> structure that it points to must specify at least one effect. ? </dd> <p>Enables the effect at a given position in the effect chain of the voice.</p> <p>Be careful when you enable an effect while the voice that hosts it is running. Such an action can result in a problem if the effect significantly changes the audio's pitch or volume. </p><p>The effects in a given {{XAudio2}} voice's effect chain must consume and produce audio at that voice's processing sample rate. The only aspect of the audio format they can change is the channel count. For example a reverb effect can convert mono data to 5.1. The client can use the <strong>{{XAUDIO2_EFFECT_DESCRIPTOR}}</strong> structure's <strong>OutputChannels</strong> field to specify the number of channels it wants each effect to produce. Each effect in an effect chain must produce a number of channels that the next effect can consume. Any calls to <strong>{{IXAudio2Voice::EnableEffect}}</strong> or <strong>{{IXAudio2Voice::DisableEffect}}</strong> that would make the effect chain stop fulfilling these requirements will fail. </p><p><strong>EnableEffect</strong> takes effect immediately when you call it from an {{XAudio2}} callback with an <em>OperationSet</em> of <strong>{{XAUDIO2_COMMIT_NOW}}</strong>.</p> <p>Returns {{S_OK}} if successful; otherwise, an error code. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of error codes. </p> <dd> <p>Zero-based index of an effect in the effect chain of the voice.</p> </dd> <dd> <p>Identifies this call as part of a deferred batch. See the {{XAudio2}} Operation Sets overview for more information. </p> </dd> <p>Disables the effect at a given position in the effect chain of the voice.</p> <p>The effects in a given {{XAudio2}} voice's effect chain must consume and produce audio at that voice's processing sample rate. The only aspect of the audio format they can change is the channel count. For example a reverb effect can convert mono data to 5.1. The client can use the <strong>{{XAUDIO2_EFFECT_DESCRIPTOR}}</strong> structure's <strong>OutputChannels</strong> field to specify the number of channels it wants each effect to produce. Each effect in an effect chain must produce a number of channels that the next effect can consume. Any calls to <strong>{{IXAudio2Voice::EnableEffect}}</strong> or <strong>{{IXAudio2Voice::DisableEffect}}</strong> that would make the effect chain stop fulfilling these requirements will fail. </p><p>Disabling an effect immediately removes it from the processing graph. Any pending audio in the effect?such as a reverb tail?is not played. Be careful disabling an effect while the voice that hosts it is running. This can result in an audible artifact if the effect significantly changes the audio's pitch or volume. </p><p><strong>DisableEffect</strong> takes effect immediately when called from an {{XAudio2}} callback with an <em>OperationSet</em> of <strong>{{XAUDIO2_COMMIT_NOW}}</strong>. </p> <p>Returns {{S_OK}} if successful; otherwise, an error code. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of valid error codes.</p> <dd> <p>Zero-based index of an effect in the effect chain of the voice.</p> </dd> <dd> <p>Identifies this call as part of a deferred batch. See the {{XAudio2}} Operation Sets overview for more information. </p> </dd> <p>Returns the running state of the effect at a specified position in the effect chain of the voice.</p> <p><strong>GetEffectState</strong> always returns the effect's actual current state. However, this may not be the state set by the most recent <strong>{{IXAudio2Voice::EnableEffect}}</strong> or <strong>{{IXAudio2Voice::DisableEffect}}</strong> call: the actual state is only changed the next time the audio engine runs after the <strong>{{IXAudio2Voice::EnableEffect}}</strong> or <strong>{{IXAudio2Voice::DisableEffect}}</strong> call (or after the corresponding <strong>{{IXAudio2::CommitChanges}}</strong> call, if EnableEffect/DisableEffect was called with a deferred operation {{ID}}).</p> <p>This method does not return a value.</p> <dd> <p>Zero-based index of an effect in the effect chain of the voice.</p> </dd> <dd> <p>Returns {{TRUE}} If the effect is enabled. If the effect is disabled, returns {{FALSE}}.</p> </dd> <p>Sets parameters for a given effect in the voice's effect chain.</p> <p>The specific effect being used determines the valid size and format of the <em>pParameters</em> buffer. The call will fail if <em>pParameters</em> is invalid or if <em>ParametersByteSize</em> is not exactly the size that the effect expects. The client must take care to direct the <strong>SetEffectParameters</strong> call to the right effect. If this call is directed to a different effect that happens to accept the same parameter block size, the parameters will be interpreted differently. This may lead to unexpected results. </p><p>The memory pointed to by <em>pParameters</em> must <em>not</em> be freed immediately, because {{XAudio2}} will need to refer to it later when the parameters actually are applied to the effect. This happens during the next audio processing pass if the <em>OperationSet</em> argument is <strong>{{XAUDIO2_COMMIT_NOW}}</strong>. Otherwise, the parameters are applied to the effect later, during the first processing pass after the <strong>{{IXAudio2::CommitChanges}}</strong> function is called with the same <em>OperationSet</em> argument. </p><p><strong>SetEffectParameters</strong> takes effect immediately when called from an {{XAudio2}} callback with an <em>OperationSet</em> of <strong>{{XAUDIO2_COMMIT_NOW}}</strong>. </p><strong>Note</strong>??<strong>{{IXAudio2Voice::GetEffectParameters}}</strong> always returns the effect's actual current parameters. However, these may not match the parameters set by the most recent call to <strong>{{IXAudio2Voice::SetEffectParameters}}</strong>. The actual parameters are only changed the next time the audio engine runs after the <strong>{{IXAudio2Voice::SetEffectParameters}}</strong> call (or after the corresponding <strong>{{IXAudio2::CommitChanges}}</strong> call, if <strong>{{IXAudio2Voice::SetEffectParameters}}</strong> was called with a deferred operation {{ID}}).? <p>Returns {{S_OK}} if successful; otherwise, an error code. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of error codes. </p><p>Fails with {{E_NOTIMPL}} if the effect does not support a generic parameter control interface. </p> <dd> <p>Zero-based index of an effect within the voice's effect chain.</p> </dd> <dd> <p> Returns the current values of the effect-specific parameters.</p> </dd> <dd> <p> Size of the <strong>pParameters</strong> array in bytes.</p> </dd> <dd> <p>Identifies this call as part of a deferred batch. See the {{XAudio2}} Operation Sets overview for more information.</p> </dd> <p>Returns the current effect-specific parameters of a given effect in the voice's effect chain.</p> <p><strong>GetEffectParameters</strong> always returns the effect's actual current parameters. However, these may not match the parameters set by the most recent call to <strong>{{IXAudio2Voice::SetEffectParameters}}</strong>: the actual parameters are only changed the next time the audio engine runs after the <strong>{{IXAudio2Voice::SetEffectParameters}}</strong> call (or after the corresponding <strong>{{IXAudio2::CommitChanges}}</strong> call, if <strong>{{IXAudio2Voice::SetEffectParameters}}</strong> was called with a deferred operation {{ID}}). </p> <p>Returns {{S_OK}} if successful, an error code otherwise. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of error codes. </p><p>Fails with {{E_NOTIMPL}} if the effect does not support a generic parameter control interface.</p> <dd> <p>Zero-based index of an effect within the voice's effect chain.</p> </dd> <dd> <p>Returns the current values of the effect-specific parameters.</p> </dd> <dd> <p>Size, in bytes, of the pParameters array.</p> </dd> <p>Sets the voice's filter parameters.</p> <p><strong>SetFilterParameters</strong> will fail if the voice was not created with the {{XAUDIO2_VOICE_USEFILTER}} flag. </p><p>This method is usable only on source and submix voices and has no effect on mastering voices.</p><strong>Note</strong>??<strong>{{IXAudio2Voice::GetFilterParameters}}</strong> always returns this voice's actual current filter parameters. However, these may not match the parameters set by the most recent <strong>{{IXAudio2Voice::SetFilterParameters}}</strong> call: the actual parameters are only changed the next time the audio engine runs after the <strong>{{IXAudio2Voice::SetFilterParameters}}</strong> call (or after the corresponding <strong>{{IXAudio2::CommitChanges}}</strong> call, if <strong>{{IXAudio2Voice::SetFilterParameters}}</strong> was called with a deferred operation {{ID}}).? <p>Returns {{S_OK}} if successful, an error code otherwise. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of error codes. </p> <dd> <p>Pointer to an <strong>{{XAUDIO2_FILTER_PARAMETERS}}</strong> structure containing the filter information. </p> </dd> <dd> <p>Identifies this call as part of a deferred batch. See the {{XAudio2}} Operation Sets overview for more information.</p> </dd> <p>Gets the voice's filter parameters.</p> <p><strong>GetFilterParameters</strong> will fail if the voice was not created with the {{XAUDIO2_VOICE_USEFILTER}} flag. </p><p><strong>GetFilterParameters</strong> always returns this voice's actual current filter parameters. However, these may not match the parameters set by the most recent <strong>{{IXAudio2Voice::SetFilterParameters}}</strong> call: the actual parameters are only changed the next time the audio engine runs after the <strong>{{IXAudio2Voice::SetFilterParameters}}</strong> call (or after the corresponding <strong>{{IXAudio2::CommitChanges}}</strong> call, if <strong>{{IXAudio2Voice::SetFilterParameters}}</strong> was called with a deferred operation {{ID}}). </p><strong>Note</strong>??<strong>GetFilterParameters</strong> is usable only on source and submix voices and has no effect on mastering voices.? <p>This method does not return a value.</p> <dd> <p>Pointer to an <strong>{{XAUDIO2_FILTER_PARAMETERS}}</strong> structure containing the filter information. </p> </dd> <p>Sets the filter parameters on one of this voice's sends.</p> <p><strong>SetOutputFilterParameters</strong> will fail if the send was not created with the {{XAUDIO2_SEND_USEFILTER}} flag. This method is usable only on sends belonging to source and submix voices and has no effect on a mastering voice's sends. </p><strong>Note</strong>??<strong>{{IXAudio2Voice::GetOutputFilterParameters}}</strong> always returns this send?s actual current filter parameters. However, these may not match the parameters set by the most recent <strong>{{IXAudio2Voice::SetOutputFilterParameters}}</strong> call: the actual parameters are only changed the next time the audio engine runs after the <strong>{{IXAudio2Voice::SetOutputFilterParameters}}</strong> call (or after the corresponding <strong>{{IXAudio2::CommitChanges}}</strong> call, if <strong>{{IXAudio2Voice::SetOutputFilterParameters}}</strong> was called with a deferred operation {{ID}}).? <p>Returns {{S_OK}} if successful, an error code otherwise. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of error codes. </p> <dd> <p> <strong>{{IXAudio2Voice}}</strong> reference to the destination voice of the send whose filter parameters will be set.</p> </dd> <dd> <p> Pointer to an <strong>{{XAUDIO2_FILTER_PARAMETERS}}</strong> structure containing the filter information.</p> </dd> <dd> <p>Identifies this call as part of a deferred batch. See the {{XAudio2}} Operation Sets overview for more information.</p> </dd> <p>Returns the filter parameters from one of this voice's sends.</p> <p><strong>GetOutputFilterParameters</strong> will fail if the send was not created with the {{XAUDIO2_SEND_USEFILTER}} flag. This method is usable only on sends belonging to source and submix voices and has no effect on mastering voices? sends. </p><strong>Note</strong>??<strong>{{IXAudio2Voice::GetOutputFilterParameters}}</strong> always returns this send?s actual current filter parameters. However, these may not match the parameters set by the most recent <strong>{{IXAudio2Voice::SetOutputFilterParameters}}</strong> call: the actual parameters are only changed the next time the audio engine runs after the <strong>{{IXAudio2Voice::SetOutputFilterParameters}}</strong> call (or after the corresponding <strong>{{IXAudio2::CommitChanges}}</strong> call, if <strong>{{IXAudio2Voice::SetOutputFilterParameters}}</strong> was called with a deferred operation {{ID}}).? <p>This method does not return a value.</p> <dd> <p> <strong>{{IXAudio2Voice}}</strong> reference to the destination voice of the send whose filter parameters will be read.</p> </dd> <dd> <p>Pointer to an <strong>{{XAUDIO2_FILTER_PARAMETERS}}</strong> structure containing the filter information.</p> </dd> <p>Sets the overall volume level for the voice.</p> <p><strong>SetVolume</strong> controls a voice's master input volume level. The master volume level is applied at different times depending on the type of voice. For submix and mastering voices the volume level is applied just before the voice's built in filter and effect chain is applied. For source voices the master volume level is applied after the voice's filter and effect chain is applied. </p><p>Volume levels are expressed as floating-point amplitude multipliers between -{{XAUDIO2_MAX_VOLUME_LEVEL}} and {{XAUDIO2_MAX_VOLUME_LEVEL}} (-2?? to 2??), with a maximum gain of 144.5 dB. A volume level of 1.0 means there is no attenuation or gain and 0 means silence. Negative levels can be used to invert the audio's phase. See {{XAudio2}} Volume and Pitch Control for additional information on volume control. </p><strong>Note</strong>??<strong>{{IXAudio2Voice::GetVolume}}</strong> always returns the volume most recently set by <strong>{{IXAudio2Voice::SetVolume}}</strong>. However, it may not actually be in effect yet: it only takes effect the next time the audio engine runs after the <strong>{{IXAudio2Voice::SetVolume}}</strong> call (or after the corresponding <strong>{{IXAudio2::CommitChanges}}</strong> call, if <strong>{{IXAudio2Voice::SetVolume}}</strong> was called with a deferred operation {{ID}}).? <p>Returns {{S_OK}} if successful, an error code otherwise. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of error codes.</p> <dd> <p>Overall volume level to use. See Remarks for more information on volume levels. </p> </dd> <dd> <p> Identifies this call as part of a deferred batch. See the {{XAudio2}} Operation Sets overview for more information. </p> </dd> <p>Sets the overall volume level for the voice.</p> <p><strong>SetVolume</strong> controls a voice's master input volume level. The master volume level is applied at different times depending on the type of voice. For submix and mastering voices the volume level is applied just before the voice's built in filter and effect chain is applied. For source voices the master volume level is applied after the voice's filter and effect chain is applied. </p><p>Volume levels are expressed as floating-point amplitude multipliers between -{{XAUDIO2_MAX_VOLUME_LEVEL}} and {{XAUDIO2_MAX_VOLUME_LEVEL}} (-2?? to 2??), with a maximum gain of 144.5 dB. A volume level of 1.0 means there is no attenuation or gain and 0 means silence. Negative levels can be used to invert the audio's phase. See {{XAudio2}} Volume and Pitch Control for additional information on volume control. </p><strong>Note</strong>??<strong>{{IXAudio2Voice::GetVolume}}</strong> always returns the volume most recently set by <strong>{{IXAudio2Voice::SetVolume}}</strong>. However, it may not actually be in effect yet: it only takes effect the next time the audio engine runs after the <strong>{{IXAudio2Voice::SetVolume}}</strong> call (or after the corresponding <strong>{{IXAudio2::CommitChanges}}</strong> call, if <strong>{{IXAudio2Voice::SetVolume}}</strong> was called with a deferred operation {{ID}}).? <p>Returns {{S_OK}} if successful, an error code otherwise. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of error codes.</p> <dd> <p>Overall volume level to use. See Remarks for more information on volume levels. </p> </dd> <dd> <p> Identifies this call as part of a deferred batch. See the {{XAudio2}} Operation Sets overview for more information. </p> </dd> <p>Writes a number of 32-bit immediate values to the specified buffer locations directly from the command stream.</p> <p><strong>WriteBufferImmediate</strong> performs <em>Count</em> number of 32-bit writes: one for each value and destination specified in <em>pParams</em>.</p><p>The receiving buffer (resource) must be in the <strong>{{D3D12_RESOURCE_STATE_COPY_DEST}}</strong> state to be a valid destination for <strong>WriteBufferImmediate</strong>.</p> <p>This method does not return a value.</p> <dd> <p>The number of <strong>{{D3D12_WRITEBUFFERIMMEDIATE_PARAMETER}}</strong> structures that are pointed to by <em>pParams</em> and <em>pModes</em>.</p> </dd> <dd> <p>The address of an array containing a number of <strong>{{D3D12_WRITEBUFFERIMMEDIATE_PARAMETER}}</strong> structures equal to <em>Count</em>.</p> </dd> <dd> <p>The address of an array containing a number of <strong>{{D3D12_WRITEBUFFERIMMEDIATE_MODE}}</strong> structures equal to <em>Count</em>. The default value is <strong>null</strong>; passing <strong>null</strong> causes the system to write all immediate values using <strong>{{D3D12_WRITEBUFFERIMMEDIATE_MODE_DEFAULT}}</strong>.</p> </dd> <p>Sets the volume levels for the voice, per channel.</p> <p><strong>SetChannelVolumes</strong> controls a voice's per-channel output levels and is applied just after the voice's final {{SRC}} and before its sends. </p><p>This method is valid only for source and submix voices, because mastering voices do not specify volume per channel. </p><p>Volume levels are expressed as floating-point amplitude multipliers between -{{XAUDIO2_MAX_VOLUME_LEVEL}} and {{XAUDIO2_MAX_VOLUME_LEVEL}} (-2?? to 2??), with a maximum gain of 144.5 dB. A volume of 1 means there is no attenuation or gain and 0 means silence. Negative levels can be used to invert the audio's phase. See {{XAudio2}} Volume and Pitch Control for additional information on volume control. </p><strong>Note</strong>??<strong>{{IXAudio2Voice::GetChannelVolumes}}</strong> always returns the volume levels most recently set by <strong>{{IXAudio2Voice::SetChannelVolumes}}</strong>. However, those values may not actually be in effect yet: they only take effect the next time the audio engine runs after the <strong>{{IXAudio2Voice::SetChannelVolumes}}</strong> call (or after the corresponding <strong>{{IXAudio2::CommitChanges}}</strong> call, if <strong>{{IXAudio2Voice::SetChannelVolumes}}</strong> was called with a deferred operation {{ID}}).? <p>Returns {{S_OK}} if successful, an error code otherwise. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of {{XAudio2}} specific error codes.</p> <dd> <p>Number of channels in the voice.</p> </dd> <dd> <p>Array containing the new volumes of each channel in the voice. The array must have <em>Channels</em> elements. See Remarks for more information on volume levels.</p> </dd> <dd> <p>Identifies this call as part of a deferred batch. See the {{XAudio2}} Operation Sets overview for more information.</p> </dd> <p>Returns the volume levels for the voice, per channel.</p> <p>These settings are applied after the effect chain is applied. This method is valid only for source and submix voices, because mastering voices do not specify volume per channel. </p><p>Volume levels are expressed as floating-point amplitude multipliers between -2?? to 2??, with a maximum gain of 144.5 dB. A volume of 1 means there is no attenuation or gain, 0 means silence, and negative levels can be used to invert the audio's phase. See {{XAudio2}} Volume and Pitch Control for additional information on volume control. </p><strong>Note</strong>??<strong>GetChannelVolumes</strong> always returns the volume levels most recently set by <strong>{{IXAudio2Voice::SetChannelVolumes}}</strong>. However, those values may not actually be in effect yet: they only take effect the next time the audio engine runs after the <strong>{{IXAudio2Voice::SetChannelVolumes}}</strong> call (or after the corresponding <strong>{{IXAudio2::CommitChanges}}</strong> call, if <strong>{{IXAudio2Voice::SetChannelVolumes}}</strong> was called with a deferred operation {{ID}}).? <p>This method does not return a value.</p> <dd> <p>Confirms the channel count of the voice.</p> </dd> <dd> <p>Returns the current volume level of each channel in the voice. The array must have at least <em>Channels</em> elements. See Remarks for more information on volume levels.</p> </dd> <p>Sets the volume level of each channel of the final output for the voice. These channels are mapped to the input channels of a specified destination voice.</p> <p>This method is valid only for source and submix voices, because mastering voices write directly to the device with no matrix mixing. </p><p>Volume levels are expressed as floating-point amplitude multipliers between -{{XAUDIO2_MAX_VOLUME_LEVEL}} and {{XAUDIO2_MAX_VOLUME_LEVEL}} (-2?? to 2??), with a maximum gain of 144.5 dB. A volume level of 1.0 means there is no attenuation or gain and 0 means silence. Negative levels can be used to invert the audio's phase. See {{XAudio2}} Volume and Pitch Control for additional information on volume control. </p><p>The {{X3DAudio}} function <strong>{{X3DAudioCalculate}}</strong> can produce an output matrix for use with <strong>SetOutputMatrix</strong> based on a sound's position and a listener's position.</p><strong>Note</strong>??<strong>{{IXAudio2Voice::GetOutputMatrix}}</strong> always returns the levels most recently set by <strong>{{IXAudio2Voice::SetOutputMatrix}}</strong>. However, they may not actually be in effect yet: they only take effect the next time the audio engine runs after the <strong>{{IXAudio2Voice::SetOutputMatrix}}</strong> call (or after the corresponding <strong>{{IXAudio2::CommitChanges}}</strong> call, if <strong>{{IXAudio2Voice::SetOutputMatrix}}</strong> was called with a deferred operation {{ID}}).? <p>Returns {{S_OK}} if successful, an error code otherwise. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of error codes.</p> <dd> <p>Pointer to a destination <strong>{{IXAudio2Voice}}</strong> for which to set volume levels.</p> <strong>Note</strong>??If the voice sends to a single target voice then specifying {{NULL}} will cause <strong>SetOutputMatrix</strong> to operate on that target voice. ? </dd> <dd> <p>Confirms the output channel count of the voice. This is the number of channels that are produced by the last effect in the chain.</p> </dd> <dd> <p>Confirms the input channel count of the destination voice.</p> </dd> <dd> <p>Array of [<em>SourceChannels</em> ? <em>DestinationChannels</em>] volume levels sent to the destination voice. The level sent from source channel <em>S</em> to destination channel <em>D</em> is specified in the form <em>pLevelMatrix</em>[<em>SourceChannels</em> ? <em>D</em> + <em>S</em>]. </p> <p>For example, when rendering two-channel stereo input into 5.1 output that is weighted toward the front channels?but is absent from the center and low-frequency channels?the matrix might have the values shown in the following table. </p> <table> <tr><th>Output</th><th>Left Input [Array Index]</th><th>Right Input [Array Index]</th></tr> <tr><td>Left</td><td>1.0 [0]</td><td>0.0 [1]</td></tr> <tr><td>Right</td><td>0.0 [2]</td><td>1.0 [3]</td></tr> <tr><td>Front Center</td><td>0.0 [4]</td><td>0.0 [5]</td></tr> <tr><td>{{LFE}}</td><td>0.0 [6]</td><td>0.0 [7]</td></tr> <tr><td>Rear Left</td><td>0.8 [8]</td><td>0.0 [9]</td></tr> <tr><td>Rear Right</td><td>0.0 [10]</td><td>0.8 [11]</td></tr> </table> <p>?</p> <strong>Note</strong>??The left and right input are fully mapped to the output left and right channels; 80 percent of the left and right input is mapped to the rear left and right channels. ? <p>See Remarks for more information on volume levels.</p> </dd> <dd> <p>Identifies this call as part of a deferred batch. See the {{XAudio2}} Operation Sets overview for more information.</p> </dd> <p>Gets the volume level of each channel of the final output for the voice. These channels are mapped to the input channels of a specified destination voice.</p> <p>This method applies only to source and submix voices, because mastering voices write directly to the device with no matrix mixing. Volume levels are expressed as floating-point amplitude multipliers between -2?? to 2??, with a maximum gain of 144.5 dB. A volume level of 1 means there is no attenuation or gain and 0 means silence. Negative levels can be used to invert the audio's phase. See {{XAudio2}} Volume and Pitch Control for additional information on volume control. </p><p>See <strong>{{WAVEFORMATEXTENSIBLE}}</strong> for information on standard channel ordering. </p><strong>Note</strong>??<strong>GetOutputMatrix</strong> always returns the levels most recently set by <strong>{{IXAudio2Voice::SetOutputMatrix}}</strong>. However, they may not actually be in effect yet: they only take effect the next time the audio engine runs after the <strong>{{IXAudio2Voice::SetOutputMatrix}}</strong> call (or after the corresponding <strong>{{IXAudio2::CommitChanges}}</strong> call, if <strong>{{IXAudio2Voice::SetOutputMatrix}}</strong> was called with a deferred operation {{ID}}).? <p>This method does not return a value.</p> <dd> <p>Pointer specifying the destination <strong>{{IXAudio2Voice}}</strong> to retrieve the output matrix for.</p> <strong>Note</strong>??If the voice sends to a single target voice then specifying {{NULL}} will cause <strong>GetOutputMatrix</strong> to operate on that target voice. ? </dd> <dd> <p>Confirms the output channel count of the voice. This is the number of channels that are produced by the last effect in the chain.</p> </dd> <dd> <p>Confirms the input channel count of the destination voice.</p> </dd> <dd> <p>Array of [<em>SourceChannels</em> * <em>DestinationChannels</em>] volume levels sent to the destination voice. The level sent from source channel S to destination channel D is returned in the form <em>pLevelMatrix</em>[<em>DestinationChannels</em> ? S + D]. See Remarks for more information on volume levels.</p> </dd> <p>Destroys the voice. If necessary, stops the voice and removes it from the {{XAudio2}} graph.</p> <p>If any other voice is currently sending audio to this voice, the method fails. </p><p><strong>DestroyVoice</strong> waits for the audio processing thread to be idle, so it can take a little while (typically no more than a couple of milliseconds). This is necessary to guarantee that the voice will no longer make any callbacks or read any audio data, so the application can safely free up these resources as soon as the call returns. </p><p>To avoid title thread interruptions from a blocking <strong>DestroyVoice</strong> call, the application can destroy voices on a separate non-critical thread, or the application can use voice pooling strategies to reuse voices rather than destroying them. Note that voices can only be reused with audio that has the same data format and the same number of channels the voice was created with. A voice can play audio data with different sample rates than that of the voice by calling <strong>{{IXAudio2SourceVoice::SetFrequencyRatio}}</strong> with an appropriate ratio parameter. </p><p>It is invalid to call <strong>DestroyVoice</strong> from within a callback (that is, <strong>{{IXAudio2EngineCallback}}</strong> or <strong>{{IXAudio2VoiceCallback}}</strong>).</p> <p>This method does not return a value.</p> <p>Use a source voice to submit audio data to the {{XAudio2}} processing pipeline.You must send voice data to a mastering voice to be heard, either directly or through intermediate submix voices. </p> <p>Starts consumption and processing of audio by the voice. Delivers the result to any connected submix or mastering voices, or to the output device.</p> <p>If the {{XAudio2}} engine is stopped, the voice stops running. However, it remains in the started state, so that it starts running again as soon as the engine starts. </p><p>When first created, source voices are in the stopped state. Submix and mastering voices are in the started state. </p><p>After <strong>Start</strong> is called it has no further effect if called again before <strong>{{IXAudio2SourceVoice::Stop}}</strong> is called. In addition multiple calls to <strong>Start</strong> without matching calls to <strong>{{IXAudio2SourceVoice::Stop}}</strong> will result in warning messages in debug builds.</p> <p>Returns {{S_OK}} if successful, an error code otherwise. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of {{XAudio2}} specific error codes.</p> <dd> <p>Flags that control how the voice is started. Must be 0.</p> </dd> <dd> <p> Identifies this call as part of a deferred batch. See the {{XAudio2}} Operation Sets overview for more information.</p> </dd> <p>Stops consumption of audio by the current voice.</p> <p>All source buffers that are queued on the voice and the current cursor position are preserved. This allows the voice to continue from where it left off, when it is restarted. The <strong>{{IXAudio2SourceVoice::FlushSourceBuffers}}</strong> method can be used to flush queued source buffers. </p><p>By default, any pending output from voice effects?for example, reverb tails?is not played. Instead, the voice is immediately rendered silent. The {{XAUDIO2_PLAY_TAILS}} flag can be used to continue emitting effect output after the voice stops running. </p><p>A voice stopped with the {{XAUDIO2_PLAY_TAILS}} flag stops consuming source buffers, but continues to process its effects and send audio to its destination voices. A voice in this state can later be stopped completely by calling <strong>Stop</strong> again with the Flags argument set to 0. This enables stopping a voice with {{XAUDIO2_PLAY_TAILS}}, waiting sufficient time for any audio being produced by its effects to finish, and then fully stopping the voice by calling <strong>Stop</strong> again without {{XAUDIO2_PLAY_TAILS}}. This technique allows voices with effects to be stopped gracefully while ensuring idle voices will not continue to be processed after they have finished producing audio. </p><p><strong>Stop</strong> is always asynchronous, even if called within a callback. </p><strong>Note</strong>??{{XAudio2}} never calls any voice callbacks for a voice if the voice is stopped (even if it was stopped with {{XAUDIO2_PLAY_TAILS}}).? <p>Returns {{S_OK}} if successful, an error code otherwise. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of {{XAudio2}} specific error codes.</p> <dd> <p> Flags that control how the voice is stopped. Can be 0 or the following: </p> <table> <tr><th>Value</th><th>Description</th></tr> <tr><td>{{XAUDIO2_PLAY_TAILS}}</td><td>Continue emitting effect output after the voice is stopped.?</td></tr> </table> <p>?</p> </dd> <dd> <p>Identifies this call as part of a deferred batch. See the {{XAudio2}} Operation Sets overview for more information.</p> </dd> <p>Adds a new audio buffer to the voice queue.</p> <p>The voice processes and plays back the buffers in its queue in the order that they were submitted. </p><p>The <strong>{{XAUDIO2_BUFFER}}</strong> structure includes details about the audio buffer's location and size, the part of the buffer that should actually be played, the loop region (if any) and loop count, the context reference to be used in any callbacks relating to this buffer, and an optional {{XAUDIO2_END_OF_STREAM}} flag that indicates that it is the last buffer of a contiguous sound. </p><p>If the voice is started and has no buffers queued, the new buffer will start playing immediately. If the voice is stopped, the buffer is added to the voice's queue and will be played when the voice starts. </p><p>If only part of the given buffer should be played, the <strong>PlayBegin</strong> and <strong>PlayLength</strong> fields in the <strong>{{XAUDIO2_BUFFER}}</strong> can be used to specify the region to be played. A <strong>PlayLength</strong> value of 0 means to play the entire buffer (and in this case <strong>PlayBegin</strong> must be 0 as well). </p><p>If all or part of the buffer should be played in a continuous loop, the <strong>LoopBegin</strong>, <strong>LoopLength</strong> and <strong>LoopCount</strong> fields in <strong>{{XAUDIO2_BUFFER}}</strong> can be used to specify the characteristics of the loop region. A <strong>LoopBegin</strong> value of {{XAUDIO2_NO_LOOP_REGION}} means that no looping should be performed, and in this case <strong>LoopLength</strong> and <strong>LoopCount</strong> must be given as 0. If a loop region is specified, it must be non-empty (<strong>LoopLength</strong> &gt; 0), and the loop count must be between 1 and {{XAUDIO2_MAX_LOOP_COUNT}} inclusive (or {{XAUDIO2_LOOP_INFINITE}} to specify an endless loop which will only end when <strong>{{IXAudio2SourceVoice::ExitLoop}}</strong> is called). A loop count of <em>N</em> means to skip backwards N times, i.e. to play the loop region <em>N</em>+1 times. </p><p>If an explicit play region is specified, it must begin and end within the given audio buffer (or, in the compressed case, within the set of samples that the buffer will decode to). In addition, the loop region cannot end past the end of the play region. </p><table> <tr><th>Xbox 360</th></tr> <tr><td>For certain audio formats, there may be additional restrictions on the valid endpoints of any play or loop regions; e.g. for {{XMA}} buffers, the regions can only begin or end at 128-sample boundaries in the decoded audio. </td></tr> </table><p>?</p><p>The <em>pBuffer</em> reference can be reused or freed immediately after calling this method, but the actual audio data referenced by <em>pBuffer</em> must remain valid until the buffer has been fully consumed by {{XAudio2}} (which is indicated by the <strong>{{IXAudio2VoiceCallback::OnBufferEnd}}</strong> callback). </p><p>Up to {{XAUDIO2_MAX_QUEUED_BUFFERS}} buffers can be queued on a voice at any one time. </p><p><strong>SubmitSourceBuffer</strong> takes effect immediately when called from an {{XAudio2}} callback with an OperationSet of {{XAUDIO2_COMMIT_NOW}}. </p><table> <tr><th>Xbox 360</th></tr> <tr><td>This method can be called from an Xbox system thread (most other {{XAudio2}} methods cannot). However, a maximum of two source buffers can be submitted from a system thread at a time.</td></tr> </table><p>?</p> <p>Returns {{S_OK}} if successful, an error code otherwise. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of {{XAudio2}} specific error codes.</p> <dd> <p> Pointer to an <strong>{{XAUDIO2_BUFFER}}</strong> structure to queue. </p> </dd> <dd> <p>Pointer to an additional <strong>{{XAUDIO2_BUFFER_WMA}}</strong> structure used when submitting {{WMA}} data. </p> </dd> <p>Removes all pending audio buffers from the voice queue.</p> <p>If the voice is started, the buffer that is currently playing is not removed from the queue. </p><p><strong>FlushSourceBuffers</strong> can be called regardless of whether the voice is currently started or stopped. </p><p>For every buffer removed, an <strong>OnBufferEnd</strong> callback will be made, but none of the other per-buffer callbacks (<strong>OnBufferStart</strong>, <strong>OnStreamEnd</strong> or <strong>OnLoopEnd</strong>) will be made. </p><p><strong>FlushSourceBuffers</strong> does not change a the voice's running state, so if the voice was playing a buffer prior to the call, it will continue to do so, and will deliver all the callbacks for the buffer normally. This means that the <strong>OnBufferEnd</strong> callback for this buffer will take place after the <strong>OnBufferEnd</strong> callbacks for the buffers that were removed. Thus, an {{XAudio2}} client that calls <strong>FlushSourceBuffers</strong> cannot expect to receive <strong>OnBufferEnd</strong> callbacks in the order in which the buffers were submitted. </p><p>No warnings for starvation of the buffer queue will be emitted when the currently playing buffer completes; it is assumed that the client has intentionally removed the buffers that followed it. However, there may be an audio pop if this buffer does not end at a zero crossing. If the application must ensure that the flush operation takes place while a specific buffer is playing?perhaps because the buffer ends with a zero crossing?it must call <strong>FlushSourceBuffers</strong> from a callback, so that it executes synchronously. </p><p>Calling <strong>FlushSourceBuffers</strong> after a voice is stopped and then submitting new data to the voice resets all of the voice's internal counters. </p><p>A voice's state is not considered reset after calling <strong>FlushSourceBuffers</strong> until the <strong>OnBufferEnd</strong> callback occurs (if a buffer was previously submitted) or <strong>{{IXAudio2SourceVoice::GetState}}</strong> returns with <strong>{{XAUDIO2_VOICE_STATE}}</strong>. <strong>BuffersQueued</strong> == 0. For example, if you stop a voice and call <strong>FlushSourceBuffers</strong>, it's still not legal to immediately call <strong>{{IXAudio2SourceVoice::SetSourceSampleRate}}</strong> (which requires the voice to not have any buffers currently queued), until either of the previously mentioned conditions are met. </p> <p>Returns {{S_OK}} if successful, an error code otherwise.</p> <p>Notifies an {{XAudio2}} voice that no more buffers are coming after the last one that is currently in its queue.</p> <p><strong>Discontinuity</strong> suppresses the warnings that normally occur in the debug build of {{XAudio2}} when a voice runs out of audio buffers to play. It is preferable to mark the final buffer of a stream by tagging it with the {{XAUDIO2_END_OF_STREAM}} flag, but in some cases the client may not know that a buffer is the end of a stream until after the buffer has been submitted. </p><p>Because calling <strong>Discontinuity</strong> is equivalent to applying the {{XAUDIO2_END_OF_STREAM}} flag retroactively to the last buffer submitted, an <strong>OnStreamEnd</strong> callback will be made when this buffer completes. </p><strong>Note</strong>??{{XAudio2}} may consume its entire buffer queue and emit a warning before the <strong>Discontinuity</strong> call takes effect, so <strong>Discontinuity</strong> is not guaranteed to suppress the warnings.? <p>Returns {{S_OK}} if successful, an error code otherwise.</p> <p>Stops looping the voice when it reaches the end of the current loop region. </p> <p>If the cursor for the voice is not in a loop region, <strong>ExitLoop</strong> does nothing. </p> <p>Returns {{S_OK}} if successful, an error code otherwise. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of {{XAudio2}} specific error codes.</p> <dd> <p> Identifies this call as part of a deferred batch. See the {{XAudio2}} Operation Sets overview for more information.</p> </dd> <p>Returns the voice's current state and cursor position data.</p> <p>For all encoded formats, including constant bit rate ({{CBR}}) formats such as adaptive differential pulse code modulation ({{ADPCM}}), <strong>SamplesPlayed</strong> is expressed in terms of decoded samples. For pulse code modulation ({{PCM}}) formats, <strong>SamplesPlayed</strong> is expressed in terms of either input or output samples. There is a one-to-one mapping from input to output for {{PCM}} formats. </p><p>If a client needs to get the correlated positions of several voices?that is, to know exactly which sample of a particular voice is playing when a specified sample of another voice is playing?it must make the <strong>{{IXAudio2SourceVoice::GetState}}</strong> calls in an {{XAudio2}} engine callback. Doing this ensures that none of the voices advance while the calls are made.</p> <dd> <p>Pointer to a buffer context provided in the <strong>{{XAUDIO2_BUFFER}}</strong> that is processed currently, or, if the voice is stopped currently, to the next buffer due to be processed. <strong>pCurrentBufferContext</strong> is {{NULL}} if there are no buffers in the queue.</p> </dd> <dd> <p>Number of audio buffers currently queued on the voice, including the one that is processed currently.</p> </dd> <dd> <p>Total number of samples processed by this voice since it last started, or since the last audio stream ended (as marked with the {{XAUDIO2_END_OF_STREAM}} flag). This total includes samples played multiple times due to looping. Theoretically, if all audio emitted by the voice up to this time is captured, this parameter would be the length of the audio stream in samples. If you specify <strong>{{XAUDIO2_VOICE_NOSAMPLESPLAYED}}</strong> when you call <strong>{{IXAudio2SourceVoice::GetState}}</strong>, this member won't be calculated, and its value is unspecified on return from <strong>{{IXAudio2SourceVoice::GetState}}</strong>. <strong>{{IXAudio2SourceVoice::GetState}}</strong> takes about one-third as much time to complete when you specify <strong>{{XAUDIO2_VOICE_NOSAMPLESPLAYED}}</strong>. </p> </dd> <p>Sets the frequency adjustment ratio of the voice.</p> <p>Frequency adjustment is expressed as <em>source frequency</em> / <em>target frequency</em>. Changing the frequency ratio changes the rate audio is played on the voice. A ratio greater than 1.0 will cause the audio to play faster and a ratio less than 1.0 will cause the audio to play slower. Additionally, the frequency ratio affects the pitch of audio on the voice. As an example, a value of 1.0 has no effect on the audio, whereas a value of 2.0 raises pitch by one octave and 0.5 lowers it by one octave. </p><p>If <strong>SetFrequencyRatio</strong> is called specifying a Ratio value outside the valid range, the method will set the frequency ratio to the nearest valid value. A warning also will be generated for debug builds. </p><strong>Note</strong>??<strong>{{IXAudio2SourceVoice::GetFrequencyRatio}}</strong> always returns the voice's actual current frequency ratio. However, this may not match the ratio set by the most recent <strong>{{IXAudio2SourceVoice::SetFrequencyRatio}}</strong> call: the actual ratio is only changed the next time the audio engine runs after the <strong>{{IXAudio2SourceVoice::SetFrequencyRatio}}</strong> call (or after the corresponding <strong>{{IXAudio2::CommitChanges}}</strong> call, if <strong>{{IXAudio2SourceVoice::SetFrequencyRatio}}</strong> was called with a deferred operation {{ID}}).? <p>Returns {{S_OK}} if successful, an error code otherwise. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of error codes. </p> <dd> <p>Frequency adjustment ratio. This value must be between {{XAUDIO2_MIN_FREQ_RATIO}} and the <em>MaxFrequencyRatio</em> parameter specified when the voice was created (see <strong>{{IXAudio2::CreateSourceVoice}}</strong>). {{XAUDIO2_MIN_FREQ_RATIO}} currently is 0.0005, which allows pitch to be lowered by up to 11 octaves.</p> </dd> <dd> <p>Identifies this call as part of a deferred batch. See the {{XAudio2}} Operation Sets overview for more information. </p> </dd> <p>Returns the frequency adjustment ratio of the voice.</p> <p><strong>GetFrequencyRatio</strong> always returns the voice's actual current frequency ratio. However, this may not match the ratio set by the most recent <strong>{{IXAudio2SourceVoice::SetFrequencyRatio}}</strong> call: the actual ratio is only changed the next time the audio engine runs after the <strong>{{IXAudio2SourceVoice::SetFrequencyRatio}}</strong> call (or after the corresponding <strong>{{IXAudio2::CommitChanges}}</strong> call, if <strong>{{IXAudio2SourceVoice::SetFrequencyRatio}}</strong> was called with a deferred operation {{ID}}). </p><p>For information on frequency ratios, see <strong>{{IXAudio2SourceVoice::SetFrequencyRatio}}</strong>. </p> <p>This method does not return a value.</p> <dd> <p>Returns the current frequency adjustment ratio if successful.</p> </dd> <p>Reconfigures the voice to consume source data at a different sample rate than the rate specified when the voice was created.</p> <p>The <strong>SetSourceSampleRate</strong> method supports reuse of {{XAudio2}} voices by allowing a voice to play sounds with a variety of sample rates. To use <strong>SetSourceSampleRate</strong> the voice must have been created without the {{XAUDIO2_VOICE_NOPITCH}} or {{XAUDIO2_VOICE_NOSRC}} flags and must not have any buffers currently queued. </p><p>The typical use of <strong>SetSourceSampleRate</strong> is to support voice pooling. For example to support voice pooling an application would precreate all the voices it expects to use. Whenever a new sound will be played the application chooses an inactive voice or ,if all voices are busy, picks the least important voice and calls <strong>SetSourceSampleRate</strong> on the voice with the new sound's sample rate. After <strong>SetSourceSampleRate</strong> has been called on the voice, the application can immediately start submitting and playing buffers with the new sample rate. This allows the application to avoid the overhead of creating and destroying voices frequently during gameplay. </p> <p>Returns {{S_OK}} if successful, an error code otherwise. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of error codes. </p> <dd> <p>The new sample rate the voice should process submitted data at. Valid sample rates are 1kHz to 200kHz. </p> </dd> <p>A submix voice is used primarily for performance improvements and effects processing. </p> <p>Data buffers cannot be submitted directly to submix voices and will not be audible unless submitted to a mastering voice. A submix voice can be used to ensure that a particular set of voice data is converted to the same format and/or to have a particular effect chain processed on the collective result. </p><p>{{IXAudio2SubmixVoice}} inherits directly from <strong>{{IXAudio2Voice}}</strong>, but does not implement methods specific to submix voices. The interface type exists solely because some of the base class methods are implemented differently for submix voices. Having a separate type for these voices helps client code to distinguish the different voice types and to benefit from C++ type safety.</p> <p>A mastering voice is used to represent the audio output device.</p><p>Data buffers cannot be submitted directly to mastering voices, but data submitted to other types of voices must be directed to a mastering voice to be heard. </p><p><strong>{{IXAudio2MasteringVoice}}</strong> inherits directly from <strong>{{IXAudio2Voice}}</strong>, but does not implement methods specific to mastering voices. The interface type exists solely because some of the base class methods are implemented differently for mastering voices. Having a separate type for these voices helps client code to distinguish the different voice types and to benefit from C++ type safety.</p> <p>Returns the channel mask for this voice.</p> <p>The <em>pChannelMask</em> argument is a bit-mask of the various channels in the speaker geometry reported by the audio system. This information is needed for the <strong>{{X3DAudioInitialize}}</strong> <em>SpeakerChannelMask</em> parameter. </p><p>The {{X3DAUDIO}}.H header declares a number of <strong>{{SPEAKER_}}</strong> positional defines to decode these channels masks. </p><p>Examples include: </p><pre>{{SPEAKER_STEREO}} // {{SPEAKER_FRONT_LEFT}} (0x1) | {{SPEAKER_FRONT_RIGHT}} (0x2) {{SPEAKER_5POINT1}} // {{SPEAKER_FRONT_LEFT}} (0x1) | {{SPEAKER_FRONT_RIGHT}} (0x2) // | {{SPEAKER_FRONT_CENTER}} (0x4) // | {{SPEAKER_LOW_FREQUENCY}} (0x8) // | {{SPEAKER_BACK_LEFT}} (0x10) | {{SPEAKER_BACK_RIGHT}} (0x20)</pre><strong>Note</strong>??For the DirectX {{SDK}} versions of {{XAUDIO}}, the channel mask for the output device was obtained via the <strong>{{IXAudio2::GetDeviceDetails}}</strong> method, which doesn't exist in Windows?8 and later.? <p>This method does not return a value.</p> <dd> <p> Returns the channel mask for this voice. This corresponds to the <strong>dwChannelMask</strong> member of the <strong>{{WAVEFORMATEXTENSIBLE}}</strong> structure. </p> </dd> <p>The {{IXAudio2EngineCallback}} interface contains methods that notify the client when certain events happen in the <strong>{{IXAudio2}}</strong> engine.</p><p>This interface should be implemented by the {{XAudio2}} client. {{XAudio2}} calls these methods via an interface reference provided by the client, using the <strong>{{XAudio2Create}}</strong> method. Methods in this interface return <strong>void</strong>, rather than an {{HRESULT}}. </p><p>See {{XAudio2}} Callbacks for restrictions on callback implementation.</p><ul> <li>{{Methods}}</li> </ul> <p>Called by {{XAudio2}} just before an audio processing pass begins.</p> <p>This method does not return a value.</p> <p>Called by {{XAudio2}} just after an audio processing pass ends.</p> <p>For information about the <strong>{{IXAudio2EngineCallback}}</strong> interface methods, see the {{XAudio2}} Callbacks section.</p> <p>This method does not return a value.</p> <p>Called if a critical system error occurs that requires {{XAudio2}} to be closed down and restarted.</p> <p>If you provide the {{ID}} of a specific device in the <em>szDeviceId</em> parameter to <strong>{{IXAudio2::CreateMasteringVoice}}</strong> or use the {{XAUDIO2_NO_VIRTUAL_AUDIO_CLIENT}} flag, then a critical error will occur and <strong>OnCriticalError</strong> is raised if the underlying {{WASAPI}} rendering device becomes unavailable. This can occur when a headset or speaker is unplugged or when a {{USB}} audio device is removed, for example. Once a critical error has occurred, audio processing stops and all further calls to {{XAudio2}} fail. The only way to recover in this situation is to release the {{XAudio2}} instance and create a new one. </p><p></p><p>If you specified {{NULL}} or <em>szDeviceId</em> parameter to <strong>{{IXAudio2::CreateMasteringVoice}}</strong>, then the system uses a Virtual Audio Client to represent the audio endpoint. In this case, if the underlying {{WASAPI}} rendering device becomes unavailable, the system automatically selects a new audio rendering device for rendering, audio processing continues, and <strong>OnCriticalError</strong> is not raised.</p><p>On the mobile device family, a Virtual Audio Client is always used and <strong>OnCriticalError</strong> is never raised, regardless of the values you provide to <strong>CreateMasteringVoice</strong>.</p><p>For information about the <strong>{{IXAudio2EngineCallback}}</strong> interface methods, see the {{XAudio2}} Callbacks section.</p> <p>This method does not return a value.</p> <dd> <p>Error code returned by {{XAudio2}}.</p> </dd> <p>The <strong>{{IXAudio2VoiceCallback}}</strong> interface contains methods that notify the client when certain events happen in a given <strong>{{IXAudio2SourceVoice}}</strong>. </p><p>This interface should be implemented by the {{XAudio2}} client. {{XAudio2}} calls these methods through an interface reference provided by the client in the <strong>{{IXAudio2::CreateSourceVoice}}</strong> method. Methods in this interface return void, rather than an {{HRESULT}}. </p><p>See the {{XAudio2}} Callbacks topic for restrictions on callback implementation.</p><ul> <li>{{Methods}}</li> </ul> <p>Called during each processing pass for each voice, just before {{XAudio2}} reads data from the voice's buffer queue.</p> <p>For information about <strong>{{IXAudio2VoiceCallback}}</strong> interface methods, see the {{XAudio2}} Callbacks topic.</p> <p>This method does not return a value.</p> <dd> <p> The number of bytes that must be submitted immediately to avoid starvation. This allows the implementation of just-in-time streaming scenarios; the client can keep the absolute minimum data queued on the voice at all times, and pass it fresh data just before the data is required. This model provides the lowest possible latency attainable with {{XAudio2}}. For xWMA and {{XMA}} data <em>BytesRequired</em> will always be zero, since the concept of a frame of xWMA or {{XMA}} data is meaningless. </p> <strong>Note</strong>??In a situation where there is always plenty of data available on the source voice, <em>BytesRequired</em> should always report zero, because it doesn't need any samples immediately to avoid glitching. ? </dd> <p>Called just after the processing pass for the voice ends.</p> <p>For information about <strong>{{IXAudio2VoiceCallback}}</strong> interface methods, see the {{XAudio2}} Callbacks topic.</p> <p>This method does not return a value.</p> <p>Called when the voice has just finished playing a contiguous audio stream.</p> <p><strong>OnStreamEnd</strong> is triggered when {{XAudio2}} processes an <strong>{{XAUDIO2_BUFFER}}</strong> with the {{XAUDIO2_END_OF_STREAM}} flag set. See the <strong>{{IXAudio2SourceVoice::SubmitSourceBuffer}}</strong> method for more information. </p><p>The <strong>OnStreamEnd</strong> callback indicates that {{XAudio2}} has finished consuming the last buffer submitted to the voice. With {{PCM}} data, all audio is guaranteed to have been played and the voice can be stopped or destroyed safely. </p><p>The <strong>OnStreamEnd</strong> callback only indicates that an <strong>{{XAUDIO2_BUFFER}}</strong> with the {{XAUDIO2_END_OF_STREAM}} flag set has been processed. The callback is strictly informational and does not change the state of the source voice that triggered it. A voice stays in the start state until <strong>{{IXAudio2SourceVoice::Stop}}</strong> is called and will continue to play submitted source buffers and to trigger additional callbacks. </p><p><strong>OnStreamEnd</strong> is guaranteed to be called just after the last byte of the current buffer has been consumed. </p><p>For information about <strong>{{IXAudio2VoiceCallback}}</strong> interface methods, see the {{XAudio2}} Callbacks topic.</p> <p>This method does not return a value.</p> <p>Called when the voice is about to start processing a new audio buffer.</p> <p><em>pBufferContext</em> is the context reference originally provided by the <strong>pContext</strong> member of the <strong>{{XAUDIO2_BUFFER}}</strong> structure, which may be {{NULL}}. </p><p><strong>OnBufferStart</strong> is guaranteed to be called just before the first byte of the current buffer is consumed. It is appropriate to use this callback for changes to the voice state such as the following. </p><ul> <li>Submitting a new buffer to the voice </li> <li>Adjusting the volume, pitch, and effect parameters of the voice </li> <li>Enabling or disabling an effect in the voice's effect chain</li> </ul>All the actions listed above are synchronous when performed in an {{XAudio2}} callback, so the changes will take effect immediately, affecting the buffer that is about to start.<p>It is also safe to use this callback to write audio data to the buffer directly, which can be useful for low-latency streaming scenarios. However, as with all {{XAudio2}} callbacks, no work should be done that uses a significant amount of processor time or could block execution, including synchronous disk or network reads. </p><p>For information about the <strong>{{IXAudio2VoiceCallback}}</strong> interface methods, see the {{XAudio2}} Callbacks section. </p> <p>This method does not return a value.</p> <dd> <p> Context reference that was assigned to the pContext member of the <strong>{{XAUDIO2_BUFFER}}</strong> structure when the buffer was submitted.</p> </dd> <p>Called when the voice finishes processing a buffer. </p> <p>After an <strong>OnBufferEnd</strong> callback the audio memory for the buffer associated with <em>pBufferContext</em> can safely be released. </p><p><em>pBufferContext</em> is the context reference originally provided by the <strong>pContext </strong>member of the <strong>{{XAUDIO2_BUFFER}}</strong> structure, which may be {{NULL}}. </p><p><strong>OnBufferEnd</strong> is guaranteed to be called just after the last byte of the current buffer has been consumed and before the first byte of the next buffer is consumed. This callback can be used to overwrite or release the audio data referenced by the completed buffer, and to update other state associated with the voice as appropriate. </p><p>For information about <strong>{{IXAudio2VoiceCallback}}</strong> interface methods, see the {{XAudio2}} Callbacks topic.</p> <p>This method does not return a value.</p> <dd> <p>Context reference assigned to the <strong>pContext</strong> member of the <strong>{{XAUDIO2_BUFFER}}</strong> structure when the buffer was submitted.</p> </dd> <p>Called when the voice reaches the end position of a loop.</p> <p><em>pBufferContext</em> is the context reference originally provided by the <strong>pContext</strong> member of the <strong>{{XAUDIO2_BUFFER}}</strong> structure, which may be {{NULL}}. </p><p><strong>OnLoopEnd</strong> is not sample-accurate; that is, actions in the callback do not occur at the exact moment that a given sample is being processed. It is only guaranteed to be called shortly after the last sample in the loop has been processed. </p><p>For information about the <strong>{{IXAudio2VoiceCallback}}</strong> interface methods, see the {{XAudio2}} Callbacks section.</p> <p>This method does not return a value.</p> <dd> <p> Context reference that was assigned to the <strong>pContext</strong> member of the <strong>{{XAUDIO2_BUFFER}}</strong> structure when the buffer was submitted. </p> </dd> <p>Called when a critical error occurs during voice processing.</p> <p><strong>OnVoiceError</strong> is called in the event of an error during voice processing, such as a hardware {{XMA}} decoder error on the Xbox 360. The arguments report which buffer was being processed at the time of the error, and its {{HRESULT}} code. If the error is not recoverable by destroying and re-creating the voice, the <strong>OnCriticalError</strong> engine callback will be called as well. </p> <p>This method does not return a value.</p> <dd> <p> Context reference that was assigned to the <strong>pContext</strong> member of the <strong>{{XAUDIO2_BUFFER}}</strong> structure when the buffer was submitted.</p> </dd> <dd> <p> The {{HRESULT}} code of the error encountered.</p> </dd> <p>Creates a new <strong>{{XAudio2}}</strong> object and returns a reference to its <strong>{{IXAudio2}}</strong> interface.</p> <p>The DirectX {{SDK}} versions of {{XAUDIO2}} supported a flag <strong>{{XAUDIO2_DEBUG_ENGINE}}</strong> to select between the release and 'checked' version. This flag is not supported or defined in the Windows 8 version of {{XAUDIO2}}. </p><strong>Note</strong>??No versions of the DirectX {{SDK}} contain the xaudio2.lib import library. DirectX {{SDK}} versions use {{COM}} to create a new <strong>{{XAudio2}}</strong> object.? <p>Returns {{S_OK}} if successful, an error code otherwise. See <strong>{{XAudio2}} Error Codes</strong> for descriptions of {{XAudio2}} specific error codes. </p> <p>Describes parameters for use with the volume meter {{APO}}.</p> <p>This structure is used with the <strong>{{XAudio2}} {{IXAudio2Voice::GetEffectParameters}}</strong> method. </p><p><em>pPeakLevels</em> and <em>pRMSLevels</em> are not returned by <strong>{{IXAudio2Voice::GetEffectParameters}}</strong>, the arrays are only filled out if they are present. If <em>pPeakLevels</em> and <em>pRMSLevels</em> are used they must be allocated by the application. The application is responsible for freeing the arrays when they are no longer needed. </p><p><em>ChannelCount</em> must be set by the application to match the number of channels in the voice the effect is applied to.</p> <dd> <p>Array that will be filled with the maximum absolute level for each channel during a processing pass. The array must be at least <em>ChannelCount</em> ? sizeof(float) bytes. <em>pPeakLevels</em> may be {{NULL}} if <em>pRMSLevels</em> is not {{NULL}}.</p> </dd> <dd> <p>Array that will be filled with root mean square level for each channel during a processing pass. The array must be at least <em>ChannelCount</em> ? sizeof(float) bytes. <em>pRMSLevels</em> may be {{NULL}} if <em>pPeakLevels</em> is not {{NULL}}.</p> </dd> <dd> <p>Number of channels being processed.</p> </dd> <p>Describes parameters for use in the reverb {{APO}}.</p> <p>All parameters related to sampling rate or time are relative to a 48kHz voice and must be scaled for use with other sampling rates. For example, setting <em>ReflectionsDelay</em> to 300ms gives a true 300ms delay when the reverb is hosted in a 48kHz voice, but becomes a 150ms delay when hosted in a 24kHz voice. </p> <dd> <p>Percentage of the output that will be reverb. Allowable values are from 0 to 100.</p> </dd> <dd> <p>The delay time of the first reflection relative to the direct path. Permitted range is from 0 to 300 milliseconds. </p> <strong>Note</strong>??All parameters related to sampling rate or time are relative to a 48kHz sampling rate and must be scaled for use with other sampling rates. See remarks section below for additional information. ? </dd> <dd> <p>Delay of reverb relative to the first reflection. Permitted range is from 0 to 85 milliseconds.</p> <strong>Note</strong>??All parameters related to sampling rate or time are relative to a 48kHz sampling rate and must be scaled for use with other sampling rates. See remarks section below for additional information. ? </dd> <dd> <p>Delay for the left rear output and right rear output. Permitted range is from 0 to 5 milliseconds.</p> <strong>Note</strong>??All parameters related to sampling rate or time are relative to a 48kHz sampling rate and must be scaled for use with other sampling rates. See remarks section below for additional information. ? </dd> <dd> <p>Delay for the left side output and right side output. Permitted range is from 0 to 5 milliseconds.</p> <strong>Note</strong>??This value is supported beginning with Windows?10. ? <strong>Note</strong>??All parameters related to sampling rate or time are relative to a 48kHz sampling rate and must be scaled for use with other sampling rates. See remarks section below for additional information. ? </dd> <dd> <p>Position of the left input within the simulated space relative to the listener. With <em>PositionLeft</em> set to the minimum value, the left input is placed close to the listener. In this position, early reflections are dominant, and the reverb decay is set back in the sound field and reduced in amplitude. With <em>PositionLeft</em> set to the maximum value, the left input is placed at a maximum distance from the listener within the simulated room. <em>PositionLeft</em> does not affect the reverb decay time (liveness of the room), only the apparent position of the source relative to the listener. Permitted range is from 0 to 30 (no units).</p> </dd> <dd> <p>Same as <em>PositionLeft</em>, but affecting only the right input. Permitted range is from 0 to 30 (no units). </p> <strong>Note</strong>??PositionRight is ignored in mono-in/mono-out mode. ? </dd> <dd> <p>Gives a greater or lesser impression of distance from the source to the listener. Permitted range is from 0 to 30 (no units).</p> </dd> <dd> <p>Gives a greater or lesser impression of distance from the source to the listener. Permitted range is from 0 to 30 (no units). </p> <strong>Note</strong>??<em>PositionMatrixRight</em> is ignored in mono-in/mono-out mode. ? </dd> <dd> <p>Controls the character of the individual wall reflections. Set to minimum value to simulate a hard flat surface and to maximum value to simulate a diffuse surface. Permitted range is from 0 to 15 (no units). </p> </dd> <dd> <p>Controls the character of the individual wall reverberations. Set to minimum value to simulate a hard flat surface and to maximum value to simulate a diffuse surface. Permitted range is from 0 to 15 (no units). </p> </dd> <dd> <p>Adjusts the decay time of low frequencies relative to the decay time at 1 kHz. The values correspond to dB of gain as follows: </p> <table> <tr><th>Value</th><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td></tr> <tr><th>Gain (dB)</th><td>-8</td><td>-7</td><td>-6</td><td>-5</td><td>-4</td><td>-3</td><td>-2</td><td>-1</td><td>0</td><td>+1</td><td>+2</td><td>+3</td><td>+4</td></tr> </table> <p>?</p> <strong>Note</strong>??A <em>LowEQGain</em> value of 8 results in the decay time of low frequencies being equal to the decay time at 1 kHz. ? <p> Permitted range is from 0 to 12 (no units). </p> </dd> <dd> <p>Sets the corner frequency of the low pass filter that is controlled by the <em>LowEQGain</em> parameter. The values correspond to frequency in Hz as follows: </p> <table> <tr><th>Value</th><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td></tr> <tr><th>Frequency (Hz)</th><td>50</td><td>100</td><td>150</td><td>200</td><td>250</td><td>300</td><td>350</td><td>400</td><td>450</td><td>500</td></tr> </table> <p>?</p> <p>Permitted range is from 0 to 9 (no units). </p> </dd> <dd> <p>Adjusts the decay time of high frequencies relative to the decay time at 1 kHz. When set to zero, high frequencies decay at the same rate as 1 kHz. When set to maximum value, high frequencies decay at a much faster rate than 1 kHz. </p> <table> <tr><th>Value</th><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td></tr> <tr><th>Gain (dB)</th><td>-8</td><td>-7</td><td>-6</td><td>-5</td><td>-4</td><td>-3</td><td>-2</td><td>-1</td><td>0</td></tr> </table> <p>?</p> <p>Permitted range is from 0 to 8 (no units). </p> </dd> <dd> <p>Sets the corner frequency of the high pass filter that is controlled by the <em>HighEQGain</em> parameter. The values correspond to frequency in kHz as follows: </p> <table> <tr><th>Value</th><td>0</td><td>1</td><td>2</td><td>3</td><td>4</td><td>5</td><td>6</td><td>7</td><td>8</td><td>9</td><td>10</td><td>11</td><td>12</td><td>13</td><td>14</td></tr> <tr><th>Frequency (kHz)</th><td>1</td><td>1.5</td><td>2</td><td>2.5</td><td>3</td><td>3.5</td><td>4</td><td>4.5</td><td>5</td><td>5.5</td><td>6</td><td>6.5</td><td>7</td><td>7.5</td><td>8</td></tr> </table> <p>?</p> <p>Permitted range is from 0 to 14 (no units).</p> </dd> <dd> <p>Sets the corner frequency of the low pass filter for the room effect. Permitted range is from 20 to 20,000 Hz.</p> <strong>Note</strong>??All parameters related to sampling rate or time are relative to a 48kHz sampling rate and must be scaled for use with other sampling rates. See remarks section below for additional information. ? </dd> <dd> <p>Sets the pass band intensity level of the low-pass filter for both the early reflections and the late field reverberation. Permitted range is from -100 to 0 dB.</p> </dd> <dd> <p>Sets the intensity of the low-pass filter for both the early reflections and the late field reverberation at the corner frequency (<em>RoomFilterFreq</em>). Permitted range is from -100 to 0 dB.</p> </dd> <dd> <p>Adjusts the intensity of the early reflections. Permitted range is from -100 to 20 dB.</p> </dd> <dd> <p>Adjusts the intensity of the reverberations. Permitted range is from -100 to 20 dB.</p> </dd> <dd> <p>Reverberation decay time at 1 kHz. This is the time that a full scale input signal decays by 60 dB. Permitted range is from 0.1 to infinity seconds.</p> </dd> <dd> <p>Controls the modal density in the late field reverberation. For colorless spaces, <em>Density</em> should be set to the maximum value (100). As Density is decreased, the sound becomes hollow (comb filtered). This is an effect that can be useful if you are trying to model a silo. Permitted range as a percentage is from 0 to 100.</p> </dd> <dd> <p>The apparent size of the acoustic space. Permitted range is from 1 to 100 feet.</p> </dd> <dd> <p>If set to {{TRUE}}, disables late field reflection calculations. Disabling late field reflection calculations results in a significant {{CPU}} time savings.</p> <strong>Note</strong>??The DirectX {{SDK}} versions of {{XAUDIO2}} don't support this member. ? </dd> <p>Describes {{I3DL2}} (Interactive 3D Audio Rendering Guidelines Level 2.0) parameters for use in the <strong>ReverbConvertI3DL2ToNative</strong> function.</p> <p>There are many preset values defined for the <strong>{{XAUDIO2FX_REVERB_I3DL2_PARAMETERS}}</strong> structure. For more information, see <strong>{{XAUDIO2FX_I3DL2_PRESET}}</strong>. </p> <p>Creates a new volume meter audio processing object ({{APO}}) and returns a reference to it.</p> <p>For information on creating new effects for use with {{XAudio2}}, see the {{XAPO}} Overview.</p><table> <tr><th>Windows</th></tr> <tr><td> <p>Because <strong>{{XAudio2CreateVolumeMeter}}</strong> calls <strong>CoCreateInstance</strong> on Windows, the application must have called the <strong>CoInitializeEx</strong> method before calling <strong>{{XAudio2CreateVolumeMeter}}</strong>. <strong>{{XAudio2Create}}</strong> has the same requirement, which means <strong>CoInitializeEx</strong> typically will be called long before <strong>{{XAudio2CreateVolumeMeter}}</strong> is called. </p> <p>A typical calling pattern on Windows would be as follows: </p> <pre>#ifndef _XBOX CoInitializeEx({{NULL}}, {{COINIT_MULTITHREADED}}); #endif {{IXAudio2}}* pXAudio2 = {{NULL}}; {{HRESULT}} hr; if ( {{FAILED}}(hr = {{XAudio2Create}}( &amp;pXAudio2, 0, {{XAUDIO2_DEFAULT_PROCESSOR}} ) ) ) return hr; ... {{IUnknown}} * pVolumeMeterAPO; {{XAudio2CreateVolumeMeter}}(&amp;pVolumeMeterAPO); </pre> </td></tr> </table><p>?</p><p>The xaudio2fx.h header defines the <strong>AudioVolumeMeter</strong> class {{GUID}} as a cross-platform audio processing object ({{XAPO}}). </p><code> class __declspec(uuid("4FC3B166-972A-40CF-{{BC37}}-7DB03DB2FBA3")) AudioVolumeMeter; </code><p><strong>{{XAudio2CreateVolumeMeter}}</strong> returns this object as a reference to a reference to <strong>{{IUnknown}}</strong> in the <em>ppApo</em> parameter. Although you can query the <strong>{{IXAPO}}</strong> and <strong>{{IXAPOParameters}}</strong> interfaces from this <strong>{{IUnknown}}</strong>, you typically never use these interfaces directly. Instead, you use them when you create a voice to add them as part of the effects chain. </p><p>The volume meter uses the <strong>{{XAUDIO2FX_VOLUMEMETER_LEVELS}}</strong> parameter structure that you access via the <strong>{{IXAudio2Voice::GetEffectParameters}}</strong> method when the {{XAPO}} is bound to the audio graph.</p><strong>Note</strong>??<strong>{{XAudio2CreateVolumeMeter}}</strong> is an inline function in xaudio2fx.h that calls <strong>CreateAudioVolumeMeter</strong>: <code> {{XAUDIO2FX_STDAPI}} CreateAudioVolumeMeter(_Outptr_ {{IUnknown}}** ppApo); __inline {{HRESULT}} {{XAudio2CreateVolumeMeter}}(_Outptr_ {{IUnknown}}** ppApo, {{UINT32}} /*Flags*/ {{DEFAULT}}(0)) { return CreateAudioVolumeMeter(ppApo); } </code>? <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Contains the created volume meter {{APO}}.</p> </dd> <dd> <p>Flags that specify the behavior of the {{APO}}. The value of this parameter must be 0.</p> </dd> <p>Creates a new reverb audio processing object ({{APO}}), and returns a reference to it.</p> <p><strong>{{XAudio2CreateReverb}}</strong> creates an effect performing Princeton Digital Reverb. The {{XAPO}} effect library ({{XAPOFX}}) includes an alternate reverb effect. Use <strong>CreateFX</strong> to create this alternate effect. </p><p>The reverb {{APO}} supports has the following restrictions: </p><ul> <li>Input audio data must be {{FLOAT32}}. </li> <li>Framerate must be within {{XAUDIO2FX_REVERB_MIN_FRAMERATE}} (20,000 Hz) and {{XAUDIO2FX_REVERB_MAX_FRAMERATE}} (48,000 Hz). </li> <li>The input and output channels must be one of the following combinations.<ul> <li>Mono input and mono output </li> <li>Mono input and 5.1 output </li> <li>Stereo input and stereo output </li> <li>Stereo input and 5.1 output</li> </ul> </li> </ul>The reverb {{APO}} maintains internal state information between processing samples. You can only use an instance of the {{APO}} with one source of audio data at a time. Multiple voices that require reverb effects would each need to create a separate reverb effect with<strong>{{XAudio2CreateReverb}}</strong>.<p>For information about creating new effects for use with {{XAudio2}}, see the {{XAPO}} Overview. </p><table> <tr><th>Windows</th></tr> <tr><td> <p>Because <strong>{{XAudio2CreateReverb}}</strong> calls <strong>CoCreateInstance</strong> on Windows, the application must have called the <strong>CoInitializeEx</strong> method before calling <strong>{{XAudio2CreateReverb}}</strong>. <strong>{{XAudio2Create}}</strong> has the same requirement, which means <strong>CoInitializeEx</strong> typically will be called long before <strong>{{XAudio2CreateReverb}}</strong> is called. </p> <p>A typical calling pattern on Windows would be as follows: </p> <pre>#ifndef _XBOX CoInitializeEx({{NULL}}, {{COINIT_MULTITHREADED}}); #endif {{IXAudio2}}* pXAudio2 = {{NULL}}; {{HRESULT}} hr; if ( {{FAILED}}(hr = {{XAudio2Create}}( &amp;pXAudio2, 0, {{XAUDIO2_DEFAULT_PROCESSOR}} ) ) ) return hr; ... {{IUnknown}} * pReverbAPO; {{XAudio2CreateReverb}}(&amp;pReverbAPO); </pre> </td></tr> </table><p>?</p><p>The xaudio2fx.h header defines the <strong>AudioReverb</strong> class {{GUID}} as a cross-platform audio processing object ({{XAPO}}). </p><code> class __declspec(uuid("{{C2633B16}}-471B-4498-{{B8C5}}-4F0959E2EC09")) AudioReverb; </code><p><strong>{{XAudio2CreateReverb}}</strong> returns this object as a reference to a reference to <strong>{{IUnknown}}</strong> in the <em>ppApo</em> parameter. Although you can query the <strong>{{IXAPO}}</strong> and <strong>{{IXAPOParameters}}</strong> interfaces from this <strong>{{IUnknown}}</strong>, you typically never use these interfaces directly. Instead, you use them when you create a voice to add them as part of the effects chain. </p><p>The reverb uses the <strong>{{XAUDIO2FX_REVERB_PARAMETERS}}</strong> parameter structure that you access via the <strong>{{IXAudio2Voice::SetEffectParameters}}</strong>. </p><strong>Note</strong>??<strong>{{XAudio2CreateReverb}}</strong> is an inline function in xaudio2fx.h that calls <strong>CreateAudioReverb</strong>: <code> {{XAUDIO2FX_STDAPI}} CreateAudioReverb(_Outptr_ {{IUnknown}}** ppApo); __inline {{HRESULT}} {{XAudio2CreateReverb}}(_Outptr_ {{IUnknown}}** ppApo, {{UINT32}} /*Flags*/ {{DEFAULT}}(0)) { return CreateAudioReverb(ppApo); } </code>? <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>Contains a reference to the reverb {{APO}} that is created.</p> </dd> <dd> <p>Flags that specify the behavior of the {{APO}}. The value of this parameter must be 0.</p> </dd> <p>Defines a {{DSP}} setting at a given normalized distance.</p> <dd> <p>Normalized distance. This must be within 0.0f to 1.0f.</p> </dd> <dd> <p>{{DSP}} control setting.</p> </dd> <p>Defines an explicit piecewise curve made up of linear segments, directly defining {{DSP}} behavior with respect to normalized distance.</p> <dd> <p> <strong>{{X3DAUDIO_DISTANCE_CURVE_POINT}}</strong> array. The array must have no duplicates and be sorted in ascending order with respect to distance.</p> </dd> <dd> <p>Number of distance curve points. There must be two or more points since all curves must have at least two endpoints defining values at 0.0f and 1.0f normalized distance, respectively.</p> </dd> <p>Specifies directionality for a single-channel non-{{LFE}} emitter by scaling {{DSP}} behavior with respect to the emitter's orientation.</p> <p>For a detailed explanation of sound cones see Sound Cones.</p> <dd> <p>Inner cone angle in radians. This value must be within 0.0f to {{X3DAUDIO_2PI}}.</p> </dd> <dd> <p>Outer cone angle in radians. This value must be within <em>InnerAngle</em> to {{X3DAUDIO_2PI}}.</p> </dd> <dd> <p>Volume scaler on/within inner cone. This value must be within 0.0f to 2.0f. </p> </dd> <dd> <p>Volume scaler on/beyond outer cone. This value must be within 0.0f to 2.0f. </p> </dd> <dd> <p>{{LPF}} direct-path or reverb-path coefficient scaler on/within inner cone. This value is only used for {{LPF}} calculations and must be within 0.0f to 1.0f. </p> </dd> <dd> <p>{{LPF}} direct-path or reverb-path coefficient scaler on or beyond outer cone. This value is only used for {{LPF}} calculations and must be within 0.0f to 1.0f. </p> </dd> <dd> <p>Reverb send level scaler on or within inner cone. This must be within 0.0f to 2.0f. </p> </dd> <dd> <p>Reverb send level scaler on/beyond outer cone. This must be within 0.0f to 2.0f. </p> </dd> <p>Defines a point of 3D audio reception.</p> <p>{{X3DAudio}} uses a left-handed Cartesian coordinate system, with values on the x-axis increasing from left to right, on the y-axis from bottom to top, and on the z-axis from near to far. Azimuths are measured clockwise from a given reference direction. To use {{X3DAudio}} with right-handed coordinates, you must negate the .z element of <em>OrientFront</em>, <em>OrientTop</em>, <em>Position</em>, and <em>Velocity</em>.</p><p>The parameter type <strong>{{X3DAUDIO_VECTOR}}</strong> is typed to DirectX::XMFLOAT3, to provide x, y and z floating-point values. </p><p>A listener's front and top vectors must be orthonormal. To be considered orthonormal, a pair of vectors must have a magnitude of 1 +- 1x10-5 and a dot product of 0 +- 1x10-5. </p> <dd> <p>Orientation of front direction. When <strong>pCone</strong> is {{NULL}} <strong>OrientFront</strong> is used only for matrix and delay calculations. When <strong>pCone</strong> is not {{NULL}} <strong>OrientFront</strong> is used for matrix, {{LPF}} (both direct and reverb paths), and reverb calculations. This value must be orthonormal with <strong>OrientTop</strong> when used.</p> </dd> <dd> <p>Orientation of top direction, used only for matrix and delay calculations. This value must be orthonormal with <strong>OrientFront</strong> when used.</p> </dd> <dd> <p>Position in user-defined world units. This value does not affect <strong>Velocity</strong>.</p> </dd> <dd> <p>Velocity vector in user-defined world units per second, used only for doppler calculations. This value does not affect <strong>Position</strong>.</p> </dd> <dd> <p>Pointer to an <strong>{{X3DAUDIO_CONE}}</strong> structure for this listener. Providing a listener cone will specify that additional calculations are performed when determining the volume and filter {{DSP}} parameters for individual sound sources. A {{NULL}} <strong>pCone</strong> value specifies an omnidirectional sound and no cone processing is applied. <strong>pCone</strong> is only used for matrix, {{LPF}} (both direct and reverb paths), and reverb calculations.</p> </dd> <p>Defines a single-point or multiple-point 3D audio source that is used with an arbitrary number of sound channels.</p> <p><strong>{{X3DAUDIO_EMITTER}}</strong> only supports a cone in a single-point emitter. Multi-point emitters are a convenient and efficient way to manage a related group of sound sources. Many properties are shared among all channel points, such as Doppler?the same Doppler shift is applied to all channels in the emitter. Thus, the Doppler value need only be calculated once, not per-point as would be needed with multiple separate single-point emitters. Because <strong>{{X3DAUDIO_EMITTER}}</strong> only has one orientation vector, a multi-point emitter cone would be of limited usefulness, forcing all channels to behave as if they were facing the same direction. If multiple independent cones are needed, multiple single-point emitters should be used, each with its own orientation. </p><p>The parameter type {{X3DAUDIO_VECTOR}} is typed to DirectX::XMFLOAT3, to provide x , y , and z floating-point values. </p><p>{{X3DAudio}} uses a left-handed Cartesian coordinate system, with values on the x-axis increasing from left to right, on the y-axis from bottom to top, and on the z-axis from near to far. Azimuths are measured clockwise from a given reference direction. To use {{X3DAudio}} with right-handed coordinates, you must negate the .z element of <em>OrientFront</em>, <em>OrientTop</em>, <em>Position</em>, and <em>Velocity</em>.</p><p>For user-defined distance curves, the distance field of the first point must be 0.0f and the distance field of the last point must be 1.0f. </p><p>If an emitter moves beyond a distance of (<strong>CurveDistanceScaler</strong> ? 1.0f), the last point on the curve is used to compute the volume output level. The last point is determined by the following: </p><pre>{{X3DAUDIO_DISTANCE_CURVE}}.pPoints[PointCount-1].{{DSPSetting}})</pre> <dd> <p>Pointer to a sound cone. Used only with single-channel emitters for matrix, {{LPF}} (both direct and reverb paths), and reverb calculations. {{NULL}} specifies the emitter is omnidirectional.</p> </dd> <dd> <p>Orientation of the front direction. This value must be orthonormal with <strong>OrientTop</strong>. <strong>OrientFront</strong> must be normalized when used. For single-channel emitters without cones <strong>OrientFront</strong> is only used for emitter angle calculations. For multi channel emitters or single-channel with cones <strong>OrientFront</strong> is used for matrix, {{LPF}} (both direct and reverb paths), and reverb calculations.</p> </dd> <dd> <p>Orientation of the top direction. This value must be orthonormal with <strong>OrientFront</strong>. <strong>OrientTop</strong> is only used with multi-channel emitters for matrix calculations.</p> </dd> <dd> <p>Position in user-defined world units. This value does not affect <strong>Velocity</strong>.</p> </dd> <dd> <p>Velocity vector in user-defined world units/second. This value is used only for doppler calculations. It does not affect <strong>Position</strong>. </p> </dd> <dd> <p>Value to be used for the inner radius calculations. If <strong>InnerRadius</strong> is 0, then no inner radius is used, but <strong>InnerRadiusAngle</strong> may still be used. This value must be between 0.0f and {{MAX_FLT}}. </p> </dd> <dd> <p>Value to be used for the inner radius angle calculations. This value must be between 0.0f and {{X3DAUDIO_PI}}/4.0. </p> </dd> <dd> <p>Number of emitters defined by the <strong>{{X3DAUDIO_EMITTER}}</strong> structure. Must be greater than 0. </p> </dd> <dd> <p>Distance from <strong>Position</strong> that channels will be placed if <strong>ChannelCount</strong> is greater than 1. <strong>ChannelRadius</strong> is only used with multi-channel emitters for matrix calculations. Must be greater than or equal to 0.0f.</p> </dd> <dd> <p>Table of channel positions, expressed as an azimuth in radians along the channel radius with respect to the front orientation vector in the plane orthogonal to the top orientation vector. An azimuth of {{X3DAUDIO_2PI}} specifies a channel is a low-frequency effects ({{LFE}}) channel. {{LFE}} channels are positioned at the emitter base and are calculated with respect to <strong>pLFECurve</strong> only, never <strong>pVolumeCurve</strong>. <strong>pChannelAzimuths</strong> must have at least <strong>ChannelCount</strong> elements, but can be <strong>{{NULL}}</strong> if <strong>ChannelCount</strong> = 1. The table values must be within 0.0f to {{X3DAUDIO_2PI}}. <strong>pChannelAzimuths</strong> is used with multi-channel emitters for matrix calculations. </p> </dd> <dd> <p>Volume-level distance curve, which is used only for matrix calculations. {{NULL}} specifies a specialized default curve that conforms to the inverse square law, such that when distance is between 0.0f and <strong>CurveDistanceScaler</strong> ? 1.0f, no attenuation is applied. When distance is greater than <strong>CurveDistanceScaler</strong> ? 1.0f, the amplification factor is (<strong>CurveDistanceScaler</strong> ? 1.0f)/distance. At a distance of <strong>CurveDistanceScaler</strong> ? 2.0f, the sound will be at half volume or -6 dB, at a distance of <strong>CurveDistanceScaler</strong> ? 4.0f, the sound will be at one quarter volume or -12 dB, and so on. <strong>pVolumeCurve</strong> and pLFECurve are independent of each other. <strong>pVolumeCurve</strong> does not affect <strong>{{LFE}} channel</strong> volume. </p> </dd> <dd> <p>{{LFE}} roll-off distance curve, or {{NULL}} to use default curve: [0.0f, <strong>CurveDistanceScaler</strong> ?1.0f], [<strong>CurveDistanceScaler</strong> ?1.0f, 0.0f]. A {{NULL}} value for <strong>pLFECurve</strong> specifies a default curve that conforms to the inverse square law with distances &lt;= <strong>CurveDistanceScaler</strong> clamped to no attenuation. <strong>pVolumeCurve</strong> and <strong>pLFECurve</strong> are independent of each other. <strong>pLFECurve</strong> does not affect non {{LFE}} channel volume. </p> </dd> <dd> <p>Low-pass filter ({{LPF}}) direct-path coefficient distance curve, or {{NULL}} to use the default curve: [0.0f, 1.0f], [1.0f, 0.75f]. <strong>pLPFDirectCurve</strong> is only used for {{LPF}} direct-path calculations. </p> </dd> <dd> <p>{{LPF}} reverb-path coefficient distance curve, or {{NULL}} to use default curve: [0.0f, 0.75f], [1.0f, 0.75f]. <strong>pLPFReverbCurve</strong> is only used for {{LPF}} reverb path calculations.</p> </dd> <dd> <p>Reverb send level distance curve, or {{NULL}} to use default curve: [0.0f, 1.0f], [1.0f, 0.0f]. </p> </dd> <dd> <p>Curve distance scaler that is used to scale normalized distance curves to user-defined world units, and/or to exaggerate their effect. This does not affect any other calculations. The value must be within the range {{FLT_MIN}} to {{FLT_MAX}}. <strong>CurveDistanceScaler</strong> is only used for matrix, {{LPF}} (both direct and reverb paths), and reverb calculations.</p> </dd> <dd> <p>Doppler shift scaler that is used to exaggerate Doppler shift effect. <strong>DopplerScaler</strong> is only used for Doppler calculations and does not affect any other calculations. The value must be within the range 0.0f to {{FLT_MAX}}.</p> </dd> <p>Receives the results from a call to <strong>{{X3DAudioCalculate}}</strong>.</p> <p>The following members must be initialized before passing this structure to the <strong>{{X3DAudioCalculate}}</strong> function: </p><ul> <li><strong>pMatrixCoefficients </strong></li> <li><strong>pDelayTimes</strong></li> <li><strong>SrcChannelCount </strong></li> <li><strong>DstChannelCount</strong></li> </ul><p>The following members are returned by passing this structure to the <strong>{{X3DAudioCalculate}}</strong> function:</p><ul> <li><strong>pMatrixCoefficients </strong></li> <li><strong>pDelayTimes </strong></li> <li><strong>{{LPFDirectCoefficient}} </strong></li> <li><strong>{{LPFReverbCoefficient}}</strong></li> <li><strong>ReverbLevel </strong></li> <li><strong>DopplerFactor </strong></li> <li><strong>EmitterToListenerAngle</strong></li> <li><strong>EmitterToListenerDistance </strong></li> <li><strong>EmitterVelocityComponent </strong></li> <li><strong>ListenerVelocityComponent</strong></li> </ul><strong>Note</strong>??For <strong>pMatrixCoefficients</strong> and <strong>pDelayTimes</strong>, <strong>{{X3DAudioCalculate}}</strong> does not allocate additional memory. <strong>{{X3DAudioCalculate}}</strong> merely modifies the values at the memory locations allocated for these references.? <p>Sets all global 3D audio constants.</p> <p><strong>{{X3DAUDIO_HANDLE}}</strong> is an opaque data structure. Because the operating system doesn't allocate any additional storage for the 3D audio instance handle, you don't need to free or close it.</p> <p>This function does not return a value.</p> <dd> <p>Assignment of channels to speaker positions. This value must not be zero. The only permissible value on Xbox 360 is {{SPEAKER_XBOX}}.</p> </dd> <dd> <p>Speed of sound, in user-defined world units per second. Use this value only for doppler calculations. It must be greater than or equal to {{FLT_MIN}}.</p> </dd> <dd> <p>3D audio instance handle. Use this handle when you call <strong>{{X3DAudioCalculate}}</strong>.</p> </dd> <p>Calculates {{DSP}} settings with respect to 3D parameters.</p> <p>You typically call <strong>{{X3DAudioCalculate}}</strong> once for each pair of emitting objects and listeners in the scene. After each call, to apply the 3D effects, the app manually applies the calculation results at <em>pDSPSettings</em> to the {{XAUDIO2}} graph. For more info, see How to: Integrate {{X3DAudio}} with {{XAudio2}}.</p><strong>Important</strong>?? The listener and emitter values must be valid. Floating-point specials (NaN, {{QNaN}}, +{{INF}}, -{{INF}}) can cause the entire audio output to go silent if introduced into a running audio graph.? <p>This function does not return a value.</p> <dd> <p>3D audio instance handle. Call <strong>{{X3DAudioInitialize}}</strong> to get this handle.</p> </dd> <dd> <p>Pointer to an <strong>{{X3DAUDIO_LISTENER}}</strong> representing the point of reception.</p> </dd> <dd> <p>Pointer to an <strong>{{X3DAUDIO_EMITTER}}</strong> representing the sound source.</p> </dd> <dd> <table> <tr><th>Value</th><th>Description</th></tr> <tr><td>{{X3DAUDIO_CALCULATE_MATRIX}}</td><td>Enables matrix coefficient table calculation.?</td></tr> <tr><td>{{X3DAUDIO_CALCULATE_DELAY}}</td><td>Enables delay time array calculation (stereo only).?</td></tr> <tr><td>{{X3DAUDIO_CALCULATE_LPF_DIRECT}}</td><td>Enables low pass filter ({{LPF}}) direct-path coefficient calculation.?</td></tr> <tr><td>{{X3DAUDIO_CALCULATE_LPF_REVERB}}</td><td>Enables {{LPF}} reverb-path coefficient calculation.?</td></tr> <tr><td>{{X3DAUDIO_CALCULATE_REVERB}}</td><td>Enables reverb send level calculation.?</td></tr> <tr><td>{{X3DAUDIO_CALCULATE_DOPPLER}}</td><td>Enables Doppler shift factor calculation.?</td></tr> <tr><td>{{X3DAUDIO_CALCULATE_EMITTER_ANGLE}}</td><td>Enables emitter-to-listener interior angle calculation.?</td></tr> <tr><td>{{X3DAUDIO_CALCULATE_ZEROCENTER}}</td><td>Fills the center channel with silence. This flag allows you to keep a 6-channel matrix so you do not have to remap the channels, but the center channel will be silent. This flag is only valid if you also set {{X3DAUDIO_CALCULATE_MATRIX}}.?</td></tr> <tr><td>{{X3DAUDIO_CALCULATE_REDIRECT_TO_LFE}}</td><td> Applies an equal mix of all source channels to a low frequency effect ({{LFE}}) destination channel. It only applies to matrix calculations with a source that does not have an {{LFE}} channel and a destination that does have an {{LFE}} channel. This flag is only valid if you also set {{X3DAUDIO_CALCULATE_MATRIX}}.?</td></tr> </table> <p>?</p> </dd> <dd> <p>Pointer to an <strong>{{X3DAUDIO_DSP_SETTINGS}}</strong> structure that receives the calculation results.</p> </dd> <p>Describes the contents of a stream buffer. </p> <p>This metadata can be used to implement optimizations that require knowledge of a stream buffer's contents. For example, {{XAPOs}} that always produce silent output from silent input can check the flag on the input stream buffer to determine if any signal processing is necessary. If silent, the {{XAPO}} can simply set the flag on the output stream buffer to silent and return, thus averting the work of processing silent data. </p><p>Likewise, {{XAPOs}} that receive valid input data, but generate silence (for any reason), may set the output stream buffer's flag accordingly, rather than writing silent samples to the buffer. </p><p>These flags represent what should be assumed is in the respective buffer. The flags may not reflect what is actually stored in memory. For example, the {{XAPO_BUFFER_SILENT}} indicates that silent data should be assumed, however the respective memory may be uninitialized </p> <dd> <p>Stream buffer contains only silent samples.</p> </dd> <dd> <p>Stream buffer contains audio data to be processed.</p> </dd> <p>Describes general characteristics of an {{XAPO}}. Used with <strong>{{IXAPO::GetRegistrationProperties}}</strong>, <strong>{{CXAPOParametersBase::CXAPOParametersBase}}</strong>, and <strong>{{CXAPOBase::CXAPOBase}}</strong>. </p> <p>Defines stream buffer parameters that remain constant while an {{XAPO}} is locked. Used with the <strong>{{IXAPO::LockForProcess}}</strong> method.</p> <p>The byte size of the respective stream buffer must be at least <em>MaxFrameCount</em> ? (<em>pFormat</em>-&gt;nBlockAlign) bytes. </p> <p>Defines stream buffer parameters that may change from one call to the next. Used with the <strong>Process</strong> method.</p> <p>Although the format and maximum size values of a particular stream buffer are constant, as defined by the <strong>{{XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS}}</strong> structure, the actual memory address of the stream buffer is permitted to change. For constant-bit-rate ({{CBR}}) {{XAPOs}}, ValidFrameCount is constant and is always equal to the corresponding <strong>{{XAPO_LOCKFORPROCESS_BUFFER_PARAMETERS}}</strong>.MaxFrameCount for this buffer. </p><strong>Note</strong>??Only constant-bit-rate {{XAPOs}} are currently supported.? <p>The interface for an Audio Processing Object which be used in an {{XAudio2}} effect chain.</p> <p>Returns the registration properties of an {{XAPO}}. </p> <p>Returns {{S_OK}} if successful; returns an error code otherwise.</p> <dd> <p> Receives a reference to a <strong>{{XAPO_REGISTRATION_PROPERTIES}}</strong> structure containing the registration properties the {{XAPO}} was created with; use <strong>{{XAPOFree}}</strong> to free the structure. </p> </dd> <p>Queries if a specific input format is supported for a given output format.</p> <p>The <strong>{{IXAPO::IsOutputFormatSupported}}</strong> and <strong>IsInputFormatSupported</strong> methods allow an {{XAPO}} to indicate which audio formats it is capable of processing. If a requested format is not supported, the {{XAPO}} should return the closest format that it does support. The closest format should be determined based on frame rate, bit depth, and channel count, in that order of importance. The behavior of <strong>IsInputFormatSupported</strong> is allowed to change, based on the internal state of the {{XAPO}}, but its behavior should remain constant between calls to the <strong>{{IXAPO::LockForProcess}}</strong> and <strong>{{IXAPO::UnlockForProcess}}</strong> methods. </p> <p>Returns {{S_OK}} if the format pair is supported. Returns {{XAPO_E_FORMAT_UNSUPPORTED}} if the format pair is not supported.</p> <dd> <p> Output format. </p> </dd> <dd> <p> Input format to check for being supported.</p> </dd> <dd> <p> If not {{NULL}}, and the input format is not supported for the given output format, <em>ppSupportedInputFormat</em> returns a reference to the closest input format that is supported. Use <strong>{{XAPOFree}}</strong> to free the returned structure. </p> </dd> <p>Queries if a specific output format is supported for a given input format.</p> <p>The <strong>{{IXAPO::IsInputFormatSupported}}</strong> and <strong>IsOutputFormatSupported</strong> methods allow an {{XAPO}} to indicate which audio formats it is capable of processing. If a requested format is not supported, the {{XAPO}} should return the closest format that it does support. The closest format should be determined based on frame rate, bit depth, and channel count, in that order of importance. The behavior of <strong>IsOutputFormatSupported</strong> is allowed to change, based on the internal state of the {{XAPO}}, but its behavior should remain constant between calls to the <strong>{{IXAPO::LockForProcess}}</strong> and <strong>{{IXAPO::UnlockForProcess}}</strong> methods.</p> <p>Returns {{S_OK}} if the format pair is supported. Returns {{XAPO_E_FORMAT_UNSUPPORTED}} if the format pair is not supported.</p> <dd> <p>Input format. </p> </dd> <dd> <p>Output format to check for being supported.</p> </dd> <dd> <p>If not {{NULL}} and the output format is not supported for the given input format, <em>ppSupportedOutputFormat</em> returns a reference to the closest output format that is supported. Use <strong>{{XAPOFree}}</strong> to free the returned structure. </p> </dd> <p>Performs any effect-specific initialization.</p> <p>The contents of <em>pData</em> are defined by a given {{XAPO}}. Immutable parameters (constant for the lifetime of the {{XAPO}}) should be set in this method. Once initialized, an {{XAPO}} cannot be initialized again. An {{XAPO}} should be initialized before passing it to {{XAudio2}} as part of an effect chain. </p><strong>Note</strong>??{{XAudio2}} does not call this method, it should be called by the client before passing the {{XAPO}} to {{XAudio2}}.? <p>Returns {{S_OK}} if successful, an error code otherwise.</p> <dd> <p> Effect-specific initialization parameters, may be {{NULL}} if <em>DataByteSize</em> is 0.</p> </dd> <dd> <p> Size of <em>pData</em> in bytes, may be 0 if <em>pData</em> is {{NULL}}.</p> </dd> <p>Resets variables dependent on frame history.</p> <p>Constant and locked parameters such as the input and output formats remain unchanged. Variables set by <strong>{{IXAPOParameters::SetParameters}}</strong> remain unchanged. </p><p>For example, an effect with delay should zero out its delay line during this method, but should not reallocate anything as the {{XAPO}} remains locked with a constant input and output configuration. </p><p>{{XAudio2}} only calls this method if the {{XAPO}} is locked. </p><p>This method is called from the realtime thread and should not block. </p> <p>This method does not return a value.</p> <p>Called by {{XAudio2}} to lock the input and output configurations of an {{XAPO}} allowing it to do any final initialization before <strong>Process</strong> is called on the realtime thread.</p> <p>Once locked, the input and output configuration and any other locked parameters remain constant until <strong>UnLockForProcess</strong> is called. After an {{XAPO}} is locked, further calls to <strong>LockForProcess</strong> have no effect until the <strong>UnLockForProcess</strong> function is called. </p><p>An {{XAPO}} indicates what specific formats it supports through its implementation of the <strong>IsInputFormatSupported</strong> and <strong>IsOutputFormatSupported</strong> methods. An {{XAPO}} should assert the input and output configurations are supported and that any required effect-specific initialization is complete. The <strong>IsInputFormatSupported</strong>, <strong>IsOutputFormatSupported</strong>, and <strong>Initialize</strong> methods should be used as necessary before calling this method. </p><p>Because <strong>Process</strong> is a nonblocking method, all internal memory buffers required for <strong>Process</strong> should be allocated in <strong>LockForProcess</strong>. </p><p> <strong>Process</strong> is never called before <strong>LockForProcess</strong> returns successfully. </p><p><strong>LockForProcess</strong> is called directly by {{XAudio2}} and should not be called by the client code. </p> <p>Returns {{S_OK}} if successful, an error code otherwise.</p> <p>Deallocates variables that were allocated with the <strong>LockForProcess</strong> method.</p> <p>Unlocking an {{XAPO}} instance allows it to be reused with different input and output formats.</p> <p>This method does not return a value.</p> <p>Runs the {{XAPO}}'s digital signal processing ({{DSP}}) code on the given input and output buffers.</p> <p>Implementations of this function should not block, as the function is called from the realtime audio processing thread. </p><p>All code that could cause a delay, such as format validation and memory allocation, should be put in the <strong>{{IXAPO::LockForProcess}}</strong> method, which is not called from the realtime audio processing thread. </p><p>For in-place processing, the <em>pInputProcessParameters</em> parameter will not necessarily be the same as <em>pOutputProcessParameters</em>. Rather, their <em>pBuffer</em> members will point to the same memory. </p><p>Multiple input and output buffers may be used with in-place {{XAPOs}}, though the input buffer count must equal the output buffer count. For in-place processing when multiple input and output buffers are used, the {{XAPO}} may assume the number of input buffers equals the number of output buffers. </p><p>In addition to writing to the output buffer, as appropriate, an {{XAPO}} is responsible for setting the output stream's buffer flags and valid frame count. </p><p>When <em>IsEnabled</em> is {{FALSE}}, the {{XAPO}} should not apply its normal processing to the given input/output buffers during. It should instead pass data from input to output with as little modification possible. Effects that perform format conversion should continue to do so. Effects must ensure transitions between normal and thru processing do not introduce discontinuities into the signal. </p><p>When writing a <strong>Process</strong> method, it is important to note {{XAudio2}} audio data is interleaved, which means data from each channel is adjacent for a particular sample number. For example, if there was a 4-channel wave playing into an {{XAudio2}} source voice, the audio data would be a sample of channel 0, a sample of channel 1, a sample of channel 2, a sample of channel 3, and then the next sample of channels 0, 1, 2, 3, and so on. </p> <p>This method does not return a value.</p> <dd> <p> Number of elements in pInputProcessParameters. </p> <strong>Note</strong>??{{XAudio2}} currently supports only one input stream and one output stream. ? </dd> <dd> <p> Input array of <strong>{{XAPO_PROCESS_BUFFER_PARAMETERS}}</strong> structures. </p> </dd> <dd> <p>Number of elements in <em>pOutputProcessParameters</em>. </p> <strong>Note</strong>??{{XAudio2}} currently supports only one input stream and one output stream. ? </dd> <dd> <p>Output array of <strong>{{XAPO_PROCESS_BUFFER_PARAMETERS}}</strong> structures. On input, the value of <strong>{{XAPO_PROCESS_BUFFER_PARAMETERS}}</strong>. <strong>ValidFrameCount</strong> indicates the number of frames that the {{XAPO}} should write to the output buffer. On output, the value of <strong>{{XAPO_PROCESS_BUFFER_PARAMETERS}}</strong>. <strong>ValidFrameCount</strong> indicates the actual number of frames written.</p> </dd> <dd> <p> {{TRUE}} to process normally; {{FALSE}} to process thru. See Remarks for additional information.</p> </dd> <p>Returns the number of input frames required to generate the given number of output frames.</p> <p>{{XAudio2}} calls this method to determine what size input buffer an {{XAPO}} requires to generate the given number of output frames. This method only needs to be called once while an {{XAPO}} is locked. <strong>CalcInputFrames</strong> is only called by {{XAudio2}} if the {{XAPO}} is locked. </p><p>This function should not block, because it may be called from the realtime audio processing thread. </p> <p>Returns the number of input frames required.</p> <dd> <p> The number of output frames desired. </p> </dd> <p>Returns the number of output frames that will be generated from a given number of input frames.</p> <p>{{XAudio2}} calls this method to determine how large of an output buffer an {{XAPO}} will require for a certain number of input frames. <strong>CalcOutputFrames</strong> is only called by {{XAudio2}} if the {{XAPO}} is locked. </p><p>This function should not block, because it may be called from the realtime audio processing thread. </p> <p>Returns the number of output frames that will be produced. </p> <dd> <p> The number of input frames. </p> </dd> <p>An optional interface that allows an {{XAPO}} to use effect-specific parameters.</p> <p>Sets effect-specific parameters.</p> <p>The data in <em>pParameters</em> is completely effect-specific and determined by the implementation of the <strong>{{IXAPOParameters::SetParameters}}</strong> function. The data passed to <strong>SetParameters</strong> can be used to set the state of the {{XAPO}} and control the behavior of the <strong>{{IXAPO::Process}}</strong> function. </p><p><strong>SetParameters</strong> can only be called on the real-time audio processing thread; no synchronization between <strong>SetParameters</strong> and the <strong>{{IXAPO::Process}}</strong> method is necessary. However, the <strong>{{IXAudio2Voice::SetEffectParameters}}</strong> method may be called from any thread as it adds in the required synchronization to deliver a copy (asynchronously) of the parameters to <strong>SetParameters</strong> on the real-time thread; no synchronization between <strong>{{IXAudio2Voice::SetEffectParameters}}</strong> and the <strong>{{IXAPO::Process}}</strong> method is necessary. </p> <p>This method does not return a value.</p> <dd> <p> Effect-specific parameter block.</p> </dd> <dd> <p> Size of pParameters, in bytes.</p> </dd> <p>Gets the current values for any effect-specific parameters.</p> <p>The data in <em>pParameters</em> is completely effect-specific and determined by the implementation of the <strong>{{IXAPOParameters::GetParameters}}</strong> function. The data returned in <em>pParameters</em> can be used to provide information about the current state of the {{XAPO}}. </p><p>Unlike SetParameters, {{XAudio2}} does not call this method on the realtime audio processing thread. Thus, the {{XAPO}} must protect variables shared with <strong>{{IXAPOParameters::SetParameters}}</strong> or <strong>{{IXAPO::Process}}</strong> using appropriate synchronization. The <strong>{{CXAPOParametersBase}}</strong> class is an implementation of <strong>{{IXAPOParameters}}</strong> and its implementation of <strong>GetParameters</strong> efficiently handles this synchronization for the user. </p><p>{{XAudio2}} calls this method from the <strong>{{IXAudio2Voice::GetEffectParameters}}</strong> method. </p><p>This method may block and should never be called from the realtime audio processing thread instead get the current parameters from <strong>{{CXAPOParametersBase::BeginProcess}}</strong>.</p> <p>This method does not return a value.</p> <dd> <p>Receives an effect-specific parameter block.</p> </dd> <dd> <p> Size of pParameters, in bytes.</p> </dd> <p>Parameters for use with the {{FXEQ}} {{XAPO}}.</p> <p>Each band ranges from <strong>FrequencyCenterN</strong> - (<strong>BandwidthN</strong> / 2) to <strong>FrequencyCenterN</strong> + (<strong>BandwidthN</strong> / 2). </p> <dd> <p>Center frequency in Hz for band 0. Must be between {{FXEQ_MIN_FREQUENCY_CENTER}} and {{FXEQ_MAX_FREQUENCY_CENTER}}.</p> </dd> <dd> <p>The boost or decrease to frequencies in band 0. Must be between {{FXEQ_MIN_GAIN}} and {{FXEQ_MAX_GAIN}} </p> </dd> <dd> <p>Width of band 0. Must be between {{FXEQ_MIN_BANDWIDTH}} and {{FXEQ_MAX_BANDWIDTH}}. </p> </dd> <dd> <p>Center frequency in Hz for band 1. Must be between {{FXEQ_MIN_FREQUENCY_CENTER}} and {{FXEQ_MAX_FREQUENCY_CENTER}}. </p> </dd> <dd> <p>The boost or decrease to frequencies in band 1. Must be between {{FXEQ_MIN_GAIN}} and {{FXEQ_MAX_GAIN}}</p> </dd> <dd> <p>Width of band 1. Must be between {{FXEQ_MIN_BANDWIDTH}} and {{FXEQ_MAX_BANDWIDTH}}.</p> </dd> <dd> <p>Center frequency in Hz for band 2. Must be between {{FXEQ_MIN_FREQUENCY_CENTER}} and {{FXEQ_MAX_FREQUENCY_CENTER}}.</p> </dd> <dd> <p>The boost or decrease to frequencies in band 2. Must be between {{FXEQ_MIN_GAIN}} and {{FXEQ_MAX_GAIN}} </p> </dd> <dd> <p>Width of band 2. Must be between {{FXEQ_MIN_BANDWIDTH}} and {{FXEQ_MAX_BANDWIDTH}}. </p> </dd> <dd> <p>Center frequency in Hz for band 3. Must be between {{FXEQ_MIN_FREQUENCY_CENTER}} and {{FXEQ_MAX_FREQUENCY_CENTER}}. </p> </dd> <dd> <p>The boost or decrease to frequencies in band 3. Must be between {{FXEQ_MIN_GAIN}} and {{FXEQ_MAX_GAIN}} </p> </dd> <dd> <p>Width of band 3. Must be between {{FXEQ_MIN_BANDWIDTH}} and {{FXEQ_MAX_BANDWIDTH}}.</p> </dd> <p>Parameters for use with the {{FXMasteringLimiter}} {{XAPO}}.</p> <p>Parameters for use with the {{FXReverb}} {{XAPO}}.</p> <dd> <p>Controls the character of the individual wall reflections. Set to minimum value to simulate a hard flat surface and to maximum value to simulate a diffuse surface.Value must be between {{FXREVERB_MIN_DIFFUSION}} and {{FXREVERB_MAX_DIFFUSION}}.</p> </dd> <dd> <p>Size of the room. Value must be between {{FXREVERB_MIN_ROOMSIZE}} and {{FXREVERB_MAX_ROOMSIZE}}. Note that physical meaning of RoomSize is subjective and not tied to any particular units. A smaller value will result in reflections reaching the listener more quickly while reflections will take longer with larger values for RoomSize.</p> </dd> <p>Initialization parameters for use with the {{FXECHO}} {{XAPOFX}}.</p> <p>Use of this structure is optional. The default <strong>MaxDelay</strong> is <strong>{{FXECHO_DEFAULT_DELAY}}</strong>.</p><strong>Note</strong>??The DirectX {{SDK}} versions of {{XAUDIO2}} don't support this functionality.? <p>Parameters for use with the {{FXECHO}} {{XAPOFX}}.</p> <p>Echo only supports {{FLOAT32}} audio formats.</p> <p>Creates an instance of the requested {{XAPOFX}} effect.</p> <p>The created {{XAPO}} will have a reference count of 1. Client code must call <strong>{{IUnknown::Release}}</strong> after passing the {{XAPO}} to {{XAudio2}} to allow {{XAudio2}} to dispose of the {{XAPO}} when it is no longer needed. Use <strong> {{IXAudio2::CreateSourceVoice}}</strong> or <strong>{{IXAudio2Voice::SetEffectChain}}</strong> to pass an {{XAPO}} to {{XAudio2}}. </p><strong>Note</strong>??The DirectX {{SDK}} version of this function doesn't have the <em>pInitData</em> or <em>InitDataByteSize</em> parameters as it only takes the first 2 parameters. To set initial parameters for the {{XAPOFX}} effect that is created with the DirectX {{SDK}} version of this function, you must bind that effect to a voice and use <strong>{{IXAudio2Voice::SetEffectParameters}}</strong>. For info about how to do this, see How to: Use {{XAPOFX}} in {{XAudio2}}.? <p>If this function succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Describes the current state of the Xbox 360 Controller.</p> <p>This structure is used by the <strong>{{XINPUT_STATE}}</strong> structure when polling for changes in the state of the controller. </p><p>The specific mapping of button to game function varies depending on the game type. </p><p>The constant {{XINPUT_GAMEPAD_TRIGGER_THRESHOLD}} may be used as the value which <em>bLeftTrigger</em> and <em>bRightTrigger</em> must be greater than to register as pressed. This is optional, but often desirable. Xbox 360 Controller buttons do not manifest crosstalk. </p> <dd> <p>Bitmask of the device digital buttons, as follows. A set bit indicates that the corresponding button is pressed. </p> <table> <tr><th>Device button</th><th>Bitmask</th></tr> <tr><td>{{XINPUT_GAMEPAD_DPAD_UP}}</td><td> 0x0001</td></tr> <tr><td>{{XINPUT_GAMEPAD_DPAD_DOWN}}</td><td> 0x0002</td></tr> <tr><td>{{XINPUT_GAMEPAD_DPAD_LEFT}}</td><td> 0x0004</td></tr> <tr><td>{{XINPUT_GAMEPAD_DPAD_RIGHT}}</td><td> 0x0008</td></tr> <tr><td>{{XINPUT_GAMEPAD_START}}</td><td> 0x0010</td></tr> <tr><td>{{XINPUT_GAMEPAD_BACK}}</td><td> 0x0020</td></tr> <tr><td>{{XINPUT_GAMEPAD_LEFT_THUMB}}</td><td> 0x0040</td></tr> <tr><td>{{XINPUT_GAMEPAD_RIGHT_THUMB}}</td><td> 0x0080</td></tr> <tr><td>{{XINPUT_GAMEPAD_LEFT_SHOULDER}}</td><td> 0x0100</td></tr> <tr><td>{{XINPUT_GAMEPAD_RIGHT_SHOULDER}}</td><td> 0x0200</td></tr> <tr><td>{{XINPUT_GAMEPAD_A}}</td><td> 0x1000</td></tr> <tr><td>{{XINPUT_GAMEPAD_B}}</td><td> 0x2000</td></tr> <tr><td>{{XINPUT_GAMEPAD_X}}</td><td> 0x4000</td></tr> <tr><td>{{XINPUT_GAMEPAD_Y}}</td><td> 0x8000</td></tr> </table> <p>?</p> <p>Bits that are set but not defined above are reserved, and their state is undefined. </p> </dd> <dd> <p>The current value of the left trigger analog control. The value is between 0 and 255.</p> </dd> <dd> <p>The current value of the right trigger analog control. The value is between 0 and 255.</p> </dd> <dd> <p>Left thumbstick x-axis value. Each of the thumbstick axis members is a signed value between -32768 and 32767 describing the position of the thumbstick. A value of 0 is centered. Negative values signify down or to the left. Positive values signify up or to the right. The constants {{XINPUT_GAMEPAD_LEFT_THUMB_DEADZONE}} or {{XINPUT_GAMEPAD_RIGHT_THUMB_DEADZONE}} can be used as a positive and negative value to filter a thumbstick input. </p> </dd> <dd> <p>Left thumbstick y-axis value. The value is between -32768 and 32767.</p> </dd> <dd> <p>Right thumbstick x-axis value. The value is between -32768 and 32767.</p> </dd> <dd> <p>Right thumbstick y-axis value. The value is between -32768 and 32767.</p> </dd> <p>Represents the state of a controller.</p> <p>The <em>dwPacketNumber</em> member is incremented only if the status of the controller has changed since the controller was last polled. </p> <dd> <p>State packet number. The packet number indicates whether there have been any changes in the state of the controller. If the <em>dwPacketNumber</em> member is the same in sequentially returned <strong>{{XINPUT_STATE}}</strong> structures, the controller state has not changed.</p> </dd> <dd> <p> <strong>{{XINPUT_GAMEPAD}}</strong> structure containing the current state of an Xbox 360 Controller.</p> </dd> <p>Specifies motor speed levels for the vibration function of a controller.</p> <p>The left motor is the low-frequency rumble motor. The right motor is the high-frequency rumble motor. The two motors are not the same, and they create different vibration effects.</p> <dd> <p>Speed of the left motor. Valid values are in the range 0 to 65,535. Zero signifies no motor use; 65,535 signifies 100 percent motor use.</p> </dd> <dd> <p>Speed of the right motor. Valid values are in the range 0 to 65,535. Zero signifies no motor use; 65,535 signifies 100 percent motor use.</p> </dd> <p>Describes the capabilities of a connected controller. The <strong>{{XInputGetCapabilities}}</strong> function returns <strong>{{XINPUT_CAPABILITIES}}</strong>. </p> <p> <strong>{{XInputGetCapabilities}}</strong> returns <strong>{{XINPUT_CAPABILITIES}}</strong> to indicate the characteristics and available functionality of a specified controller. </p><p> <strong>{{XInputGetCapabilities}}</strong> sets the structure members to indicate which inputs the device supports. For binary state controls, such as digital buttons, the corresponding bit reflects whether or not the control is supported by the device. For proportional controls, such as thumbsticks, the value indicates the resolution for that control. Some number of the least significant bits may not be set, indicating that the control does not provide resolution to that level. </p><p>The <em>SubType</em> member indicates the specific subtype of controller present. Games may detect the controller subtype and tune their handling of controller input or output based on subtypes that are well suited to their game genre. For example, a car racing game might check for the presence of a wheel controller to provide finer control of the car being driven. However, titles must not disable or ignore a device based on its subtype. Subtypes not recognized by the game or for which the game is not specifically tuned should be treated as a standard Xbox 360 Controller ({{XINPUT_DEVSUBTYPE_GAMEPAD}}). </p><p>Older {{XUSB}} Windows drivers report incomplete capabilities information, particularly for wireless devices. The latest {{XUSB}} Windows driver provides full support for wired and wireless devices, and more complete and accurate capabilties flags. </p> <p>Contains information on battery type and charge state.</p> <dd> <p>The type of battery. <em>BatteryType</em> will be one of the following values. </p> <table> <tr><th>Value</th><th>Description</th></tr> <tr><td>{{BATTERY_TYPE_DISCONNECTED}}</td><td>The device is not connected.?</td></tr> <tr><td>{{BATTERY_TYPE_WIRED}}</td><td>The device is a wired device and does not have a battery.?</td></tr> <tr><td>{{BATTERY_TYPE_ALKALINE}}</td><td>The device has an alkaline battery.?</td></tr> <tr><td>{{BATTERY_TYPE_NIMH}}</td><td>The device has a nickel metal hydride battery.?</td></tr> <tr><td>{{BATTERY_TYPE_UNKNOWN}}</td><td>The device has an unknown battery type.?</td></tr> </table> <p>?</p> </dd> <dd> <p>The charge state of the battery. This value is only valid for wireless devices with a known battery type. <em>BatteryLevel</em> will be one of the following values. </p> <table> <tr><th>Value</th></tr> <tr><td>{{BATTERY_LEVEL_EMPTY}}</td></tr> <tr><td>{{BATTERY_LEVEL_LOW}}</td></tr> <tr><td>{{BATTERY_LEVEL_MEDIUM}}</td></tr> <tr><td>{{BATTERY_LEVEL_FULL}}</td></tr> </table> <p>?</p> </dd> <p>Specifies keystroke data returned by <strong>{{XInputGetKeystroke}}</strong>.</p> <p>Future devices may return {{HID}} codes and virtual key values that are not supported on current devices, and are currently undefined. Applications should ignore these unexpected values. </p><p>A <em>virtual-key</em> code is a byte value that represents a particular physical key on the keyboard, not the character or characters (possibly none) that the key can be mapped to based on keyboard state. The keyboard state at the time a virtual key is pressed modifies the character reported. For example, {{VK_4}} might represent a "4" or a "$", depending on the state of the {{SHIFT}} key. </p><p>A reported keyboard event includes the virtual key that caused the event, whether the key was pressed or released (or is repeating), and the state of the keyboard at the time of the event. The keyboard state includes information about whether any {{CTRL}}, {{ALT}}, or {{SHIFT}} keys are down. </p><p>If the keyboard event represents an Unicode character (for example, pressing the "A" key), the <em>Unicode</em> member will contain that character. Otherwise, <em>Unicode</em> will contain the value zero. </p><p>The valid virtual-key ({{VK_xxx}}) codes are defined in {{XInput}}.h. In addition to codes that indicate key presses, the following codes indicate controller input. </p><table> <tr><th>Value</th><th>Description</th></tr> <tr><td>{{VK_PAD_A}}</td><td><strong>A</strong> button?</td></tr> <tr><td>{{VK_PAD_B}}</td><td><strong>B</strong> button?</td></tr> <tr><td>{{VK_PAD_X}}</td><td><strong>X</strong> button?</td></tr> <tr><td>{{VK_PAD_Y}}</td><td><strong>Y</strong> button?</td></tr> <tr><td>{{VK_PAD_RSHOULDER}}</td><td>Right shoulder button?</td></tr> <tr><td>{{VK_PAD_LSHOULDER}}</td><td>Left shoulder button?</td></tr> <tr><td>{{VK_PAD_LTRIGGER}}</td><td>Left trigger?</td></tr> <tr><td>{{VK_PAD_RTRIGGER}}</td><td>Right trigger?</td></tr> <tr><td>{{VK_PAD_DPAD_UP}}</td><td>Directional pad up?</td></tr> <tr><td>{{VK_PAD_DPAD_DOWN}}</td><td>Directional pad down?</td></tr> <tr><td>{{VK_PAD_DPAD_LEFT}}</td><td>Directional pad left?</td></tr> <tr><td>{{VK_PAD_DPAD_RIGHT}}</td><td>Directional pad right?</td></tr> <tr><td>{{VK_PAD_START}}</td><td><strong>{{START}}</strong> button?</td></tr> <tr><td>{{VK_PAD_BACK}}</td><td><strong>{{BACK}}</strong> button?</td></tr> <tr><td>{{VK_PAD_LTHUMB_PRESS}}</td><td>Left thumbstick click?</td></tr> <tr><td>{{VK_PAD_RTHUMB_PRESS}}</td><td>Right thumbstick click?</td></tr> <tr><td>{{VK_PAD_LTHUMB_UP}}</td><td>Left thumbstick up?</td></tr> <tr><td>{{VK_PAD_LTHUMB_DOWN}}</td><td>Left thumbstick down?</td></tr> <tr><td>{{VK_PAD_LTHUMB_RIGHT}}</td><td>Left thumbstick right?</td></tr> <tr><td>{{VK_PAD_LTHUMB_LEFT}}</td><td>Left thumbstick left?</td></tr> <tr><td>{{VK_PAD_LTHUMB_UPLEFT}}</td><td>Left thumbstick up and left?</td></tr> <tr><td>{{VK_PAD_LTHUMB_UPRIGHT}}</td><td>Left thumbstick up and right?</td></tr> <tr><td>{{VK_PAD_LTHUMB_DOWNRIGHT}}</td><td>Left thumbstick down and right?</td></tr> <tr><td>{{VK_PAD_LTHUMB_DOWNLEFT}}</td><td>Left thumbstick down and left?</td></tr> <tr><td>{{VK_PAD_RTHUMB_UP}}</td><td>Right thumbstick up?</td></tr> <tr><td>{{VK_PAD_RTHUMB_DOWN}}</td><td>Right thumbstick down?</td></tr> <tr><td>{{VK_PAD_RTHUMB_RIGHT}}</td><td>Right thumbstick right?</td></tr> <tr><td>{{VK_PAD_RTHUMB_LEFT}}</td><td>Right thumbstick left?</td></tr> <tr><td>{{VK_PAD_RTHUMB_UPLEFT}}</td><td>Right thumbstick up and left?</td></tr> <tr><td>{{VK_PAD_RTHUMB_UPRIGHT}}</td><td>Right thumbstick up and right?</td></tr> <tr><td>{{VK_PAD_RTHUMB_DOWNRIGHT}}</td><td>Right thumbstick down and right?</td></tr> <tr><td>{{VK_PAD_RTHUMB_DOWNLEFT}}</td><td>Right thumbstick down and left?</td></tr> </table><p>?</p> <p>Retrieves the current state of the specified controller.</p> <p>When <strong>{{XInputGetState}}</strong> is used to retrieve controller data, the left and right triggers are each reported separately. For legacy reasons, when DirectInput retrieves controller data, the two triggers share the same axis. The legacy behavior is noticeable in the current Game Device Control Panel, which uses DirectInput for controller state.</p> <p>If the function succeeds, the return value is <strong>{{ERROR_SUCCESS}}</strong>. </p><p>If the controller is not connected, the return value is <strong>{{ERROR_DEVICE_NOT_CONNECTED}}</strong>. </p><p>If the function fails, the return value is an error code defined in Winerror.h. The function does not use <strong>SetLastError</strong> to set the calling thread's last-error code.</p> <dd> <p>Index of the user's controller. Can be a value from 0 to 3. For information about how this value is determined and how the value maps to indicators on the controller, see Multiple Controllers.</p> </dd> <dd> <p>Pointer to an <strong>{{XINPUT_STATE}}</strong> structure that receives the current state of the controller.</p> </dd> <p>Sends data to a connected controller. This function is used to activate the vibration function of a controller.</p> <p>If the function succeeds, the return value is <strong>{{ERROR_SUCCESS}}</strong>.</p><p>If the controller is not connected, the return value is <strong>{{ERROR_DEVICE_NOT_CONNECTED}}</strong>.</p><p>If the function fails, the return value is an error code defined in WinError.h. The function does not use <em>SetLastError</em> to set the calling thread's last-error code.</p> <dd> <p>Index of the user's controller. Can be a value from 0 to 3. For information about how this value is determined and how the value maps to indicators on the controller, see Multiple Controllers.</p> </dd> <dd> <p>Pointer to an <strong>{{XINPUT_VIBRATION}}</strong> structure containing the vibration information to send to the controller.</p> </dd> <p>Retrieves the capabilities and features of a connected controller.</p> <strong>Note</strong>??The legacy {{XINPUT}} 9.1.0 version (included in Windows?Vista and later) always returned a fixed set of capabilities regardless of attached device.? <p>If the function succeeds, the return value is <strong>{{ERROR_SUCCESS}}</strong>. </p><p>If the controller is not connected, the return value is <strong>{{ERROR_DEVICE_NOT_CONNECTED}}</strong>. </p><p>If the function fails, the return value is an error code defined in WinError.h. The function does not use <em>SetLastError</em> to set the calling thread's last-error code.</p> <dd> <p>Index of the user's controller. Can be a value in the range 0?3. For information about how this value is determined and how the value maps to indicators on the controller, see Multiple Controllers. </p> </dd> <dd> <p>Input flags that identify the controller type. If this value is 0, then the capabilities of all controllers connected to the system are returned. Currently, only one value is supported:</p> <table> <tr><th>Value</th><th>Description</th></tr> <tr><td><strong>{{XINPUT_FLAG_GAMEPAD}}</strong></td><td>Limit query to devices of Xbox 360 Controller type.</td></tr> </table> <p>?</p> <p>Any value of <em>dwflags</em> other than the above or 0 is illegal and will result in an error break when debugging.</p> </dd> <dd> <p>Pointer to an <strong>{{XINPUT_CAPABILITIES}}</strong> structure that receives the controller capabilities.</p> </dd> <p>Sets the reporting state of {{XInput}}.</p> <p>This function is meant to be called when an application gains or loses focus (such as via <strong>{{WM_ACTIVATEAPP}}</strong>). Using this function, you will not have to change the {{XInput}} query loop in your application as neutral data will always be reported if {{XInput}} is disabled. </p><p>In a controller that supports vibration effects:</p><ul> <li>Passing <strong>{{FALSE}}</strong> will stop any vibration effects currently playing. In this state, calls to <strong>{{XInputSetState}}</strong> will be registered, but not passed to the device.</li> <li>Passing <strong>{{TRUE}}</strong> will pass the last vibration request (even if it is 0) sent to <strong>{{XInputSetState}}</strong> to the device.</li> </ul> <p>This function does not return a value.</p> <dd> <p>If enable is <strong>{{FALSE}}</strong>, {{XInput}} will only send neutral data in response to <strong>{{XInputGetState}}</strong> (all buttons up, axes centered, and triggers at 0). <strong>{{XInputSetState}}</strong> calls will be registered but not sent to the device. Sending any value other than <strong>{{FALSE}} </strong>will restore reading and writing functionality to normal.</p> </dd> <p>Retrieves the sound rendering and sound capture audio device {{IDs}} that are associated with the headset connected to the specified controller.</p> <p>Callers must allocate the memory for the buffers passed to <strong>{{XInputGetAudioDeviceIds}}</strong>. The resulting strings can be of arbitrary length.</p> <p>If the function successfully retrieves the device {{IDs}} for render and capture, the return code is <strong>{{ERROR_SUCCESS}}</strong>. </p><p>If there is no headset connected to the controller, the function will also retrieve <strong>{{ERROR_SUCCESS}}</strong> with <strong>{{NULL}}</strong> as the values for <em>pRenderDeviceId</em> and <em>pCaptureDeviceId</em>. </p><p>If the controller port device is not physically connected, the function will return <strong>{{ERROR_DEVICE_NOT_CONNECTED}}</strong>. </p><p>If the function fails, it will return a valid Win32 error code. </p> <dd> <p> Index of the gamer associated with the device.</p> </dd> <dd> <p> Windows Core Audio device {{ID}} string for render (speakers).</p> </dd> <dd> <p> Size, in wide-chars, of the render device {{ID}} string buffer.</p> </dd> <dd> <p>Windows Core Audio device {{ID}} string for capture (microphone).</p> </dd> <dd> <p>Size, in wide-chars, of capture device {{ID}} string buffer.</p> </dd> <p>Retrieves the battery type and charge status of a wireless controller.</p> <p>If the function succeeds, the return value is <strong>{{ERROR_SUCCESS}}</strong>.</p> <dd> <p>Index of the signed-in gamer associated with the device. Can be a value in the range 0?{{XUSER_MAX_COUNT}} ? 1.</p> </dd> <dd> <p>Specifies which device associated with this user index should be queried. Must be <strong>{{BATTERY_DEVTYPE_GAMEPAD}}</strong> or <strong>{{BATTERY_DEVTYPE_HEADSET}}</strong>.</p> </dd> <dd> <p>Pointer to an <strong>{{XINPUT_BATTERY_INFORMATION}}</strong> structure that receives the battery information.</p> </dd> <p>Retrieves a gamepad input event.</p> <p>Wireless controllers are not considered active upon system startup, and calls to any of the <em>{{XInput}}</em> functions before a wireless controller is made active return <strong>{{ERROR_DEVICE_NOT_CONNECTED}}</strong>. Game titles must examine the return code and be prepared to handle this condition. Wired controllers are automatically activated when they are inserted. Wireless controllers are activated when the user presses the {{START}} or Xbox Guide button to power on the controller.</p> <p>If the function succeeds, the return value is <strong>{{ERROR_SUCCESS}}</strong>. </p><p>If no new keys have been pressed, the return value is <strong>{{ERROR_EMPTY}}</strong>. </p><p>If the controller is not connected or the user has not activated it, the return value is <strong>{{ERROR_DEVICE_NOT_CONNECTED}}</strong>. See the Remarks section below.</p><p>If the function fails, the return value is an error code defined in Winerror.h. The function does not use <strong>SetLastError</strong> to set the calling thread's last-error code. </p> <dd> <p>[in] Index of the signed-in gamer associated with the device. Can be a value in the range 0?{{XUSER_MAX_COUNT}} ? 1, or {{XUSER_INDEX_ANY}} to fetch the next available input event from any user.</p> </dd> <dd> <p>[in] Reserved</p> </dd> <dd> <p>[out] Pointer to an <strong>{{XINPUT_KEYSTROKE}}</strong> structure that receives an input event.</p> </dd> <p>A multithread interface accesses multithread settings and can only be used if the thread-safe layer is turned on. </p> <p>This interface is obtained by querying it from the <strong>{{ID3D10Device}} Interface</strong> using {{IUnknown::QueryInterface}}.</p> <p>Enter a device's critical section.</p> <p>Entering a device's critical section prevents other threads from simultaneously calling that device's methods (if <strong>multithread protection</strong> is set to true), calling {{DXGI}} methods, and calling the methods of all resource, view, shader, state, and asynchronous interfaces.</p><p>This function should be used in multithreaded applications when there is a series of graphics commands that must happen in order. This function is typically called at the beginning of the series of graphics commands, and <strong>{{ID3D10Multithread::Leave}}</strong> is typically called after those graphics commands.</p> <p>Returns nothing.</p> <p>Leave a device's critical section.</p> <p>This function is typically used in multithreaded applications when there is a series of graphics commands that must happen in order. <strong>{{ID3D10Multithread::Enter}}</strong> is typically called at the beginning of a series of graphics commands, and this function is typically called after those graphics commands.</p> <p>Returns nothing.</p> <p>Turn multithreading on or off.</p> <p>True if multithreading was turned on prior to calling this method, false otherwise.</p> <dd> <p>True to turn multithreading on, false to turn it off.</p> </dd> <p>Find out if multithreading is turned on or not.</p> <p>Whether or not multithreading is turned on. True means on, false means off.</p> <p> The <strong>{{LOCKTYPE}}</strong> enumeration values indicate the type of locking requested for the specified range of bytes. The values are used in the <strong>{{ILockBytes::LockRegion}}</strong> and <strong>{{IStream::LockRegion}}</strong> methods.</p> <p> The <strong>{{STATSTG}}</strong> structure contains statistical data about an open storage, stream, or byte-array object. This structure is used in the <strong>{{IEnumSTATSTG}}</strong>, <strong>{{ILockBytes}}</strong>, <strong>{{IStorage}}</strong>, and <strong>{{IStream}}</strong> interfaces.</p> <p> The <strong>{{ISequentialStream}}</strong> interface supports simplified sequential access to stream objects. The <strong>{{IStream}}</strong> interface inherits its <strong>Read</strong> and <strong>Write</strong> methods from <strong>{{ISequentialStream}}</strong>.</p> <p>Reads a specified number of bytes from the stream object into memory starting at the current read/write location within the stream.</p> <dd><p>[in] Points to the buffer into which the stream is read. If an error occurs, this value is {{NULL}}.</p></dd> <dd><p>[in] Specifies the number of bytes of data to attempt to read from the stream object.</p></dd> <dd><p>[out] Pointer to a location where this method writes the actual number of bytes read from the stream object. You can set this reference to {{NULL}} to indicate that you are not interested in this value. In this case, this method does not provide the actual number of bytes read.</p></dd> <p>Writes a specified number of bytes into the stream object starting at the current read/write location within the stream.</p> <dd><p>[in] Points to the buffer into which the stream should be written.</p></dd> <dd><p>[in] The number of bytes of data to attempt to write into the stream.</p></dd> <dd><p>[out] Pointer to a location where this method writes the actual number of bytes written to the stream object. The caller can set this reference to {{NULL}}, in which case this method does not provide the actual number of bytes written.</p></dd> <p> The <strong>{{IStream}}</strong> interface lets you read and write data to stream objects. Stream objects contain the data in a structured storage object, where storages provide the structure. Simple data can be written directly to a stream but, most frequently, streams are elements nested within a storage object. They are similar to standard files.</p><p>The <strong>{{IStream}}</strong> interface defines methods similar to the {{MS}}-{{DOS}} {{FAT}} file functions. For example, each stream object has its own access rights and a seek reference. The main difference between a {{DOS}} file and a stream object is that in the latter case, streams are opened using an <strong>{{IStream}}</strong> interface reference rather than a file handle.</p><p>The methods in this interface present your object's data as a contiguous sequence of bytes that you can read or write. There are also methods for committing and reverting changes on streams that are open in transacted mode and methods for restricting access to a range of bytes in the stream.</p><p>Streams can remain open for long periods of time without consuming file-system resources. The <strong>{{IUnknown::Release}}</strong> method is similar to a close function on a file. Once released, the stream object is no longer valid and cannot be used.</p><p>Clients of asynchronous monikers can choose between a data-pull or data-push model for driving an asynchronous <strong>{{IMoniker::BindToStorage}}</strong> operation and for receiving asynchronous notifications. See {{URL}} Monikers for more information. The following table compares the behavior of asynchronous <strong>{{ISequentialStream::Read}}</strong> and <strong>{{IStream::Seek}}</strong> calls returned in <strong>{{IBindStatusCallback::OnDataAvailable}}</strong> in these two download models:</p> <p> The <strong>Seek</strong> method changes the seek reference to a new location. The new location is relative to either the beginning of the stream, the end of the stream, or the current seek reference.</p> <p><strong>{{IStream::Seek}}</strong> changes the seek reference so that subsequent read and write operations can be performed at a different location in the stream object. It is an error to seek before the beginning of the stream. It is not, however, an error to seek past the end of the stream. Seeking past the end of the stream is useful for subsequent write operations, as the stream byte range will be extended to the new seek position immediately before the write is complete.</p><p>You can also use this method to obtain the current value of the seek reference by calling this method with the <em>dwOrigin</em> parameter set to <strong>{{STREAM_SEEK_CUR}}</strong> and the <em>dlibMove</em> parameter set to 0 so that the seek reference is not changed. The current seek reference is returned in the <em>plibNewPosition</em> parameter.</p> <p>This method can return one of these values.</p><dl> <dt><strong>{{S_OK}}</strong></dt> <dd> <p>The seek reference was successfully adjusted.</p> </dd> <dt><strong>{{E_PENDING}}</strong></dt> <dd> <p>Asynchronous Storage only: Part or all of the stream data is currently unavailable. For more information, see <strong>{{IFillLockBytes}}</strong> and Asynchronous Storage.</p> </dd> <dt><strong>{{STG_E_INVALIDPOINTER}}</strong></dt> <dd> <p>Indicates that the [out] parameter <em>plibNewPosition</em> points to invalid memory, because <em>plibNewPosition</em> is not read.</p> </dd> <dt><strong>{{STG_E_INVALIDFUNCTION}}</strong></dt> <dd> <p>The <em>dwOrigin</em> parameter contains an invalid value, or the <em>dlibMove</em> parameter contains a bad offset value. For example, the result of the seek reference is a negative offset value.</p> </dd> <dt><strong>{{STG_E_REVERTED}}</strong></dt> <dd> <p>The object has been invalidated by a revert operation above it in the transaction tree.</p> </dd> </dl> <dd> <p>The displacement to be added to the location indicated by the <em>dwOrigin</em> parameter. If <em>dwOrigin</em> is <strong>{{STREAM_SEEK_SET}}</strong>, this is interpreted as an unsigned value rather than a signed value.</p> </dd> <dd> <p>The origin for the displacement specified in <em>dlibMove</em>. The origin can be the beginning of the file (<strong>{{STREAM_SEEK_SET}}</strong>), the current seek reference (<strong>{{STREAM_SEEK_CUR}}</strong>), or the end of the file (<strong>{{STREAM_SEEK_END}}</strong>). For more information about values, see the <strong>{{STREAM_SEEK}}</strong> enumeration.</p> </dd> <dd> <p>A reference to the location where this method writes the value of the new seek reference from the beginning of the stream. </p> <p>You can set this reference to <strong>{{NULL}}</strong>. In this case, this method does not provide the new seek reference.</p> </dd> <p>The <strong>SetSize</strong> method changes the size of the stream object.</p> <p><strong>{{IStream::SetSize}}</strong> changes the size of the stream object. Call this method to preallocate space for the stream. If the <em>libNewSize</em> parameter is larger than the current stream size, the stream is extended to the indicated size by filling the intervening space with bytes of undefined value. This operation is similar to the <strong>{{ISequentialStream::Write}}</strong> method if the seek reference is past the current end of the stream.</p><p>If the <em>libNewSize</em> parameter is smaller than the current stream, the stream is truncated to the indicated size.</p><p>The seek reference is not affected by the change in stream size.</p><p>Calling <strong>{{IStream::SetSize}}</strong> can be an effective way to obtain a large chunk of contiguous space.</p> <p>This method can return one of these values.</p><dl> <dt><strong>{{S_OK}}</strong></dt> <dd> <p>The size of the stream object was successfully changed.</p> </dd> <dt><strong>{{E_PENDING}}</strong></dt> <dd> <p>Asynchronous Storage only: Part or all of the stream's data is currently unavailable. For more information, see <strong>{{IFillLockBytes}}</strong> and Asynchronous Storage.</p> </dd> <dt><strong>{{STG_E_MEDIUMFULL}}</strong></dt> <dd> <p>The stream size is not changed because there is no space left on the storage device.</p> </dd> <dt><strong>{{STG_E_INVALIDFUNCTION}}</strong></dt> <dd> <p>The value of the <em>libNewSize</em> parameter is not supported by the implementation. Not all streams support greater than 2?? bytes. If a stream does not support more than 2?? bytes, the high <strong>{{DWORD}}</strong> data type of <em>libNewSize</em> must be zero. If it is nonzero, the implementation may return {{STG_E_INVALIDFUNCTION}}. In general, {{COM}}-based implementations of the <strong>{{IStream}}</strong> interface do not support streams larger than 2?? bytes.</p> </dd> <dt><strong>{{STG_E_REVERTED}}</strong></dt> <dd> <p>The object has been invalidated by a revert operation above it in the transaction tree.</p> </dd> </dl> <dd> <p>Specifies the new size, in bytes, of the stream.</p> </dd> <p>The <strong>CopyTo</strong> method copies a specified number of bytes from the current seek reference in the stream to the current seek reference in another stream.</p> <p>The <strong>CopyTo</strong> method copies the specified bytes from one stream to another. It can also be used to copy a stream to itself. The seek reference in each stream instance is adjusted for the number of bytes read or written. This method is equivalent to reading <em>cb</em> bytes into memory using <strong>{{ISequentialStream::Read}}</strong> and then immediately writing them to the destination stream using <strong>{{ISequentialStream::Write}}</strong>, although <strong>{{IStream::CopyTo}}</strong> will be more efficient.</p><p>The destination stream can be a clone of the source stream created by calling the <strong>{{IStream::Clone}}</strong> method.</p><p>If <strong>{{IStream::CopyTo}}</strong> returns an error, you cannot assume that the seek references are valid for either the source or destination. Additionally, the values of <em>pcbRead</em> and <em>pcbWritten</em> are not meaningful even though they are returned.</p><p>If <strong>{{IStream::CopyTo}}</strong> returns successfully, the actual number of bytes read and written are the same.</p><p>To copy the remainder of the source from the current seek reference, specify the maximum large integer value for the <em>cb</em> parameter. If the seek reference is the beginning of the stream, this operation copies the entire stream.</p> <p>This method can return one of these values.</p><dl> <dt><strong>{{S_OK}}</strong></dt> <dd> <p>The stream object was successfully copied.</p> </dd> <dt><strong>{{E_PENDING}}</strong></dt> <dd> <p>Asynchronous Storage only: Part or all of the data to be copied is currently unavailable. For more information, see <strong>{{IFillLockBytes}}</strong> and Asynchronous Storage.</p> </dd> <dt><strong>{{STG_E_INVALIDPOINTER}}</strong></dt> <dd> <p>The value of one of the reference parameters is invalid.</p> </dd> <dt><strong>{{STG_E_MEDIUMFULL}}</strong></dt> <dd> <p>The stream is not copied because there is no space left on the storage device.</p> </dd> <dt><strong>{{STG_E_REVERTED}}</strong></dt> <dd> <p>The object has been invalidated by a revert operation above it in the transaction tree.</p> </dd> </dl> <dd> <p>A reference to the destination stream. The stream pointed to by <em>pstm</em> can be a new stream or a clone of the source stream.</p> </dd> <dd> <p>The number of bytes to copy from the source stream.</p> </dd> <dd> <p>A reference to the location where this method writes the actual number of bytes read from the source. You can set this reference to <strong>{{NULL}}</strong>. In this case, this method does not provide the actual number of bytes read.</p> </dd> <dd> <p>A reference to the location where this method writes the actual number of bytes written to the destination. You can set this reference to <strong>{{NULL}}</strong>. In this case, this method does not provide the actual number of bytes written.</p> </dd> <p>The <strong>Commit</strong> method ensures that any changes made to a stream object open in transacted mode are reflected in the parent storage. If the stream object is open in direct mode, <strong>{{IStream::Commit}}</strong> has no effect other than flushing all memory buffers to the next-level storage object. The {{COM}} compound file implementation of streams does not support opening streams in transacted mode.</p> <p>The <strong>Commit</strong> method ensures that changes to a stream object opened in transacted mode are reflected in the parent storage. Changes that have been made to the stream since it was opened or last committed are reflected to the parent storage object. If the parent is opened in transacted mode, the parent may revert at a later time, rolling back the changes to this stream object. The compound file implementation does not support the opening of streams in transacted mode, so this method has very little effect other than to flush memory buffers. For more information, see {{IStream}} - Compound File Implementation.</p><p>If the stream is open in direct mode, this method ensures that any memory buffers have been flushed out to the underlying storage object. This is much like a flush in traditional file systems.</p><p>The <strong>{{IStream::Commit}}</strong> method is useful on a direct mode stream when the implementation of the <strong>{{IStream}}</strong> interface is a wrapper for underlying file system {{APIs}}. In this case, <strong>{{IStream::Commit}}</strong> would be connected to the file system's flush call.</p> <p>This method can return one of these values.</p><dl> <dt><strong>{{S_OK}}</strong></dt> <dd> <p>Changes to the stream object were successfully committed to the parent level.</p> </dd> <dt><strong>{{E_PENDING}}</strong></dt> <dd> <p>Asynchronous Storage only: Part or all of the stream's data is currently unavailable. For more information see <strong>{{IFillLockBytes}}</strong> and Asynchronous Storage.</p> </dd> <dt><strong>{{STG_E_MEDIUMFULL}}</strong></dt> <dd> <p>The commit operation failed due to lack of space on the storage device.</p> </dd> <dt><strong>{{STG_E_REVERTED}}</strong></dt> <dd> <p>The object has been invalidated by a revert operation above it in the transaction tree.</p> </dd> </dl> <dd> <p>Controls how the changes for the stream object are committed. See the <strong>{{STGC}}</strong> enumeration for a definition of these values.</p> </dd> <p>The <strong>Revert</strong> method discards all changes that have been made to a transacted stream since the last <strong>{{IStream::Commit}}</strong> call. On streams open in direct mode and streams using the {{COM}} compound file implementation of <strong>{{IStream::Revert}}</strong>, this method has no effect.</p> <p>The <strong>Revert</strong> method discards changes made to a transacted stream since the last commit operation.</p> <p>This method can return one of these values.</p><dl> <dt><strong>{{S_OK}}</strong></dt> <dd> <p>The stream was successfully reverted to its previous version.</p> </dd> <dt><strong>{{E_PENDING}}</strong></dt> <dd> <p>Asynchronous Storage only: Part or all of the stream's data is currently unavailable. For more information see <strong>{{IFillLockBytes}}</strong> and Asynchronous Storage.</p> </dd> </dl> <p> The <strong>Stat</strong> method retrieves the <strong>{{STATSTG}}</strong> structure for this stream.</p> <p><strong>{{IStream::Stat}}</strong> retrieves a reference to the <strong>{{STATSTG}}</strong> structure that contains information about this open stream. When this stream is within a structured storage and <strong>{{IStorage::EnumElements}}</strong> is called, it creates an enumerator object with the <strong>{{IEnumSTATSTG}}</strong> interface on it, which can be called to enumerate the storages and streams through the <strong>{{STATSTG}}</strong> structures associated with each of them.</p> <p>This method can return one of these values.</p><dl> <dt><strong>{{S_OK}}</strong></dt> <dd> <p>The <strong>{{STATSTG}}</strong> structure was successfully returned at the specified location.</p> </dd> <dt><strong>{{E_PENDING}}</strong></dt> <dd> <p>Asynchronous Storage only: Part or all of the stream's data is currently unavailable. For more information see <strong>{{IFillLockBytes}}</strong> and Asynchronous Storage.</p> </dd> <dt><strong>{{STG_E_ACCESSDENIED}}</strong></dt> <dd> <p>The caller does not have enough permissions for accessing statistics for this storage object.</p> </dd> <dt><strong>{{STG_E_INSUFFICIENTMEMORY}}</strong></dt> <dd> <p>The <strong>{{STATSTG}}</strong> structure was not returned due to a lack of memory.</p> </dd> <dt><strong>{{STG_E_INVALIDFLAG}}</strong></dt> <dd> <p>The value for the <em>grfStateFlag</em> parameter is not valid.</p> </dd> <dt><strong>{{STG_E_INVALIDPOINTER}}</strong></dt> <dd> <p>The <em>pStatStg</em> reference is not valid.</p> </dd> <dt><strong>{{STG_E_REVERTED}}</strong></dt> <dd> <p>The object has been invalidated by a revert operation above it in the transaction tree.</p> </dd> </dl> <p> The <strong>Clone</strong> method creates a new stream object with its own seek reference that references the same bytes as the original stream.</p> <p>The <strong>Clone</strong> method creates a new stream object for accessing the same bytes but using a separate seek reference. The new stream object sees the same data as the source-stream object. Changes written to one object are immediately visible in the other. Range locking is shared between the stream objects.</p><p>The initial setting of the seek reference in the cloned stream instance is the same as the current setting of the seek reference in the original stream at the time of the clone operation.</p> <p>This method can return one of these values.</p><dl> <dt><strong>{{S_OK}}</strong></dt> <dd> <p>The stream was successfully cloned.</p> </dd> <dt><strong>{{E_PENDING}}</strong></dt> <dd> <p>Asynchronous Storage only: Part or all of the stream's data is currently unavailable. For more information see <strong>{{IFillLockBytes}}</strong> and Asynchronous Storage.</p> </dd> <dt><strong>{{STG_E_INSUFFICIENTMEMORY}}</strong></dt> <dd> <p>The stream was not cloned due to a lack of memory.</p> </dd> <dt><strong>{{STG_E_INVALIDPOINTER}}</strong></dt> <dd> <p>The <em>ppStm</em> reference is not valid.</p> </dd> <dt><strong>{{STG_E_REVERTED}}</strong></dt> <dd> <p>The object has been invalidated by a revert operation above it in the transaction tree.</p> </dd> </dl> <dd> <p>When successful, reference to the location of an <strong>{{IStream}}</strong> reference to the new stream object. If an error occurs, this parameter is <strong>{{NULL}}</strong>.</p> </dd> <p> The <strong>{{STGC}}</strong> enumeration constants specify the conditions for performing the commit operation in the <strong>{{IStorage::Commit}}</strong> and <strong>{{IStream::Commit}}</strong> methods.</p> <p>You can specify <strong>{{STGC_DEFAULT}}</strong> or some combination of <strong>{{STGC_OVERWRITE}}</strong>, <strong>{{STGC_ONLYIFCURRENT}}</strong>, and <strong>{{STGC_DANGEROUSLYCOMMITMERELYTODISKCACHE}}</strong> for normal commit operations. You can specify <strong>{{STGC_CONSOLIDATE}}</strong> with any other {{STGC}} flags.</p><p>Typically, use <strong>{{STGC_ONLYIFCURRENT}}</strong> to protect the storage object in cases where more than one user can edit the object simultaneously.</p> <p> The <strong>{{STATFLAG}}</strong> enumeration values indicate whether the method should try to return a name in the <strong>pwcsName</strong> member of the <strong>{{STATSTG}}</strong> structure. The values are used in the <strong>{{ILockBytes::Stat}}</strong>, <strong>{{IStorage::Stat}}</strong>, and <strong>{{IStream::Stat}}</strong> methods to save memory when the <strong>pwcsName</strong> member is not required.</p> <p> </p><p>The <strong>{{AUDCLNT_SHAREMODE}}</strong> enumeration defines constants that indicate whether an audio stream will run in shared mode or in exclusive mode.</p> <p>The <strong>{{IAudioClient::Initialize}}</strong> and <strong>{{IAudioClient::IsFormatSupported}}</strong> methods use the constants defined in the <strong>{{AUDCLNT_SHAREMODE}}</strong> enumeration.</p><p>In shared mode, the client can share the audio endpoint device with clients that run in other user-mode processes. The audio engine always supports formats for client streams that match the engine's mix format. In addition, the audio engine might support another format if the Windows audio service can insert system effects into the client stream to convert the client format to the mix format.</p><p>In exclusive mode, the Windows audio service attempts to establish a connection in which the client has exclusive access to the audio endpoint device. In this mode, the audio engine inserts no system effects into the local stream to aid in the creation of the connection point. Either the audio device can handle the specified format directly or the method fails.</p><p>For more information about shared-mode and exclusive-mode streams, see User-Mode Audio Components.</p> <dd> <p>The audio stream will run in shared mode. For more information, see Remarks.</p> </dd> <dd> <p>The audio stream will run in exclusive mode. For more information, see Remarks.</p> </dd> <p>Specifies the category of an audio stream.</p> <p>Note that only a subset of the audio stream categories are valid for certain stream types.</p><table> <tr><th>Stream type</th><th>Valid categories</th></tr> <tr><td>Render stream</td><td>All categories are valid.</td></tr> <tr><td>Capture stream</td><td>AudioCategory_Communications, AudioCategory_Speech, AudioCategory_Other</td></tr> <tr><td>Loopback stream</td><td>AudioCategory_Other</td></tr> </table><p>?</p><p>Games should categorize their music streams as <strong>AudioCategory_GameMedia</strong> so that game music mutes automatically if another application plays music in the background. Music or video applications should categorize their streams as <strong>AudioCategory_Media</strong> or <strong>AudioCategory_Movie</strong> so they will take priority over <strong>AudioCategory_GameMedia</strong> streams.</p><p>The values <strong>AudioCategory_ForegroundOnlyMedia</strong> and <strong>AudioCategory_BackgroundCapableMedia</strong> are deprecated. For Windows Store apps, these values will continue to function the same when running on Windows?10 as they did on Windows?8.1. Attempting to use these values in a Universal Windows Platform ({{UWP}}) app, will result in compilation errors and an exception at runtime. Using these values in a Windows desktop application built with the Windows?10 {{SDK}} the will result in a compilation error.</p> <dd> <p>Other audio stream.</p> </dd> <dd> <p>Media that will only stream when the app is in the foreground. This enumeration value has been deprecated. For more information, see the Remarks section.</p> </dd> <dd> <p>Media that can be streamed when the app is in the background. This enumeration value has been deprecated. For more information, see the Remarks section.</p> </dd> <dd> <p>Real-time communications, such as {{VOIP}} or chat.</p> </dd> <dd> <p>Alert sounds.</p> </dd> <dd> <p>Sound effects.</p> </dd> <dd> <p>Game sound effects.</p> </dd> <dd> <p>Background audio for games.</p> </dd> <dd> <p>Game chat audio. Similar to <strong>AudioCategory_Communications</strong> except that <strong>AudioCategory_GameChat</strong> will not attenuate other streams.</p> </dd> <dd> <p>Speech.</p> </dd> <dd> <p>Stream that includes audio with dialog.</p> </dd> <dd> <p>Stream that includes audio without dialog.</p> </dd> <p> </p><p>The <strong>AudioSessionState</strong> enumeration defines constants that indicate the current state of an audio session.</p> <p>When a client opens a session by assigning the first stream to the session (by calling the <strong>{{IAudioClient::Initialize}}</strong> method), the initial session state is inactive. The session state changes from inactive to active when a stream in the session begins running (because the client has called the <strong>{{IAudioClient::Start}}</strong> method). The session changes from active to inactive when the client stops the last running stream in the session (by calling the <strong>{{IAudioClient::Stop}}</strong> method). The session state changes to expired when the client destroys the last stream in the session by releasing all references to the stream object.</p><p>The system volume-control program, Sndvol, displays volume controls for both active and inactive sessions. Sndvol stops displaying the volume control for a session when the session state changes to expired. For more information about Sndvol, see Audio Sessions.</p><p>The <strong>{{IAudioSessionControl::GetState}}</strong> and <strong>{{IAudioSessionEvents::OnStateChanged}}</strong> methods use the constants defined in the <strong>AudioSessionState</strong> enumeration.</p><p>For more information about session states, see Audio Sessions.</p> <dd> <p>The audio session is inactive. (It contains at least one stream, but none of the streams in the session is currently running.)</p> </dd> <dd> <p>The audio session is active. (At least one of the streams in the session is running.)</p> </dd> <dd> <p>The audio session has expired. (It contains no streams.)</p> </dd> <p>Presents a rendered image to the user.</p> <p>Starting with Direct3D 11.1, consider using <strong>{{IDXGISwapChain1::Present1}}</strong> because you can then use dirty rectangles and the scroll rectangle in the swap chain presentation and as such use less memory bandwidth and as a result less system power. For more info about using dirty rectangles and the scroll rectangle in swap chain presentation, see Using dirty rectangles and the scroll rectangle in swap chain presentation.</p><p>For the best performance when flipping swap-chain buffers in a full-screen application, see Full-Screen Application Performance Hints.</p><p>Because calling <strong>Present</strong> might cause the render thread to wait on the message-pump thread, be careful when calling this method in an application that uses multiple threads. For more details, see Multithreading Considerations.</p><table> <tr><td> <p>Differences between Direct3D 9 and Direct3D 10:</p> <p>Specifying <strong>{{DXGI_PRESENT_TEST}}</strong> in the <em>Flags</em> parameter is analogous to <strong>{{IDirect3DDevice9::TestCooperativeLevel}}</strong> in Direct3D 9.</p> </td></tr> </table><p>?</p><p>For flip presentation model swap chains that you create with the <strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong> value set, a successful presentation unbinds back buffer 0 from the graphics pipeline, except for when you pass the <strong>{{DXGI_PRESENT_DO_NOT_SEQUENCE}}</strong> flag in the <em>Flags</em> parameter.</p><p>For info about how data values change when you present content to the screen, see Converting data for the color space.</p> <p>Possible return values include: {{S_OK}}, {{DXGI_ERROR_DEVICE_RESET}} or {{DXGI_ERROR_DEVICE_REMOVED}} (see {{DXGI_ERROR}}), {{DXGI_STATUS_OCCLUDED}} (see {{DXGI_STATUS}}), or {{D3DDDIERR_DEVICEREMOVED}}. </p><strong>Note</strong>??The <strong>Present</strong> method can return either {{DXGI_ERROR_DEVICE_REMOVED}} or {{D3DDDIERR_DEVICEREMOVED}} if a video card has been physically removed from the computer, or a driver upgrade for the video card has occurred.? <dd> <p>An integer that specifies how to synchronize presentation of a frame with the vertical blank. </p> <p>For the bit-block transfer (bitblt) model (<strong>{{DXGI_SWAP_EFFECT_DISCARD}}</strong> or <strong>{{DXGI_SWAP_EFFECT_SEQUENTIAL}}</strong>), values are:</p> <ul> <li>0 - The presentation occurs immediately, there is no synchronization.</li> <li>1 through 4 - Synchronize presentation after the <em>n</em>th vertical blank.</li> </ul> <p>For the flip model (<strong>{{DXGI_SWAP_EFFECT_FLIP_SEQUENTIAL}}</strong>), values are:</p> <ul> <li>0 - Cancel the remaining time on the previously presented frame and discard this frame if a newer frame is queued. </li> <li>1 through 4 - Synchronize presentation for at least <em>n</em> vertical blanks. </li> </ul> <p>For an example that shows how sync-interval values affect a flip presentation queue, see Remarks.</p> <p>If the update region straddles more than one output (each represented by <strong>{{IDXGIOutput}}</strong>), <strong>Present</strong> performs the synchronization to the output that contains the largest sub-rectangle of the target window's client area.</p> </dd> <dd> <p>An integer value that contains swap-chain presentation options. These options are defined by the {{DXGI_PRESENT}} constants.</p> </dd> <p>Set the priority for evicting the resource from memory.</p> <p>The eviction priority is a memory-management variable that is used by {{DXGI}} for determining how to populate overcommitted memory.</p><p>You can set priority levels other than the defined values when appropriate. For example, you can set a resource with a priority level of 0x78000001 to indicate that the resource is slightly above normal.</p> <p>Returns one of the following {{DXGI_ERROR}}.</p> <dd> <p>The priority is one of the following values: </p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_MINIMUM}} (0x28000000)</strong></dt> </dl> </td><td> <p>The resource is unused and can be evicted as soon as another resource requires the memory that the resource occupies.</p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_LOW}} (0x50000000)</strong></dt> </dl> </td><td> <p>The eviction priority of the resource is low. The placement of the resource is not critical, and minimal work is performed to find a location for the resource. For example, if a {{GPU}} can render with a vertex buffer from either local or non-local memory with little difference in performance, that vertex buffer is low priority. Other more critical resources (for example, a render target or texture) can then occupy the faster memory.</p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_NORMAL}} (0x78000000)</strong></dt> </dl> </td><td> <p>The eviction priority of the resource is normal. The placement of the resource is important, but not critical, for performance. The resource is placed in its preferred location instead of a low-priority resource. </p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_HIGH}} (0xa0000000)</strong></dt> </dl> </td><td> <p>The eviction priority of the resource is high. The resource is placed in its preferred location instead of a low-priority or normal-priority resource.</p> </td></tr> <tr><td><dl> <dt><strong>{{DXGI_RESOURCE_PRIORITY_MAXIMUM}} (0xc8000000)</strong></dt> </dl> </td><td> <p>The resource is evicted from memory only if there is no other way of resolving the memory requirement.</p> </td></tr> </table> <p>?</p> </dd> <p>Get a reference to the data contained in the surface, and deny {{GPU}} access to the surface.</p> <p>Use <strong>{{IDXGISurface::Map}}</strong> to access a surface from the {{CPU}}. To release a mapped surface (and allow {{GPU}} access) call <strong>{{IDXGISurface::Unmap}}</strong>.</p> <p>Returns {{S_OK}} if successful; otherwise, returns one of the error codes that are described in the {{DXGI_ERROR}} topic.</p> <dd> <p>A reference to the surface data (see <strong>{{DXGI_MAPPED_RECT}}</strong>).</p> </dd> <dd> <p>{{CPU}} read-write flags. These flags can be combined with a logical {{OR}}. </p> <ul> <li>{{DXGI_MAP_READ}} - Allow {{CPU}} read access.</li> <li>{{DXGI_MAP_WRITE}} - Allow {{CPU}} write access.</li> <li>{{DXGI_MAP_DISCARD}} - Discard the previous contents of a resource when it is mapped.</li> </ul> </dd> <p>Status codes that can be returned by {{DXGI}} functions.</p><p></p> <p>The <strong>{{HRESULT}}</strong> value for each <strong>{{DXGI_STATUS}}</strong> value is determined from this macro that is defined in {{DXGItype}}.h:</p><pre> #define _FACDXGI 0x87a #define {{MAKE_DXGI_STATUS}}(code) {{MAKE_HRESULT}}(0, _FACDXGI, code) </pre><p>For example, <strong>{{DXGI_STATUS_OCCLUDED}}</strong> is defined as <strong>0x087A0001</strong>:</p><pre> #define {{DXGI_STATUS_OCCLUDED}} {{MAKE_DXGI_STATUS}}(1) </pre> <p> </p><p>Provides configuration information to the dispatching thread for a callback.</p> <p> The <strong>GetParameters</strong> method returns information about the callback so that the dispatching thread can optimize the process that it uses to invoke the callback. </p><p> If the method returns a value other than zero in the <em>pdwFlags</em> parameter, your <strong>Invoke</strong> method must meet the requirements described here. Otherwise, the callback might delay the pipeline.</p><p> If you want default values for both parameters, return <strong>{{E_NOTIMPL}}</strong>. The default values are given in the parameter descriptions on this page.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows?{{XP}} with Service Pack?2 ({{SP2}}) and later.</li> <li>Windows?{{XP}} Media Center Edition?2005 with {{KB900325}} (Windows?{{XP}} Media Center Edition?2005) and {{KB925766}} (October 2006 Update Rollup for Windows?{{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong><strong>{{S_OK}}</strong></strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong><strong>{{E_NOTIMPL}}</strong></strong></dt> </dl> </td><td> <p> Not implemented. Assume the default behavior. </p> </td></tr> </table><p>?</p> <dd> <p>Receives a flag indicating the behavior of the callback object's <strong>{{IMFAsyncCallback::Invoke}}</strong> method. The following values are defined. The default value is zero.</p> <table> <tr><th>Value</th><th>Meaning</th></tr> <tr><td><dl> <dt><strong>Zero</strong></dt> </dl> </td><td> <p>The callback does not take a long time to complete, but has no specific restrictions on what system calls it makes. The callback generally takes less than 30 milliseconds to complete.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MFASYNC_FAST_IO_PROCESSING_CALLBACK}}</strong></strong></dt> </dl> </td><td> <p>The callback does very minimal processing. It takes less than 1 millisecond to complete.</p> <p>The callback must be invoked from one of the following work queues:</p> <ul> <li><strong>{{MFASYNC_CALLBACK_QUEUE_IO}}</strong></li> <li><strong>{{MFASYNC_CALLBACK_QUEUE_TIMER}}</strong></li> </ul> </td></tr> <tr><td><dl> <dt><strong><strong>{{MFASYNC_SIGNAL_CALLBACK}}</strong></strong></dt> </dl> </td><td> <p>Implies <strong>{{MFASYNC_FAST_IO_PROCESSING_CALLBACK}}</strong>, with the additional restriction that the callback does no processing (less than 50 microseconds), and the only system call it makes is <strong>SetEvent</strong>.</p> <p>The callback must be invoked from one of the following work queues:</p> <ul> <li><strong>{{MFASYNC_CALLBACK_QUEUE_IO}}</strong></li> <li><strong>{{MFASYNC_CALLBACK_QUEUE_TIMER}}</strong></li> </ul> </td></tr> <tr><td><dl> <dt><strong><strong>{{MFASYNC_BLOCKING_CALLBACK}}</strong></strong></dt> </dl> </td><td> <p>Blocking callback.</p> </td></tr> <tr><td><dl> <dt><strong><strong>{{MFASYNC_REPLY_CALLBACK}}</strong></strong></dt> </dl> </td><td> <p>Reply callback.</p> </td></tr> </table> <p>?</p> </dd> <dd> <p> Receives the identifier of the work queue on which the callback is dispatched. </p> <p>This value can specify one of the standard Media Foundation work queues, or a work queue created by the application. For list of standard Media Foundation work queues, see <strong>Work Queue Identifiers</strong>. To create a new work queue, call <strong>{{MFAllocateWorkQueue}}</strong>. The default value is <strong>{{MFASYNC_CALLBACK_QUEUE_STANDARD}}</strong>.</p> <p>If the work queue is not compatible with the value returned in <em>pdwFlags</em>, the Media Foundation platform returns <strong>{{MF_E_INVALID_WORKQUEUE}}</strong> when it tries to dispatch the callback. (See <strong>{{MFPutWorkItem}}</strong>.)</p> </dd> <p>Contains information about the creation flags, input channels, and sample rate of a voice.</p> <p>Note the DirectX {{SDK}} versions of {{XAUDIO2}} do not support the <strong>ActiveFlags</strong> member.</p> <dd> <p>Flags used to create the voice; see the individual voice interfaces for more information.</p> </dd> <dd> <p>Flags that are currently set on the voice.</p> </dd> <dd> <p>The number of input channels the voice expects.</p> </dd> <dd> <p>The input sample rate the voice expects.</p> </dd> <p>{{XAudio2}} constants that specify default parameters, maximum values, and flags.</p><p> </p><p><strong>{{XAudio2}} boundary values</strong></p> <p>Represents an audio data buffer, used with <strong>{{IXAudio2SourceVoice::SubmitSourceBuffer}}</strong>.</p> <p>{{XAudio2}} audio data is interleaved, data from each channel is adjacent for a particular sample number. For example if there was a 4 channel wave playing into an {{XAudio2}} source voice, the audio data would be a sample of channel 0, a sample of channel 1, a sample of channel 2, a sample of channel 3, and then the next sample of channels 0, 1, 2, 3, etc. </p><p>The <strong>AudioBytes</strong> and <strong>pAudioData</strong> members of <strong>{{XAUDIO2_BUFFER}}</strong> correspond to the size in bytes and contents of the 'data' {{RIFF}} chunk of the file being played. The contents of the chunk may need to be byte swapped when loading the file on Xbox 360. </p><p>Memory allocated to hold a <strong>{{XAUDIO2_BUFFER}}</strong> or <strong>{{XAUDIO2_BUFFER_WMA}}</strong> structure can be freed as soon as the <strong>{{IXAudio2SourceVoice::SubmitSourceBuffer}}</strong> call it is passed to returns. The data the structure points to (<strong>pAudioData</strong> and <strong>pDecodedPacketCumulativeBytes</strong>, respectively) can't be freed until the buffer completes (as signaled by the <strong>{{IXAudio2VoiceCallback::OnBufferEnd}}</strong> callback) or the voice is stopped or destroyed. </p> <p>Retrieves the battery type and charge status of a wireless controller.</p> <p>If the function succeeds, the return value is <strong>{{ERROR_SUCCESS}}</strong>.</p> <dd> <p>Index of the signed-in gamer associated with the device. Can be a value in the range 0?{{XUSER_MAX_COUNT}} ? 1.</p> </dd> <dd> <p>Specifies which device associated with this user index should be queried. Must be <strong>{{BATTERY_DEVTYPE_GAMEPAD}}</strong> or <strong>{{BATTERY_DEVTYPE_HEADSET}}</strong>.</p> </dd> <dd> <p>Pointer to an <strong>{{XINPUT_BATTERY_INFORMATION}}</strong> structure that receives the battery information.</p> </dd> <p>Contains information on battery type and charge state.</p> <dd> <p>The type of battery. <em>BatteryType</em> will be one of the following values. </p> <table> <tr><th>Value</th><th>Description</th></tr> <tr><td>{{BATTERY_TYPE_DISCONNECTED}}</td><td>The device is not connected.?</td></tr> <tr><td>{{BATTERY_TYPE_WIRED}}</td><td>The device is a wired device and does not have a battery.?</td></tr> <tr><td>{{BATTERY_TYPE_ALKALINE}}</td><td>The device has an alkaline battery.?</td></tr> <tr><td>{{BATTERY_TYPE_NIMH}}</td><td>The device has a nickel metal hydride battery.?</td></tr> <tr><td>{{BATTERY_TYPE_UNKNOWN}}</td><td>The device has an unknown battery type.?</td></tr> </table> <p>?</p> </dd> <dd> <p>The charge state of the battery. This value is only valid for wireless devices with a known battery type. <em>BatteryLevel</em> will be one of the following values. </p> <table> <tr><th>Value</th></tr> <tr><td>{{BATTERY_LEVEL_EMPTY}}</td></tr> <tr><td>{{BATTERY_LEVEL_LOW}}</td></tr> <tr><td>{{BATTERY_LEVEL_MEDIUM}}</td></tr> <tr><td>{{BATTERY_LEVEL_FULL}}</td></tr> </table> <p>?</p> </dd> <p>Describes the capabilities of a connected controller. The <strong>{{XInputGetCapabilities}}</strong> function returns <strong>{{XINPUT_CAPABILITIES}}</strong>. </p> <p> <strong>{{XInputGetCapabilities}}</strong> returns <strong>{{XINPUT_CAPABILITIES}}</strong> to indicate the characteristics and available functionality of a specified controller. </p><p> <strong>{{XInputGetCapabilities}}</strong> sets the structure members to indicate which inputs the device supports. For binary state controls, such as digital buttons, the corresponding bit reflects whether or not the control is supported by the device. For proportional controls, such as thumbsticks, the value indicates the resolution for that control. Some number of the least significant bits may not be set, indicating that the control does not provide resolution to that level. </p><p>The <em>SubType</em> member indicates the specific subtype of controller present. Games may detect the controller subtype and tune their handling of controller input or output based on subtypes that are well suited to their game genre. For example, a car racing game might check for the presence of a wheel controller to provide finer control of the car being driven. However, titles must not disable or ignore a device based on its subtype. Subtypes not recognized by the game or for which the game is not specifically tuned should be treated as a standard Xbox 360 Controller ({{XINPUT_DEVSUBTYPE_GAMEPAD}}). </p><p>Older {{XUSB}} Windows drivers report incomplete capabilities information, particularly for wireless devices. The latest {{XUSB}} Windows driver provides full support for wired and wireless devices, and more complete and accurate capabilties flags. </p> <p>A table of controller subtypes available in {{XInput}}.</p> <p>Retrieves a gamepad input event.</p> <p>Wireless controllers are not considered active upon system startup, and calls to any of the <em>{{XInput}}</em> functions before a wireless controller is made active return <strong>{{ERROR_DEVICE_NOT_CONNECTED}}</strong>. Game titles must examine the return code and be prepared to handle this condition. Wired controllers are automatically activated when they are inserted. Wireless controllers are activated when the user presses the {{START}} or Xbox Guide button to power on the controller.</p> <p>If the function succeeds, the return value is <strong>{{ERROR_SUCCESS}}</strong>. </p><p>If no new keys have been pressed, the return value is <strong>{{ERROR_EMPTY}}</strong>. </p><p>If the controller is not connected or the user has not activated it, the return value is <strong>{{ERROR_DEVICE_NOT_CONNECTED}}</strong>. See the Remarks section below.</p><p>If the function fails, the return value is an error code defined in Winerror.h. The function does not use <strong>SetLastError</strong> to set the calling thread's last-error code. </p> <dd> <p>[in] Index of the signed-in gamer associated with the device. Can be a value in the range 0?{{XUSER_MAX_COUNT}} ? 1, or {{XUSER_INDEX_ANY}} to fetch the next available input event from any user.</p> </dd> <dd> <p>[in] Reserved</p> </dd> <dd> <p>[out] Pointer to an <strong>{{XINPUT_KEYSTROKE}}</strong> structure that receives an input event.</p> </dd> <p>Represents a virtual adapter. This interface extends <strong>Id3d12device2</strong> to support the creation of special-purpose diagnostic heaps in system memory that persist even in the event of a {{GPU}}-fault or device-removed scenario.</p><strong>Note</strong> This interface, introduced in the Windows 10 Fall Creators Update, is the latest version of the <strong>{{ID3D12Device}}</strong> interface. Applications targeting the Windows 10 Fall Creators Update and later should use this interface instead of earlier versions. <p>Use <strong>{{D3D12CreateDevice}}</strong> to create a device.</p> <p>Specifies the type of unit contained in an <strong>{{IMFSample}}</strong> in a {{MFSampleExtension_ForwardedDecodeUnits}} collection.</p> <p>Gets the {{ID}} of the process with which the activity is associated.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>The <em>pPID</em> parameter is null.</p> </td></tr> </table><p> </p> <dd> <p>Receives the process {{ID}}.</p> </dd> <p>Part of a contract between {{D3D11On12}} diagnostic layers and graphics diagnostics tools. This interface facilitates diagnostics tools to capture information at a lower level than the {{DXGI}} swapchain.</p> <p>Represents the activity of a process associated with a sensor.</p> <p>Gets an <strong>{{IMFSensorProcessActivity}}</strong> object representing the current process activity of a sensor.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>The <em>ppProcessActivity</em> parameter is null.</p> </td></tr> </table><p> </p> <p>Gets the streaming mode of the sensor process.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>The <em>pMode</em> parameter is null.</p> </td></tr> </table><p> </p> <dd> <p>Receives the process {{ID}}.</p> </dd> <p>Gets the count of <strong>{{IMFSensorActivityReport}}</strong> objects that are available to be retrieved.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>The <em>pcCount</em> parameter is null.</p> </td></tr> </table><p> </p> <p>Retrieves an <strong>{{IMFSensorActivityReport}}</strong> based on the specified device name.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_INVALIDARG}}</strong></dt> </dl> </td><td> <p>The <em>symbolicName</em> parameter is null.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>The <em>sensorActivityReport</em> parameter is null.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_OUTOFMEMORY}}</strong></dt> </dl> </td><td> <p>The system is out of memory.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDINDEX}}</strong></dt> </dl> </td><td> <p>The <em>Index</em> parameter is not less than value returned by <strong>GetCount</strong>. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_NOT_FOUND}}</strong></dt> </dl> </td><td> <p>No sensor with the specified symbolic name was found.</p> </td></tr> </table><p> </p> <p>Represents an activity report for a sensor.</p> <p>Gets the symbolic link for the sensor associated with the report.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>The <em>pcchWritten</em> parameter is null.</p> </td></tr> </table><p> </p> <dd> <p>The string into which the sensor symbolic link is written.</p> </dd> <dd> <p>The character count of the <em>SymbolicLink</em> string.</p> </dd> <dd> <p>Receives the number of characters that were written into the <em>SymbolicLink</em> string.</p> </dd> <p>Interface implemented by the client to receive callbacks when sensor activity reports are available.</p> <p>Register the callback by passing an implementation of this interface into <strong>{{MFCreateSensorActivityMonitor}}</strong>.</p> <p>Gets a value indicating whether the sensor is currently streaming.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>The <em>pfStreaming</em> parameter is null.</p> </td></tr> </table><p> </p> <dd> <p>Receives a value indicating whether the sensor is currently streaming.</p> </dd> <p>Raised by the media pipeline when a new <strong>{{IMFSensorActivitiesReport}}</strong> is available.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <p>Gets the count of <strong>{{IMFSensorProcessActivity}}</strong> objects, representing the current activity of a process associated with the sensor, that are available to be retrieved.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>The <em>pulCount</em> parameter is null.</p> </td></tr> </table><p> </p> <p>Provides methods for controlling a sensor activity monitor.</p> <p>Get an instance of this class by calling <strong>{{MFCreateSensorActivityMonitor}}</strong>. Sensor activity reports are delivered through the <strong>{{IMFSensorActivitiesReportCallback}}</strong> interface passed into this method.</p> <p>Stops the sensor activity monitor.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> </table><p> </p> <p>Gets the time associated with the sensor activity report.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>The <em>pft</em> parameter is null.</p> </td></tr> </table><p> </p> <dd> <p>Receives the time associated with the sensor activity report.</p> </dd> <p>Gets the friendly name for the sensor associated with the report.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>The <em>pcchWritten</em> parameter is null.</p> </td></tr> </table><p> </p> <dd> <p>The string into which the sensor friendly name is written.</p> </dd> <dd> <p>The character count of the <em>FriendlyName</em> string.</p> </dd> <dd> <p>Receives the number of characters that were written into the <em>FriendlyName</em> string.</p> </dd> <p>Provides access to <strong>{{IMFSensorActivityReport}}</strong> objects that describe the current activity of a sensor.</p> <p>Register to receive sensor activities reports by implementing the <strong>{{IMFSensorActivitiesReportCallback}}</strong> interface and passing the implementation into <strong>{{MFCreateSensorActivityMonitor}}</strong>.</p> <p>Retrieves an <strong>{{IMFSensorActivityReport}}</strong> based on the specified index.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>The <em>sensorActivityReport</em> parameter is null.</p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDINDEX}}</strong></dt> </dl> </td><td> <p>The <em>Index</em> parameter is not less than value returned by <strong>GetCount</strong>. </p> </td></tr> </table><p> </p> <p>Starts the sensor activity monitor.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{MF_E_INVALIDREQUEST}}</strong></dt> </dl> </td><td> <p>The sensor activity monitor has already been started.</p> </td></tr> </table><p> </p> <p>Initializes a new instance of the <strong>{{IMFSensorActivityMonitor}}</strong> interface.</p> <p> The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table. </p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p> The method succeeded. </p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>The <em>ppActivityMonitor</em> parameter is null.</p> </td></tr> </table><p> </p> <p> Returns the nominal mapping of {{UCS4}} Unicode code points to glyph indices as defined by the font '{{CMAP}}' table. </p> <p>Note that this mapping is primarily provided for line layout engines built on top of the physical font {{API}}. Because of OpenType glyph substitution and line layout character substitution, the nominal conversion does not always correspond to how a Unicode string will map to glyph indices when rendering using a particular font face. Also, note that Unicode variant selectors provide for alternate mappings for character to glyph. This call will always return the default variant.</p><p> When characters are not present in the font this method returns the index 0, which is the undefined glyph or ".notdef" glyph. If a character isn't in a font, {{IDWriteFont::HasCharacter}} returns false and GetUnicodeRanges doesn't return it in the range.</p> <p>If this method succeeds, it returns <strong>{{S_OK}}</strong>. Otherwise, it returns an <strong>{{HRESULT}}</strong> error code.</p> <dd> <p>An array of {{USC4}} code points from which to obtain nominal glyph indices. The array must be allocated and be able to contain the number of elements specified by <em>codePointCount</em>.</p> </dd> <dd> <p>The number of elements in the <em>codePoints</em> array.</p> </dd> <dd> <p>When this method returns, contains a reference to an array of nominal glyph indices filled by this function.</p> </dd> <p>Gets a message from the message queue.</p> <p>This method doesn't remove any messages from the message queue.</p><p>This method gets a message from the message queue after an optional retrieval filter has been applied.</p><p>Call this method twice to retrieve a message, first to obtain the size of the message and second to get the message. Here is a typical example:</p><pre> // Get the size of the message. {{SIZE_T}} messageLength = 0; {{HRESULT}} hr = pInfoQueue-&gt;GetMessage({{DXGI_DEBUG_ALL}}, 0, {{NULL}}, &amp;messageLength); // Allocate space and get the message. {{DXGI_INFO_QUEUE_MESSAGE}} * pMessage = ({{DXGI_INFO_QUEUE_MESSAGE}}*)malloc(messageLength); hr = pInfoQueue-&gt;GetMessage({{DXGI_DEBUG_ALL}}, 0, pMessage, &amp;messageLength); </pre><strong>Note</strong> This {{API}} requires the Windows Software Development Kit ({{SDK}}) for Windows 8. <p>Returns {{S_OK}} if successful; an error code otherwise. For a list of error codes, see {{DXGI_ERROR}}.</p> <dd> <p> A <strong>{{DXGI_DEBUG_ID}}</strong> value that identifies the entity that gets the message.</p> </dd> <dd> <p>An index into the message queue after an optional retrieval filter has been applied. This can be between 0 and the number of messages in the message queue that pass through the retrieval filter. Call <strong>{{IDXGIInfoQueue::GetNumStoredMessagesAllowedByRetrievalFilters}}</strong> to obtain this number. 0 is the message at the beginning of the message queue.</p> </dd> <dd> <p>A reference to a <strong>{{DXGI_INFO_QUEUE_MESSAGE}}</strong> structure that describes the message.</p> </dd> <dd> <p>A reference to a variable that receives the size, in bytes, of the message description that <em>pMessage</em> points to. This size includes the size of the message string that <em>pMessage</em> points to.</p> </dd> <p> </p><p>Returns an object associated with the asynchronous operation. The type of object, if any, depends on the asynchronous method that was called.</p> <p>Typically, this object is used by the component that implements the asynchronous method. It provides a way for the function that invokes the callback to pass information to the asynchronous <strong>End...</strong> method that completes the operation.</p><p>If you are implementing an asynchronous method, you can set the object through the <em>punkObject</em> parameter of the <strong>{{MFCreateAsyncResult}}</strong> function.</p><p>If the asynchronous result object's internal <strong>{{IUnknown}}</strong> reference is <strong>{{NULL}}</strong>, the method returns <strong>{{E_POINTER}}</strong>.</p><p>This interface is available on the following platforms if the Windows Media Format 11 {{SDK}} redistributable components are installed:</p><ul> <li>Windows {{XP}} with Service Pack 2 ({{SP2}}) and later.</li> <li>Windows {{XP}} Media Center Edition 2005 with {{KB900325}} (Windows {{XP}} Media Center Edition 2005) and {{KB925766}} (October 2006 Update Rollup for Windows {{XP}} Media Center Edition) installed.</li> </ul> <p>The method returns an <strong>{{HRESULT}}</strong>. Possible values include, but are not limited to, those in the following table.</p><table> <tr><th>Return code</th><th>Description</th></tr> <tr><td> <dl> <dt><strong>{{S_OK}}</strong></dt> </dl> </td><td> <p>The method succeeded.</p> </td></tr> <tr><td> <dl> <dt><strong>{{E_POINTER}}</strong></dt> </dl> </td><td> <p>There is no object associated with this asynchronous result.</p> </td></tr> </table><p> </p> <dd> <p>Receives a reference to the object's <strong>{{IUnknown}}</strong> interface. If no object is associated with the operation, this parameter receives the value <strong>{{NULL}}</strong>. If the value is not <strong>{{NULL}}</strong>, the caller must release the interface.</p> </dd> <p>Increments the reference count for an interface on an object. This method should be called for every new copy of a reference to an interface on an object.</p> <p>Objects use a reference counting mechanism to ensure that the lifetime of the object includes the lifetime of references to it. You use <strong>AddRef</strong> to stabilize a copy of an interface reference. It can also be called when the life of a cloned reference must extend beyond the lifetime of the original reference. The cloned reference must be released by calling <strong>{{IUnknown::Release}}</strong>.</p><p>The internal reference counter that <strong>AddRef</strong> maintains should be a 32-bit unsigned integer.</p> <p>The method returns the new reference count. This value is intended to be used only for test purposes.</p> <p>Retrieves references to the supported interfaces on an object.</p><p>This method calls <strong>{{IUnknown::AddRef}}</strong> on the reference it returns.</p> <p>For any one object, a specific query for the <strong>{{IUnknown}}</strong> interface on any of the object's interfaces must always return the same reference value. This enables a client to determine whether two references point to the same component by calling <strong>QueryInterface</strong> with {{IID_IUnknown}} and comparing the results. It is specifically not the case that queries for interfaces other than {{IUnknown}} (even the same interface through the same reference) must return the same reference value.</p><p>There are four requirements for implementations of <strong>QueryInterface</strong> (In these cases, "must succeed" means "must succeed barring catastrophic failure."):</p><ul> <li> <p>The set of interfaces accessible on an object through <strong>QueryInterface</strong> must be static, not dynamic. This means that if a call to <strong>QueryInterface</strong> for a reference to a specified interface succeeds the first time, it must succeed again, and if it fails the first time, it must fail on all subsequent queries.</p> </li> <li> <p>It must be reflexive — if a client holds a reference to an interface on an object, and queries for that interface, the call must succeed.</p> </li> <li> <p>It must be symmetric — if a client holding a reference to one interface queries successfully for another, a query through the obtained reference for the first interface must succeed.</p> </li> <li> <p>It must be transitive — if a client holding a reference to one interface queries successfully for a second, and through that reference queries successfully for a third interface, a query for the first interface through the reference for the third interface must succeed.</p> </li> </ul> <p>This method returns {{S_OK}} if the interface is supported, and {{E_NOINTERFACE}} otherwise. If <em>ppvObject</em> is <strong>{{NULL}}</strong>, this method returns {{E_POINTER}}.</p> <p>Decrements the reference count for an interface on an object.</p> <p>When the reference count on an object reaches zero, <strong>Release</strong> must cause the interface reference to free itself. When the released reference is the only existing reference to an object (whether the object supports single or multiple interfaces), the implementation must free the object.</p><p>Note that aggregation of objects restricts the ability to recover interface references.</p> <p>The method returns the new reference count. This value is intended to be used only for test purposes.</p> <p>Enables clients to get references to other interfaces on a given object through the <strong>QueryInterface</strong> method, and manage the existence of the object through the <strong>AddRef</strong> and <strong>Release</strong> methods. All other {{COM}} interfaces are inherited, directly or indirectly, from <strong>{{IUnknown}}</strong>. Therefore, the three methods in <strong>{{IUnknown}}</strong> are the first entries in the {{VTable}} for every interface. </p> <p>Describes a sensor profile {{ID}}.</p> <dd> <p>A <strong>Sensor Profile {{GUID}}</strong> that describes the type of sensor profile. </p> </dd> <dd> <p>The index of the sensor profile.</p> </dd> <dd> <p>Not currently used.</p> </dd>