I am trying to write a custom extension for RMS using a COM object in a DLL. The DLL is written using Delphi, as that is what I know best, although I have limited experience of COM. As specified there is a function called Process that returns a boolean result.
I have written a COM client in Delphi and it can call the DLL and runs the function ok.
The function in the DLL is to be called from a Custom button on the POS. When I try to run the function from the Custom button it finds the DLL ok as it shows the 'before' and 'after' create messages in my code (see below) but the Store Operations POS fails to create the object or call the Process function.
Store Operations POS always returns the error: "Attempt to execute COM object 'displaysomething.DisplaySomething' failed. Could not create object."
Is there anyway of finding why it failed to create the object as this message is not very helpful.
Any other suggestions as to what my problem might be would be very welcome.
Regards, John.
Code snippets from my DLL :
function TDisplaySomething.Process(MySession: SessionClass): boolean; begin ShowMessage('Process Called!!!'); Process := True; end;
{----------------------------------------------------------------------------------}
initialization ShowMessage('Before create');
TComObjectFactory.Create(ComServer, TDisplaySomething, Class_DisplaySomething, 'DisplaySomething', 'Display Com Object', ciMultiInstance, tmApartment);
ShowMessage('After create'); end.