1
0
Fork 0
mirror of https://github.com/juce-framework/JUCE.git synced 2026-01-14 00:14:18 +00:00

Made sure that File::createLink on win32 works even if CoInitialize hasn't been called.

This commit is contained in:
jules 2013-11-01 11:03:40 +00:00
parent f485fdcf63
commit fb3b5035aa

View file

@ -630,6 +630,8 @@ bool File::createLink (const String& description, const File& linkFileToCreate)
ComSmartPtr<IShellLink> shellLink;
ComSmartPtr<IPersistFile> persistFile;
CoInitialize (0);
return SUCCEEDED (shellLink.CoCreateInstance (CLSID_ShellLink))
&& SUCCEEDED (shellLink->SetPath (getFullPathName().toWideCharPointer()))
&& SUCCEEDED (shellLink->SetDescription (description.toWideCharPointer()))