Hi,
I stumbled over this problem myself. Could not get the delegate callback to work.
Try implementing a class with the IUPnPDeviceFinderCallback interface, and using that instead of a delegate. That worked for me! :)
public class DeviceFinderCallback : IUPnPDeviceFinderCallback
{
public void DeviceAdded(int lFindData, UPnPDevice pDevice)
{
}
public void DeviceRemoved(int lFindData, string bstrUDN)
{
}
public void SearchComplete(int lFindData)
{
}
}
static void Main(string[] args)
{
var finder = new UPnPDeviceFinder();
int id = finder.CreateAsyncFind(
"upnp:rootdevice", 0, new DeviceFinderCallback());
finder.StartAsyncFind(id);
Console.ReadLine();
}