开发者

Visual Studio: different ocx file version number for new OS?

开发者 https://www.devze.com 2023-03-25 04:25 出处:网络
I\'m looking for general advice.I created a Visual Studio 2010 project that outputs an ocx file that is used on XP and Vista machines.The DLL on which it depends has been updated on our Win7 machines.

I'm looking for general advice. I created a Visual Studio 2010 project that outputs an ocx file that is used on XP and Vista machines. The DLL on which it depends has been updated on our Win7 machines. I simply needed to rebuild for Win7 using the exact same code with an updated .lib file. I created a second project开发者_C百科 configuration (ReleaseW7) and it only differs from the original project config (Release) in that it points to the new .lib.

So now I have 2 files both named xx.ocx. Besides looking at the name of the folder each file resides in (or looking at the creation time of each) there is no way to determine which is which. I thought of using different file version numbers but as far as I can tell (and I'm relatively new to this so I could certainly be wrong) that would require two separate projects each with a slightly modified resource (.rc) file, instead of simply having two configurations within the same project. If nothing more, that seems like a waste of hard drive space. It also feels like the "wrong" way of using file version numbers

Is there a cleaner or more "standard" way of handling this? All I really want is a way for the folks who install the ocx and support the end user to know for certain that they are working with the correct file.


Long story short, I decided to use different version numbers. I was able to setup a preprocessor definition for the resource compiler and use that to handle different versions of VS_VERSION_INFO in my .rc file.

In case anyone is interested, this is the resource I found:

http://social.msdn.microsoft.com/Forums/en-US/winformssetup/thread/605275c0-3001-45d2-b6c1-652326ca5340/

0

精彩评论

暂无评论...
验证码 换一张
取 消