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 8182563
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T00:53:58+00:00 2026-06-07T00:53:58+00:00

I enumerated the RAS capable devices using RasEnumDevices and I am getting the DeviceName

  • 0

I enumerated the RAS capable devices using "RasEnumDevices" and I am getting the DeviceName as "Communications cable between two computers #8","Communications cable between two computers #7" etc.,
And my friendly name of the device looks different as "USB Device (COM10)" , I got it through SetupDiGetDeviceRegistryProperty.

Is this the normal behaviour? Because When I try to create a Rasphonebook, I cant Identify my connected device name. Is there a way to make both device name and friendly name same?

I tried enumerating "RasEnumDevices" but am getting list of devices.

WAN Miniport (L2TP)
WAN Miniport (L2TP)
WAN Miniport (PPTP)
WAN Miniport (PPTP)
WAN Miniport (PPPOE)
Communications cable between two computers #14
Communications cable between two computers #13

How to choose my device from the above list?

or Any Apis available only to list the connected RAS devices?

or Any APIS to get only the connected device name? like “Communications cable between two computers #8” in my case..

Update :

RAS devices

In the above picture I can see the RAS device name with COM port name. Is there a way to enumerate these devices with COM port name?

  • 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-07T00:53:59+00:00Added an answer on June 7, 2026 at 12:53 am

    Unfortunately what you’re seeing come back from RasEnumDevices is exactly what’s expected. There is no way to directly tie a RASDEVINFO structure back to the actual hardware, or what port it’s assigned to since the structure really doesn’t give you any way of uniquely identifying the hardware.

    Say you have two PPTP VPN ports, you can’t distinguish port 1 from port 2… they’ll both come back from the API call as “WAN Miniport (PPTP)”.

    By the way, if you don’t want to deal with the interop code yourself you may want to check out the DotRas SDK on CodePlex, it has pretty much the entire RAS API wrapped.

    using DotRas;
    
    IEnumerable<RasDevice> devices = RasDevice.GetDevices();
    

    That’s the call you’d have made to get the devices listed from RasEnumDevices using the above mentioned SDK.

    Here’s a link for it if you want it: http://dotras.codeplex.com

    Edit: I wanted to add, your phonebook entry would only need to have the name of “Communications cable between two computers #14” because it knows which COM port it’s associated with. You don’t need to identify that yourself, nor would the entry work if you appended the COM port information to the device name.

    Good luck!

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

Sidebar

Related Questions

I have an enumerated type, StackID , and I am using the enumeration to
I was previously using How can a formcollection be enumerated in ASP.NET MVC? 's
Hibernates is generating a VARBINARY column with JPA @Enumerated annotation. I'm using SQL Server
I am getting the Collection was mutated while being enumerated exception when I am
Arrays can be indexed using user-defined enumerated types. For example: type TIndexValue = (ZERO
I asked a previous question about mapping an enumerated value on a table using
I've tried using the grab all of the process IDs enumerated by the desktop
It's possible to define enumerations in JPA using either @Enumerated(EnumType.ORDINAL) or @Enumerated(EnumType.STRING) I wonder
Often, one needs several enumerated types together. Sometimes, one has a name clash. Two
Possible Duplicate: Getting exception as “Collection was mutated while being enumerated” This question is

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.