Search code examples
windowskerneldevice-driver

How can I get a file version using a device driver?


I have a device driver that obtains the complete path to a binary eg:

  C:\Windows\System32\Notepad.exe

Is there a kernel level call that I can make similar to "GetFileVersionInfo" to obtain the product version of the binary?

OR can I just use:

how to use the GetFileVersionInfo function?

Thanks


Solution

  • After doing some research... it seems that 'GetFileVersionInfo' can be called from a device driver

    see question 7 of 18 on http://www.osronline.com/showThread.cfm?link=59108

    Here is the call for 'GetFileVersionInfo'

    https://msdn.microsoft.com/en-us/library/windows/desktop/ms647003(v=vs.85).aspx
    

    and

    the call for 'GetFileVersionInfoSize'

    https://msdn.microsoft.com/en-us/library/windows/desktop/ms647005(v=vs.85).aspx