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

Facebook - Control privacy setting of liked page

By default, Facebook displayed your liked page to public. It is the user responsibility to adjust the privacy setting. And in my opinion, F...