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:
parent
f485fdcf63
commit
fb3b5035aa
1 changed files with 2 additions and 0 deletions
|
|
@ -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()))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue