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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T09:51:21+00:00 2026-05-26T09:51:21+00:00

I using a wrapper to the WCL BT library. Since the app is in

  • 0

I using a wrapper to the WCL BT library. Since the app is in .NET 4 and the license we have to the wrapper is in .NET 2, this is a sloppy workaround.

Using this wrapper with a .NET 4 WPF application works fine as long as the useLegacyV2RuntimeActivationPolicy is on. More on this here. It takes around 22 seconds firing the OnDiscoveryComplete event.

But when using the same wrapper with an ASP NET MVC 3 application, the OnDiscoveryComplete event on the library is never fired. Anyone knows why?

The wrapper is called on buttonClickedEvent on the WPF app and on a SearchAsync action on an AsyncController on the MVC app.

The relevant code is here:

Calling the wrapper:

var wrapper = new Wrapper();
wrapper.Search();

Wrapper:

public Wrapper() {
    _wclApi = new wclAPI();
    _wclApi.Load();
     _btDiscovery = new wclBluetoothDiscovery();
    _btDiscovery.OnDiscoveryStarted += BtDiscoveryOnDiscoveryStarted;
    _btDiscovery.OnDiscoveryComplete += BtDiscoveryOnDiscoveryComplete;
}

public void Search() {
    var radios = new wclBluetoothRadios();
    var ret = _btDiscovery.EnumRadios(radios);

    if (ret == 0) {
        wclBluetoothRadio radio = radios[0];
        _btDiscovery.Discovery(radio, 0x15);
    }
}

private void BtDiscoveryOnDiscoveryComplete(object sender, wclBluetoothDiscoveryCompleteEventArgs e) {
    // handle devices found
}
  • 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-26T09:51:22+00:00Added an answer on May 26, 2026 at 9:51 am

    There is probably an exception that the wclBluetoothDiscovery is encountering but not properly exposing to you. It’s a common bug in async APIs to not inform callers when bad things happen… the proper API design would be to raise the *Complete event but then raise the exception to you when you query the completed event args.

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

Sidebar

Related Questions

I'm using a Java wrapper for SQLite called SQLiteJDBC - this may have some
I'm currently implementing a .NET wrapper for a Java library by using JNI to
I have installed SQLite and am using the wrapper from: http://sqlite.phxsoftware.com/ I have created
I'm using a Java wrapper for accessing Sqlite but I assume this is a
I'm using Infostrat's WPF wrapper for the Bing maps 3d control (blog here http://blogs.msdn.com/virtualearth3d/
I am using a DirectShowLib which is a thin wrapper for DirectShow. I have
I have a COM Callable Wrapper that I'm using from a VB6 program, but
I'm using a wrapper function around jQuery's AJAX function like this: $.getAjax = function(url,
I was reading this MSDN article which deals with creating a .NET managed wrapper
I'm working on an iphone app that uses Abbyy OCR. Using the wrapper class

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.