ObjectARX & Dummies

Course Index

*Course support: Click here!
*Course and User samples: Download here!

Thursday, March 27, 2008

Version Control

Hello,

Probably you will need or already need some version controlling on your software or on its modules.
This is made through the VS_VERSION_INFO resource inside C++ projects and through AssemblyInfo.cs file inside C# projects.

I have found an old but up to date tool (runs from VS2002 to VS2008) which allows you to easily manage these version informations. This tool, from Julijan Sribar, is an AddIn which tracks all opened projects and allow you to manage each version information. This tool is provided for free and its source code is also available for download: Versioning Controlled Build

Another issue is how to get this information at runtime to display, for instance, this version at an "About" like dialog inside your product. To do that in VC++ we need to read the VS_VERSION_INFO resource and get what we want. There is also another great article Retrieving version information from your local application's resource, from luetz,explaining how to do that.

Through C# there is no big deal, you can read the version information from AssemblyInfo as follows:

System.Reflection.Assembly oAssembly = System.Reflection.Assembly.GetExecutingAssembly();
System.Diagnostics.FileVersionInfo oFileVersionInfo = FileVersionInfo.GetVersionInfo(oAssembly.Location) ;
MessageBox.Show("Version Info", oFileVersionInfo.ProductVersion);

Hope this help you to keep your file versions organized and updated!
Cheers!

Tuesday, March 25, 2008

Blog Classes content update

Hello,

I have updated and fixed some classes sample code that are not UNICODE aware that will not compile inside VS2005 (ObjectARX 2007, 2008 and 2009).

Basically, I have changed:

- Add _T() macro to all strings;
- Changed strcpy() to _tcscpy() which is UNICODE aware;
- Changed char* to TCHAR* or to ACHAR* pointers;

Important: ACHAR is a typedef present inside "AdAChar.h" ObjectARX header. If you are trying to compile for non-UNICODE ObjectARX versions replace ACHAR* by TCHAR* (or char*) and you should get out of compilation errors.

Cheers!

Wednesday, March 19, 2008

VS2005 Samples

Hello,

I have updated some VS2002 samples to VS2005.
There are two new files, ending with "VC8" which are the VS2005 converted solution/projects.

You can download these projects from here:

VS2005 Samples

These should compile fine with ObjectARX 2007, 2008 and 2009.
Note that if you plan to be 100% compatible with these 3 releases you will need to use the 2007 version of ObjectARX SDK.

Cheers!