crash in acedCommand(...)

crash in acedCommand(...)

Anonymous
Not applicable
327 Views
1 Reply
Message 1 of 2

crash in acedCommand(...)

Anonymous
Not applicable
Hi ,
in my code i am making two consecutive calls to acedCommand(...)
for one work flow it works fine but for other work flow it crashes on second
call to acedCommand(...).


acedCommand(RTSTR,"-PLOT",RTSTR,"No",RTSTR,"Model", RTSTR, "", RTSTR,
(LPCSTR)printerName, RTSTR, "No", RTSTR, "No", RTSTR, "No",0);
acedCommand(RTSTR,"_preview",0); // crashing at this line.

the above two lines are written inside a function which is itself run in
response to a registered command.

Can anyone help me to figure out why it is happening
thanks in advance.
Ravi
0 Likes
328 Views
1 Reply
Reply (1)
Message 2 of 2

Anonymous
Not applicable
Is this AuotCAD2007. If it is then:
You are passing LPCSTR, it should be LPCTSTR, and so on like _T("-Plot") not
just "Plot".

Check as well if the first command has finished its job before going to the
next.
Try this and see.

Cheers,
charlie.

"Ravi" wrote in message
news:5477610@discussion.autodesk.com...
Hi ,
in my code i am making two consecutive calls to acedCommand(...)
for one work flow it works fine but for other work flow it crashes on second
call to acedCommand(...).


acedCommand(RTSTR,"-PLOT",RTSTR,"No",RTSTR,"Model", RTSTR, "", RTSTR,
(LPCSTR)printerName, RTSTR, "No", RTSTR, "No", RTSTR, "No",0);
acedCommand(RTSTR,"_preview",0); // crashing at this line.

the above two lines are written inside a function which is itself run in
response to a registered command.

Can anyone help me to figure out why it is happening
thanks in advance.
Ravi
0 Likes