Suppressing error output?

I’m using HDF5 with NI’s CVI/LabWindows. It works fine, but I need to suppress any error output. My application is a command line. I’m using a camera application that saves images as numbered entries in the HDF file, and the only way IO can find to see how many there are is to start opening them sequentially and stopping when i get an error. That works fine. The problem is that if I have 16 frames (for example), when I open frame 17 and get an error, HDF spews text all over the console. I get the error code and know I only have 16 but the console is covered with “Object not found” messages.

Can I suppress them? Is there a function to tell HDF not to display? Or do I need to remove the error reporting code and rebuild the library? Any suggestions would be appreciated.

Thanks!

H5Eset_auto2(H5E_DEFAULT, NULL, NULL) should do the trick. G.

Awesome! It should indeed. I expected there was some sort of switch.

In the interim I found other functions that make my counting the objects a lot easier and faster. Rather than iterating and waiting for the error I am now able to query the object count. This forum really is an amazing resource.

Thanks!!!