Re: How can I access version data from the .rc file in kernel mode?

Thanks, I suspected this may be the case.

-Justin

At 03:27 AM 10/10/2002, you wrote:

Justin Frodsham wrote:
> I have an IOCTL to retrieve the driver version, but I am sick of changing
> it in the resource file and my version.h include file (more like I keep
> forgetting to change both). In user mode you can call
> GetFileVersionInfo(). Is there some simple way to do this in kernel mode?
> I tried making the .rc file include my version file, but then you can not
> use the resource editor. It seems like there has got to be a simple way
> to do this.

If you really want to do this, you can install the samples for my WDM
book and then download the service pack from my web site. The RESOURCE
sample contains exactly the code you’re looking for.

This is very complex, however, because it involves doing file I/O
directly to the image file on disk. Even getting the name of the file is
a bit of a project. I prefer to *not* use the resource editor in my
drivers, since there are very few resources and it’s generally easier to
add them by hand. I therefore have a VERSION.H file that I update by
hand, which is exactly what you said you didn’t want to do. This is by
far the simpler approach, though.


Walter Oney, Consulting and Training
Basic and Advanced Driver Programming Seminars
Now teaming with John Hyde for USB Device Engineering Seminars
Check out our schedule at http://www.oneysoft.com


You are currently subscribed to ntdev as: zeppelin@io.com
To unsubscribe send a blank email to %%email.unsub%%