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

  • SEARCH
  • Home
  • 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 4566500
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T18:47:52+00:00 2026-05-21T18:47:52+00:00

I am attempting to have an application for Windows Mobile CE re-connect to a

  • 0

I am attempting to have an application for Windows Mobile CE re-connect to a specific WEP Enabled network if it becomes available. I believe that this code scans through the currently available access points to get a reference to the network I need:

                // we have communicated with the server, so save the access point for future reference
                INetworkInterface[] wniNet = NetworkInterface.GetAllNetworkInterfaces();
                foreach (NetworkInterface wni in wniNet)
                {
                    if (wni is WirelessNetworkInterface)
                    {
                        WirelessNetworkInterface wWireless = wni as WirelessNetworkInterface;
                        //if (mwniServerConnection == null)
                        if (string.IsNullOrEmpty(msAccessPointName))
                        {
                            MessageBox.Show("assigning: " + wWireless.AssociatedAccessPoint.ToString() + " to instance var.", "testing");

                            // first attempt to save the WEP enabled access point to the preferred networks
                            //WirelessZeroConfigNetworkInterface wWifiConnection = new WirelessZeroConfigNetworkInterface();
                            //wWifiConnection.AddPreferredNetwork(wWireless.AssociatedAccessPoint.ToString(),
                            //    wWireless.InfrastructureMode,
                            //    "9876543210",
                            //    1,
                            //    wWireless.AuthenticationMode,
                            //    WEPStatus.WEPEnabled,
                            //    null);
                            mwniServerConnection = wWireless;
                            msAccessPointName = wWireless.AssociatedAccessPoint.ToString();
                        }
                    }
                }

I am a little out of my depth having found the OpenNETCF library yesterday, I’d like to ask if there are any examples of code that can test if the network ac is available, and to connect if it is.

  • 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-21T18:47:53+00:00Added an answer on May 21, 2026 at 6:47 pm

    I found that using adapter.SetWirelessSettings re-connects the hand held device to the specific access point found in order communicate on the specific network my server runs on:

    public static bool AttemptToReConnectAccessPoint()
    {
        bool wbRtn = false;
    
        // attempt to connect to the proper network
        if (U.mapAccessPoint != null)
        {
            // if we are currently on the right access point, we don't want to blow off the connection
            if (CheckIfAccessPointIsCurrent()) return true;
            foreach (OpenNETCF.Net.Adapter wAdapter in OpenNETCF.Net.Networking.GetAdapters())
            {
                bool wbFound = false;
                foreach (OpenNETCF.Net.AccessPoint wAccessPoint in wAdapter.NearbyAccessPoints)
                {
                    if (wAccessPoint.Name == U.mapAccessPoint.Name)
                    {
                        wbRtn = wAdapter.SetWirelessSettings(wAccessPoint.Name);
                        // give the re-connect script a second to finish
                        Thread.Sleep(1000);
                        Application.DoEvents();
                        break;
                    }
                }
                if (wbFound) break;
            }
        }
    
        return wbRtn;
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently have a Windows Application that uses TCP Sockets to connect users and
I have an existing application that is written in C++ for Windows. This application
In our application, we have a number of Windows Services (more than 30) that
I have a ASP.NET application running on Windows 2003 that needs to communicate with
I have an application that I am attempting to build on Mac OS X
I'm attempting to debug a .NET Compact framework C# application on a Windows Mobile
I have been attempting to create a Windows Application using Iron Ruby Version 1.1
I'm attempting to create an application that looks much like the Windows 8 Metro
I have a windows application that acts as a WCF Service that I developed
I have been attempting to get log4net logging in my asp.net web application with

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.