Subject INVALID POINTER OPERATION !
Author Yosvany Gonzalez Galban
Excuse my English, please.

Greetings for all.

I have a IBOC: TIB_Connection in my application (EXE) already connected,
then I need to execute a form in an extension of the application (DLL) and
to the function I pass him the IBOC.

In the DLL is associated a TIB_Query in their property IB_Connection that
connection IBOC. Everything works well. I can close the form and to open it
several times without problems.

When I close the application then closes the connection of the
TIB_Connection and it is when a type exception takes place EINVALIDPOINTER
with message "INVALID POINTER OPERATION". I have been debug what happens
when the database is disconnected and in the procedure IB_ReallocMem the
exception takes place when trying to liberate memory with FREEMEM. This is
the CALL STACK:

IB_ReallocMem (var Ptr: pointer; OldSize, NewSize: longint);
procedure TIB_Connection.FreeStmtHandleCache (MaxHandles: integer)
procedure TIB_Connection.DeallocateStatements;
procedure TIB_Connection.SysBeforeDisconnect;
procedure TIB_Connection.SysDisconnect;
procedure TIB_Connection.Disconnect;
procedure TFormMain.FormClose(Sender: TObject; var Action: TCloseAction);

Can they help me?

Greetings,
Yosvany.