Difference between CreateFile & Com_Open

  • Thread starter Thread starter Arsalan Ahmad
  • Start date Start date
A

Arsalan Ahmad

Hi,

For a serial port device like modem, can any one please tell me the
difference between the APIs CreateFile(), COM_Open() and HWOpen().

Thanks,

Arsalan
 
Well, CreateFile() is how an application program opens a hardware device (or
a file). COM_Open is the name of the driver function which is called to
perform the open, when a device whose name is of the form COM<n>: is opened.
HWOpen is probably the low-level routine that actually does whatever is
necessary to the hardware when the device is opened (called by COM_Open).

If you're developing an application, all you need is CreateFile().

Paul T.
 
Back
Top