This project has moved and is read-only. For the latest updates, please go here.


The thread 0x279c has exited with code 259 (0x103).


Hi All,

I am facing a issue in my project which is using EXCEL-DNA. when i am calling funciton in excel it hangs and seems its going in an infinite loop untill i kill the excel.

Step :1 open Excel which load .XLL
Step :2 call function , type "=XXX.CUSTOM_Calc(21+21+ param0+ param1) on excel cell and fit Function key to see the function param details. it and goes in an infinite loop and hangs untill i kill excel instance.

Note: its working fine when calling funciton normally. issue occurs at very first time i open excel and hit fn key.___

I debugged excel DNA code base. i found its throwing "Warning: InvalidAsyncContext returned from xlAsyncReturn" and excel dna timer going in infinite loop and doesn't return any value/ status to my main code.

Closed Sep 30, 2015 at 10:33 PM by govert
Incorrect usage


govert wrote Sep 17, 2015 at 8:29 AM

Could you please make a small project that reproduces the issue?
You can mail it to, or attach here.

It sound like a problem with how you're calling the API.

I thought the timer issue has been fixed, but I can check again. However, the message you report here sounds like it comes from somewhere else.


shrans007 wrote Sep 21, 2015 at 7:15 AM

Hi Govert,

The issue is resolved now. I was calling the COM object model from another thread.

Thanks for the help.