Are you sure the CSound function isn’t going to modify the contents of your string?
If it really is a read-only parameter, then it’s an absolutely shameful bit of programming for them not to make the parameter a const char*! You should write and tell them!
Unfortunately I still get an access violation error on this line:
that breaks to here:
/** Lets you access methods and properties of the object that this ScopedPointer refers to. */
inline ObjectType* operator->() const noexcept { return object; }
“error C2440: ‘const_cast’ : cannot convert from ‘const juce::CharPointer_UTF8’ to 'char *'
1> Conversion requires a constructor or user-defined-conversion operator, which can’t be used by const_cast or reinterpret_cast”