An example MSR OPOS Service Object I am writing was not initializing properly. I am adding this question to help others who run into the same problem since various searches resulted in no help whatsoever.
My question is: How can I determine what method in an OPOS Service Object is missing? Is there a utility of some kind that can exercise an OPOS Service Object and tell me what is missing? Is there some way to determine what methods an interface is expected to provide and which are missing?
I am following the procedure in Writing an OPOS Service Object using ATL in order to learn how an OPOS Service Object is created. I am using Visual Studio 2005 under Windows XP. To test the basic functionality I am using the NCR Retail Services Manager (RSM) utility to create a profile for an MSR in order to test the basic functionality of a Mag Stripe Reader simulator Service Object.
The Visual Studio project creates the COM object and registers it properly. When I attempt to use the Diagnostics function of RSM on the Service Object profile I receive an error of OPOS_E_NOSERVICE
. I have created a log file logging function in the COM object which shows that the Service Object is loaded, the DLLMain()
function of the COM object is invoked and the DLLGetClassObject()
is invoked. However a second log file which logs the various Service Object interface methods is not created indicating that none of the Service Object interface methods are called.
So it appears that there is a problem with the Service Object interface which fails a check that is done at the time the COM object is loaded.
The DllGetClassObject()
function is generated by the Visual Studio ATL project wizard and should require no changes.
Using the Microsoft POS .NET sample utility which comes with POS .NET 1.12 I tried using the sample utility. I can see the profile created with NCR RSM in the tree control under the MSR node. However when I attempt an Open
there is an error message. The Windows Event log shows the follow error.
Microsoft.PointOfService.PosControlException: Method Open threw an exception. The service object does not support one or more of the methods required by its release.