Home Page link  

C# addin cannot create object

 

Point-Of-Sale Software - - MS Point Of Sale software discussed here

 Post an article  get this group's latest topics as an RSS feed add this group's latest topics to your My MSN content add this group's latest topics to your My Yahoo content  add this group's latest topics to your Google content  YahooMyWeb Yahoo!  Google Google  Windows Live Favorites Windows Live  del.icio.us del.icio.us  digg digg  Add to Netscape Netscape
Subject Author Date
C# addin cannot create object Olan 01-09-2007
Posted by Olan on January 9, 2007, 7:58 am
Please log in for more thread options
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();
}
}

}


Posted by cod on January 10, 2007, 3:26 pm
Please log in for more thread options
wrote:

<cut/>

Please post the hook entry to invoke your object..
thanks

cod

Posted by Olan on January 11, 2007, 4:16 am
Please log in for more thread options
Hi Cod,

Thanks for the reply, the hook was 2, HalTender.Tender, 1.
I have resolved the issue by adding a constructor...

public HalTender()
{
//do nothing
}

Thanks,
Olan

"cod" wrote:

> wrote:
>
> <cut/>
>
> Please post the hook entry to invoke your object..
> thanks
>
> cod
>

Similar ThreadsPosted
Use VB.NET 2005 to create addin components February 11, 2006, 2:23 pm
Need help on: "Attempt to execute COM object 'MyTest.MyTest' failed. Could not create object." July 12, 2005, 4:26 am
DLL Created using vb.net 2.0... Could not create object. July 20, 2006, 10:31 am
Active X Component Can't Create Object December 9, 2006, 6:58 pm
ActiveX component can't create object February 26, 2007, 10:35 am
RMS - 'Could not create object' in Custom Extension September 3, 2008, 10:37 pm
"Runtime Error 429: ActiveX can not create object" March 27, 2007, 7:03 pm
Runtime error 429 Active X component can't create object June 6, 2007, 1:49 am
How do I use C# to build COM addin? September 13, 2005, 2:41 pm
AddItem addin April 4, 2007, 11:32 am

Contact Us | Privacy Policy
This site is not affiliated with Intuit - makers of Quickbooks and Quicken software
This site is not affiliated with Sage Software - makers of Peachtree accounting software
XML SitemapXML Sitemap