Thanks ricko. In my case I'm manually messing with graphics, so it's more complicated.
Extract from email from Yves:
You can create 2 types of HWA surfaces from an extension:
What is it : Render target texture in HWA mode.
What you can do : blit other surfaces into it, blit to screen.
What you can't do : GetDC, LockBuffer, GetPixel/SetPixel, etc.
When to use it : when you have an intermediate surface that you blit other surfaces into before you render it to the screen.
Note: Creating a render target takes time, so cache it if possible.
What is it : HWA texture created in video memory, managed. Managed means that the texture is restored when the device is lost.
What you can do : blit to screen only
What you can't do : GetDC, LockBuffer, GetPixel/SetPixel, blit to non surfaces that aren't render target or HWA screen, etc...
When to use it : when you have a cached fixed image that you want to blit to screen.
HWA surfaces are more limited than normal surfaces.
LPSURFACE ps = WinGetSurface((int)rhPtr->rhIdEditWin);
BOOL bHWA = ((rhPtr->rh4.rh4Mv->mvAppMode & SM_D3D) != 0);
LPSURFACE pProto = ps;
if ( bHWA )
GetSurfacePrototype(&pProto, ps->GetDepth(), ST_HWA_RTTEXTURE, ps->GetDriver());
LPSURFACE randomSurface = new cSurface();
randomSurface->Create(rdPtr->rHo.hoImgWidth, rdPtr->rHo.hoImgHeight, pProto);