Thursday, June 25, 2009

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.




No comments:

Post a Comment

Windows 7 - STOP 0x0000007B (0xFFFFF880009A97E8 0xFFFFFFFFC0000034 0x0000000000 0x0000000000)

If you encounter STOP 0x0000007B (0xFFFFF880009A97E8 0xFFFFFFFFC0000034 0x0000000000 0x0000000000) blue screen of death. This is very like...