Correct CLSID's with add-in shim

D

David Thielen

Hello;

Sorry for the wide distribution but I am stuck on these 4 items and
have googled and searched msdn and microsoft.com - all to no avail.

This is for a Word add-in written in C# and using the
IDTExtensibility2 approach (ie not VSTO).

A developer in the Word group told me "The shim RGS and IDL both use a
different CLSID from the assembly, so both get registered and there's
no mapping between them, plus writing trash to the registry."

I have gone over and over and over the article at
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnoxpta/html/odc_comshim.asp
and I can't find anything about this.

As I read that article, the idl file gets one GUID before the library
statement that is unique - it is not repeated anywhere else.

The second GUID appears in the idl file once (inside importlib) and
three times in the rgs file. And those two files/four locations are
the only place that second GUID is used.

What am I missing here (both files below)?

thanks - dave


COMAddInShim.idl:
// COMAddInShim.idl : IDL source for stshim
//

// This file will be processed by the MIDL tool to
// produce the type library (COMAddInShim.tlb) and marshalling code.

import "oaidl.idl";
import "ocidl.idl";

[
uuid(3b98f7f0-7dde-4ab9-99ab-15bc8e1adb0e),
version(1.0),
helpstring("Windward COMAddInShim 1.0 Type Library")
]
library COMAddInShimLib
{
importlib("stdole2.tlb");
[
uuid(c2f1fb6c-86e0-49a7-a423-1ab93deee94e),
helpstring("ConnectProxy Class")
]
coclass ConnectProxy
{
[default] interface IUnknown;
};
};

ConnectProxy.rgs:
HKCR
{
AutoTagAddInShim.Connect.1 = s 'Connect Class'
{
CLSID = s '{c2f1fb6c-86e0-49a7-a423-1ab93deee94e}'
}
AutoTagAddInShim.Connect = s 'Connect Class'
{
CLSID = s '{c2f1fb6c-86e0-49a7-a423-1ab93deee94e}'
CurVer = s 'AutoTagAddInShim.Connect.1'
}
NoRemove CLSID
{
ForceRemove '{c2f1fb6c-86e0-49a7-a423-1ab93deee94e}' =
s 'Connect Class'
{
ProgID = s 'AutoTagAddInShim.Connect.1'
VersionIndependentProgID = s
'AutoTagAddInShim.Connect'
InprocServer32 = s '%MODULE%'
{
val ThreadingModel = s 'Apartment'
}
}
}
}

HKCU
{
NoRemove Software
{
NoRemove Microsoft
{
NoRemove Office
{
NoRemove Word
{
NoRemove Addins
{
ForceRemove AutoTagAddInShim.Connect
{
val 'Description' = s 'A Word
add-in for Windward Reports'
val 'FriendlyName' = s 'Windward
AutoTag'
val 'LoadBehavior' = d 3
}
}

}

}

}

}

}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top