How to detect that file dialog has been created using GetOpenFileName?
I take a part in developing of namespace shell extension(NSE) containing file list from some folders. I have some problems with Open file dialog (OFD) created with the flag OFN_ALLOWMULTISELECT on Window Vista.
If application uses OFD created using IFileOpenDialog my NSE works fine and application gets correct result in IShellItemArray.
If application uses OFD created using GetOpenFileName and user selects some files then he gets an incorrect result because this function returns the string:
<Folder name>\0<File name 1>\0<File name2>\0\0
There must be the following result:
<Folder name>\0<File name 1>\0<Subfolder 1\File name 2>\0<Folder name>\0<Subfolder 2\File name 3>\0\0.
I must use single select mode in my NSE if application uses OFD created using GetOpenFileName.
I want to get IFileOpenDialog from IShellBrowser and if this attempt is successfully then OFD has been created using IFileOpenDialog otherwise using GetOpenFileName.
But I am not sure it is possibly and if GetOpenFileName uses IFileOpenDialog for creating OFD then it will be always successfully...
Could you advise me how to detect in my NSE that OFD has been created using GetOpenFileName?