private string CombineIfValid(string path1, string path2) {
string returnPath = null;
if (path1 != null && path2 != null) {
try {
string combinedPath = Path.Combine(path1, path2);
if (combinedPath.Length < MAX_PATH) {
returnPath = combinedPath;
}
}
catch {
}
}
return returnPath;
}