|
From: Per W. <pw...@ia...> - 2003-12-04 13:05:17
|
To my knowledge it is possible to implement fifo files in NT too. However, you would then need the IFS SDK (I think that was the correct name), and M$ charges a lot for this SDK. The SDK is targeted at implementation of own file systems, file reparse points etc. In theory, you can do these things with the normal DDK - Device Driver ToolKit - but you will miss sample code and needed include files so you would then need to google around for PD code. The simplest solution is to implement a tail program that prenumerates to changes. Then you don't have to constantly poll the size of the file to detect new alarms. /Per W On Thu, 4 Dec 2003, Igor Pierscinski wrote: > Hi, > > Answer to your question depends on how the aplication > you mentioned sends alarms to the file. If it sends > them to standart output and they are redirected to the file > then you can write a program that reads standart input > and for each line of input it does what you want to do > (something like: <program_that_sends_alarms> | <your_alarm_filter> ). > But most probably the situation is as follows: the program > writes alarms directly to the file - then your easiest option > is to write a program that opens this file for reading and > periodically checks if something has changed in that file. > If you know unix then command "tail -f" may give you an > idea what i am talking about. It is the easiest solution and > you can write an ordinary program that does that. > As far as I know there is no such thing on windows as fifo > special files that you know from unix. > But if you want to do it the hard way you can search for > infromation on how to write a filesystem filter driver - then > you can intercept all the write operations to a file, but that > is totally different story. > > Regards > > Igor Pierscinski > > > -----Original Message----- > > From: Christian Sch=E4fer [mailto:ca...@kr...] > > Sent: Thursday, December 04, 2003 8:42 AM > > To: Dev...@li... > > Subject: [Dev-C++] pipe to a file? > > > > > > hi Dev-cpp-users, > > > > I have a difficult problem here and an idea how to solve it, which I > > am not really sure of if it would be possible.. > > > > I have an application running that sends out alarmings. these alarms > > are appended to a plain-text-file. one alarm =3D=3D one line. > > > > I want to write an application that puts itself where the file is, and > > recieves the appendings, writes them to another file and several other > > things. > > > > I think this can maybe done by pipes, but I do not know how to do it. > > an alarm should be treated like an event, when it occures something > > has to be done about it (ring a bell :). > > > > of course this application would need to run as a service. > > I also need some hints or tutorials here, to write a service. > > (I usually program for unix systems but that's really different..) > > > > but first I need to get this append-problem solved. > > > > thanks in advance! > > > > > > gruss > > /Christian mailto:ca...@kr... > > > > -- > > I propose that the following character sequence for joke markers: > > > > :-) > > 19-Sep-82 11:44 Scott E Fahlman > > > > > > > > ------------------------------------------------------- > > This SF.net email is sponsored by OSDN's Audience Survey. > > Help shape OSDN's sites and tell us what you think. Take this > > five minute survey and you could win a $250 Gift Certificate. > > http://www.wrgsurveys.com/2003/osdntech03.php?site=3D8 > > _______________________________________________ > > Dev-cpp-users mailing list > > Dev...@li... > > TO UNSUBSCRIBE: http://www23.brinkster.com/noicys/devcpp/ub.htm > > https://lists.sourceforge.net/lists/listinfo/dev-cpp-users > > > > > ------------------------------------------------------- > This S |