Hi, I use FpIOctl from "BaseUnix" . My platform is Linux. I do FpOpen then FpIOCTL. It works!
However: The kernel 2.6 has a new naming convention for the function number. See the file: asm/ioctl.h This file contains many constants and the final call number is assembled from the direction type, device number, function number, etc... I wanted to write a unit that would simulate this file (ioctl.h), but, this header file contains mainly macros. I do not think that it is possible to write some Pascal code that would in fact be a macro! If someone knows if it possible to write macros in Pascal please tell me. In the mean time, I calculate the function number "by hand", knowing the device number, function number, IO_RW, etc... Or if I use a precedure do do this, then this will slow the program down. For the Windows platform, I can not help you sorry. Thank you Alain Michaud On Mon, 2006-05-29 at 22:47 +0200, Marc Santhoff wrote: > Hi, > > on FreeBSD I use fpOpen, fpIoctl, etc. to drive some generic device. In > my porting efforts to win32 I have found the more generic FileOpen, but > no equivalent of fpIoctl or it's underlying unix system call ioctl(). > > An old win32.hlp told me Windows has "DeviceIoCtl()", but I'm not really > sure if this is what I need. At least there is ntohing about this > funtion in the RTL sources of fps 2.0.2. > > How can I port this calls? > > TIA, > Marc > > > _______________________________________________ > fpc-pascal maillist - fpc-pascal@lists.freepascal.org > http://lists.freepascal.org/mailman/listinfo/fpc-pascal _______________________________________________ fpc-pascal maillist - fpc-pascal@lists.freepascal.org http://lists.freepascal.org/mailman/listinfo/fpc-pascal