You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Windows case: It's not always possible to call COM's functions, because it can be failed or not available (for old win versions). How about to use old plain win API if COM failed with a workaround like this:
BOOL ShowOpenFileDialog(_Out_ LPTSTR szBuffer, _In_ UINT iBufferSize)
{
IFileDialog *pfd = NULL;
HRESULT hr = CoCreateInstance(CLSID_FileOpenDialog, NULL, CLSCTX_INPROC_SERVER, IID_IFileDialog, (void**)&pfd);
if (SUCCEEDED(hr))
{
// use IFileDialog as needed...
pfd->Release();
}
else
{
// use GetOpenFileName() as needed...
}
}
I haven't found this approach in the library, but I think it should be useful. Your opinion?
The text was updated successfully, but these errors were encountered:
There is, explicitly, no support for Windows XP in Native File Dialog right now. (See the readme). This is due to the fact that I am not using OpenFileDialog et al., and instead am using a Vista-level API. Some versions of XP support it, and they won't crash, but there is no guarantee.
I would be open to a pull request that implements nfd_win_legacy.cpp which detects the windows version, and calls APIs that are guaranteed to exist on earlier versions of windows. It should be possible to route these at runtime, so every version of windows is served by Native File Dialog without a recompile.
Windows case: It's not always possible to call COM's functions, because it can be failed or not available (for old win versions). How about to use old plain win API if COM failed with a workaround like this:
I haven't found this approach in the library, but I think it should be useful. Your opinion?
The text was updated successfully, but these errors were encountered: