Using UpdateResource to update Version data (VS_VERSIONINFO)

  • Thread starter Thread starter John Dyer
  • Start date Start date
J

John Dyer

We need to be able to set the version information for .net exe's and
dll's after the build has happened. This is so we do not need to
check out files that have not changed just to "tweak" the version
data.

I am trying to emulate the functionality that Dev Studio has where I
have been able to change the version information by loading in a dll
or exe and selecting the version resource. I then am able to "drill"
down to the version strings and change away.

I have been looking at the UpdateResource function and that seems to
be the right path. It looks like I need to read in the current
VS_VERSIONINFO data, make changes and then update it.

The problem is getting the VS_VERSIONINFO modeled in C#. I was trying
to avoid tricky memory allocations with a lot of "peek and poke"ing to
make the correct image.

Does anyone know how Dev Studio is able to do its magic?

Any thoughts on how I should be handling this?

Is there a better way to update the version data post build?

Thanks,
John Dyer
 
Back
Top