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

Oracle - Reclaim disk space

Oracle does not release disk space even if you had delete the data or tablespace. If you have enterprise manager, you should use it to  rec...