String128 literal and numeric conversions

How can string literals and numeric values be assigned to Steinberg::Vst::String128 tchar*'s, for both SMTG_OS_OSX and SMTG_WINDOWS?
Xcode to_string.png
Xcode string literal.png

Check Steinberg::String, which is the SDK’s platform independent wrapper class for converting between different string encodings. Also note that SMTG_OS_OSX and SMTG_OS_WINDOWS are macros, so you can use the preprocessor to generate platform specific code at compile time, e.g.

// OSX specific code...
// Windows speicifc code...

Your code is trying to distinguish at runtime, which will lead to build issues if stuff isn’t available in another compiler/build environment.

This revised code works on Mac and PC.