Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9239363
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T07:58:14+00:00 2026-06-18T07:58:14+00:00

For an application, we use UPnP to discover and register devices/service(we have server and

  • 0

For an application, we use UPnP to discover and register devices/service(we have server and client part).

For the discovery, we used the http://managedupnp.codeplex.com/ which worked very well.

To register, we did found some library, but they were VERY buggy(intel open source library), and we now want to use the COM component and make a small c# abstraction on it.

I found some documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/aa381805(v=vs.85).aspx but I’ve got a problem.

This library contains only interfaces, and I can’t see how I can get an instance of it. And I can’t find any example/documentation.

So, does anybody knows how to register a device/service with this COM component?

Thank you!

EDIT:

I tried to generate a C# dll:

midl /target NT51 /tlb "C:\upnphost.tlb" "C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Include\upnphost.idl"
tlbimp upnphost.tlb

But after importing this generated dll, I only got the same interface than before :/. Am I on the right way, how should I do that?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-18T07:58:15+00:00Added an answer on June 18, 2026 at 7:58 am

    Once you’ve done the midl + tlbimp, you can just write this kind of code, as the tlbimp should have create a class (UPnPRegistrarClass) and an interface IUPnPRegistrar that the underlying COM class implements:

    IUPnPRegistrar registrar = (IUPnPRegistrar)new UPnPRegistrarClass();
    registrar.RegisterDevice(
        File.ReadAllText("DimmerDevice-Desc.xml"),
        "My.Class",
        "MyInitString",
        "MyContainerId",
        Path.GetFullPath("."),
        3200);
    

    Note: for this to work, download the UPnP device registration sample on your disk, and copy the two XML description files to the current execution path. You also must implement a COM Object with a progid (“My.Class” that works because the RegisterDevice call will indeed instantiate this object to build an identifier. You can do that with .NET.

    Device and service description formats are available here: UPnP™ Device Architecture 1.1. In the Windows world, there are some extra restrictions specified here: Creating a Device Description (Windows)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm currently developing a PHP application that is going to use websockets for client-server
I'm trying to have my custom java application use our Active Directory Server for
I have a C#.net Windows form Application with SQL Server. My application use in
I have an application which use java.util logging and libraries used by this application
I push my application(use mysql service) to cloudfoundry success.and use vmc tunnel access to
I would like to have my GWT application use different constants when debugging or
I have spent the whole day trying to make my application use threads but
Application: a UPNP media server runing on Google TV. I'd like to raise and
I have a Media server at home that works well with upnp on my
I am wiling to have some pages of my application use a wiki based

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.