This document is archived and information here might be outdated. Recommended version. |
Gets current surface.
[Visual Basic .NET] Public Function GetCurrentSurface ( _ ) As ISurface
[C#] public ISurface GetCurrentSurface ( );
[C++]
HRESULT GetCurrentSurface(
void
);
GetCurrentSurface may return a NULL pointer ('Nothing' in VB). For example, it will return NULL if ITerrain.IsValid is FALSE. Therefore, check the return value before attempting to use it.