Problem with ClassInterfaceType.None

Jan 4, 2010 at 5:34 PM

I am having a problem with this piece of code. I can call the GetConnectionRawData method from unmanaged code (Powerbuilder), but when I try to reference the properties of ConnectionData I get errors. But If I get rid of "[ClassInterface(ClassInterfaceType.None)]" I have no problem accessing the properties of ConnectionData. Is there a dll conflict? Are the attributes used properly? Any help will be greatly appreciated.

    [ComVisible(true)]
    [ClassInterface(ClassInterfaceType.None)]
    [Guid("1B09A9E8-480F-4b4b-95F5-2CD6586B44A7")]
    public class DBConfigProxyFacade : IDBConfigProxy, IDisposable
    {

        [ComVisible(true)]
        [return: MarshalAs(UnmanagedType.LPArray)]
        public ConnectionData[] GetConnectionRawData(ConnectionType i_connectionType)
        {
            try
            {
                ConnectionData[] connectionData = _internalWeb.GetConnectionRawData(i_connectionType);
                return connectionData;
            }
            catch (Exception ex)
            {
                ErrorMessage = string.Format("Failed to get All Connection data from Configuration Service. Attempting top get from File. {0}", ex.Message);
                return new ConnectionData[] {};
            }

        }