int MLGetFunction(MLINKlink, const char **s, int *n) gets a function with a symbol as a head from the MathLink connection specified by link, storing the name of the symbol in s and the number of arguments of the function in n.
MLGetFunction() allocates memory for the character string corresponding to the name of the head of the function. You must call MLReleaseSymbol() to disown this memory. If MLGetFunction() fails and the function's return value indicates an error, do not call MLReleaseSymbol() on the contents of s.
External programs should not modify the character string s.