serial com in borland pascal (windows DLL) 
Author Message
 serial com in borland pascal (windows DLL)

Do anybody have experince with serial communication from a DLL in
borland Pascal. I've tried to use the buildcommdcb(),setcommstate()
and opencomm() form the winprocs unit but it setcommstate just returns
errorcode -3. What does that mean? Anybody have some documentation on
the winprocs unit in borland pascal (delphi) except from the online
help. Anybody seen some exsamples?

Thank you for helping


Frede Schmidt
S?nderborg
Denmark



Wed, 18 Jun 1902 08:00:00 GMT  
 serial com in borland pascal (windows DLL)

Quote:

>Do anybody have experince with serial communication from a DLL in
>borland pascal. I've tried to use the buildcommdcb(),setcommstate()
>and opencomm() form the winprocs unit but it setcommstate just returns
>errorcode -3. What does that mean? Anybody have some documentation on
>the winprocs unit in borland pascal (delphi) except from the online
>help. Anybody seen some exsamples?

Not for serial communications from a DLL, but anyway...

If you'll check error codes for OpenComm you'll see that -3 means
IE_NOPEN - The device is not open. So I can suggest switch calls to
SetCommState() and OpenComm(). You should first open the port. Another
thing - why do you need BuildCommDCB()? If you use SetCommState() just
fill in the right values by yourself.
About WinProcs (at least in BP7.0, not sure about Delphi) - nothing
special or interesting inside :), just function prototypes and import
statements, as described in online help under 'WinProcs unit' - ...
defines functions and procedures headers for the Windows API. They are
not lying - it's true :)

Cheers
  Dmitri

--------------------------------------------------------------
        Shit happens, but why it always happens to us?
--------------------------------------------------------------

                            http://www.dma.be/p/bewoner/dmitri



Wed, 18 Jun 1902 08:00:00 GMT  
 serial com in borland pascal (windows DLL)


Quote:

>Do anybody have experince with serial communication from a DLL in
>borland pascal. I've tried to use the buildcommdcb(),setcommstate()
>and opencomm() form the winprocs unit but it setcommstate just returns
>errorcode -3. What does that mean? Anybody have some documentation on
>the winprocs unit in borland pascal (delphi) except from the online
>help. Anybody seen some exsamples?

Frede - you could try looking in the Swag archives for what you want
http::/www.gdsoft.com/swag/swag.html or alternatively there's a
Delphi component ported from Microsoft's MSCOMM.VBX at the
Delphi Superpage http:://elwww.lboro.ac.uk/mirrors/dsp.


Wed, 18 Jun 1902 08:00:00 GMT  
 serial com in borland pascal (windows DLL)

Quote:

> Do anybody have experince with serial communication from a DLL in
> borland pascal. I've tried to use the buildcommdcb(),setcommstate()
> and opencomm() form the winprocs unit but it setcommstate just returns
> errorcode -3. What does that mean? Anybody have some documentation on
> the winprocs unit in borland pascal (delphi) except from the online
> help. Anybody seen some exsamples?

> Thank you for helping


> Frede Schmidt
> S?nderborg
> Denmark

Try 'MSComm' which you can find on http://www.delphi32.com !

It is excellent and included souce, i've written a little project
by it in delphi and it works very fine and easy!



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. COM (Serial) Port Access in Borland Pascal

2. REQ: serial communication between 2 pc's using borland pascal for windows

3. Borland Pascal 7 - Serial Comms - Help!!

4. Borland Pascal 7.0 - Debugger for Windows and Windows '95

5. Simplying serial com port selection

6. COM serial communications

7. How can I disable all serial ports (COM[s])

8. FW: How can I disable all serial ports (COM[s])

9. Free Borland Pascal/Delphi UNZIP source code (UNITs and DLL)

10. Free BORLAND PASCAL DLL and UNIT(s) For All

11. Free BORLAND PASCAL DLL and UNIT(s) For All

 

 
Powered by phpBB® Forum Software