10 {
11 if (stringHandle == 0)
12 {
13 return "";
14 }
15
16 int bufferLength;
17 HAPI_GetStringBufLength(&session, stringHandle, &bufferLength);
18
19 char* buffer = new char[bufferLength];
20 HAPI_GetString(&session, stringHandle, buffer, bufferLength);
21
22 std::string result(buffer);
23 delete[] buffer;
24
25 return result;
26 }