Posted on 1997-03-23
How can I get Delphi 2 (Win 95) to send data to the COM port and communicate with a modem, for example to dial phone numbers? There are various references to Microsoft's TAPI in the Help files. Is this the way to go, or is there something more obvious I'm missing. VB4 seems to include a DLL (mscomm32??) for this, but I can't see a staightforward method in Delphi..
sperling's suggestion to use CreateFile and WriteFile is something I've already tried (also have tried AssignFile etc.)
I get the impression this would have worked with Win 3.11, but doesn't work for Win95.
With CreateFile, I get a valid file handle and the lpdWord value indicates that x number of bytes have been written....but it doesn't actually do anything to my modem. (YES I've checked I'm using the correct COM port.)
My question was really IS there an easier way of accessing Win 95's functionality rather than trying to write directly to the port.
As I said, I think VB4 has an OCX for this which makes it nice and easy.
I'M afraid you have not solved my problem.