Hello,
I am trying to create a very basic add-in to POS just to get familiar with how it's done. I have followed the directions in the "Creating a
COM Component Add-in" help section. First I created a Class Library called RMSTest; I left the default name of Class1 for the class. Here
is all the code:
---------------------- Module TestModule
Public Session As Object
Public Class Class1
End Class
Public Function Process(ByVal Session As Object) As Boolean Dim custID As Integer custID = Session.Transaction.Customer.ID If custID 0 Then Process = True MsgBox("cust id is " + custID) Else MsgBox("no cust id") Process = False End If
End Function End Module
----------------------
Basically, I just want to display a message box with the customer's id when a customer value is changed. After I built my solution and
strong named the assembly, rebuilt the solution (steps 1-10), I browsed out to the bin folder of my project and registered the dll. I was a
bit confused because the steps said to browse out to the bin folder from the command prompt, but then it said to ccopy the dll to the addins
directory for Store Operations. So I wasn't sure where the file should be registered, so I tried it from both places.
Both times I typed in regasm /tlb:RMSTest.tlb RMSTest.dll, I got the following at the command prompt:
RegAsm Warning: No Types were registered.. Assembly exported to 'C:\Program Files\Microsoft Retail Management System\Store Operations\rmstest.tlb', and the type library was registered
successfully
I am not sure why I got the No Types Were registered.
But then I continued on and changed my registry settings; I changed the Hook Count to 1, and in the 000 hook, I put in Hooktype of 11,
ObjectName of RMSTest.Class1 and Parameter of 5. This seemed to be the right settings for calling the add in on customer save.
So, then I went into Store Operations and tried to change some customer values; when I clicked the OK button, I got the error message:
Attempt to execute COM object 'RMSTest.Class1' failed. Could not create object.
Like I said, this is a very basic thing I am trying to do - there could be an error in the VB .Net code, the way I tried to register it, the
registry settings, etc - I just am not sure.
Any ideas?
Thanks!