Board index » delphi » Calling a interface method multiple times......please help

Calling a interface method multiple times......please help

Hi,
I'm trying to pass a number of values from one exe to another using
COM and an
out of process server.
In the client the first call is to initialise the server object and
then
the next number of calls are to the same interface methods to insert
values
The final call is tell the server to close the object
The code is something like this

Server := CoAlarmManagerComSvr.Create;
Server.InitAlarmBundle;
Server.AddAlarm(value);
Server.AddAlarm(value);
Server.AddAlarm(value);
Server.AddAlarm(value);
Server.AddAlarm(value);
Server.AddAlarm(value);
Server.AddAlarm(value);
Server.CloseAlarmBundle;

This seems to work for the first 5 AddAlarm calls but then the client
throws a application defined exception 0xc000001e. I have absolutely
no idea why this is
happening and it is driving me crazy.

Can anybody please help ????

thanks
Noel

 

Re:Calling a interface method multiple times......please help


ta for the replies 8-)....problem solved it seems that the problem was with
passing a record structure in the addalarm call. When this was changed so that
all fields were passed as parameters the problem disappeared...strange!!!!
Quote
noelo_n...@hotmail.com (Noel O'Connor) wrote in message <news:9b7ed422.0305231958.47d256c9@posting.google.com>...
> Hi,
> I'm trying to pass a number of values from one exe to another using
> COM and an
> out of process server.
> In the client the first call is to initialise the server object and
> then
> the next number of calls are to the same interface methods to insert
> values
> The final call is tell the server to close the object
> The code is something like this

> Server := CoAlarmManagerComSvr.Create;
> Server.InitAlarmBundle;
> Server.AddAlarm(value);
> Server.AddAlarm(value);
> Server.AddAlarm(value);
> Server.AddAlarm(value);
> Server.AddAlarm(value);
> Server.AddAlarm(value);
> Server.AddAlarm(value);
> Server.CloseAlarmBundle;

> This seems to work for the first 5 AddAlarm calls but then the client
> throws a application defined exception 0xc000001e. I have absolutely
> no idea why this is
> happening and it is driving me crazy.

> Can anybody please help ????

> thanks
> Noel

Other Threads