We are in the process of evaluating RMS 2.0 for use in our company. As part of this process we are trying to create a DLL, in Visual Studio 2005, to add certain functionality to the POS. So far, I am able to create a DLL in Visual Basic, register it using regasm, and it works. The intellisense works fine in C# but not in VB, so I thought I would try it in C# I am getting several errors.
I get the following warning during build: "prowiz.dll does not contain any types that can be registered for COM Interop"
I get the following error when attempting to use the DLL: " Attempt to execute COM object prowiz.wiz failed. Could not create object.
I have Register Comm Interop set to true; I would much rather use C# than VB and any help would be greatly appreciated. Following is the code I am using in the C# Class. Any ideas?
Thank you,
Galen Meyer
************************************************************************ using System.Collections.Generic; using System.Runtime.InteropServices; using System.IO; using System.Text; using QSRules;namespace prowiz { [Guid("02a53f8e-0609-4db9-ab4c-53aaa67f1831")] public interface Addin_Interface { [DispId(1)] bool Process(QSRules.SessionClass mySession); }
[Guid("02a53f8e-0609-4db9-ab4c-53aaa67f1831"), InterfaceType(ComInterfaceType.InterfaceIsIDispatch)]public interface Addin_Events { }
[Guid("02a53f8e-0609-4db9-ab4c-53aaa67f1831"), ClassInterface(ClassInterfaceType.None), ComSourceInterfaces(typeof(Addin_Events))] [ComVisible(true)]public class wiz : Addin_Interface { public bool Process(QSRules.SessionClass mySession) { if (DialogResult.OK == MessageBox.Show(string.Format("The current cashier is .", mySession.Cashier.Name.ToString()))) { return true; } else return false;
} } }