Daniel - I have nearly got your suggestion working, thank you!! (The only difference being that SendCommand is a member of Document, not Utility).
Is there a way to prevent the command being echoed in autocad though? One use for a callback I have is setting a progress bar, so it won't look great to see
(acet-ui-progress-safe n) appear 100 times in the command window.
Looks like if I can't callback synchronously over COM I'll have to pop up my own progress bar window.
Is there a call that tells autocad to at least handle window events so it doesn't appear to freeze up while my dll is calculating?
All that said, I'm unsure why you're going with COM outside of lisp. Is there some reason?
Have you thought of popping up a modal dialog box with a message & windows progress bar? That way you don't need to fiddle with strange ways of getting acad's progress bar to display - just use a normal windows form which you can create direct in C++.
If I want to do this, don't I need to get the HWND of autocad from somewhere? Do you know how to do that?