Some problemas about CADImageDLL

Discuss and ask questions about CAD DLL (CAD Image DLL, CAD Importer DLL).

Moderators: SDS, support, admin

Post Reply
luisarvayo
Posts: 1
Joined: 18 Oct 2006, 04:52
Location: Mexico

Some problemas about CADImageDLL

Post by luisarvayo » 18 Oct 2006, 05:18

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.

support
Posts: 3254
Joined: 30 Mar 2005, 11:36
Contact:

Post by support » 18 Oct 2006, 17:41

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

Post Reply