如何修复此错误我的应用程序无法读取更多然后1000记录在记事本中终止。

问题描述:

上下文0x3651d8'已断开连接。从当前上下文释放接口(上下文0x365068)。这可能会导致损坏或数据丢失。为了避免这个问题,请确保所有上下文/公寓都保持活动状态,直到应用程序完全使用代表其中的COM组件的RuntimeCallableWrappers完成。

Context 0x3651d8' is disconnected. Releasing the interfaces from the current context (context 0x365068). This may cause corruption or data loss. To avoid this problem, please ensure that all contexts/apartments stay alive until the application is completely done with the RuntimeCallableWrappers that represent COM components that live inside them.

这里 [ ^ ]是关于此问题的MSDN文档。



请阅读: [ ^ ]
Here[^] is MSDN documentation about this problem.

Please, read it too: Avoiding disconnected context warning when shutting down a thread on which STA COM objects have been created[^]