[Gambas-devel] C/c++ Component
Rob
sourceforge-raindog2 at ...19...
Mon Jun 9 18:29:48 CEST 2003
On Monday 09 June 2003 11:26, DA Corp. wrote:
>I have this file. It was write in C. This file is used to write a number in
>the parallel port. 0x37 is 55 in hexadecimal number. I want to replace it
>for a variable in Gambas. for example, X: =0D
>#include <dos.h>=0D
Sure looks like a DOS C program, which won't help you under Linux. If you
just want to write a number to the parallel port, open /dev/lp0 (or lp1 or
whatever, or maybe /dev/parport0 or parport1 if writing to lp0 "cooks" your
data) as a file and write to it.... it's only if you need raw read-write
access that it becomes an issue in Gambas. As I've said before, a workaround
would be something like "cu" that talks to the parallel instead of the serial
port, but I don't know if such a thing exists.
That discussion would be better suited for the -user list unless you want to
try to find some Linux parallel port C source and turn it into a Gambas
component, which I'm sure lots of people would appreciate. (If that's the
case, Ken Schrock's current work learning how to write Gambas components
should be useful to you - read the archives.) Maybe you could write a Gambas
component for libieee1284, a generalized parallel port interface library that
even works under other operating systems:
http://cyberelk.net/tim/libieee1284/
Please turn off the HTML in your mail when sending to mailing lists, by the
way.
Rob
More information about the Devel
mailing list