Google Answers Logo
View Question
 
Q: [C#] MarshallDirectiveException ( No Answer,   0 Comments )
Question  
Subject: [C#] MarshallDirectiveException
Category: Computers > Programming
Asked by: jhsolorz-ga
List Price: $20.00
Posted: 21 Dec 2004 07:21 PST
Expires: 24 Dec 2004 18:00 PST
Question ID: 445548
A small percentage of our customers are getting the following
exception:


System.Runtime.InteropServices.MarshalDirectiveException: Marshaler
restriction: Excessively long string.
at System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid&
clsid, Object punkOuter, Int32 context, Guid& iid)
at System.Windows.Forms.AxHost.CreateWithoutLicense()
at System.Windows.Forms.AxHost.CreateWithLicense(String license)
at System.Windows.Forms.AxHost.CreateInstance()
at System.Windows.Forms.AxHost.GetOcxCreate()
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 Bravestorm.OperatorClient.UI.Html.HtmlEdit.InitializeComponent()


Just briefly, the code is unmodified designer generated code.
Among the components we have an AxDHTMLEdit. The InitializeComponent
method roughly looks like this:


private void InitializeComponent() {
this.components = new System.ComponentModel.Container();
this.axDHTMLEditor = new AxDHTMLEDLib.AxDHTMLEdit();


...


((System.ComponentModel.ISupportInitialize)(this.axDHTMLEditor)).BeginInit();
this.SuspendLayout();


...


//
// axDHTMLEditor
//
this.axDHTMLEditor.Dock = System.Windows.Forms.DockStyle.Fill;
this.axDHTMLEditor.Enabled = true;
this.axDHTMLEditor.Location = new System.Drawing.Point(0, 51);
this.axDHTMLEditor.Name = "axDHTMLEditor";
this.axDHTMLEditor.OcxState =
((System.Windows.Forms.AxHost.State)(resources.GetObject("axDHTMLEditor.OcxState")));
this.axDHTMLEditor.Size = new System.Drawing.Size(992, 749);
this.axDHTMLEditor.TabIndex = 0;
this.axDHTMLEditor.DocumentComplete += new
System.EventHandler(this.axDHTMLEditor_DocumentComplete);
this.axDHTMLEditor.onkeyup += new
System.EventHandler(this.axDHTMLEditor_onkeyup);
this.axDHTMLEditor.onkeydown += new
System.EventHandler(this.axDHTMLEditor_onkeydown);
this.axDHTMLEditor.ShowContextMenu += new
AxDHTMLEDLib._DHTMLEditEvents_ShowContextMenuEventHandler(this.axDHTMLEditor_ShowContextMenu);
this.axDHTMLEditor.onmouseup += new
System.EventHandler(this.axDHTMLEditor_onmouseup);


...


((System.ComponentModel.ISupportInitialize)(this.axDHTMLEditor)).EndInit();
this.ResumeLayout(false);



}


How do we solve this issue?

Request for Question Clarification by mathtalk-ga on 21 Dec 2004 10:55 PST
Hi, jhsolorz-ga:

I can take this up with Microsoft system engineers.  But as a quick
thought, are the affected customers on one particular OS version or
another?  I'm noticing that there seem to be "nested" calls to
CreateWithoutLicense() within CreateWithLicense, etc. and I wonder if
this is perhaps an artifact of how the .Net framework is supported on
an older platform, like Win98 or NT4.

regards, mathtalk-ga
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy