Update: UltraVNC 1.4.3.6 and UltraVNC SC 1.4.3.6: viewtopic.php?t=37885
Important: Please update to latest version before to create a reply, a topic or an issue: viewtopic.php?t=37864

Join us on social networks and share our announcements:
- Website: https://uvnc.com/
- GitHub: https://github.com/ultravnc
- Mastodon: https://mastodon.social/@ultravnc
- Facebook: https://www.facebook.com/ultravnc1
- X/Twitter: https://twitter.com/ultravnc1
- Reddit community: https://www.reddit.com/r/ultravnc
- OpenHub: https://openhub.net/p/ultravnc

Start two winvnc service instances parallel

Developers may discuss here
Post Reply
Thohoj
Posts: 4
Joined: 2016-06-30 08:13

Start two winvnc service instances parallel

Post by Thohoj »

Hi,

I installed two winvnc services

Code: Select all

winvnc.exe -install uvnc_service_1
winvnc.exe -install uvnc_service_2
What happens is:
uvnc_service_1 starts up, creates its child winvnc process and starts listening. When uvnc_service_2 starts up the child process of uvnc_service_1 stops. After a moment uvnc_service_1 restarts its child process. Then it stops again... and so on.

is it possible to start two service instances parallel?

Regards
Thorsten
Thohoj
Posts: 4
Joined: 2016-06-30 08:13

Re: Start two winvnc service instances parallel

Post by Thohoj »

In the meantime I was able to find the cause:

service_1 starts up and starts its child (c1) process.
service_2 starts up and starts its child (c2) process.
c2 detects the "don't start me twice" mutex of c1 and shuts itself down.
During shutdown it fires an event that leads into shutdown of c1 which listens on this event.
service_1 detects "something happens to my child c1" and restarts it.
...

1) I renamed the event, so that it includes the "service_name". Now each service has it's own event that fires on shutdown.
2) When the service starts it's child process I inserted the "-multi" argument (from "winvnc.exe -multi -install service_1")
3) The child process detects the "-multi" argument and skips the "don't start me twice" mutex.

The bad news are: I had to change the source.
User avatar
Rudi De Vos
Admin & Developer
Admin & Developer
Posts: 6831
Joined: 2004-04-23 10:21
Contact:

Re: Start two winvnc service instances parallel

Post by Rudi De Vos »

Having multiple services is experts only.
Capture engine isn't tested and virtual drivers gonna behave bad
Don't gonna change the behaviour
Post Reply