InfoPath error when hosting in .NET Windows Forms application

  • Thread starter Access to Visual Basic project via VFP
  • Start date
A

Access to Visual Basic project via VFP

We have stuck with the strange error in our .NET 2.0 Windows Rich Client
Application, where for object editing Microsoft.Office.InfoPath.FormControl
is used in custom UserControl. It's happening when user opens form containing
InfoPath editor more then one time - f.e. three or four times at a strech.
Changed data is saved in XML locally on the client and then read into object
and sent to the server view WCF service.

Also strange error is thrown when rebuilding Client App solution in VS 2005
- it crashes and closes down.

Could it be due to incorrectly releasing InfoPath form or incorrect Event
unregistration problem?

The runtime errors are:

System.Runtime.InteropServices.COMException was unhandled by user code
Message="Catastrophic failure (Exception from HRESULT: 0x8000FFFF
(E_UNEXPECTED))"
Source="Microsoft.Office.Interop.InfoPath"
ErrorCode=-2147418113
StackTrace:
at
Microsoft.Office.Interop.InfoPath.InfoPathEditorObjectClass.NewFromSolution(String bstrSolutionURI)
at Microsoft.Office.InfoPath.FormControl.NewFromFormTemplate(String
formTemplateLocation)
at DiBi.ClientCommon.InfoPathFormControl.NewFromFormTemplate(String
path, Boolean readOnly) in
D:\DiBi\MXX\Projects\ClientApplications\ProcessingClient\ClientCommon\InfoPath\InfoPathFormControl.cs:line 147
at
DiBi.IngestModule.Controls.DigitalObjectMetadataView.InitalizeControl(DigitalObjectInfo
digitalObject, Boolean openReadOnly) in
D:\DiBi\MXX\Projects\ClientApplications\ProcessingClient\IngestModule\Controls\DigitalObjectMetadataView.cs:line 157
at DiBi.IngestModule.Controls.DigitalObjectEditForm.LoadControl(Int32
digitalObjectVersionId, Int32 typeId) in
D:\DiBi\MXX\Projects\ClientApplications\ProcessingClient\IngestModule\Controls\DigitalObjectEditForm.cs:line 235
at
DiBi.IngestModule.DigitalObjectController.ShowDigitalObjectEditForm(Int32
digitalObjectVersionId, Int32 typeId) in
D:\DiBi\MXX\Projects\ClientApplications\ProcessingClient\IngestModule\DigitalObjectController.cs:line 167
at
DiBi.IngestModule.DigitalObjectController.ShowDigitalObjectEditForm(Int32
digitalObjectVersionId) in
D:\DiBi\MXX\Projects\ClientApplications\ProcessingClient\IngestModule\DigitalObjectController.cs:line 118
at DiBi.IngestModule.Controls.DigitalObjectsList.OpenItem() in
D:\DiBi\MXX\Projects\ClientApplications\ProcessingClient\IngestModule\Controls\DigitalObjectsList.cs:line 193
at
DiBi.IngestModule.Controls.DigitalObjectsList.OnDataGridViewCellMouseDoubleClick(Object
sender, DataGridViewCellMouseEventArgs e) in
D:\DiBi\MXX\Projects\ClientApplications\ProcessingClient\IngestModule\Controls\DigitalObjectsList.cs:line 244
at
System.Windows.Forms.DataGridView.OnCellMouseDoubleClick(DataGridViewCellMouseEventArgs e)
at
System.Windows.Forms.DataGridView.OnMouseDoubleClick(MouseEventArgs e)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.DataGridView.WndProc(Message& m)
at
System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
[12.02.2008 17:42:28] Rihards Jozēns says: un uzmet aci bug 1168

-----------------------------------------------
Attempted to read or write protected memory. This is often an indication
that other memory is corrupt.

at System.Windows.Forms.UnsafeNativeMethods.CallWindowProc(IntPtr
wndProc, IntPtr hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
at System.Windows.Forms.AxHost.DetachAndForward(Message& m)
at System.Windows.Forms.AxHost.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)

-----------------------------------------------
Unable to get the window handle for the 'FormControl' control. Windowless
ActiveX controls are not supported.

at System.Windows.Forms.AxHost.InPlaceActivate()
at System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
at System.Windows.Forms.AxHost.CreateHandle()
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
at System.Windows.Forms.AxHost.EndInit()
at DiBi.ClientCommon.InfoPathFormControl.InitializeComponent() in
c:\DiBiOI\MR1\Projects\ClientApplications\ProcessingClient\ClientCommon\InfoPath\InfoPathFormControl.Designer.cs:line 130
at DiBi.ClientCommon.InfoPathFormControl..ctor() in
c:\DiBiOI\MR1\Projects\ClientApplications\ProcessingClient\ClientCommon\InfoPath\InfoPathFormControl.cs:line 65
at DiBi.ClientCommon.InfoPathForm.InitializeComponent() in
c:\DiBiOI\MR1\Projects\ClientApplications\ProcessingClient\ClientCommon\InfoPath\InfoPathForm.Designer.cs:line 33
at DiBi.ClientCommon.InfoPathForm..ctor() in
c:\DiBiOI\MR1\Projects\ClientApplications\ProcessingClient\ClientCommon\InfoPath\InfoPathForm.cs:line 77
at DiBi.IngestModule.DigitalObjectController.ShowInfoPathForm(Int32
selectedTypeVersionId, Int32 selectedTemplateId, Int32
selectedTemplateVersionId) in
c:\DiBiOI\MR1\Projects\ClientApplications\ProcessingClient\IngestModule\DigitalObjectController.cs:line 324
at DiBi.IngestModule.Controls.NewDigitalObject.OnNewDoButtonClick(Object
sender, EventArgs e) in
c:\DiBiOI\MR1\Projects\ClientApplications\ProcessingClient\IngestModule\Controls\NewDigitalObject.cs:line 69
at System.Windows.Forms.Control.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnClick(EventArgs e)
at System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons
button, Int32 clicks)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ButtonBase.WndProc(Message& m)
at System.Windows.Forms.Button.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg,
IntPtr wparam, IntPtr lparam)
inner exception: Attempted to read or write protected memory. This is often
an indication that other memory is corrupt.
at System.Windows.Forms.UnsafeNativeMethods.IOleObject.DoVerb(Int32
iVerb, IntPtr lpmsg, IOleClientSite pActiveSite, Int32 lindex, IntPtr
hwndParent, COMRECT lprcPosRect)
at System.Windows.Forms.AxHost.DoVerb(Int32 verb)
at System.Windows.Forms.AxHost.InPlaceActivate()
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top