I recently acquired a new Windows Mobile phone and was using the Windows Mobile Device Center to set up the partnership with my laptop. In the process, I came to a stage where I had to activate IRM as per the steps in Activate Information Rights Management by using ActiveSync.
I entered my domain credentials and then pressed the button, but what I got back was a rather cryptic error exception with the message: “The operation completed successfully”. Successfully?
Luckily this is was a .NET exception wrapping up the underlying Win32 exception, and the .NET runtime displayed the stack trace:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. —> System.ComponentModel.Win32Exception: The operation completed successfully
at Microsoft.WindowsMobile.ImageUtils.LoadIcon(String fileName, IconSize iconSize)
at Microsoft.WindowsMobile.DeviceManager.Partnership.GetImage(IconSize iconSize)
at Microsoft.WindowsMobile.DeviceCenter.ProgressControl.set_WorkType(Work value)
at Microsoft.WindowsMobile.DeviceCenter.ProgressControl..ctor(String titleText, String descriptionText, Work workType, OkCancelControl okCancelControl)
at Microsoft.WindowsMobile.DeviceCenter.Six.IrmActivationControl.SaveContentSettings(MainHost mainHost, AnimatedControl outgoingControl, String errorTitle, Boolean removeControl)
at Microsoft.WindowsMobile.DeviceCenter.Six.IrmActivationControl.OnOk(Object sender, OkClickedEventArgs e)
at Microsoft.WindowsMobile.DeviceCenter.OkCancelControl.ClickSave(Object sender, EventArgs e)
at Microsoft.WindowsMobile.DeviceCenter.OkCancelControlButton.button_Click(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnClick(EventArgs e)
After some debugging with WinDbg, I found that my “sync.ico” file under C:UsersarvindshAppDataRoamingMicrosoftActiveSyncProfiles<XYZPQR> was in some way “corrupt” or “not good”, causing the icon loading to fail and eventually the above exception. So I went ahead and put in a “good” sync.ico file in the above folder, restarted the sync process and then I was able to proceed with IRM activation. It turns out that this icon is used in the animated screen which displays when IRM is being activated, and that was the reason why the un-readable icon was so critical and caused the above exception.
I hope this esoteric tip is useful to someone out there! If you like it, please leave a comment and / or rate this post, please!