mirror of
https://github.com/UzixLS/KernelEx.git
synced 2025-07-19 07:21:20 +03:00
import KernelEx-4.0-RC2
This commit is contained in:
7
sheet/sheet.cpp
Normal file → Executable file
7
sheet/sheet.cpp
Normal file → Executable file
@ -120,11 +120,16 @@ bool KexShlExt::ResolveShortcut(const char* shortcutPath, char* filePath)
|
||||
char path[MAX_PATH];
|
||||
WCHAR tmp[MAX_PATH];
|
||||
|
||||
CoInitialize(NULL);
|
||||
|
||||
result = CoCreateInstance(CLSID_ShellLink, NULL, CLSCTX_INPROC_SERVER,
|
||||
IID_IShellLink, (void**) &shellLink);
|
||||
|
||||
if (FAILED(result))
|
||||
{
|
||||
CoUninitialize();
|
||||
return false;
|
||||
}
|
||||
|
||||
result = shellLink->QueryInterface(IID_IPersistFile, (void**) &persistFile);
|
||||
if (SUCCEEDED(result))
|
||||
@ -149,6 +154,8 @@ bool KexShlExt::ResolveShortcut(const char* shortcutPath, char* filePath)
|
||||
|
||||
shellLink->Release();
|
||||
|
||||
CoUninitialize();
|
||||
|
||||
return SUCCEEDED(result);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user