There is a bug in ServiceAndDeviceDiscovery.BluetoothDeviceServicesManager.DiscoverAllDevices()
The "while (0 == result)" loop should contain the following line at the end of the loop:
Marshal.FreeHGlobal(bufferPtr);
I have seen instances where you eventually run out of memory when calling this method a lot.
The "while (0 == result)" loop should contain the following line at the end of the loop:
Marshal.FreeHGlobal(bufferPtr);
I have seen instances where you eventually run out of memory when calling this method a lot.