IT Community - Software Programming, Web Development and Technical Support

Could not iterate UPNP services of a device using microsoft UPNP.DLL.Please let Me kn

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. ...


Go Back   IT Community - Software Programming, Web Development and Technical Support > Software Development > Mobile Software Development > Windows Mobile

Register FAQ Members List Calendar Mark Forums Read
  1 links from elsewhere to this Post. Click to view. #1 (permalink)  
Old 07-25-2007, 01:30 AM
theone theone is offline
D-Web Sr.Programmer
 
Join Date: Jun 2007
Posts: 129
theone is on a distinguished road
Question Could not iterate UPNP services of a device using microsoft UPNP.DLL.Please let Me kn

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.
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 07-27-2007, 06:18 AM
oxygen oxygen is offline
D-Web Architect
 
Join Date: Jun 2007
Posts: 633
oxygen is on a distinguished road
Thumbs down Re: Could not iterate UPNP services of a device using microsoft UPNP.DLL.Please let M

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
Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

LinkBacks (?)
LinkBack to this Thread: http://www.discussweb.com/windows-mobile/2683-could-not-iterate-upnp-services-device-using-microsoft-upnp-dll-please-let-me-kn.html
Posted By For Type Date
Could not iterate UPNP services of a device using microsoft UPNP ... | Web Hosting This thread Refback 09-27-2007 11:58 AM

Similar Threads
Thread Thread Starter Forum Replies Last Post
The device is not ready. at System.IO kingmaker C# Programming 3 02-16-2008 10:32 AM
Microsoft delivered a new version of its Microsoft Security Assessment Tool (MSAT) senthilkannan Microsoft 0 12-19-2007 03:47 AM
How to mount the device in linux? write2ashokkumar Server Management 0 11-06-2007 04:38 AM
Microsoft Developing A Double-Sided Touch Screen Device vadivelanvaidyanathan Technology BUZZzzzzz 0 08-30-2007 11:58 PM
Default Boot Device vigneshgets Operating Systems 0 07-18-2007 03:36 AM


All times are GMT -7. The time now is 03:12 PM.


Copyright ©2004 - 2007, DiscussWeb. All Rights Reserved.

SEO by vBSEO 3.0.0