What bigger problem are you trying to solve? From a pure access to hardware/device driver point of view WinPE is no different than normal Windows. By default, WinPE does not grant user mode access to PCI config space registers or memory io space. You would need to install a device driver for the PCI device in question and that driver would have to enable access to these resources (usually through an IOCTL interface, mapping resources directly into user mode is quite dangerous and a big security hole).
WinPE C++ Program Hardware Access Guides?
Clam10
1
Reputation point
Is it possible to write a C or C++ program for Windows Preinstallation Environment (WinPE) that can access the hardware (PCI config space registers and memory i/o space)? If so, are there any guides to it since I couldn't find anything about it?