I'd have to get the filepath of a resource of the opened document to a std::wstring.
I can easily get the filepath of the resource as a PMString:
InterfacePtr< ILinkResource > pResource( GetDataBase( LinkManager ), ResourceUIDRef.GetUID(), UseDefaultIID() );
PMString ResourceFilepath = pResource->GetLongName( false );
The problem is that I'd have to convert the PMString to a std::wstring without losing any of the information. The path may contain special characters like Arabic or Chinese so just converting the string to a std::string with GetPlatformString() won't get the job done.
Should I even grab the PMString or should I just use WideString from GetLongName() and somehow get the conversion done for that? StringUtils has a ConvertWideStringToUTF8 but it also seems to give out std::string.
So to put the long story short: How to correctly convert PMString to std::wstring?
The plug-in will be used in Windows environment.