public static bool ReadPciConfig(uint pciAddress, uint regAddress, out uint value) { if (_driver == null || (regAddress & 3) != 0) { value = 0; return false; } ReadPciConfigInput input = new ReadPciConfigInput { PciAddress = pciAddress, RegAddress = regAddress }; value = 0; return _driver.DeviceIOControl(Interop.Ring0.IOCTL_OLS_READ_PCI_CONFIG, input, ref value); }
public static bool ReadPciConfig(uint pciAddress, uint regAddress, out uint value) { if (driver == null || (regAddress & 3) != 0) { value = 0; return(false); } ReadPciConfigInput input = new ReadPciConfigInput(); input.PciAddress = pciAddress; input.RegAddress = regAddress; value = 0; return(driver.DeviceIOControl(IOCTL_OLS_READ_PCI_CONFIG, input, ref value)); }