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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T17:05:30+00:00 2026-05-14T17:05:30+00:00

Now my team working in a network project using windows application c# . I

  • 0

Now my team working in a network project using windows application c#. I didn’t know how to programmatically detect Cipher type and Encryption level from a wireless network device from windows 2003 server.

After searching i got WMI (Windows Management Instrumentation) for solving the problem.+

Please suggest example/reference for finding Cipher type and Encryption level from a wireless network device from windows 2003 server

  • 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-05-14T17:05:30+00:00Added an answer on May 14, 2026 at 5:05 pm

    just found you question. The information which you search for originate from NDIS driver. WMI only gives you a subset of such information. Every NDIS driver support some standard requests which can be send with respect of DeviceIoControl function (see http://msdn.microsoft.com/en-us/library/aa363216%28v=VS.85%29.aspx). As an input (lpInBuffer parameter) you should give a DWORD with an OID code, a control code which identify the request, As an output you receive a structure with information filed, or in your case a DWORD (enum value). For example, if you asked NDIS driver for

    #define OID_802_11_WEP_STATUS                   0x0D01011B
    

    (as DWORD value of lpInBuffer parameter) it returns back also DWORD with information like

    // Also aliased typedef to new name
    typedef enum _NDIS_802_11_WEP_STATUS
    {
        Ndis802_11WEPEnabled,
        Ndis802_11Encryption1Enabled = Ndis802_11WEPEnabled,
        Ndis802_11WEPDisabled,
        Ndis802_11EncryptionDisabled = Ndis802_11WEPDisabled,
        Ndis802_11WEPKeyAbsent,
        Ndis802_11Encryption1KeyAbsent = Ndis802_11WEPKeyAbsent,
        Ndis802_11WEPNotSupported,
        Ndis802_11EncryptionNotSupported = Ndis802_11WEPNotSupported,
        Ndis802_11Encryption2Enabled,
        Ndis802_11Encryption2KeyAbsent,
        Ndis802_11Encryption3Enabled,
        Ndis802_11Encryption3KeyAbsent
    } NDIS_802_11_WEP_STATUS, *PNDIS_802_11_WEP_STATUS,
      NDIS_802_11_ENCRYPTION_STATUS, *PNDIS_802_11_ENCRYPTION_STATUS;
    

    request for

    #define OID_802_11_AUTHENTICATION_MODE          0x0D010118
    

    returns

    typedef enum _NDIS_802_11_AUTHENTICATION_MODE
    {
        Ndis802_11AuthModeOpen,
        Ndis802_11AuthModeShared,
        Ndis802_11AuthModeAutoSwitch,
        Ndis802_11AuthModeWPA,
        Ndis802_11AuthModeWPAPSK,
        Ndis802_11AuthModeWPANone,
        Ndis802_11AuthModeWPA2,
        Ndis802_11AuthModeWPA2PSK,
        Ndis802_11AuthModeMax               // Not a real mode, defined as upper bound
    } NDIS_802_11_AUTHENTICATION_MODE;
    

    request for

    #define OID_802_11_INFRASTRUCTURE_MODE          0x0D010108
    

    returns

    typedef enum _NDIS_802_11_NETWORK_INFRASTRUCTURE
    {
        Ndis802_11IBSS,
        Ndis802_11Infrastructure,
        Ndis802_11AutoUnknown,
        Ndis802_11InfrastructureMax         // Not a real value, defined as upper bound
    } NDIS_802_11_NETWORK_INFRASTRUCTURE;
    

    and so on. You can find all different constants which you needs in ntddndis.h after installing of Windows DDK.

    To open a device handle you should use CreateFile function. Instead of file name you should give a string with the prefix "\\.\" and adapter name (adapter guids). Adapter names you can enumerate with different way. One of the easiest is the subkey names of the registry key HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters\Adapters.

    All what I explained above work exactly like http://msdn.microsoft.com/en-us/library/aa964902%28v=VS.85%29.aspx or other examples of usage DeviceIoControl. The full list of IoControl requests which must support some device class is described in DDK. I repeat one more time, that for usage of that one need only use DeviceIoControl and not write a device driver.

    More as 10 years ago I play a little with such requests which I described here. I tested my old program works without any problems now. One need only use OIDs which you need and not much more.

    UPDATED: I found a good link http://pages.infinit.net/codeguru/WiFiArticle.htm which explains in other words the same what I just written. It seems to me that one use here wrong parameters in CreateFile. One have to use FILE_SHARE_READ | FILE_SHARE_WRITE to makes all working. Example http://code.google.com/p/haggle/source/browse/winmobile/Haggle/WindowsWiFiUtils.cpp (see bool WindowsWiFiUtils:init(), bool WindowsWiFiUtils::setEncryptionMode(unsigned long adapterIndex, const unsigned int mode) etc) looks like much better and contain a lot of methods which can be also interesting for you. It is a C++ example, but it’s very easy to rewrite this in C#.

    UPDATED 2: One more way is usage of “Native Wifi API” http://msdn.microsoft.com/en-us/library/ms706556%28VS.85%29.aspx like WlanQueryInterface (for example with wlan_intf_opcode_supported_infrastructure_auth_cipher_pairs) or WZCQueryInterface, but it seems not supported on Windows Server 2003, what you need. Generally “Native Wifi API” is probably more reliable way to give maximum information (or modify it), but WMI can be also a good pragmatical alternative.

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

Sidebar

Related Questions

I thinking about switching to TFS2010 for my team. Right now we're using NANT
I'm working on a small C++ project which involves a launcher application that does
http://test.rfinvestments.co.za I've been working on this website for a little while and, now that
I've been working on a CodeIgniter project with a friend of mine for almost
I've been working on an iPhone project with iOS 4.0. I just downloaded Xcode
Scott Guthrie just blogged about the new jQuery Templates that his team has been
Ok so I'm working on my homework and am having trouble getting the Count
I'm working on upgrading one of our Rails 2.3.8 apps to Rails 3, and
This is installed on a Unix system I don't have direct access to, but
We converted everything to Mercurial coming from CVS and so far so good. An

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.