This is a discussion on Could not iterate UPNP services of a device using microsoft UPNP.DLL.Please let Me kn within the Windows Mobile forums, part of the Mobile Software Development category; Hi Friends, I am facing a problem with Microsoft upnp.dll, I have 5.1.2600.2180 of upnp.dll. ...
| |||||||
| Register | FAQ | Members List | Calendar | Mark Forums Read |
|
#1
| |||
| |||
| Hi Friends, I am facing a problem with Microsoft upnp.dll, I have 5.1.2600.2180 of upnp.dll. I wrote both VC++ as well as C# code; but could not iterate the device services. I also used get__item functions of IUPNPDevices and IUPNPServices but both returned null reference. I am sending you C# code snippet. Code Snippet using UPNPLib; private void btnOK_Click(object sender, EventArgs e) { try { UPnPDeviceFinder pDeviceFinder = new UPnPDeviceFinder(); // get device list for DEVICE URN UPnPDevices pDevices = pDeviceFinder.FindByType("urn:schemas-upnp-org:device:Printer:1", 0); foreach (UPnPDevice pDevice in pDevices) { if (pDevice != null) { MessageBox.Show(pDevice.FriendlyName); // get device services UPnPServices pServices = pDevice.Services; // While iterating the services it goes to catch block. Exception messge is "Exception from HRESUT:0X80040500" foreach (UPnPService pService in pServices) { if (pService != null) MessageBox.Show(pService.Id.ToString()); } } } } catch (Exception ex) { MessageBox.Show(ex.Message); } } I tried the code both in VC++ and C#, it could not able to iterate services with both languages. I also used get__item functions of IUPNPDevices and IUPNPServices but both returned null reference. Please let me know the problem cause. |
|
#2
| |||
| |||
| Hi the error code you are seeing is UPNP_E_INVALID_DOCUMENT - it suggests, that your device has invalid device description document. The error is actually on the device side Oxygen |
![]() |
| Thread Tools | |
| Display Modes | |
| |
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Detect the Bluetooth Device | sudha | Mobile Software Development | 0 | 04-28-2008 02:31 AM |
| The device is not ready. at System.IO | kingmaker | C# Programming | 3 | 02-16-2008 09:32 AM |
| Microsoft delivered a new version of its Microsoft Security Assessment Tool (MSAT) | senthilkannan | Microsoft | 0 | 12-19-2007 02:47 AM |
| Microsoft Developing A Double-Sided Touch Screen Device | vadivelanvaidyanathan | Technology BUZZzzzzz | 0 | 08-30-2007 10:58 PM |
| Default Boot Device | vigneshgets | Operating Systems | 0 | 07-18-2007 02:36 AM |
Our Partners |