用C#怎样读取外部扩展IO的数据阿,basic里用INP90()很容易就实现了?
能不能用C#读取和写入阿?帮助文档里有下面的论述,是不是不行阿?Summary
Attempting to use the port I/O (input/output) functions such as inp() and outp() from within an application for Windows NT running in user mode causes a privileged instruction exception to occur. The sample code provided in the OUTP.C online help sample for the outp() function and related functions can be used to illustrate this behavior. The documentation regarding the compatibility of the port I/O functions is incomplete. Win32-based applications that call inp(), outp(), and so forth can be successfully compiled and linked. However, these applications will generate the privileged instruction exception because the port I/O functions cannot be called from code running in user mode. Do not call the following functions from within a Win32-based application executing in user mode: _inp()
_inpw()
_inpd()
_outp()
_outpw()
_outpd() 
NOTE: This documentation error has been corrected for the Visual C++ 4.0 Books Online. The descriptions of the various port I/O functions do not list "Win NT" in the Compatibility section.