unit Unit1;interfaceusesWindows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,Dialogs, ActiveX, StdCtrls, RIMRADIOCOMLib_TLB, Buttons;typeTForm1 = class(TForm)SpeedButton1: TSpeedButton;Edit1: TEdit;Edit2: TEdit;Edit3: TEdit;Label1: TLabel;Label2: TLabel;Label3: TLabel;procedure SpeedButton1Click(Sender: TObject);procedure FormCreate(Sender: TObject);private{ Private declarations }public{ Public declarations }end;varForm1: TForm1;implementation{$R *.dfm}procedure TForm1.SpeedButton1Click(Sender: TObject);vari: Cardinal;SwPartList: IGetSwPartList;PartList: PSafeArray;RRO: TRIMRadioObj;Connection: IConnection;IMEI: IReadIMEI;StrImei: WideString;pl: WideString;BBPIN: IReadBBPIN;edtClipBoard: TEdit;begin// Create RIM Radio ObjectRRO := TRIMRadioObj.Create(Form1);// Query different interfaces to see if are supported// if OK then read desired informationif RRO.DefaultInterface.QueryInterface(IID_IConnection, Connection) = S_OK thenbegin// Connect to phoneConnection.Connect('USB', 300, 19200, '');// Read BBPINif (Connection.IsConnected = 1) and (RRO.DefaultInterface.QueryInterface(IID_IReadBBPIN, BBPIN) = S_OK) thenbegin// Use IntToHex(BBPIN.Execute,6) to show BBPINEdit3.Text := IntToHex(BBPIN.Execute,6);end;// IMEIif (Connection.IsConnected = 1) and (RRO.DefaultInterface.QueryInterface(IID_IReadIMEI, IMEI) = S_OK) thenbeginIMEI.Execute(StrImei);Edit1.Text := StringReplace(StrImei, '/', '', [rfReplaceAll]);end;// PartListif (Connection.IsConnected = 1) and (RRO.DefaultInterface.QueryInterface(IID_IGetSwPartList, SwPartList) = S_OK) thenbeginSwPartList.Execute(PartList);for i:=0 to PartList.rgsabound[0].cElements-1 dobeginSafeArrayGetElement(PartList, i, pl);// From all partlist info just show MEPif Pos('MEP', pl) > 0 thenEdit2.Text := pl;end;end;// Create a TEdit to put IMEI + MEP together and paste it to clipboardedtClipBoard := TEdit.Create(Form1);edtClipBoard.Parent := Form1;edtClipBoard.Text := 'IMEI:' + Edit1.Text + ' MEP:' + Edit2.Text;edtClipBoard.SelectAll;edtClipBoard.CopyToClipboard;edtClipBoard.Free;// Finish then disconnect interfaceConnection.Disconnect;end;// Release Rim Radio ObjectRRO.Free;end;procedure TForm1.FormCreate(Sender: TObject);beginEdit1.Text:=''; Edit2.Text:=''; Edit3.Text:='';end;end.
Read Imei Pin Mep BlackBerry Complete Source
Posted by Librarian → 07:54
Category → Read Imei Pin Mep BlackBerry Complete Source » BlackBerry , Software » Gsm Library
Subscribe to:
Post Comments (Atom)
0 comments:
Post a Comment