hjast 0 Newbie Poster

HEre is the code for a RTDServer in C#, and I can't get it to work in Excel. I checked the registry and it is registered in HKEY_USERS_ROOT.

using System;
using System.Collections.Generic;
using System.Text;
using Excel;
using System.Runtime.InteropServices;
using Microsoft.Office.Core;


namespace RTDServer
{
    [ProgId("RTDServer")]

    [ComVisible(true)]

    [Guid("60A6C959-649B-49f4-BD3A-1DAACFD35CF8")]

    public class RtdServer : IRtdServer
    { 

        public int ServerStart(IRTDUpdateEvent CallbackObject)
        {
            return 1;
        }

        public object ConnectData(int TopicID, ref Array Strings, ref bool GetNewValues)
        {
            return 99;
        }

        public Array RefreshData(ref int TopicCount)
        {
            return new int[] { 66 };
        }

        public void DisconnectData(int TopicID)
        {
        }

        public int Heartbeat()
        {
            return 1;
        }

        public void ServerTerminate()
        {
        }
    }
}
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.