Club Delphi  
    Paypal   FTP   CCD     Buscar   Trucos   Trabajo   Foros

Retroceder   Foros Club Delphi > Principal > Varios
Registrarse FAQ Miembros Calendario Guía de estilo Temas de Hoy

Coloboración Paypal con ClubDelphi

 
 
Herramientas Buscar en Tema Desplegado
  #31  
Antiguo 24-04-2013
pacocable pacocable is offline
Registrado
 
Registrado: ago 2006
Posts: 9
Poder: 0
pacocable Va por buen camino
Se conectan casi siempre por puerto com virtual

segun he mirado los moviles al menos nokia se conecta por un com virtual que se crea al conectarlo con sus drivers.asi lo he conectado yo:
procedure TForm1.Button5Click(Sender: TObject);
begin
IF Marcar('COM2',edit3.Text) then
begin
showmessage('llamando');
end
else
begin
showmessage('no llama');
end;
end;

function Marcar(Puerto: String; Telefono: String): Boolean;
var
hPort: THandle;
DCB: TDCB;
Comando: String;
Escritos: Cardinal;
begin
Result:= FALSE;
Puerto:= Uppercase(Puerto);
// Cambiar esto si es necesario un puerto diferente
if (Puerto<>'COM1') and (Puerto<>'COM2') then
begin
showmessage('puerto no valido comprobar panel de control');
exit;
end;

hPort:= CreateFile(PChar('\\.\'+Puerto), GENERIC_READ or GENERIC_WRITE,0, nil,
OPEN_EXISTING,FILE_ATTRIBUTE_NORMAL,0);
if hPort<>INVALID_HANDLE_VALUE then
begin
DCB.DCBlength:= sizeof(DCB);
if GetCommState(hPort,DCB) then
begin
// Cambiar esto para una configuracion del puerto diferente
with DCB do
begin
BaudRate := CBR_9600;
ByteSize := 8;
Parity := NOPARITY;
StopBits := ONESTOPBIT;
Flags := $01;
end;
if SetCommState(hPort, DCB) then
begin
PurgeComm(hPort, PURGE_TXABORT or PURGE_RXABORT or PURGE_TXCLEAR or
PURGE_RXCLEAR);
Comando:= 'ATD'+Telefono+#13;
Result := WriteFile(hPort, PChar(Comando)^, Length(Comando), Escritos, nil);

end;
end;
CloseHandle(hPort);
end
else
begin
showmessage('no conetado');
end;
end;
en text3 va el numero de telefono amarcar lo que si me faltan son mas comandos at
Responder Con Cita
 



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
ver los contactos de un celular con delphi kurono Varios 0 02-07-2011 00:01:21
No pongas el celular en el bolsillo del pantalon jcarteagaf La Taberna 4 25-07-2008 19:40:53
infectar un celular ciro.arc Seguridad 10 19-07-2008 18:00:36
Programación de un celular hugoChinchilla Conexión con bases de datos 7 14-09-2007 05:09:18
Y asi hay gente que se descresta con un celular mamcx La Taberna 3 14-03-2007 23:14:20


La franja horaria es GMT +2. Ahora son las 00:52:38.


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