JasonDBurke
Programmer
Hi,
I am building a windows service. I have spawned off a thread that checks a snort intrusion detection log file size to see if its filesize has changed. Snort.exe has control over this file because it needs to write to it whenever a new alert is triggered. The problem I am having is that in both the FileStream and FileInfo length function, they just keep repeating the same file size over and over again even though the snort alert log is growing. When I stop Snort.exe then the filesize responds with the correct number. How can I retrieve the correct filesize as Snort is running...this seems to be a file control issue. I have been able to do this successfully in other languages such as C/C++ and Pascal.
Thanks,
Jason
I am building a windows service. I have spawned off a thread that checks a snort intrusion detection log file size to see if its filesize has changed. Snort.exe has control over this file because it needs to write to it whenever a new alert is triggered. The problem I am having is that in both the FileStream and FileInfo length function, they just keep repeating the same file size over and over again even though the snort alert log is growing. When I stop Snort.exe then the filesize responds with the correct number. How can I retrieve the correct filesize as Snort is running...this seems to be a file control issue. I have been able to do this successfully in other languages such as C/C++ and Pascal.
Thanks,
Jason