I'm writing some code will automate selection of Window Explorer(explorer.exe) items. And I found two methods that might help:
HRESULT SelectItem(
[in] VARIANT *pvfi,
[in] int dwFlags
);
// from http://msdn.microsoft.com/en-us/library/windows/desktop/dd894079(v=vs.85).aspx
HRESULT SelectItemRelative(
[in] int iRelative
);
// from http://msdn.microsoft.com/en-us/library/windows/desktop/bb774966(v=vs.85).aspx
I've tried SelectItemRelative
and it works perfectly; next item in explorer is selected when I pass 1
as argument. The method is self-explanatory
Now, I don't quite get SelectItem
, it takes a VARIANT and an int. According to MSDN, the int flag tells the method what kind of selection to make, and that's all, no explanation on what VARIANT is.
What should I pass for VARIANT *pvfi
?