This function only works on the Microsoft bluetooth stack. If you have BlueSoleil, Widcomm (on non-vista OS), or Toshiba bluetooth stacks, you need to use a seperate API.
Despite its name, this function doesn't return until the timeout has elapsed, and all the bluetooth devices have been found. So choose a sensible timeout value. The BluetoothFindNextDevice function just enumerates through the found devices, and BluetoothFindDeviceClose frees the memory used to remember the list.