I have a MTM. When it is installed it runs fine with its own box in the message application. If we reinstall from the Inbox this fails (without first uninstalling the application). Also "Remove" fails if the message application is running (MTM is loaded). Uninstall.exe is based on the example MTM provided by S60.
It calls iMsvSession->DeInstallMtmGroup( filename );
where filename is the MTM registration RSS file. What is this method exactly doing? It removes the mailbox from the message application, but is it also unloading the MTM from the memory. If the message application is running we observe that the uninstall ("Remove") is not complete and fails although no error is returned from DeInstallMtmGroup().
What about ReleaseMtmGroup in CMtmRegistryControl? What is that doing?