This documentation is archived and is not being maintained.

Windows API Changes in Visual Basic .NET

In Visual Basic 6.0, the Declare statement was used to call the Windows API in order to access functionality not provided by Visual Basic. In Visual Basic .NET, the need to access the Windows API is greatly diminished because much of the functionality of the Windows API is wrapped up in the .NET Framework.

The Declare statement can still be used to call an API, but there are some differences that you need to be aware of. For example, some of the data types in Visual Basic .NET have no direct equivalent; they must be marshaled in order to be passed to an API call. For more information, see Walkthrough: Calling Windows APIs.

See Also

Data Type Changes in Visual Basic | Introduction to Visual Basic .NET for Visual Basic Veterans | Declare Statement