Don't just hardcode the max length of the PMI name as it could be wrong. PMI2 installations seem to be retaining at least some of the PMI functions, so use the one to get the max name length.