C++ Getting Device IO
Today, I am exploring on how to communicate with window system device with VS C++
In concept, it is rather simple
1. Get the device name
2. Open the device with CreateFile().
3. Perform IO action such as DeviceIoControl()
4. Close the device after use with CloseHandle()
You need to include windows.h, winioctl.h, stdio.h
Below is the sample code from MSDN on reading first primary drive geometry information.