But if you are doing drag and drop you are likely a UI thread which "should" be in an STA, no?
Jim > -----Original Message----- > From: Richard Blewett [mailto:[EMAIL PROTECTED]] > Sent: Tuesday, May 21, 2002 6:55 AM > To: [EMAIL PROTECTED] > Subject: Re: [DOTNET] STAThread and Clipboard/DnD/CommonDialog > > > yep > > -----Original Message----- > From: dotnet discussion [mailto:[EMAIL PROTECTED]]On > Behalf Of > Richard Birkby > Sent: 21 May 2002 11:30 > To: [EMAIL PROTECTED] > Subject: Re: [DOTNET] STAThread and Clipboard/DnD/CommonDialog > > > So the only way to initialize Drag and Drop is via a call to > OleInitialize, > which also has the (unfortunate*) side effect of placing you > in an STA. > > > Richard > * marshalling performance is not really a concern with Drag > and Drop... > > > -----Original Message----- > > From: dotnet discussion > [mailto:[EMAIL PROTECTED]]On Behalf Of > > Richard Blewett > > Sent: 21 May 2002 11:31 > > To: [EMAIL PROTECTED] > > Subject: Re: [DOTNET] STAThread and Clipboard/DnD/CommonDialog > > > > > > The [STAThread] attribute ensures that the thread calls > OleInitialize not > > CoInitialize. OleInitialize sets up the extra stuff > required for OLE Drag > > and Drop, etc. > > > > Richard > > http://staff.develop.com/richardb > > > > -----Original Message----- > > From: dotnet discussion [mailto:[EMAIL PROTECTED]]On Behalf Of > Richard Birkby > Sent: 21 May 2002 11:13 > To: [EMAIL PROTECTED] > Subject: [DOTNET] STAThread and Clipboard/DnD/CommonDialog > > > Why does a thread have to be marked as an STAThread when it's calling > operations on the clipboard? Why can't COM marshal the calls from the > (default) MTA to the STA required by the clipboard? > > > Richard > > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or > subscribe to other DevelopMentor lists at http://discuss.develop.com. > > You can read messages from the DOTNET archive, unsubscribe from DOTNET, or > subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.