please find the code for the service created to detect my USB device.
The problem in the above code is that the logfile is getting updated only after the service is stopped.
My intension is to update the log file once the device is detected.. But it happens only after the service is stopped. how to achieve what i intend to?
please guide me..
To avoid losing log entries, you need to flush the
fwrites .fflush(your file handle )