.NET

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

How to crash AutoCAD with managed wrapper API

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

You are not logged in.

Log into access your profile, ask and answer questions, share ideas and more. Haven't signed up yet? Register

Announcements
Are you familiar with the Autodesk Expert Elites? The Expert Elite program is made up of customers that help other customers by sharing knowledge and exemplifying an engaging style of collaboration. To learn more, please visit our Expert Elite website.

Need installation help?

Start with some of our most frequented solutions to get help installing your software.

Ask the Community