Partager via


Surface Interfaces

DirectDrawSurface objects expose their functionality through the IDirectDrawSurface, IDirectDrawSurface2, IDirectDrawSurface3, IDirectDrawSurface4, and IDirectDrawSurface5 interfaces. Each new interface version provides the same utility as its predecessors, with additional options available through new methods.

When you create a surface by calling the IDirectDraw4::CreateSurface method (or another creation method from IDirectDraw4), you receive a pointer to the surface's IDirectDrawSurface4 interface. This behavior is different than previous versions of DirectX. Before the introduction of the IDirectDraw4 interface, the CreateSurface method provided a pointer to a surface's IDirectDrawSurface interface. If you want to work with a different iteration (in particular IDirectDrawSurface5) of the interface, you must query for it. When using IDirectDraw4 this is not the case, although you are free to query a surface for a different iteration of an interface if you choose.

© 1992-2003 Microsoft Corporation. All rights reserved.