.NET

Reply
*Tony Tanzillo
Message 1 of 2 (138 Views)

How to crash AutoCAD with managed wrapper API

138 Views, 1 Replies
12-30-2005 06:25 AM
You can crash AutoCAD with an eWasOpenForWrite
error using the following steps:

1. Build a managed extension that adds a
handler to the Editor's PointMonitor event.

2. Load the extension, and ensure that the
PointMonitor event handler is added. The
handler need not do anything at all.

3. Create a Dimension.

4. Issue DDEDIT and select the dimension.

5. Right click on the dimension text, and choose
"Insert Field" from the menu.

6. In the Field dialog, Category combo,
select "Objects".

7. In the Field Names list, select "Object".

8. Click the Select object button next to the
Object type edit box.

9. In the drawing, at the "Select object: " prompt,
move the pickbox over the dimension whose
text is being edited.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com
*Tony Tanzillo
Message 2 of 2 (138 Views)

Re: How to crash AutoCAD with ObjectARX

12-30-2005 07:20 AM in reply to: *Tony Tanzillo
Sorry. The problem described in the previous post
is not related to the PointMonitor event.

The culprit is AcEdInputPointManager::turnOnForcedPick().

If forced picking is on in the context outlined in
that post, AutoCAD apparently tries to access the
object, and kaboom.

I never noticed this in my ObjectARX based code
that uses monitorInputPoint() because I always
turn forced picking off when AutoCAD is not in
a quiescent state.

Revising the managed code to do the same thing,
also works around the problem.

--
http://www.caddzone.com

AcadXTabs: MDI Document Tabs for AutoCAD 2004/2005/2006
http://www.acadxtabs.com

"Tony Tanzillo" wrote in message news:5047745@discussion.autodesk.com...
You can crash AutoCAD with an eWasOpenForWrite
error using the following steps:........
Post to the Community

Have questions about Autodesk products? Ask the community.

New Post
Announcements
Are You Going To Be @ AU 2014? Feel free to drop by our AU topic post and share your plans, plug a class that you're teaching, or simply check out who else from the community might be in attendance. Ohh and don't forgot to stop by the Autodesk Help | Learn | Collaborate booths in the Exhibit Hall and meet our community team if you get a chance!