Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Buscar Temas de Hoy Marcar Foros Como Leídos

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #1  
Antiguo 22-03-2013
bigguntm bigguntm is offline
Miembro
NULL
 
Registrado: nov 2012
Posts: 16
Poder: 0
bigguntm Va por buen camino
Ayuda para conectar celular en la app

Hola a todos de nuevo, al comienzo de mi programa queria que los blackberry's se conectaran a mi app para poder leerles sus datos, lo principal seria el imei y el mep. Bueno, nunca lo pude hacer, debe ser por el poco tiempo que llevo programando, un colega en un foro, me facilito esto,

Código:
RIMRADIOCOMLib_TLB.pass
se los puse en un .rar abajo lo pueden descargar..

en un archivo .bat , colocamos esto..

//para registrar la dll y pueda funcionar correctamente.

Código:
regsvr32 RIMRadioCOM.dll
en la Unit principal esto..

Código Delphi [-]
unit Unit1;

interface

uses
  Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
  Dialogs, ActiveX, RIMRADIOCOMLib_TLB, StdCtrls, ExtCtrls;

type
  TForm1 = class(TForm)
    btnReadInfo: TButton;
    edtIMEI: TLabeledEdit;
    edtMEP: TLabeledEdit;
    procedure btnReadInfoClick(Sender: TObject);
  private
    { Private declarations }
  public
    { Public declarations }
  end;

var
  Form1: TForm1;

implementation

{$R *.dfm}

procedure TForm1.btnReadInfoClick(Sender: TObject);
var
i: Cardinal;
SwPartList: IGetSwPartList;
PartList: PSafeArray;
RRO: TRIMRadioObj;
Connection: IConnection;
IMEI: IReadIMEI;
StrImei: WideString;
pl: WideString;
BBPIN: IReadBBPIN;
edtClipBoard: TEdit;
begin
// Create RIM Radio Object
RRO := TRIMRadioObj.Create(Form1);
// Query different interfaces to see if are supported
// if OK then read desired information
if RRO.DefaultInterface.QueryInterface(IID_IConnection, Connection) = S_OK then
begin
// Connect to phone
Connection.Connect('USB', 300, 19200, '');
// Read BBPIN
if (Connection.IsConnected = 1) and (RRO.DefaultInterface.QueryInterface(IID_IReadBBPIN, BBPIN) = S_OK) then
begin
// Use IntToHex(BBPIN.Execute,6) to show BBPIN
end;
// IMEI
if (Connection.IsConnected = 1) and (RRO.DefaultInterface.QueryInterface(IID_IReadIMEI, IMEI) = S_OK) then
begin
IMEI.Execute(StrImei);
edtIMEI.Text := StringReplace(StrImei, '/', '', [rfReplaceAll]);
end;
// PartList
if (Connection.IsConnected = 1) and (RRO.DefaultInterface.QueryInterface(IID_IGetSwPartList, SwPartList) = S_OK) then
begin
SwPartList.Execute(PartList);
for i:=0 to PartList.rgsabound[0].cElements-1 do
begin
SafeArrayGetElement(PartList, i, pl);
// From all partlist info just show MEP
if Pos('MEP', pl) > 0  then
edtMEP.Text := pl;
end;
end;
// Create a TEdit to put IMEI + MEP together and paste it to clipboard
edtClipBoard := TEdit.Create(Form1);
edtClipBoard.Parent := Form1;
edtClipBoard.Text := 'IMEI:' + edtIMEI.Text + ' MEP:' + edtMEP.Text;
edtClipBoard.SelectAll;
edtClipBoard.CopyToClipboard;
edtClipBoard.Free;
// Finish then disconnect interface
Connection.Disconnect;
end;
// Release Rim Radio Object
RRO.Free;
end;

end.



el problema es que todo esta "correctamente", la aplicacion no me da ningun error, pero tampoco lee la data del blackberry cuando lo conecto.. Saludos y gracias de antemano..
Archivos Adjuntos
Tipo de Archivo: rar RIMRADIOCOMLib_TLB.rar (50,0 KB, 7 visitas)
Responder Con Cita
 


Herramientas Buscar en Tema
Buscar en Tema:

Búsqueda Avanzada
Desplegado

Normas de Publicación
no Puedes crear nuevos temas
no Puedes responder a temas
no Puedes adjuntar archivos
no Puedes editar tus mensajes

El código vB está habilitado
Las caritas están habilitado
Código [IMG] está habilitado
Código HTML está deshabilitado
Saltar a Foro

Temas Similares
Tema Autor Foro Respuestas Último mensaje
Ayuda para conectar Delphi y sql server Mauro Daniel Conexión con bases de datos 6 16-09-2011 16:23:43
conectar mi celular motorola y enviar mensajes desde delphi carsan Varios 10 09-02-2011 15:02:09
Pena de muerte para los que tengan móvil (celular) Casimiro Noteví La Taberna 2 17-06-2007 12:57:13
Ayuda a conectar con Access!! kye_z Conexión con bases de datos 7 21-10-2004 09:51:33
Ayuda para conectar equipos remotamente. Telemaco Internet 5 30-03-2004 15:26:27


La franja horaria es GMT +2. Ahora son las 17:05:29.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2026, Jelsoft Enterprises Ltd.
Traducción al castellano por el equipo de moderadores del Club Delphi
Copyright 1996-2007 Club Delphi