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));
dll_function(&pp_host); //calls the dll function
Debugging step by step (F5) the application using this dll generates an error :
"user breakpoint called from code at ...
Whereas the execution of the same application doesn't generate any error.
Does someone has any explanation ?
Thank you.
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));
dll_function(&pp_host); //calls the dll function
Debugging step by step (F5) the application using this dll generates an error :
"user breakpoint called from code at ...
Whereas the execution of the same application doesn't generate any error.
Does someone has any explanation ?
Thank you.