Class not registered error in examples shipped with Adobe SDK (9.1)

If you are interested only in the problem skip paragraph 1.

Today I was eager to get start my next interesting task of developing a new secret Atmel Studio plugin that would render and show .pdf files from within the IDE in a tool window. For that I decided to use the Acrobat SDK, and download it and started with an example right away. The acrobat sdk download comes with a good set of examples to start with for most of the popular programming languages of which c# is my choice of interest. I opened the example solution and they were a pretty old (created with VS2005) , but voila, things migrated seamlessly and I immediately pressed the F5 button in my computer, and it's fubar as usual. Nothing in my technical works right away out of the box, L. But that keeps me going , so am happy to face these kind of nasty stuff. J. OK, now the problem. The error is something like this.

Class not registered ……….. On the code line,

((System.ComponentModel.ISupportInitialize)(this.pdfWindowLeft)).EndInit();

Where pdfWindowLeft is declared as follows.

private AxAcroPDFLib.AxAcroPDF pdfWindowLeft;

I was wondering why, and looked into the registry if the corresponding COM component is registered in the assembly and it did !. So the next thing that came up is that, is this the right version of acrobat runtime and sdk ? The answer is yes to that. Both are 9.1. Then after some searching in the internet I found out that I need to change the Assembly Architecture to "x86" from "Any CPU", and bingo it worked right away. The problem is that the application compiled with "Any CPU" will behave based on the underlying operating system's architecture. Mine is Win 8 – x64 and hence is produce a 64-bit app that tries to find the Adobe's ActiveX components from a 64 bit part of the registry, but Adobe SDK is only available in 32-bit variant. So switching it to "x86" changed the application to be compiled as a 32-bit application and runs on WOW64 and loads the appropriate components. J. I guess Adobe should fix this in the default example projects shipped with their distribution.

soundararajan