C程序中含outp()函数,xp运行不出来,求高手带

解决方案 »

  1.   

    函数找不到定义,只和你的SDK有关,和OS无关的,这个函数好像既不属于Win32API,也不属于C标准库的,应该是第三方库,你没有正确引用或者没有拿到。
      

  2.   

    那是tc的函数吧,写端口的,在windows下,都用api了。
      

  3.   

    MSDN上有句话:
    Because these functions write directly to an I/O port, they cannot be used in user code in Windows NT, Windows 2000, Windows XP, and Windows Server 2003. For information about using I/O ports in these operating systems, search for "Serial Communications in Win32" at MSDN. 
      

  4.   

    // 两个办法
    // 1、将outp()改为API,xp以上不允许直接访问。
    // 2、装个winIO
      

  5.   

    outp()仅仅适用于 Windows98以下版本
      

  6.   

    Xp下 NtSystemDebugControl  封装下可以写端口