Err.LastDLLError Property


Err.LastDLLError Property

Class

Microsoft.VisualBasic.ErrObject

Syntax

     Dim result As Integer = Err.LastDLLError 

Description

The LastDLLError property is a read-only property that contains the return code of the most recently called external DLL function.

Usage at a Glance

  • Only direct calls to a Windows system DLL function from VB code will assign a value to the LastDLLError property.

  • No error or exception is raised when Visual Basic sets the LastDllError property. You must manually examine this field when appropriate.

  • The LastDLLError property is only used by system DLLs, such as kernel32.dll. Therefore, errors that occur within DLLs you may have created will not cause an error code to be assigned to the property.

  • Some DLL calls to the Windows API return 0 to denote a successful function call, and others return 0 to denote an unsuccessful call.

See Also

Err Object




Visual Basic 2005(c) In a Nutshell
Visual Basic 2005 in a Nutshell (In a Nutshell (OReilly))
ISBN: 059610152X
EAN: 2147483647
Year: 2004
Pages: 712

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net