we've created a simple forms app with two windows. the second form contains the activex control. the first win is creating/calling the second win on button click. the click-code is this:
Code: Select all
Using f = New Form2
f.ShowDialog()
End Using
Code: Select all
System.AccessViolationException: Es wurde versucht, im geschützten Speicher zu lesen oder zu schreiben. Dies ist häufig ein Hinweis darauf, dass anderer Speicher beschädigt ist.
bei System.Windows.Forms.UnsafeNativeMethods.CoCreateInstance(Guid& clsid, Object punkOuter, Int32 context, Guid& iid)
bei System.Windows.Forms.AxHost.CreateWithLicense(String license, Guid clsid)
bei System.Windows.Forms.AxHost.CreateInstanceCore(Guid clsid)
bei System.Windows.Forms.AxHost.CreateInstance()
bei System.Windows.Forms.AxHost.GetOcxCreate()
bei System.Windows.Forms.AxHost.TransitionUpTo(Int32 state)
bei System.Windows.Forms.AxHost.CreateHandle()
bei System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
bei System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
bei System.Windows.Forms.AxHost.EndInit()
bei WindowsApp1.Form2.InitializeComponent() in D:\TestPdfCtl\Gen\Solution1\WindowsApp1\Form2.Designer.vb:Zeile 49.
bei WindowsApp1.Form2..ctor()
bei WindowsApp1.Form1.Button1_Click(Object sender, EventArgs e) in D:\TestPdfCtl\Gen\Solution1\WindowsApp1\Form1.vb:Zeile 3.
bei System.Windows.Forms.Control.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnClick(EventArgs e)
bei System.Windows.Forms.Button.OnMouseUp(MouseEventArgs mevent)
bei System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
bei System.Windows.Forms.Control.WndProc(Message& m)
bei System.Windows.Forms.ButtonBase.WndProc(Message& m)
bei System.Windows.Forms.Button.WndProc(Message& m)
bei System.Windows.Forms.NativeWindow.DebuggableCallback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
bei System.Windows.Forms.UnsafeNativeMethods.DispatchMessageW(MSG& msg)
bei System.Windows.Forms.Application.ComponentManager.System.Windows.Forms.UnsafeNativeMethods.IMsoComponentManager.FPushMessageLoop(IntPtr dwComponentID, Int32 reason, Int32 pvLoopData)
bei System.Windows.Forms.Application.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
bei System.Windows.Forms.Application.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.OnRun()
bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.DoApplicationModel()
bei Microsoft.VisualBasic.ApplicationServices.WindowsFormsApplicationBase.Run(String[] commandLine)
bei WindowsApp1.My.MyApplication.Main(String[] Args) in :Zeile 81.
edvschu