Page 1 of 1

Some problemas about CADImageDLL

Posted: 18 Oct 2006, 05:18
by luisarvayo
Hi,

I am using CADImageDLL demo on a VS 2003 project, .NET 1.1.

I have a problem with your DLL in that frequently a "resource already in use" exception is raised in the following lines:

using(Graphics g1 = Graphics.FromHwnd(_panelControl.Handle))
DLLWin32ImportCAD.DrawCAD(DLLWin32ImportCAD.CADFile, g1.GetHdc(), ref R);


That is not the exact message but almost, and it seems that a problem is ocurring here because the Graphics instance is disposed immediately. Could that be caused because the DrawCAD works in a thread ?. If that is the case, then, is there another way in that the drawing can occur in a non-thread model ?
That situation is causing me a lot of troubles.

In fact, the same problem you can observe in your main c# demo for VS 2003 after a few repaints of the device context.

Posted: 18 Oct 2006, 17:41
by support
Hello!
<br />We made some tests with the demo application and this error occured only when debugging in VS 2003.
<br />Thus we think that the reason of the problem is inside of the VS 2003 debugger.
<br />Sergey.

please post questions to the forum or write to support@cadsofttools.com