How to advertise Bonjour Service in Visual C ++

I'm trying to figure out if this is possible, but what is the easiest way to advertise a Bonjour service through Visual C ++?

+6
windows visual-c ++ bonjour zeroconf
source share
2 answers

You can use the DNS Service Discovery client: dns-sd .

Windows Bonjour Installer places it in C:\Windows\system32\dns-sd.exe

Summary:

  dns-sd -R name type domain port [key=value ...] dns-sd -B type domain dns-sd -L name type domain 

There is no easy way to find indepth documentation for Bonjour windows , (and this is a serious shame), but here is the man page for its mac equivalent:
http://developer.apple.com/.../dns-sd.1.html

There is also C:\Windows\system32\dnssd.dll , an API that, unfortunately, must allow, corresponds to this document:
http://developer.apple.com/.../dns_sd_h/

+7
source share

This is a pretty old question ... however, since I recently implemented Bonjour functionality on Windows for one project, check out it. There is a Bonjour SDK for Windows from the Apple developer site with examples in C, C #, etc. The C examples folder contains the full source for the dns-sd client, which can then be used to create your own client (for registering services, names, etc.). Since this is C, you can easily package this functionality as a dll, and then enable and use other languages ​​(e.g. C #).

Bonjour SDK for Windows @ developer.apple.com

0
source share

All Articles