Simon Mourier's Avatar
Simon Mourier's blog (1346 answers on StackOverflow) about Microsoft technologies C#, C/C++, .NET, WinRT, WinUI, COM, Interop, DirectX, Direct2D, Windows, ...
  • 🔎︎ Search
  • Categories
  • Archives
  • About Me
  • c#
  • excel
  • office
  • windows-shell

GetDataObject Requested Clipboard operation did not succeed 0x800401D0

Sep 8, 2017 See the question and my original answer on StackOverflow

All clipboard access must run using an STA thread. There are many ways to do this:

  • use BeginInvoke functions (Winforms or WPF) that guarantee the code runs on the UI thread (which should be STA)
  • start your own Thread instance and use SetAparmentState(STA),
  • etc.
  • SmoBlog © 2010-2025 Simon Mourier. All rights reserved.
  • Privacy & Terms