Original Post
Hello, im trying to do a Wrapper to manage Windows with the WIN32 APPI. My problem is that i need to allocate and WNdCLASSEX and a LPSTR dinamically ( I use realloc because the New operator dont reallocate memory) , but when i compile my App a popup appears saying Debug Assertion Failed! , the problem is with the header dbgheap.c with the expression _CrtIsValidHeapPointer(pUserData). I suppose that I am sending bad pointers to the malloc func Well anyway here is part of the code: UINT cVentana::Registrar(LPSTR InNameClass,UINT InCstyle) { m_numreg++; MessageBox(NULL,"PartA","Hi",MB_OK); //Here were is the problem m_wclase=(WNDCLASSEX*)realloc(m_wclase,sizeof(WNDCLASSEX)*m_numreg) m_nombreclase=(LPSTR*)realloc(m_nombreclase,sizeof(LPSTR)*m_numreg) MessageBox(NULL,"PartA","Hi",MB_OK); Hope that somebody can help me Joseka }