I use a REALLOC in a dll:
dll_function(X_CHAR **pp_host)
{
X_CHAR *lp_host = NULL;
lp_host = realloc(*pp_host, 64 * sizeof(X_CHAR));
}
Where pp_host is initialised in the application using the dll:
X_CHAR *pp_host = NULL;
pp_host = malloc(20* sizeof(X_CHAR))...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.