Hi,
I'm trying to create a c# add in for RMS 1.3 with vs2005 but get a cannot create object when the hook tries to start the dll. The code I'm using is shown below (just for a little test). When I compile the dll I have selected to make the assembly com visible.
I register the dll using regasm and the dll is located in the store ops folder.
Have I missed something ? (I can createobject using vba)
using System; using System.Collections.Generic; using System.Text; using System.IO;
namespace HalTender { public class Tender { private string m_LogFile Environment.GetFolderPath(Environment.SpecialFolder.System) + @"\HalTender.txt"; private TextWriter tw;
public bool Process(Object obj) { LogIt(m_LogFile,"Started"); return true; }
private void LogIt(string LogFile, string Message) { if (!File.Exists(LogFile)) { tw = File.CreateText(LogFile); tw.Close(); } StreamWriter fs = new StreamWriter(LogFile, true); fs.WriteLine(DateTime.Now.ToString() + ": " + Message); fs.Close(); } }
}