(COM LPT) Win32



         

CreateFile


, Win32 . , . open fopen , CreateFile. Win32 API. :

HANDLE CreateFile(

LPCTSTR lpFileName,

DWORD dwDesiredAccess,

DWORD dwShareMode,

LPSECURITY_ATTRIBUTES lpSecurityAttributes,

DWORD dwCreationDistribution,

DWORD dwFlagsAndAttributes,

HANDLE hTemplateFile

);

, . :

lpFileName

. . . . . "COM1", "COM2", "COM3", "COM4" . MS-DOS, . "LPT1", "LPT2" . , 1 , Windows . LPT1 . . - , Internet, . , .

dwDesiredAccess

. :

  • 0 .
  • GENERIC_READ .
  • GENERIC_WRITE .
  • GENERIC_READ|GENERIC_WRITE .

dwShareMode