//---------------------------------------------------------------------------
void __fastcall TForm1::OpenTray()
{
//Kasse auf Knopfdruck öffnen
unsigned long res=0;
unsigned int i =0;
HANDLE com=CreateFile("COM1",GENERIC_WRITE,0,NULL,OPEN_EXISTING,
FILE_ATTRIBUTE_NORMAL,0);
if (com>0)
{
WriteFile(com,"XXXXXXXXXXXXXXXXXXXX",20,&res,NULL);
CloseHandle(com);
}
}
Hier ist ein CBuilder-Beispiel.
Gruß, SamC