Friday, December 10, 2010

COM Books

What are the preferred books for COM (Component Object Model) Programming? On msdn forums, It is a most frequently asking question. And I saw different people recommending different books (including me). Hence, I thought that I would track all the recommended books at one place so that it can be shared to, if anybody looks for in the future.

[#1] Inside COM (Author: Dale Rogerson) - Is a good book from Microsoft and very good to start with. There is another book with similar title as Inside Distributed COM for Distributed COM from the Microsoft itself.

[#2] Essential COM (Author: Don Box) - It was my favorite book (of course for many across the globe) and it is still, Obvious choice, if one would serious about knowing breadth and depth of Component Object Model.  and Effective COM is it's supplement from the same author.
[#3] COM/DCOM Primer Plus (from SAMS), It is another good book to refer through some of the COM intricacies.

The list would be short and to the best of my knowledge though it is not the exhaustive list. 

Sunday, November 7, 2010

Quotes

Chase excellence and success will follow. ~ 3 Idiots
If you don't stand for something, you will fall for anything. ~ Malcolm X
If you tell the truth, you don't have to remember anything. ~ Mark Twain

Friday, October 8, 2010

Visual C#

Here are the list of books suggested for Visual C# on msdn.

Visual C++

Here is a link for Visual C++ Books suggested on msdn.

Tuesday, October 5, 2010

Quotes

What you are is not what you are and what others are telling you is, what you are. ~ MLS Shastri
Analogies and Anecdotes are common in the lectures of MLS Shastri, who used to run a training institute called Uttara (Located at Rajaji Nagar, Bangalore, India). He was conducting training's (through Audio recorded sessions) for C, C++ and Advanced Unix. His teaching was very unique in nature and he had a great comprehension on the subject.

I admire his talent and no doubt, he is a great inspiration to many. I feel extremely honored to have attended his classes (in 2003). That’s one of the best things that has ever happened in my life.

It’s a big pain, curbing myself to describe him this succinctly. Lastly, Kudos to him!

Saturday, September 25, 2010

Windows Installer Information | C#

When you are working with Installer applications. At times, you may have to find properties of underlying components inside Installer (.msi) packages. MSI does maintain a database of all the properties of underlying items.  

Windowsinstaller can be used to find this information. Usage of the WindowInstaller has already been published in another post.

The below C# method helps you to find a property of an underlying component:
The above method takes two parameters sMsiFilePath - indicates the exact path of the .msi file and sProperty is the name of the property(e.g. Version) to find and returns the the property value as a string.

e.g. GetMSIProperty("C:\Test\Setup.msi", "DisplayVersion"); // to make a call to the above method

Friday, September 24, 2010

x32 Or x64? | C#

Developers more often, want to know the processor type (32 bit or 64 bit) to make some programming decisions. It usually happens, when you write applications for 64 bit machine. Registry entries are also added on different paths for 32 bit and 64 bit Applications.

When you install a 64 bit application, the entry in the registry will be made under the below path: And a 32 bit application will make an entry under the following path: The below C# code detects the processor type of the machine, where your application is running:
In the above code, PROCESSOR_ARCHITECTURE is the environment variable, which carries the information of the system type. Environment is the class (part of the System namespace) to expand the environment variable to extract the machine architecture.

Thursday, September 23, 2010

Century

100 Posts in MSDN

Monday, September 20, 2010

Make Your Bitmaps Transparent | C#

Scenario #1: Comparing with Visual C++, It is easy to make a bitmap (.jpeg, .bmp and .png) in C#. Code to make a bitmap back ground transparent on a picture control:
Two things here, picBox (Picture Box control instance) back(ground) color is setting to Transparent. And Making the BmpOne (Bitmap object) transparent.

Scenario #2: Code to make the ImageList images transparent:
iconsList (Of type ImageList) contains two icons here. This iconsList can be leveraged to set images on ListView controls, Radio Buttons and Labels etc.

Saturday, September 18, 2010

Idiom

Don't be another brick in a wall.
Came across this in one of the english movies (and don't remember the movie name). There was a context in the movie, where two friends were chatting with each other and one suggests the other, "Do whatever you want but don't be another brick in a wall". He meant to say that do something different.

Thursday, September 9, 2010

Is patch'ed? | C#

Patches are usually being applied to all the products/softwares to come around various issues that the end users do face over the period of time while using any software. These are also called with other names as Hot or Quick fixes, which are normally being identified by a number prefixed with KB (e.g KB2508987).

While creating setup (or InstallShield) applications, It is usually a case of detecting whether or not a specific patch is installed?. Knowing that, the installer can prompt the user to add it first before moving on with the installation. The below is a C# code that will detect whether a particular patch has been applied for particular product.

Follow the below 3 easy steps:
1) Add msi.dll to the project.

2) Add WindowsInstaller namespace.
using WindowsInstaller;
3) Add the below code to detect the patch.
Type type = Type.GetTypeFromProgID("WindowsInstaller.Installer", true);
if (type != null)
{
    WindowsInstaller.Installer installer = (WindowsInstaller.Installer)   Activator.CreateInstance(type);
    if (installer != null)
    {
        WindowsInstaller.StringList patches = installer.get_Patches("{049DB35D-4A8B-4DFF-A9EF-D7142186BDFD}");

        foreach (string patch in patches)
        {
           if (patch == "{011FF98E-2A9E-1AEE-D2DE-F2135786CDEF}")
           {
               // found
               break;
           }
        }
    }
}

Wednesday, September 1, 2010

Registry Access | C#

Registry class (which is part of the namespace Microsoft.Win32) in .NET exposes CurrentUser, Local Machine etc.. keys by default and so it is not needed to mention the keys beginning with the following:


For instance use the the below code to access the keys from the path HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\System Center Essentials\2.0\Setup\Components\Server-Version
RegistryKey registryKey = Registry.LocalMachine.OpenSubKey("\\SOFTWARE\\Microsoft\\System Center Essentials\\2.0\\Setup\\Components");
if (registryKey != null)
{ 
    string serverVersion = Convert.ToString(registryKey.GetValue("Server-Version"));
}

Monday, August 23, 2010

What is C#?

Is a type safe, managed and an object oriented (= multi-paradigm) programming language generates Microsoft Intermediate Language (MSIL) code compiling by .NET framework.

Thursday, July 15, 2010

What is .NET Framework?

A standard to write managed applications that provide Platform independent, Language neutralization, performance and security.

Thursday, June 3, 2010

What's in the Title?

akx Solutions is a website, through which technical solutions are being shared, already. This blog is an extension to that and hence is the title akx++ Solutions, which has also been described in terms of inheritance symbolically.

class akx++Solutions : public akxSolutions{ };

Hence, it is-a a site that inherits the core idea of sharing technical solutions and adds new look & interface on its own. Also, both are loosely coupled and hence can be updated independently without changing the basic interface(/ core idea). However, having an access to blog can reach out to site (using the link provided on sidebar) or vice-versa.

Above interpretation, however, might still be hypothetical. Thus, suggesting, not to get carried away strictly by the OOPs and derive comparisons.