Hi there!
I am dealing with a requirement that I need to get the current working directory of a running process from the context of a pre operation callback of a minifilter, so I was thinking if there is a way of getting this information without using PEB
stuff maybe just by using documented and no opaque things. By using PEB
is complicated because of the lack of backward compatibility, in my state of things, for example, my winternl.h
does not define DLCurrentDirectory
as people expects on their proposed solutions out there.
My feeling with this initial incompatibility even at compile time is something like the compiler screaming “do not use opaque stuff, avoid future headaches, find a better general solution”. Thus, I would appreciate any tip, clue or help. Have anyone ever faced this kind of requirement? Here goes one more general/philosophical question: when facing this kind of requirement, that push us to use undocumented or opaque stuff, how we could keep the code sane, stable, compatible and general? how can we proceed to get the thing done? Personally, I do not see a way of doing this in a (really) right way, opaque and undocumented stuff is kernel developers business, maybe device drivers developers should keep it alone. Thanks in advance!