1. Question about using InterProcess Communication

I've been exploring the usage of IPC (InterProcess Communication) Library by
Thomas Parslow and I have a question.

What I want to do is have a main application start a secondary application
and when the main application closes, close the secondard one. I've got this
working.

The clinker is I also allow multiple instances of the secondary app.
However, when I use an ipc_CallProc or ipc_CallFunc routine to close the
secondary apps, only the first one gets closed.

Anyone have a solution?

new topic     » topic index » view message » categorize

2. Re: Question about using InterProcess Communication

Hey Judith,

The best way to do this is to setup the Second application to have a
diffrent Namespace.  This can be done through this method:

-- Main App
constant BaseName = "euMyApp"
sequence ipcProcName ipcProcName = {}
procedure getProccessID(integer id)
    ipcProcName &={ BaseName & sprint(id) }
end procedure

-- Sub-Proccess
constant BaseName = "euMyApp"
procedure registerMyProccess()
    for x = 0 to 100 do
        if not ipc_IsProcessRunning(BaseName & sprint(x)) then
            if ipc_RegisterProcessName(BaseName & sprint(x)) then
                exit
            end if
        end if
    end for
end procedure

----- Original Message -----
From: "Judith Evans" <camping at txcyber.com>
To: "Eu Forum" <EUforum at topica.com>
Sent: Wednesday, March 24, 2004 7:05 AM
Subject: Question about using InterProcess Communication


>
>
> I've been exploring the usage of IPC (InterProcess Communication) Library
by
> Thomas Parslow and I have a question.
>
> What I want to do is have a main application start a secondary application
> and when the main application closes, close the secondard one. I've got
this
> working.
>
> The clinker is I also allow multiple instances of the secondary app.
> However, when I use an ipc_CallProc or ipc_CallFunc routine to close the
> secondary apps, only the first one gets closed.
>
> Anyone have a solution?
>
>
>
> For Topica's complete suite of email marketing solutions visit:
> http://www.topica.com/?p=TEXFOOTER
>
>

new topic     » goto parent     » topic index » view message » categorize

3. Re: Question about using InterProcess Communication

Mario, I knew if anyone had an answer you would smile Thanks a bunch.

Mario wrote:
>Hey Judith,

>The best way to do this is to setup the Second application to have a
>diffrent Namespace. This can be done through this method:

>-- Main App
>constant BaseName = "euMyApp"
>sequence ipcProcName ipcProcName = {}
>procedure getProccessID(integer id)
>    ipcProcName &={ BaseName & sprint(id) }
>end procedure

>-- Sub-Proccess
>constant BaseName = "euMyApp"
>procedure registerMyProccess()
>    for x = 0 to 100 do
>        if not ipc_IsProcessRunning(BaseName & sprint(x)) then
>            if ipc_RegisterProcessName(BaseName & sprint(x)) then
>                exit
>            end if
>       end if
>    end for
>end procedure

----- Original Message -----
Subject: Question about using InterProcess Communication

I've been exploring the usage of IPC (InterProcess Communication) Library  
by Thomas Parslow and I have a question.

What I want to do is have a main application start a secondary application
and when the main application closes, close the secondard one. I've got  
this working.

The clinker is I also allow multiple instances of the secondary app.
However, when I use an ipc_CallProc or ipc_CallFunc routine to close the
secondary apps, only the first one gets closed.

Anyone have a solution?

new topic     » goto parent     » topic index » view message » categorize

4. Re: Question about using InterProcess Communication

Was there any doubt that I wouldn't have a solution? blink

EuMario
Judith wrote:
> Mario, I knew if anyone had an answer you would smile Thanks a bunch.

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu