Wireless Communication Library Support Forum

Frameworks => Bluetooth Framework => Topic started by: jcgalveza on January 30, 2012, 06:42:41 PM

Title: WCL for .net 4.0 with microsoft, toshiba and bluesoleil stacks
Post by: jcgalveza on January 30, 2012, 06:42:41 PM
Hellow, I'm using the demo version of the WCL with 3 dongles, each using the Microsoft, Toshiba and BlueSoleil stacks when I try to open the wclAuthenticator for Microsoft it throws and "Unable to register callback" error, if I uninstall the BlueSoleil stack the error disapears and everu thin works just fine. TextBlue woks OK but I noticed that it uses the wcl2wbt.dll instead of the wcl.dll (for framework 4.0) that I'm using.
Any ideas on why this is happening? which dll should I use?

thanks a lot
Title: Re: WCL for .net 4.0 with microsoft, toshiba and bluesoleil stacks
Post by: Mike Petrichenko on January 30, 2012, 07:15:57 PM
Hello,

Try to run your application with administrative rughts. It should help. Let me know if it doesn't.

You should use wcl.dll.

wcl2wbt.dll is for WidComm support.
Title: Re: WCL for .net 4.0 with microsoft, toshiba and bluesoleil stacks
Post by: jcgalveza on January 30, 2012, 07:33:33 PM
Thanks a lot for your quick respose, I'm already using administrative rigths, I have the following manifest in my application:

Code: [Select]
<?xml version="1.0" encoding="utf-8"?>
<asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <assemblyIdentity version="1.0.0.0" name="MyApplication.app"/>
  <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2">
    <security>
      <requestedPrivileges xmlns="urn:schemas-microsoft-com:asm.v3">
           <requestedExecutionLevel  level="requireAdministrator" uiAccess="false" />
      </requestedPrivileges>
    </security>
  </trustInfo>
 
  <compatibility xmlns="urn:schemas-microsoft-com:compatibility.v1">
    <application>
           
    </application>
  </compatibility>
 
 
</asmv1:assembly>

By the way, I also noticed that using administrative rigths prevents the wcl.wclAPI.OnAccept event from happening.

thanks once again
Title: Re: WCL for .net 4.0 with microsoft, toshiba and bluesoleil stacks
Post by: Mike Petrichenko on January 30, 2012, 07:43:16 PM
So it doesn't work even with admin rights?
Title: Re: WCL for .net 4.0 with microsoft, toshiba and bluesoleil stacks
Post by: jcgalveza on January 30, 2012, 08:02:23 PM
That's right, it doesn't work even with administrative rights.
Title: Re: WCL for .net 4.0 with microsoft, toshiba and bluesoleil stacks
Post by: Mike Petrichenko on January 30, 2012, 08:08:07 PM
Ok, i'll try to reproduce it and fix.
Title: Re: WCL for .net 4.0 with microsoft, toshiba and bluesoleil stacks
Post by: jcgalveza on January 30, 2012, 08:19:00 PM
Ok, thanks a lot.
Did you noticed the part of the OnAccept event not triggering when on Administrative privileges?
Title: Re: WCL for .net 4.0 with microsoft, toshiba and bluesoleil stacks
Post by: Mike Petrichenko on January 31, 2012, 05:55:20 AM
OnAccept?
Title: Re: WCL for .net 4.0 with microsoft, toshiba and bluesoleil stacks
Post by: Mike Petrichenko on January 31, 2012, 06:33:21 AM
I reproduced the problem. Unfortunately issue appears in Windows function BluetoothRegisterForAuthenticationEx which returns error code

RPC_S_SERVER_UNAVAILABLE
1722 (0x6BA)
The RPC server is unavailable.

I'm not sure how to fix it now but we will keep working on this matter. The problem appears only if there is BlueSoleil drivers installed. Looks like BS changes something in MS stack.
Title: Re: WCL for .net 4.0 with microsoft, toshiba and bluesoleil stacks
Post by: jcgalveza on January 31, 2012, 03:25:19 PM
Ok, thanks a lot, I'll keep reading this topic just in case you find a solution. About the OnAccept not triggering problem, well is not about OnAccept, the problem is with the OnChange event, sorry about that..., I looked at it closely yesterday and the problem happends only with toshiba stack, let me explain a bit more:
If you have two dongles, one registered with microsoft stack and the other registered with toshiba stack, under normal privileges if you remove either dongle you will have an OnChange event, the same if you reconnect the dongles, on the contrary, under administrative rights, if you connect or disconnect the "Microsoft" dongle you'll have the event, but if you do the same with the toshiba dongle then the event won't be triggered.
One last thing, if I wish to use the four supported stacks with Visual Studio 2010 and .NET framework 4 which assemblies should I reference?

Thank you very much.
Title: Re: WCL for .net 4.0 with microsoft, toshiba and bluesoleil stacks
Post by: Mike Petrichenko on January 31, 2012, 03:34:27 PM
Hello,

Thank you for so detailed description of the problem with OnChange event. I will check it and back to you with test result and possible fix.

With regards to 4 stacks. WCL is in one DLL: wcl.dll. You always must reference to wcl.dll as to a WCL library. But by some reason there is separate DLL for WidComm support. You shouldn't reference to this DLL (wcl2wbt.dll) but you have to redistribute it together with your application if your application must support WidComm. The wcl2wbt.dll must be in the same folder as your application is or (what is better) in System32 folder.
Title: Re: WCL for .net 4.0 with microsoft, toshiba and bluesoleil stacks
Post by: jcgalveza on January 31, 2012, 03:53:29 PM
Ok, understood. Also there are 2 subdirs : build and redist booth with copies of WCL for .NET 4.0, I'm referencing the one in the redist subdir. Is that Ok?
Title: Re: WCL for .net 4.0 with microsoft, toshiba and bluesoleil stacks
Post by: Mike Petrichenko on January 31, 2012, 04:18:01 PM
Yes, of course. DLLs are identical in those dirs.
Title: Re: WCL for .net 4.0 with microsoft, toshiba and bluesoleil stacks
Post by: jcgalveza on January 31, 2012, 04:28:19 PM
Ok, thanks
Title: Re: WCL for .net 4.0 with microsoft, toshiba and bluesoleil stacks
Post by: Mike Petrichenko on February 01, 2012, 11:00:40 AM
Hello,

We have reproduced the Toshiba OnChange problem and now try to fix it.
Title: Re: WCL for .net 4.0 with microsoft, toshiba and bluesoleil stacks
Post by: jcgalveza on February 01, 2012, 03:10:21 PM
Ok, thanks again.