Checking if path is valid.
Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance
Hello,
I am creating a keyboard filter logger as a learning experience. So
far, everything is going pretty smooth, and I think i am understanding
the basics. I am having one problem though. I allow the user to
specify the path of where he or she wants the log file in the registry.
With this value, I will be calling NtCreateFile to create the log file
and write it etc..
Is there a way to validate the path though? I was thinking about
calling NtOpenFile to see if it fails and if it fails, then I could
tell if the path that is provided in the registry is broken, but that
seems a bit dirty. I was hoping to find a clean way to do it.
Also, if I pass in "c:\\log.txt" as opposed to
"\\DosDevices\\c:\\log.txt" to NtCreateFile, would it still work
properly? or must I pass in the full path.
thanks
.
Relevant Pages
- Re: Virus - downloaded Uniblue Registry Booster
... He not an MS MVP. ... seconds, when complete, will generate a log file. ... Have you tried the simple remedy of uninstalling Registry Booster ... Spybot and AVG does not recognize it as a virus. ... (microsoft.public.windowsxp.help_and_support) - Re: Another guy who "cannot run defrag"
... I have ALWAYS be able to run defrag on C drive. ... I have changed the "reboot' entry in the registry to autocheck ... Here is the log file after the scan: ... Registry Data Items Infected: - do you have anything here ... (microsoft.public.windowsxp.help_and_support) - Re: Called ServiceBase.Run(), but never receive OnStart()?
... settings, most important of which for our purposes is the name of the ... On the machines where this works, I see, in the logfile, the two ... Write a startup message to the log file. ... But you are reading from the registry before you are actually writing to the log file, what's important is to know the time you entered Main and the time at which you are calling Run, the difference between those may not exceed 30 seconds. ... (microsoft.public.dotnet.languages.csharp) - Re: Another guy who "cannot run defrag"
... I have ALWAYS be able to run defrag on C drive. ... I have changed the "reboot' entry in the registry to autocheck ... I wish you could put up the relevant part of the MBAM log file ... Here is the log file after the scan: ... (microsoft.public.windowsxp.help_and_support) - Re: C# log component
... if that fails ... I am also wondering if there does exist such log component, ... processes using the built-in log component to open the same log file to ... DLL to have a common log file), will there be any risk of racing ... (microsoft.public.dotnet.languages.csharp) |
|