The common way to do this is by calling SHGetSpecialFolderPath .This does work fine in the VST 2.4 SDK or any other Win32 project.
It is not possible to call this function in the VST 3.7 SDK. As soon as I #include <shlobj.h> I get a weird list of compiler errors:
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\ocidl.h(607,22): error C2011: “Steinberg::Vst::IConnectionPoint”: “class” Typneudefinition
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\ocidl.h(51): message : Siehe Deklaration von “Steinberg::Vst::IConnectionPoint”
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\shobjidl_core.h(44,44): warning C4099: “Steinberg::Vst::IContextMenu”: Geben Sie den zuerst unter Verwendung von “class” und jetzt unter Verwendung von “struct” gesehenen Namen ein
1>D:\VST_SDK_3.7\VST3_SDK\pluginterfaces\vst\ivstcontextmenu.h(187): message : Siehe Deklaration von “Steinberg::Vst::IContextMenu”
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\shobjidl_core.h(2141,18): error C2011: “Steinberg::Vst::IContextMenu”: “class” Typneudefinition
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\shobjidl_core.h(44): message : Siehe Deklaration von “Steinberg::Vst::IContextMenu”
1>C:\Program Files (x86)\Windows Kits\10\Include\10.0.18362.0\um\shobjidl_core.h(2290,5): error C2504: “Steinberg::Vst::IContextMenu”: Basisklasse undefiniert
Ho do I get the path to user documents directory in the VST3.7 SDK?