/
Support Statement: Dealing with Library/Class Name Clash
Support Statement: Dealing with Library/Class Name Clash
In some situations, a COM library name clashes with one of the class names. This is more common for COM controls.
This can cause build errors in the generated code and in the stub code, in particular.
The work around is to add a "netName" attribute to the coclass definition.
For example, consider this control:
The translator generates a stub for SSSPlitter control that does not compile. This is because there is a "name clash" between the class name and the namespace: namespace SSSplitter { // .... public class SSSplitter : System.Windows.Forms.Control { public SSSplitter.Panes Panes // This line throws a compiler error, C# assume SSSPlitter is the name of the class, not the namespace { set { } get { return null; } } } }
The script below shows how to add a "netName" attribute to the coclass definition.
<DescriptionFile> <library id="IGSPLITTER.OCX" name="SSSplitter" uuid="14ACBB92-9C4A-4C45-AFD2-7AE60E71E5B3" netVersion="4.0" source="IGSPLITTER.OCX" location="%library%\Interop.SSSplitter.dll" axLocation="%library%\AxInterop.SSSplitter.dll" type="ActiveX" > ... <coclass id="SSSplitter" uuid="60051AC3-70FA-4592-AAAE-6F1093E3E7F2" migStatus="ActiveX" migName="AxSSSplitter.AxSSSplitter" netName="SSSplitterNew" >
, multiple selections available,
Related content
Support Statement: Designer Control GUID
Support Statement: Designer Control GUID
More like this
Support Statement: hybrid upgrade of Toolbar.Buttons.Add to WinForms extension
Support Statement: hybrid upgrade of Toolbar.Buttons.Add to WinForms extension
More like this
Support Statement: Duplicate COM symbols in different TypeLibs
Support Statement: Duplicate COM symbols in different TypeLibs
More like this
Support Statement: Making a control into a class
Support Statement: Making a control into a class
More like this
Support Statement: Upgrading a COM Component property to a WinForms Static property
Support Statement: Upgrading a COM Component property to a WinForms Static property
More like this
Support Statement: Consolidating COM API versions
Support Statement: Consolidating COM API versions
More like this