T
Tiret Ohf D.
Hi everybody,
I am using Visio control in a C# application and I have found out, that
this code leads to the OS Loader Exception during closing the
application (code executed in a form, then the form was closed, and
finally I close the application, containing the form)
-----------
public string OpenStencil(string FullPath)
{
try
{
m_Documents.OpenEx(FullPath, (short)VisOpenSaveArgs.visOpenRO);
return Ok;
}
catch (Exception ex)
{
return ex.Message;
}
}
-----------
If I'll comment the call and not unsubscribe from Visio events (like
MarkerEvent) the exception will show its ugly face again in the same
circumstances.
I think that the problem lies in a reference to the document that is
not releasing when I attempt to replace it with OpenEx. The OpenEx is
used to load a stencil into control.
Genossen, what am I doing wrong?
I am using Visio control in a C# application and I have found out, that
this code leads to the OS Loader Exception during closing the
application (code executed in a form, then the form was closed, and
finally I close the application, containing the form)
-----------
public string OpenStencil(string FullPath)
{
try
{
m_Documents.OpenEx(FullPath, (short)VisOpenSaveArgs.visOpenRO);
return Ok;
}
catch (Exception ex)
{
return ex.Message;
}
}
-----------
If I'll comment the call and not unsubscribe from Visio events (like
MarkerEvent) the exception will show its ugly face again in the same
circumstances.
I think that the problem lies in a reference to the document that is
not releasing when I attempt to replace it with OpenEx. The OpenEx is
used to load a stencil into control.
Genossen, what am I doing wrong?