The answer to this is merely choosing the last entry in the index. For my case, I only need to grab the latest photo so this works well.
if (EventID == WIA.EventID.wiaEventDeviceConnected)
{
Console.WriteLine("Connected: D5100");
}
if (EventID == WIA.EventID.wiaEventItemCreated)
{
if (d != null)
{
foreach (Property p in d.Properties)
{
if (p.Name.Equals("Pictures Taken"))
Console.WriteLine("Taken");
}
wiaImageFile = (WIA.ImageFile)(d.Items[d.Items.Count].Transfer(FormatID.wiaFormatJPEG));
wiaImageFile.SaveFile(Properties.Settings.Default.FolderNameRaw + "\\" + imageCount + ".jpg");
imageCount++;
}
}
This works very well. Except that if the file exists already for whatever reasons, you need to do a try catch and fix the problem.