Reputation: 25
I am very new to Windows programming. so can you help me to get sample program(C/C++) which i can get all the hard disk information which is connected to my server.
I am using windows 2008 R2 sp1 server and also connected more than one hard disk to server.
Please help me to get this information.
Thanks, Deepesh C.P
Upvotes: 0
Views: 3880
Reputation: 81
Following API's must be useful
DisplayVolumePaths GetDiskFreeSpace CreateFile
Refer these links aswell
http://social.msdn.microsoft.com/Forums/en-CA/vcgeneral/thread/1d4fda3c-885f-46e2-bc32-80c4426510dc
Upvotes: 1
Reputation: 56
As a start I would read up on the Windows API.
To get all logical drives on a windows system use
DWORD WINAPI GetLogicalDrives(void);
or
DWORD WINAPI GetLogicalDriveStrings(
__in DWORD nBufferLength,
__out LPTSTR lpBuffer
);
As see on http://msdn.microsoft.com/en-us/library/windows/desktop/aa364972(v=vs.85).aspx
Upvotes: 0