简体   繁体   English

如何在本地Windows网络上发现我的应用程序的所有其他实例?

[英]How to discover all other instances of my application on the local Windows network?

We want to add a 'collaborative' feature to our application, so our program should be able to automatically discover all other instances of itself that are running on the same local network, without needing any extra configuration from the users. 我们希望向我们的应用程序添加“协作”功能,因此我们的程序应该能够自动发现运行在同一本地网络上的其他所有实例,而无需用户进行任何额外配置。

Our application runs on Windows, so it can use any APIs provided by the OS. 我们的应用程序在Windows上运行,因此可以使用操作系统提供的任何API。 We are assuming a network typical for a small business, a couple of Windows PCs, some routers, etc. 我们假设一个小型企业的典型网络,几台Windows PC,一些路由器等。

Also, will there be problems with anti-viruses, firewalls, and such? 另外,防病毒软件,防火墙等是否会出现问题? We don't want to scare our users. 我们不想吓users我们的用户。

You can send broadcast packets for that but that only works within a single subnet (actually apparently a " broadcast domain " but it's usually the subnet). 您可以为此发送广播数据包,但只能在单个子网(实际上显然是“ 广播域 ”,但通常是子网)中工作。 If you just try every IP you can think of you might trigger firewall pop-ups that suggest that your software is trying to hack the computer. 如果您仅尝试使用每个IP,您可能会想到,您可能会触发防火墙弹出窗口,提示您的软件正在试图入侵计算机。 I think the best way is to use broadcast for the current subnet and offer a user interface for adding other hosts. 我认为最好的方法是对当前子网使用广播,并提供用于添加其他主机的用户界面。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 将消息发送到同一网络上的所有其他应用程序实例 - Sending a message to all other instances of the application on the same network 如何发现我的应用程序正在使用的.dll - how to discover .dlls my application is using 如何获取本地网络上所有设备的名称和IP? - How to get the names and ips of all devices on my local network? C ++应用程序:发现LAN上的其他IP - C++ application: discover other IPs on LAN 如何将我的一个应用程序 windows 保留在同一应用程序的另一个 windows 之上? - How to keep one of my application windows on top of the other windows of the same application? 如何发现DLL是否在Windows服务的上下文中运行? - How discover if a DLL runs in the context of a windows service? 是否可以从系统和可能正在检查的其他应用程序中隐藏应用程序的本地网络流量? - Is it possible to hide the local network traffic of an application from the system and other applications that may be checking? 如何获取另一个应用程序的所有窗口的句柄 - How to get handles to all windows of another application 具有多个窗口作为类实例的应用程序,C ++ - Application with multiple windows as instances of a class, C++ 如何检测我的Windows应用程序是否已结束? - How to detect if my Windows application has ended?
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM