Subject Re: [IBO] INVALID POINTER OPERATION !
Author Jason Wharton
Are you using ShareMem in both the EXE and DLL?

Also, don't pass the connection reference. Share the connection handle into
a connection object owned by the DLL.

Jason Wharton
CPS - Mesa AZ
http://www.ibobjects.com


----- Original Message -----
From: "Yosvany Gonzalez Galban" <universo@...>
To: <IBObjects@yahoogroups.com>
Sent: Friday, October 12, 2001 7:52 AM
Subject: [IBO] INVALID POINTER OPERATION !


> 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.