title: Programmatically connect to bluetooth headsets on Windows Mobile
body: <p>On a Windows Mobile 5.0 device I have an MFC C++ kiosk application that should programmatically connect to one of 3 Bluetooth headsets and open a bidirectional audio connection to it. </p>
  
  <p>The headsets are already known to the device, it's only the switching and connecting part that should be done programmatically.</p>
  
  <p>How would I do that?</p>
  
  <p>I'm aware of the thread <a href="https://stackoverflow.com/questions/467524/how-to-connect-via-bluetooth-in-wm-programmatically">How to “Connect via Bluetooth” in WM programmatically?</a> but would like to have a way that works in C++.</p>
  
  <p>Any ideas?</p>