PtAppAddInput() question

Hi,everybody!
I am a newbie of photon.I have a question of PtAppAddInput().When i receive
a message,I don’t know how to get the pid that PtAppAddInput() needs.
Who can help me and give me an example of that ??

Thanks!

Hello Yiner

Is there a reason that you cannot use 0? That would probably be the
easiest way. This would cause your input handler to be called for any
non-photon message.

If however you want to use a specific pid you could use a shared memory
object to store a pid in, or write the pid to a file in one applicatio
and then have the other application read that file. Also you could do a
pidin in your application and parse the output looking for the specific
pid. Those are just a couple of ways off the top of my head. I am sure
there are other ways as well that I can’t think of right now.

Thanks,
Rodney

yiner wrote:

Hi,everybody!
I am a newbie of photon.I have a question of PtAppAddInput().When i receive
a message,I don’t know how to get the pid that PtAppAddInput() needs.
Who can help me and give me an example of that ??

Thanks!

Thanks a lot.

“Rodney Dowdall” <rdowdall@qnx.com> ???:bl1o3f$21a$1@nntp.qnx.com

Hello Yiner

Is there a reason that you cannot use 0? That would probably be the
easiest way. This would cause your input handler to be called for any
non-photon message.

If however you want to use a specific pid you could use a shared memory
object to store a pid in, or write the pid to a file in one applicatio
and then have the other application read that file. Also you could do a
pidin in your application and parse the output looking for the specific
pid. Those are just a couple of ways off the top of my head. I am sure
there are other ways as well that I can’t think of right now.

Thanks,
Rodney

yiner wrote:

Hi,everybody!
I am a newbie of photon.I have a question of PtAppAddInput().When i
receive
a message,I don’t know how to get the pid that PtAppAddInput() needs.
Who can help me and give me an example of that ??

Thanks!