Comm port interaction in Jade

For questions and postings not covered by the other forums
ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Comm port interaction in Jade

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:46 am

by Mike van Bokhoven >> Wed, 29 Dec 1999 1:39:01 GMT

Hi all,

I need to read from/write to a comm port in Jade. My task consists of having a modem answer a call, receive a data stream, process that stream, send a response, and hang up.

I'd like to find out whether anyone else has done this before in Jade, and if so, what the simplest way of doing it is. If anyone has any info that would help me, I'd be very grateful for the assistance.

Thanks.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Comm port interaction in Jade

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:46 am

by Krull >> Wed, 29 Dec 1999 3:42:07 GMT

Hi Mike,

A while ago I experimented with using the windoze comms API from JADE to read/write to a comm/port. The comms API is an extension to the standard file input and output (I/O) functions CreateFile, CloseHandle, ReadFile, ReadFileEx, WriteFile, and WriteFileEx etc. and are relatively straightforward to use. The comms API functions are provided on win9x and NT platforms in the kernel32 library.

I used external method wrappers rather than calling the functions directly from JADE. The Communications API is documented in the MS platform SDK; online documentation can be found at: http://msdn.microsoft.com/library/psdk/ ... n_4m7n.htm

An alternative to rolling your own comms interface, would be to obtain a third party JADE comms class or Active-X control. An example of the latter is the Microsoft Communications Control (mscomm32.ocx). I am not sure what MS product this control ships with; it is however, installed on my machine and JADE imports it with no errors. I have not tried it from JADE so I can't tell you if it works.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Comm port interaction in Jade

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:46 am

by Mike van Bokhoven >> Thu, 30 Dec 1999 0:51:16 GMT
A while ago I experimented with using the windoze comms API from JADE to read/write to a comm/port. The comms API is an extension to the standard file input and output (I/O) functions CreateFile, CloseHandle, ReadFile, ReadFileEx, WriteFile, and WriteFileEx etc. and are relatively straightforward to use. The comms API functions are provided on win9x and NT platforms in the kernel32 library.
I used external method wrappers rather than calling the functions directly from JADE. The Communications API is documented in the MS platform SDK; online documentation can be found at: http://msdn.microsoft.com/library/psdk/ ... n_4m7n.htm

Thanks, there's plenty of info there, I could certainly do that in VC++. Though if I can use the OCX, I will, in the hope of saving myself some time.
An alternative to rolling your own comms interface, would be to obtain a third party JADE comms class or Active-X control. An example of the latter is the Microsoft Communications Control (mscomm32.ocx). I am not sure what MS product this control ships with; it is however, installed on my machine and JADE imports it with no errors. I have not tried it from JADE so I can't tell you if it works.

Indeed - it's on both my dev machine and the server, but not on a fresh install of Win 2000, so I'm not at all sure either. I would give it a try, but I can't find anywhere in the Jade documentation or the website any details on importing OCXs. I suspect I'm looking in the wrong places. You wouldn't happen to know of any reference material anywhere that summarises the import procedure?

Thanks for your help!


Mike.

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Comm port interaction in Jade

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:46 am

by Krull >> Thu, 30 Dec 1999 2:53:28 GMT
Indeed - it's on both my dev machine and the server, but not on a fresh install of Win 2000, so I'm not at all sure either. I would give it a try, but I can't find anywhere in the Jade documentation or the website any details on importing OCXs. I suspect I'm looking in the wrong places. You wouldn't happen to know of any reference material anywhere that summarises the import procedure?

Thanks for your help!

Importing an Active-X control (or OCX) into JADE is quite easy. Just fire up the painter and select 'Import ActiveX Control' from the File menu, which brings up a dialog that allows you to add/register/unregister active-x controls. This is documented in chapter 5 of the JADE developer's reference manual. Active-x controls imported into JADE are added to the control toolbar (and add control list) in painter and can be dropped onto a form and used in a similar manner to other controls.

If you haven't used the MS OLE/COM object viewer that comes with VC++ and the platform SDKs, it is quite handy for discovering the plethora of COM objects that get installed on you machine over time and allows you to view the type library for an interface. This is useful if you don't have any external documentation since you can look at stuff such as enumerations and embedded help strings that are not currently imported into JADE. Viewing the type library for the MS Comm control reveals that the help file is comm98.chm, a compiled html file, which I guess we can assume gets installed along with the control. The help file provides an example of how to use the control from VB.

regards
Krull

Dulce Periculum (family motto)

ConvertFromOldNGs
Posts: 5321
Joined: Wed Aug 05, 2009 5:19 pm

Re: Comm port interaction in Jade

Postby ConvertFromOldNGs » Fri Aug 07, 2009 11:46 am

by Mike van Bokhoven >> Wed, 5 Jan 2000 2:57:11 GMT
Importing an Active-X control (or OCX) into JADE is quite easy. Just fire up the painter and select 'Import ActiveX Control' from the File menu, which brings up a dialog that allows you to add/register/unregister active-x controls. This is documented in chapter 5 of the JADE developer's reference manual. Active-x controls imported into JADE are added to the control toolbar (and add control list) in painter and can be dropped onto a form and used in a similar manner to other controls.

Thanks! It seems that mscomm32.ocx is distributed with Dev Studio. I'll experiment with that, I think there's a good chance it'll do what I need it to.
Dulce Periculum (family motto)

Sounds familiar, given that I'm developing on Win 2000 RC2.


Mike.


Return to “General Discussion”

Who is online

Users browsing this forum: No registered users and 25 guests