I think I got it!
Here's an extremely rough cut, just a console app that displays the most recent update and the date of the update. This is not highly efficient -- now that I know what to do, I will eliminate the sort and just do a single pass, comparing for the most recent item, but, here's the gist of it:
class Program
{
static void Main(string[] args)
{
//Environment.CurrentDirectory = @"c:\Program Files (x86)\Microsoft Visual SourceSafe Upgrade";
IVSSDatabase db = new VSSDatabase();
db.Open(@"ThePath\srcsafe.ini", "Admin", "ThePassword");
IVSSItem rootFolder = db.get_VSSItem("$/", false);
var versions = new List();
foreach (IVSSVersion item in rootFolder.get_Versions((int)Microsoft.VisualStudio.SourceSafe.Interop.VSSFlags.VSSFLAG_RECURSYES))
{
versions.Add(new VersionInfo()
{
ItemName = item.VSSItem.Name,
ItemFullPath = item.VSSItem.Spec,
ItemVersionDate = item.Date,
ItemVersionNumber = item.VersionNumber
});
}
// echo all
var versionInfo = versions.OrderByDescending(i => i.ItemVersionDate).First();
Console.WriteLine("{0} {1}", versionInfo.ItemFullPath, versionInfo.ItemVersionDate);
Console.ReadLine();
}
}
class VersionInfo
{
public string ItemName { get; set; }
public string ItemFullPath { get; set; }
public DateTime ItemVersionDate { get; set; }
public int ItemVersionNumber { get; set; }
}