| Microsoft DirectX 8.1 (Visual Basic) | 
Retrieves the viewport parameters currently set for the device.
object.GetViewport( _ 
    Viewport As D3DVIEWPORT8)
An error is raised and Err.Number may be set to D3DERR_INVALIDCALL if the Viewport parameter is invalid.
For information on trapping errors, see the Microsoft® Visual Basic® Error Handling topic.