Paradox calls C routine (control serial device) 
Author Message
 Paradox calls C routine (control serial device)

My problem:
1) serial device connecting to COM port
2) a sequence of control is send to it
3) feedback a lot of data
4) analysis the data and print a graph.

What came to my mind, is to use Paradox for Windows to handle those data
and present in a graph. Also Paradox table to hold control data.

However there is no routine in Paradox to call Windows APIs.
What I found is just DDE/OLE calls.

I can write C or C++ routines to:
- read ASCII file exported from Paradox to control the device; and
- write ASCII data file of the device to be imported by Paradox.

Any suggestions to call a C routine from Paradox ?

Raymond Kwok

/////////////////////////////////////////////////\

// Raymond Kwok /////////////////////////////////////\
// Consultant Computer Section ////////////////////////\
// lkl Consultant Services //////////  Merry X'mas  /////\
\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\



Thu, 23 Jul 1998 03:00:00 GMT
 Paradox calls C routine (control serial device)


Quote:

>My problem:
>1) serial device connecting to COM port
>2) a sequence of control is send to it
>3) feedback a lot of data
>4) analysis the data and print a graph.

>What came to my mind, is to use Paradox for Windows to handle those data
>and present in a graph. Also Paradox table to hold control data.

>However there is no routine in Paradox to call Windows APIs.
>What I found is just DDE/OLE calls.

>I can write C or C++ routines to:
>- read ASCII file exported from Paradox to control the device; and
>- write ASCII data file of the device to be imported by Paradox.

>Any suggestions to call a C routine from Paradox ?

Make a DLL with the C routines in question. You can acces these
routines from within Paradox, by declaring them in the uses section.
So if your DLL is names MyFunc.dll, then in the uses section declare
with:

uses myfunc
<Here goes the function names and parameters>
enduses




Fri, 24 Jul 1998 03:00:00 GMT
 Paradox calls C routine (control serial device)

Quote:

>My problem:
>1) serial device connecting to COM port
>2) a sequence of control is send to it
>3) feedback a lot of data
>4) analysis the data and print a graph.

>What came to my mind, is to use Paradox for Windows to handle those data
>and present in a graph. Also Paradox table to hold control data.

>However there is no routine in Paradox to call Windows APIs.
>What I found is just DDE/OLE calls.

>I can write C or C++ routines to:
>- read ASCII file exported from Paradox to control the device; and
>- write ASCII data file of the device to be imported by Paradox.

>Any suggestions to call a C routine from Paradox ?

>Raymond Kwok

You can call the Windows API from within Paradox; you just declare it in
your Uses section, and select "User", "Krnl386" or "GDI" as your DLL name:
Uses User
   WinAPIFunction(parameters)
enduses

The only problem you may run into is trying to pass pointers to complex
structures; then you'll want to resort to a custom DLL as an intermediary.

Jim



Fri, 24 Jul 1998 03:00:00 GMT
 Paradox calls C routine (control serial device)

Quote:
>  My problem:
>  1) serial device connecting to COM port
>  2) a sequence of control is send to it
>  3) feedback a lot of data
>  4) analysis the data and print a graph.

>  What came to my mind, is to use Paradox for Windows to handle those data
>  and present in a graph. Also Paradox table to hold control data.

>  However there is no routine in Paradox to call Windows APIs.
>  Any suggestions to call a C routine from Paradox ?

>  Raymond Kwok

You should take a look at the SilverWare Windows Communications Tool Kit for Paradox.

It will enable you to do what you need.

You can contact SilverWare Inc. via:

Tele: (214) 247-0131
Fax:  (214) 406-9999

For on-line info:
Internet WWW is http://rampages.onramp.net/~silver

Good Luck...



Sat, 25 Jul 1998 03:00:00 GMT
 Paradox calls C routine (control serial device)

Quote:

>>  My problem:
>>  1) serial device connecting to COM port
>>  2) a sequence of control is send to it
>>  3) feedback a lot of data
>>  4) analysis the data and print a graph.

>>  What came to my mind, is to use Paradox for Windows to handle those
data
>>  and present in a graph. Also Paradox table to hold control data.

>>  However there is no routine in Paradox to call Windows APIs.
>>  Any suggestions to call a C routine from Paradox ?

>>  Raymond Kwok

If you can get to borlands ftp site, there is a nice Paradox form called
mycomm which will show you how to write and read from any comm port.  
However, you will need to write a dll to access the SDK windows calls for
GetCommState, BuildCommDCB and SetCommState which all require the DCB
structure to be passed to them. (If you want to control the port settings
from Paradox instead of the windows control panel).  However, you can
call the WriteComm and ReadComm after defining the USER.EXE in the USES
attribute under paradox.  'mycomm' from the borland ftp site shows you
how to set up for WriteComm and ReadComm.

The DLL I wrote is somewhat crude and specific for my application
however, if you think it might be helpful I will send it to your email
address.

Rodger



Sun, 26 Jul 1998 03:00:00 GMT
 
 [ 5 post ] 

 Relevant Pages 

1. MACINTOSH - Foxpro routine to grab hard disk serial #

2. Clipper routines for serial port

3. serial device

4. VB Function (Storage device Serial Number)

5. Communicate with serial device (Version 8 - Windows 95 / NT)

6. serial device

7. Serial Device

8. Remote serial devices

9. Serial devices

10. Faxing from remote serial devices with fax modems

11. Need HLC Functions for Serial Device Access

12. Working with serial devices


 
Powered by phpBB® Forum Software