To anyone interested,
I contacted Dale with DOSLib and he gave me a fix for my problem:
During a long, time consuming task, if AutoCAD does not not have a chance to "peek and pump" it's Windows message queue, then Windows might think the application has hung. So, in your time consuming task, you might want to sprinkle a call to DOS_PAUSE, which will force AutoCAD to flush its message queue, thus keeping the UI alive. Something as simple as this might help:
(dos_pause 0)
Thanks Dale and everyone else that contributed.