I'am developing code to read dataset information of compound type. When trying to read member field's name, I use the following code to retrieve field name:
//here hDataType is get by H5Dget_type(DatasetID), and iM is the field's index, and here its value is 0 for it's the first field
char* name = H5Tget_member_name(hDataType, iM);
string strMemName(name); //copy the value
free(name); //here result in runtime error in Vista system.
As I know from the HDF5 documentation, the application that calls H5Tget_member_name need to free the buffer, so I did and it works fine in Windows XP, but cause external error in Windows Vista. Anyone know how this happens? Thanks