S
sanjana
hi
i m trying to detect CD insert removal events via the system.management
n i m using in the query 'Win32_LogicalDisk'
When i try to access the property of these class like Size ..
it give me THE USED SPAce in the cd
doubt:
however when i try to access the property of these class like
MaxMediaSize ..
it give me an error "NOT fOUND" y????????????
when i try to access the property of these class like FreeSpace..
it always gives me the value as 0 y????????????????
here is the part of the code
ManagementObject mo = new
ManagementObject("Win32_LogicalDisk.DeviceId='D:'");
mo.Get();
UInt64 ulngFreeSpace = (UInt64) mo["FreeSpace"];
UInt64 ulngmediaSpace = (UInt64) mo["MaxMediaSize"];
thanx
i m trying to detect CD insert removal events via the system.management
n i m using in the query 'Win32_LogicalDisk'
When i try to access the property of these class like Size ..
it give me THE USED SPAce in the cd
doubt:
however when i try to access the property of these class like
MaxMediaSize ..
it give me an error "NOT fOUND" y????????????
when i try to access the property of these class like FreeSpace..
it always gives me the value as 0 y????????????????
here is the part of the code
ManagementObject mo = new
ManagementObject("Win32_LogicalDisk.DeviceId='D:'");
mo.Get();
UInt64 ulngFreeSpace = (UInt64) mo["FreeSpace"];
UInt64 ulngmediaSpace = (UInt64) mo["MaxMediaSize"];
thanx