I'm not sure if I'm answering this correctly as I don't know the particular problem to solve, but here are some suggestions. For avoiding the (char*) typecast, use an overloaded function like

inline STRING* str_cpy(STRING* str, STRING* str2)
{
return str_cpy(str,(char*)str2);
}

For avoiding the C binding, you can use __declspec(dllexport) instead of DLLFUNC. For using var for an index in an array, overload the [] operator.