.NET
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to crash AutoCAD with managed wrapper API

1 REPLY 1
Reply
Message 1 of 2
Anonymous
383 Views, 1 Reply

How to crash AutoCAD with managed wrapper API

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
1 REPLY 1
Message 2 of 2
Anonymous
in reply to: Anonymous

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:........

Can't find what you're looking for? Ask the community or share your knowledge.

Post to forums  

Autodesk DevCon in Munich May 28-29th


Autodesk Design & Make Report

”Boost