Author Topic: Demo not working - "Parameter error"  (Read 827 times)

Offline lvaskov

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Demo not working - "Parameter error"
« on: November 08, 2008, 10:20:19 PM »
Hello,

I installed the components in Delphi 2007 and compiled the demo project. When I run it, it correctly identifies available transports and Bluetooth APIs. But when I press "Discovery" on the "Bluetooth Discovery/Devices" tabs, it shows error - "Parameter Error".

I tried to write a simple project, using example source code from this forum:

Code: [Select]
procedure TForm1.Button1Click(Sender: TObject);
var
  Devices:  TBFBluetoothDevices;
begin
  Devices := BluetoothDiscovery.Discovery(nil, False, False);
  // Check is there is at leat one device
  if Assigned(Devices) then
    begin
      try
        if Devices.Count > 0 then
          begin
            ShowMessage(IntToStr(Devices.Count));
          end;
      // The error can appears above so use try/finally block
      finally
        // Clean up
        Devices.Free;
      end;
    end;
end;

The result is the same - "Parameter error" at this line:
Devices := BluetoothDiscovery.Discovery(nil, False, False);

I use Bluesoleil 2.3.0.0 Voip Release.

Any ideas ?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2467
  • Karma: 1000
    • Wireless Communication Library
Re: Demo not working - "Parameter error"
« Reply #1 on: November 09, 2008, 02:23:47 AM »
Good day!

The error is absolutly correct, because the first parameter of the Discovery function is the Radio object on which discovery should be executed (what is described in the doc file included in the package).

The demo shows that error because you should enum radios and select one to work with.
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager

Offline lvaskov

  • Newbie
  • *
  • Posts: 2
  • Karma: 0
Re: Demo not working - "Parameter error"
« Reply #2 on: November 09, 2008, 12:45:58 PM »
Thank you for your answer, I will let you know when I try again.

By the way, do you have plans to make a release for Delphi 2009 (Unicode) ?

Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2467
  • Karma: 1000
    • Wireless Communication Library
Re: Demo not working - "Parameter error"
« Reply #3 on: November 09, 2008, 01:32:34 PM »
WCL is compatable with D2009 (WCL with source code) and is completly UNICODE (for any versions).
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager