I'm trying to extract string from resource in the form of indirect string. For the current example I have simply took an indirect string for one of Windows 10 built-in APPS. However, this code returns error in Visual Studio 2015, and I'm not sure why.
I know that unresolved external symbol linker error may be produced when the the definition is missing, but in my case I'm using Microsoft Windows Function and I'm including the right header file, and because of this I'm confused why Visual Studio returns such an error.
I cannot find any useful information on the web for exactly that case.
Here is my example code:
#include "stdafx.h"
#include <Shlwapi.h>
int main()
{
LPWSTR output = L"";
LPWSTR input = L"@{Microsoft.BingFinance_4.8.268.0_x86__8wekyb3d8bbwe?ms-resource://Microsoft.BingFinance/Resources/ApplicationTitle}";
int result = ::SHLoadIndirectString(input, output, sizeof(output), NULL );
// printf("String result: %s \n", output);
return 0;
}
And here is the error:
Error LNK2019 unresolved external symbol __imp__SHLoadIndirectString@16 referenced in function _main