What Windows kernel API(s) do I use to obtain the base file name of a path from a driver? (I am assuming that I don’t have to search the string for the last ‘\’)
eg obtain bar.txt from c:\foo\bar.txt
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You might consider constructing a loop using FsRtlDissectName until the remaining path argument is empty.
Something like this might do what you want (although you’ll need to handle things like ADS stream names, as well as adding proper error checking):