Ok, thanks that did work.. But i could not find why it was not working
for the "...EnumDeviceInterfaces". meanwhile researching for the
problem i got the way to block a device. That is ... by using the API
"SetupDiSetClassInstallParams" ... but now i am able to block the
device if the device is not in use currently.
If the device is in use then also the API returns success
however the device does not get blocked .... I am using DICS_STOP flag
with the API. Do you have any idea how to get rid of this?? Means i
want forcefully block this device in such cases also.

Please do reply soon.