![]() |
![]() |
| Paypal | FTP | CCD | Buscar | Trucos | Trabajo | Foros |
|
|||||||
| Registrarse | FAQ | Miembros | Calendario | Guía de estilo | Temas de Hoy |
|
|
Herramientas | Buscar en Tema | Desplegado |
|
#31
|
|||
|
|||
|
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 |
|
|
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 |
|