You cannot use MCSTR() here as oldcertpath is not a static c-string.