Whats Wrong with the Windows API?
Why not just continue using the Windows API in the .NET environment? You certainly can, using the .NET Platform Invocation Services (referred to as “P/Invoke”). From the Visual Basic developer’s point of view, calling the Windows API is no more difficult than using the familiar Declare statement. Using the Windows API has some serious drawbacks in the .NET world, however, and you might consider doing anything you can to avoid it. For example: • The .NET common language runtime is meant to be platform non-specific. Whenever you use a Windows API call, you’re tying your code to the specific platform (that is, a specific version of Windows, and Windows itself, as opposed to some other operating system) on which you wrote it. Converting your code to another platform, should that ever become necessary, will require modifications to each line of code that uses the API call. • Calling the Windows API (or any unmanaged code in Dlls) from .NET isn’t as simple as it was in Visual Basic 6.0. Limi