For arguments that require char *, you can pass a MATLAB® string (a character array). For example, see the stringToUpper function in the shrlibsample library.
libfunctions shows that you can use a MATLAB cstring for this input. Type:
libfunctions shrlibsample -full
Create a MATLAB character array, str, and pass it as the input argument:
str = 'This was a Mixed Case string'; calllib('shrlibsample','stringToUpper',str)
ans = THIS WAS A MIXED CASE STRING
Although the input argument that MATLAB passes to stringToUpper resembles a pointer to type char, it is not a true pointer data type because it does not contain the address of the MATLAB character array, str. When the function executes, it returns the correct result, but does not modify the value in str. If you examine str, you find it is unchanged. Type:
str = This was a Mixed Case string