Microsoft Store Operations POS: Attempt to process COM object 'ObjectName' failed. An unknown error ocurred.

I have a program that gets executed in POS. Occasionally POS closes that program in the midle of execution; after trying to restart it the error message shows "Attempt to process COM object 'ObjectName' failed. An unknown error occurred." I am invoking this program from Custom POS Button. Here is entry code. The exception below is never executed.

namespace FrameWiz { [ComVisible(true)] public class Startup { public bool Process(object argSession) { FrameWizShell frameWizShell = null; Session mySession = null;

try { //mine code here

return true; } catch(Exception) { throw; } finally { frameWizShell.Dispose(); mySession.Destroy(); } } } }

Reply to
Oliver
Loading thread data ...

Two biggy problems with this code. One, you should never catch an exception if you do nothing with it. Either get rid of your catch, or use it (log, or pop up a message box). Two, don't destroy your session. By doing this you are probably hurting rms. Unless you explicitly created the session object (which you did not, RMS passed it to you), you should not destroy it. Just my $.02.

Reply to
Ryan

BeanSmart website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.