HOWTO: Access PC Bus Devices in Visual Basic for WindowsLast reviewed: July 14, 1997Article ID: Q154819 |
The information in this article applies to:
SUMMARYThis article describes how to access PC bus devices in Visual Basic for Windows. Many programs written in MS-DOS versions of BASIC used Peek, Poke, and In and Out to access the PC bus directly. This functionality is not supported in Visual Basic for Windows.
MORE INFORMATIONMS-DOS did not implement any memory protection; this meant that BASIC applications were able to write to any memory location directly, giving fast access to the hardware of the PC, including custom hardware that plugged into the expansion ports. In a multitasking environment it was clearly unacceptable for an application to write to memory owned by another application. The hardware port addresses are deemed to belong to the system. Accordingly, applications are unable to write directly to the PC bus addresses. It is often desirable to port MS-DOS BASIC code to a Windows environment. However, programs that attempt to control custom devices will fail to port directly. Effectively, there are two potential solutions:
REFERENCESFor more information, please see the following articles in the Microsoft Knowledge Base:
ARTICLE-ID: Q29519 TITLE : How to Write a Driver for a Custom Hardware Device ARTICLE-ID: Q87004 TITLE : Differences Between QuickBasic and Visual Basic Statements |
Keywords : PrgOther vb4all vb4win kbhowto
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |