Can I monitor the size of a thread's message queue?

前端 未结 1 1873
北海茫月
北海茫月 2021-01-12 06:33

Our application is getting a System Call Failed RPC error from DCOM (0x80010100), we suspect that the target thread\'s message queue is full (although I\'m not

相关标签:
1条回答
  • 2021-01-12 07:23

    I don't know of any way of monitoring the size of the queue (short of using a kernel debugger and groveling in the internal Win32Thread data structure at TIB+[0x40], which I hardly recommend).

    For debugging purposes, to check if the queue is full when you get the error, try doing a PostThreadMessage. If it's full, the call should fail with GetLastError() == 0x718. (Not enough quota is available to process this command.)

    0 讨论(0)
提交回复
热议问题