0

I built a media player, that media player is associated with several media file types.
Every time that a user opens a media file, I check if my player is open.
I managed to prevent opening two instances but I want to pass the file path to the already opened instance.

I am using mutex to prevent opening and I have been trying to use SendMessage to pass strings.
What is the best way to do so?

Yinon Eliraz
  • 317
  • 1
  • 6
  • 22
  • There are a whole raft of technologies available to you including WCF, MSMQ and Remoting. – Liath May 30 '14 at 14:42

2 Answers2

0

I think a good way is to create a WCF service into your media player. You will can communicate easily with it. See the ServiceHost class

Silvinus
  • 1,445
  • 8
  • 16
0

Try named pipes, i.e.NamedPipeServerStream & NamedPipeClientStream. Some general overview is avaibale here as well, although in your case basic write-to-temp-lock-file/read-from-temp-lock-file might not be such a bad idea.

Ilya Kozhevnikov
  • 10,242
  • 4
  • 40
  • 70