-
Notifications
You must be signed in to change notification settings - Fork 209
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compilation fails on VS2017 #69
Comments
You could probably also switch to using that small CComPtr object I added too Edit: Because it would remove the goto's manual frees and thus also remove the warning/error. |
This doesn't happen on fresh checkout on vs2017 on the latest code as of the time of your posting. You must be doing something else you're not describing. |
Perhaps that would be the case. I don't use Windows anymore so I am unable to reproduce the issue on an updated version on VS. |
Compilation on Visual Studio 2017 fails due to the following errors:
and
Changing lines 374-384 in nfd_win.cpp from:
if ( !SUCCEEDED(coResult))
{
fileOpenDialog = NULL;
NFDi_SetError("Could not initialize COM.");
goto end;
}
// Create dialog
HRESULT result = ::CoCreateInstance(::CLSID_FileOpenDialog, NULL,
CLSCTX_ALL, ::IID_IFileOpenDialog,
reinterpret_cast<void**>(&fileOpenDialog) );
to:
HRESULT result = NULL;
if ( !SUCCEEDED(coResult))
{
fileOpenDialog = NULL;
NFDi_SetError("Could not initialize COM.");
goto end;
}
// Create dialog
result = ::CoCreateInstance(::CLSID_FileOpenDialog, NULL,
CLSCTX_ALL, ::IID_IFileOpenDialog,
reinterpret_cast<void**>(&fileOpenDialog) );
seems to fix the issue and the dialogs work without any issues.
The text was updated successfully, but these errors were encountered: