September, 2011

  • Akash Blogging......

    Unable to set the Folder Property in Outlook View Control–Getting error 8002801d (Library Not Registered)

    • 0 Comments

    One of my customer ran into this issue with the Outlook View Control. All we were doing was trying to set the Folder property to the Contacts folder so that when the control loads it shows the contacts in that folder by default. In our case it gave the error 8002801d (Library Not Registered) and displayed the Inbox folder which is the default. This problem was not happening on all the machines.

    The strange thing was that it showed the Inbox in the View control, to me it means that the library is registered and that is why it was able to show Inbox. Why is it not showing the contacts? What could be going wrong? Which library are we talking about? After a little debugging, as expected we found out that the LoadLibrary call was failing. I was able to get the GUID it was looking for and it was {0006F062-0000-0000-C000-000000000046} which is for OUTLCTL.DLL.

    This is where Process Monitor came to our help. I decided to take a Process Monitor log on a non-working and a working machine. Below is what I see:

    On the non-working machine( looking for {0006F062-0000-0000-C000-000000000046} ) this is how it looked:

    OUTLOOK.EXE    RegQueryKey    HKCU\Software\Classes                                                        SUCCESS
    OUTLOOK.EXE RegOpenKey HKCU\Software\Classes\TypeLib SUCCESS
    OUTLOOK.EXE RegQueryKey HKCU\Software\Classes\TypeLib SUCCESS
    OUTLOOK.EXE RegOpenKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046} SUCCESS
    OUTLOOK.EXE RegQueryKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046} SUCCESS
    OUTLOOK.EXE RegOpenKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.0 SUCCESS
    OUTLOOK.EXE RegQueryKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.0 SUCCESS
    OUTLOOK.EXE RegOpenKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.0\409 NAME NOT FOUND
    OUTLOOK.EXE RegOpenKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.0\409 NAME NOT FOUND
    OUTLOOK.EXE RegQueryKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.0 SUCCESS
    OUTLOOK.EXE RegOpenKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.0\9 NAME NOT FOUND
    OUTLOOK.EXE RegOpenKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.0\9 NAME NOT FOUND
    OUTLOOK.EXE RegQueryKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.0 SUCCESS
    OUTLOOK.EXE RegOpenKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.0\0 NAME NOT FOUND
    OUTLOOK.EXE RegOpenKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.0\0 NAME NOT FOUND
    OUTLOOK.EXE RegCloseKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.0 SUCCESS
    OUTLOOK.EXE RegCloseKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046} SUCCESS
    OUTLOOK.EXE RegCloseKey HKCU\Software\Classes\TypeLib SUCCESS

    On the working machine( looking for {0006F062-0000-0000-C000-000000000046} ) this is how it looked:
    OUTLOOK.EXE    RegCloseKey    HKCU\Software\Classes                                                                SUCCESS
    OUTLOOK.EXE RegQueryKey HKCU\Software\Classes\TypeLib SUCCESS
    OUTLOOK.EXE RegOpenKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046} NAME NOT FOUND
    OUTLOOK.EXE RegOpenKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046} SUCCESS
    OUTLOOK.EXE RegQueryKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046} SUCCESS
    OUTLOOK.EXE RegOpenKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.0 NAME NOT FOUND
    OUTLOOK.EXE RegOpenKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.0 NAME NOT FOUND
    OUTLOOK.EXE RegQueryKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046} SUCCESS
    OUTLOOK.EXE RegOpenKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046} NAME NOT FOUND
    OUTLOOK.EXE RegEnumKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046} SUCCESS
    OUTLOOK.EXE RegEnumKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046} NO MORE ENTRIES
    OUTLOOK.EXE RegQueryKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046} SUCCESS
    OUTLOOK.EXE RegOpenKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1 NAME NOT FOUND
    OUTLOOK.EXE RegOpenKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1 SUCCESS
    OUTLOOK.EXE RegQueryKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1 SUCCESS
    OUTLOOK.EXE RegOpenKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\409 NAME NOT FOUND
    OUTLOOK.EXE RegOpenKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\409 NAME NOT FOUND
    OUTLOOK.EXE RegQueryKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1 SUCCESS
    OUTLOOK.EXE RegOpenKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\9 NAME NOT FOUND
    OUTLOOK.EXE RegOpenKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\9 NAME NOT FOUND
    OUTLOOK.EXE RegQueryKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1 SUCCESS
    OUTLOOK.EXE RegOpenKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\0 NAME NOT FOUND
    OUTLOOK.EXE RegOpenKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\0 SUCCESS
    OUTLOOK.EXE RegQueryKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\0 SUCCESS
    OUTLOOK.EXE RegOpenKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\0\win32 NAME NOT FOUND
    OUTLOOK.EXE RegOpenKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\0\win32 SUCCESS
    OUTLOOK.EXE RegCloseKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\0\win32 SUCCESS
    OUTLOOK.EXE RegCloseKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\0 SUCCESS
    OUTLOOK.EXE RegQueryKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1 SUCCESS
    OUTLOOK.EXE RegOpenKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\0 NAME NOT FOUND
    OUTLOOK.EXE RegOpenKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\0 SUCCESS
    OUTLOOK.EXE RegQueryKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\0 SUCCESS
    OUTLOOK.EXE RegOpenKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\0\win32 NAME NOT FOUND
    OUTLOOK.EXE RegOpenKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\0\win32 SUCCESS
    OUTLOOK.EXE RegQueryKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\0\win32 SUCCESS
    OUTLOOK.EXE RegOpenKey HKCU\Software\Classes\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\0\win32 NAME NOT FOUND
    OUTLOOK.EXE RegQueryValue HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\0\win32\(Default) SUCCESS
    OUTLOOK.EXE RegCloseKey HKCR\TypeLib\{0006F062-0000-0000-C000-000000000046}\1.1\0\win32 SUCCESS
    OUTLOOK.EXE CreateFile C:\Program Files\Microsoft Office\Office14\OUTLCTL.DLL SUCCESS
    OUTLOOK.EXE ReadFile C:\Program Files\Microsoft Office\Office14\OUTLCTL.DLL SUCCESS
    OUTLOOK.EXE ReadFile C:\Program Files\Microsoft Office\Office14\OUTLCTL.DLL SUCCESS

    Now, comparing the entries of the working and non-working machine, we can clearly see:
    1) That the keys ending with 1.0 don’t exist on the working machine but they do on the non-working machine.
    2) On the working machine it continues to search for keys ending with 1.1 (Version 1.1 of OVC) and goes on to find the OUTLCTL.DLL, This does not happen on the non-working machine.
    So, I decided to take a look at the registry of the non-working machine and below is how it looks:
    image
     
    And on the working machine, this is how it looks:
    image

    What’s the difference? On the working machine there is no 1.0 key! If you look at the “PrimaryInteropAssemblyName” key on the non-working machine, it points to version 10.0.4504.0 which is a build from Office XP. This is a left over key from one of the previous installs of Office and the Interops.
    We decided to take a backup of the key and delete it. As soon as we deleted the 1.0 key and tested the code again, everything WORKED!

    Moral of the story? Comparing Process Monitor logs can give you answers Smile.

    Enjoy!

Page 1 of 1 (1 items)