Win-API to Pinvoke support
The Microsoft Windows application programming interface (Win API) allows developers to call Windows OS functions directly. All programs interact with the Windows API at some point, either directly or through some other API.
Many system resources can be managed using this API, and applications employ them to perform special functions not available from the programming language natively, such as file system access, working with the Windows registry, or interacting directly with the user interface. These functions are implemented in several DLLs that reside on the Windows\system32 folder, including kernel32.dll, advapi32.dll, user32.dll, gdi32.dll, and others.
Visual Basic 6.0 is not the exception, and it provides the “declare” keyword to call methods from external libraries. These methods are not necessarily written in VB6. This keyword is used to access functionality from dlls part of both the Win API and external components.