Author Topic: Error 10060  (Read 1261 times)

Offline Jazireh

  • Newbie
  • *
  • Posts: 13
  • Karma: 0
Error 10060
« on: January 27, 2009, 02:45:30 PM »
Hi mike ,
i want send a file for more device(phone or mobile) , i used thread for this but my program give me error 10060 , can u help me ?
i use BFBluetoothDiscovery and TBFObjectPushClient .

thread source :
 unit Unit2;

interface
uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, BFDiscovery, BFBase, BFClients, BFOBEXClient, BFObjectPushClient,
  StdCtrls, Buttons;
  type
  TMT = class(TThread)

  constructor Create(obj:TBFObjectPushClient);

  protected
    procedure Execute; override;
  private
  obj_push:TBFObjectPushClient;
  public
  end;

implementation
uses
unit1;
  constructor TMT.Create(obj:TBFObjectPushClient);
   begin
    Self.obj_push:=obj;
  inherited Create(false);
   end;
   procedure TMT.Execute;
   begin
           obj_push.Put('C:\Documents and Settings\Afr\Desktop\1.txt');
            obj_push.Close;
   end;
end.
//=========================================
procedure TForm1.Button1Click(Sender: TObject);
var i:Integer;
tm:Tmt;
  Devices:  TBFBluetoothDevices;
  objp:TBFObjectPushClient;
begin
  Devices := BFBluetoothDiscovery.Discovery(nil, False, False);

  if Assigned(Devices) then begin
    try
  for i:=0 to Devices.Count-1 do
  begin
          objp:=TBFObjectPushClient.Create(self);
         objp.BluetoothTransport.Device := Devices;
           objp.Open;
           Sleep(1000);
           Application.ProcessMessages;
           tm:=tmt.Create(objp);


        end;
Caption:='aaaaa';
    finally
      Devices.Free;
    end;
 end;


Offline Mike Petrichenko

  • Bluetooth Framework Developer
  • Administrator
  • Hero Member
  • *****
  • Posts: 2467
  • Karma: 1000
    • Wireless Communication Library
Re: Error 10060
« Reply #1 on: January 27, 2009, 03:31:30 PM »
10060 means WSAETIMEDOUT (time out). It may be because the device is busy or turned off.
WCL - Wireless Communication Library
TextBlue - Bluetooth Proximity Marketing Software
WCL Phone Explorer - Free Phone Content Manager