![]() |
unable to use custom control in form regions
Hi,
Our company has created a custom control that displays and annotates tiff files amongst other image files. While designing a COM Add-in for Outlook 2007 and using form regions we added our control to view incoming and outcoming faxes. The steps we do a - add the custom annotation control to a form region - initialise it in the CustomFormRegion class (using VSTO 2005 SE) and C# - call custom functions from our control such as EnableMenuItems() etc. (all menus of our control looks as expected) (so far everything is fine) - pass in our annotation control the MailItem Attachment as a parameter to display it. The attachment does not get displayed and we get the error msg: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." This we tried: - Added our custom annotation control to a legacy custom form and worked fine when tried to view an image file using a VB Script - used the same text box control as the legacy Message form and displayed the tiff file as expected (like it does in the legacy Message form) - tried to open any tiff file and not the MailItem Attachment with our annotation control from the form region and failed again. The new file had read/write access. Any more info just ask. Thanks in advance. |
unable to use custom control in form regions
Does this problem occur with form regions in all three scopes -- reading pane, compose and read?
Are you adding the control to the region programmatically? If so, what happens if you add it to the form region manually? -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Nikolas" wrote in message ... Our company has created a custom control that displays and annotates tiff files amongst other image files. While designing a COM Add-in for Outlook 2007 and using form regions we added our control to view incoming and outcoming faxes. The steps we do a - add the custom annotation control to a form region - initialise it in the CustomFormRegion class (using VSTO 2005 SE) and C# - call custom functions from our control such as EnableMenuItems() etc. (all menus of our control looks as expected) (so far everything is fine) - pass in our annotation control the MailItem Attachment as a parameter to display it. The attachment does not get displayed and we get the error msg: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." This we tried: - Added our custom annotation control to a legacy custom form and worked fine when tried to view an image file using a VB Script - used the same text box control as the legacy Message form and displayed the tiff file as expected (like it does in the legacy Message form) - tried to open any tiff file and not the MailItem Attachment with our annotation control from the form region and failed again. The new file had read/write access. Any more info just ask. Thanks in advance. |
unable to use custom control in form regions
Thanks for your quick reply.
I have only used it in the reading pane and in the read scope. I have added the control manually only. "Sue Mosher [MVP-Outlook]" wrote: Does this problem occur with form regions in all three scopes -- reading pane, compose and read? Are you adding the control to the region programmatically? If so, what happens if you add it to the form region manually? -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Nikolas" wrote in message ... Our company has created a custom control that displays and annotates tiff files amongst other image files. While designing a COM Add-in for Outlook 2007 and using form regions we added our control to view incoming and outcoming faxes. The steps we do a - add the custom annotation control to a form region - initialise it in the CustomFormRegion class (using VSTO 2005 SE) and C# - call custom functions from our control such as EnableMenuItems() etc. (all menus of our control looks as expected) (so far everything is fine) - pass in our annotation control the MailItem Attachment as a parameter to display it. The attachment does not get displayed and we get the error msg: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." This we tried: - Added our custom annotation control to a legacy custom form and worked fine when tried to view an image file using a VB Script - used the same text box control as the legacy Message form and displayed the tiff file as expected (like it does in the legacy Message form) - tried to open any tiff file and not the MailItem Attachment with our annotation control from the form region and failed again. The new file had read/write access. Any more info just ask. Thanks in advance. |
unable to use custom control in form regions
I doubt that it will work in the reading pane, because attachments there are read-only.
That doesn't explain, though, why it doesn't work in the read Inspector. If you want to send me the control and a sample project, I can try running it here and, if I can duplicate the problem, pass it along to the Outlook 2007 team and let you know what happens. Having the legacy custom form version too would provide a good basis for comparison. You can sent it to me at webmaster at outlookcode dot com. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Nikolas" wrote in message ... Thanks for your quick reply. I have only used it in the reading pane and in the read scope. I have added the control manually only. "Sue Mosher [MVP-Outlook]" wrote: Does this problem occur with form regions in all three scopes -- reading pane, compose and read? Are you adding the control to the region programmatically? If so, what happens if you add it to the form region manually? "Nikolas" wrote in message ... Our company has created a custom control that displays and annotates tiff files amongst other image files. While designing a COM Add-in for Outlook 2007 and using form regions we added our control to view incoming and outcoming faxes. The steps we do a - add the custom annotation control to a form region - initialise it in the CustomFormRegion class (using VSTO 2005 SE) and C# - call custom functions from our control such as EnableMenuItems() etc. (all menus of our control looks as expected) (so far everything is fine) - pass in our annotation control the MailItem Attachment as a parameter to display it. The attachment does not get displayed and we get the error msg: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." This we tried: - Added our custom annotation control to a legacy custom form and worked fine when tried to view an image file using a VB Script - used the same text box control as the legacy Message form and displayed the tiff file as expected (like it does in the legacy Message form) - tried to open any tiff file and not the MailItem Attachment with our annotation control from the form region and failed again. The new file had read/write access. Any more info just ask. Thanks in advance. |
unable to use custom control in form regions
Hi,
I just want to make sure you received the sample project I sent you on Monday on the email address you mention below (webmaster at outlookcode dot com). Regards. "Sue Mosher [MVP-Outlook]" wrote: I doubt that it will work in the reading pane, because attachments there are read-only. That doesn't explain, though, why it doesn't work in the read Inspector. If you want to send me the control and a sample project, I can try running it here and, if I can duplicate the problem, pass it along to the Outlook 2007 team and let you know what happens. Having the legacy custom form version too would provide a good basis for comparison. You can sent it to me at webmaster at outlookcode dot com. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Nikolas" wrote in message ... Thanks for your quick reply. I have only used it in the reading pane and in the read scope. I have added the control manually only. "Sue Mosher [MVP-Outlook]" wrote: Does this problem occur with form regions in all three scopes -- reading pane, compose and read? Are you adding the control to the region programmatically? If so, what happens if you add it to the form region manually? "Nikolas" wrote in message ... Our company has created a custom control that displays and annotates tiff files amongst other image files. While designing a COM Add-in for Outlook 2007 and using form regions we added our control to view incoming and outcoming faxes. The steps we do a - add the custom annotation control to a form region - initialise it in the CustomFormRegion class (using VSTO 2005 SE) and C# - call custom functions from our control such as EnableMenuItems() etc. (all menus of our control looks as expected) (so far everything is fine) - pass in our annotation control the MailItem Attachment as a parameter to display it. The attachment does not get displayed and we get the error msg: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." This we tried: - Added our custom annotation control to a legacy custom form and worked fine when tried to view an image file using a VB Script - used the same text box control as the legacy Message form and displayed the tiff file as expected (like it does in the legacy Message form) - tried to open any tiff file and not the MailItem Attachment with our annotation control from the form region and failed again. The new file had read/write access. Any more info just ask. Thanks in advance. |
unable to use custom control in form regions
When I run your project, this statement:
m_AnnotationControl.Open(m_tempTif) raises a System.accessviolationexception error: Attempted to read or write protected memory. This is often an indication that other memory is corrupt. The discussion at http://forums.microsoft.com/MSDN/Sho...02386&SiteID=1, among others, suggests that issue could be related to calling an external method on a COM object -- a topic that is way outside my expertise. I admit, though, that it's easier to imagine that being a problem with a numeric or object parameter than with the string paramter in your Open method. Of course, it could also be a VS bug, but I didn't see anything on Microsoft Connect that seemed to fit. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "Nikolas" wrote in message ... Thanks for your quick reply. I have only used it in the reading pane and in the read scope. I have added the control manually only. "Sue Mosher [MVP-Outlook]" wrote: Does this problem occur with form regions in all three scopes -- reading pane, compose and read? Are you adding the control to the region programmatically? If so, what happens if you add it to the form region manually? "Nikolas" wrote in message ... Our company has created a custom control that displays and annotates tiff files amongst other image files. While designing a COM Add-in for Outlook 2007 and using form regions we added our control to view incoming and outcoming faxes. The steps we do a - add the custom annotation control to a form region - initialise it in the CustomFormRegion class (using VSTO 2005 SE) and C# - call custom functions from our control such as EnableMenuItems() etc. (all menus of our control looks as expected) (so far everything is fine) - pass in our annotation control the MailItem Attachment as a parameter to display it. The attachment does not get displayed and we get the error msg: "Attempted to read or write protected memory. This is often an indication that other memory is corrupt." This we tried: - Added our custom annotation control to a legacy custom form and worked fine when tried to view an image file using a VB Script - used the same text box control as the legacy Message form and displayed the tiff file as expected (like it does in the legacy Message form) - tried to open any tiff file and not the MailItem Attachment with our annotation control from the form region and failed again. The new file had read/write access. Any more info just ask. Thanks in advance. |
All times are GMT +1. The time now is 07:53 AM. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2006 OutlookBanter.com