I have a C# project that I am running it from a VC++ project. I've used `Clipboard` in my C# project; but when I'm running my C# project from VC++ it doesn't work properly.

My C# code:

```
IDataObject dataObject = Clipboard.GetDataObject();
if (dataObject.GetDataPresent("MyType",true))     //This returns true in both of cases
  Console.WriteLine("Here");
object obj = dataObject.GetData("MyType");    //obj is null
MyType data = obj as MyType;
// When I copy data from normal program to called program (from VC++) this is null

```

Apparently I can not use `Clipboard` in the projects that are not `STAThread`. The entry point of my C# project is `STAThread` but I don't know how can I make my VC++ project `STAThread`?

Edit: `Application.OleRequired() == ApartmentState.STA` returns `true` and My thread was `STAThread`.