Transition into COM context 0x27a7788 for this RuntimeCallableWrapper failed with the following error: Object is not connected to server (Exception from HRESULT: 0x800401FD (CO_E_OBJNOTCONNECTED)). This is typically because the COM context 0x27a7788 where this RuntimeCallableWrapper was created has been disconnected or it is busy doing something else and cannot process the context transition. No proxy will be used to service the request on the COM component and calls will be made to the COM component directly. This may cause corruption or data loss. To avoid this problem, please ensure that all COM contexts/apartments/threads stay alive and are available for context transition, until the application is completely done with the RuntimeCallableWrappers that represents COM components that live inside them.
I am trying to access Clipboard in my C# App.... It works .... but whenever i have following text in my clipboard it stops and give me exception Quoted above..
else if (e == Keys) { return ""; }
My Code is following
private string GetClip()
{
string MyStr="";
try
{
if(Clipboard.ContainsText())
MyStr = Clipboard.GetText();
}
catch
{
}
return MyStr;
}
User contributions licensed under CC BY-SA 3.0