在window 2000下不能用_outp和_inp函数,有人推荐用winio动态库,但我用winio相应的方法始终不能向端口送数,请有用过winio的大虾指点迷津,或者推荐用其他的方法在win2000下向端口送数?在线等待

解决方案 »

  1.   

    找一本资料,上面有关于怎么使win2000的进程拥有执行特权指令的方法
    好象是vc编程编程集锦吧
      

  2.   

    这是WIN95以后的操作系统禁止的,只能用编VXD驱动程序方式。但这方面我就不知道了。
      

  3.   

    agree with Richuen22(石志康), under Windows NT/2000, user mode applications are not allowed to access I/O ports directly, but take a look at WinIo (a kernel-mode device driver)http://www.internals.com"
    WinIo - This library allows direct I/O port and physical memory access under Windows 9x/NT/2000 and XP. Version 2.0 provides faster I/O port access, better memory mapping support and can be used from non-administrative accounts under Windows NT/2000 and XP.
    "
      

  4.   

    WIN2000下的端口访问是被禁止的,你需要编写一个端口的驱动程序。
    不过网上有现成的东东,你用GOOGLE搜“WIN2000并口访问”可以得到
      

  5.   

    给你个Example(注意你当前的操作员的权限是不是超级管理员  DWORD dwPortVal;
      DWORD dwMemVal;
      bool bResult;
      HANDLE hPhysicalMemory;
      PBYTE pbLinAddr;  // Call InitializeWinIo to initialize the WinIo library.  bResult = InitializeWinIo();  //初始化winio 不忘了  if (bResult)
      {
        // Under Windows NT/2000/XP, after calling InitializeWinIo,
        // you can call _inp/_outp instead of using GetPortVal/SetPortVal    GetPortVal(0x378, &dwPortVal, 4);    SetPortVal(0x378, 10, 4);    // Map physical addresses 0xA0000 - 0xAFFFF into the linear address space
        // of the application. The value returned from the call to MapPhysToLin is
        // a linear address corresponding to physical address 0xA0000. In case of
        // an error, the return value is NULL.    pbLinAddr = MapPhysToLin((PBYTE)0xA0000, 65536, &hPhysicalMemory);    if (pbLinAddr)
        {
          // Now we can use pbLinAddr to access physical address 0xA0000      *pbLinAddr = 10;      // When you're done with pbLinAddr, call UnmapPhysicalMemory      UnmapPhysicalMemory(hPhysicalMemory, pbLinAddr);
        }    // Instead of using MapPhysToLin, we can use GetPhysLong/SetPhysLong    GetPhysLong((PBYTE)0xA0000, &dwMemVal);    SetPhysLong((PBYTE)0xA0000, 10);    // When you're done using WinIo, call ShutdownWinIo    ShutdownWinIo();
      }
      else
      {
        printf("Error during initialization of WinIo.\n");
        exit(1);
      }
      

  6.   

    WinIO自己就带了两个例子,先试试他们行不行。
      

  7.   

    http://www.chat001.com/forum/crackforum/257005.html
      

  8.   

    上面的错了,如下:
    http://expert.csdn.net/Expert/topic/2545/2545536.xml?temp=.4431116
      

  9.   

    使用ddk写一个i/o端口访问的小驱动,在应用层通过ioctl的方法调用就行了,很简单的,问题解决了吗?