SetAppData method

Sets the surface's application-specified DWORD of data.

Syntax

HRESULT retVal = object.SetAppData(dwAppData);

Parameters

  • dwAppData
    Type: DWORD_PTR

    Any DWORD value to be used by the application to store information specific to the surface.

Remarks

This method enables an application to tag a surface with a unique DWORD of data. For example, applications that use 2-D transforms can use this method to tag input surfaces to the transforms. This enables the application to identify which surfaces were hit when doing 2-D hit testing. However, applications can use this data in any way that is useful.

The IDXSurfaceFactory::CreateD3DRMTexture method copies the application data to the texture from the DXSurface when it creates the texture.

All surface implementations must support IDXSurface::SetAppData and IDXSurface::GetAppData.

See also

IDXSurface::GetAppData