Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

REALLOC problems while debugging step by step

Status
Not open for further replies.

jna

Instructor
Jun 10, 2002
1
DK
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.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top