My company develops hardware and software for education/emergency medical/law enforcement applications. We have a product that communicates by Bluetooth to a PC using SPP (Virtual Com Port) profile. We need to find a way to determine the numbers of the outgoing and incoming serial port numbers assigned to a paired Bluetooth device. These numbers can be found in the Bluetooth Control Panel in both XP and Vista, but Windows 7 shows only the outgoing port number. We'd like to automate the process of assigning the correct incoming port number, in our software, which is written in Delphi 5. Possible solutions would include methods of accessing Windows APIs that can return the desired information.... I believe I can access an ordinary DLL (my programming skills are limited). We do not use COM or .NET.
A good solution might be directing us to the appropriate DLL or API call that can take the assigned name of the paired device, and return two parameters: the outgoing port, and the incoming port. The solution needs to work for XP, Vista, and W7.