.NET Components for Mobility

Can't find PInvoke DLL 'BthUtil.dll' in windows ce6.0

Last post 08-27-2008 12:33 AM by PeterFoot. 3 replies.
Page 1 of 1 (4 items)
Sort Posts: Previous Next
  • 07-22-2008 4:46 AM

    • George
    • Top 75 Contributor
    • Joined on 07-22-2008
    • Posts 8

    Can't find PInvoke DLL 'BthUtil.dll' in windows ce6.0

    OS: windows ce6.0

    code:

    private void btnFind_Click(object sender, EventArgs e)
            {
                try
                {
                    BluetoothRadio.PrimaryRadio.Mode = RadioMode.Discoverable;
                    bluetoothClient = new BluetoothClient();
                    InTheHand.Net.Sockets.BluetoothDeviceInfo[ bluetoothDeviceInfo = (new BluetoothClient()).DiscoverDevices(10, false, false, true);
                    //Guid spguid = InTheHand.Net.Bluetooth.BluetoothService.ObexObjectPush;
                    cmbBlueTooth.DataSource = bluetoothDeviceInfo;
                    cmbBlueTooth.DisplayMember = "DeviceName";
                    cmbBlueTooth.ValueMember = "DeviceAddress";
                }
                catch (Exception ex)
                {
                    MessageBox.Show(ex.Message);
                }
                finally
                {
                }
            } 

    Error:Can't find PInvoke DLL 'BthUtil.dll'

    Why??

  • 07-22-2008 5:10 PM In reply to

    Re: Can't find PInvoke DLL 'BthUtil.dll' in windows ce6.0

    I'm not the WM/WinCE guy, but from an earlier answer of Peter's http://inthehand.com/forums/t/1178.aspx its the case that not all CE vendors ship that DLL.  Maybe they just missed it and they could do so...

    Alan J. McFarlane
    http://www.alanjmcf.me.uk/
    Please follow-up in the newsgroup for the benefit of all.
    Have I helped? Consider visiting my Amazon wishlist, see my homepage.
  • 08-10-2008 10:45 PM In reply to

    • George
    • Top 75 Contributor
    • Joined on 07-22-2008
    • Posts 8

    Re: Can't find PInvoke DLL 'BthUtil.dll' in windows ce6.0

    It looks like the bthutil.dll is not supported under CE. 
     
    It is in PPC and Smartphone API.  


     It  might be possible to create your own version of BthUtil.  To make the device 
     
    discoverable on CE look at BthWriteScanEnableMask().  You want to use 
     
    mask=0x2 for "On" and mask=0x3 for "discoverable". 

  • 08-27-2008 12:33 AM In reply to

    Re: Can't find PInvoke DLL 'BthUtil.dll' in windows ce6.0

    Since Windows Mobile supports the BthReadScanEnableMask and BthWriteScanEnableMask (the BthUtil functions are obviously simple wrappers around these) I'll be replacing the code for the next release so that it removes this dependency.

    Peter

    Peter Foot
    Microsoft Device Application Development MVP
    www.peterfoot.net | www.inthehand.com
Page 1 of 1 (4 items)
Copyright © 2001-2008 In The Hand Ltd. All rights reserved. Terms of Use and Privacy Policy.