gizmo Lt JG

Registrado: 07 Feb 2003Mensajes: 54
|
Publicado: Jue 23 Oct, 2003 2:35 pm Asunto: CreateFile y WriteFile |
|
|
Hola, estoy intentando acceder al puerto paralelo en XP con CreateFile y WriteFile pero no sé muy bien como configurar las líneas de control...
Lo he intentado con:
| Código: | HANDLE PUERTO=NULL;
void__fastall TForm1::Button1Click(TObject *Sender)
{
char caract;
caract='a';
PUERTO=CreateFile("LPT1",GENERIC_READ|GENERIC_WRITE,0,0,OPEN_EXISTING,0,0);
if (PUERTO==INVALID_HANDLE_VALUE) Application-> Terminate();
error=TransmitCommChar(PUERTO,caract);
} |
¿Cómo se usan? |
|