🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: alt.pl.comp.lang.csharp
Article #9854

Re: SaveFileDialog - exception

#9854
From: Sławek Mróz
Date: Wed, 09 Nov 2005 10:49
47 lines
2265 bytes
Użytkownik "Krzysztof Ciuba" <kciuba@op.pl> napisał w wiadomości 
news:dkrbrq$4he$1@news.onet.pl...
>> j/w, generalnie wywolanie ShowDialog nie rodzi problemu z SaveFileDialog w
> moim
>> programie.
>> A jednak, gdy odpalam programik na innym kompie (Win XP Home), wyskakuje
> mi exception
>>
>> ************** Exception Text **************
>>
>> System.Threading.ThreadStateException: Current thread must set to single
> thread
>> apartment (STA) mode before OLE calls can be made. Ensure that your Main
> function has
>> STAThreadAttribute marked on it.
>>
>>
>>
>> Przeszukanie pod tym katem googla wyplulo mi tylko jakies sovieckojezyczne
> strony, z
>> ktorych nic nie rozumiem, wiec wdzieczny bede za Wasza pomoc: co moze byc
> przyczyna
>> bledu i jak to leczyc?
>>
>
> witam,
> Spróbuj zrobić to co sugeruje komuniakt błędu, czyli ustawić atrybut STA w
> linii kodu poprzedzającej metodę Main():
>
> [STAThread]
> static void Main()
> {...}
>
> lub równoważne
> [STAThreadAttribute]
> static void Main()
> {...}

Pomogla zamiana Frameworka:)

Okazalo sie, ze byla tam zainstalowana jakas swieza wersja betowa i cus sie jej nie 
podobalo.
Dzieki tak czy inaczej:)

Pozdr
Slawek 
Technical Details
Message-ID: <dksk4t$bvp$1@atlantis.news.tpi.pl>
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!newsfeed.atman.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
References: <dkqfk6$1h0$1@atlantis.news.tpi.pl> <dkrbrq$4he$1@news.onet.pl>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!news-archive.icm.edu.pl!newsfeed.gazeta.pl!newsfeed.atman.pl!newsfeed.tpinternet.pl!nemesis.news.tpi.pl!atlantis.news.tpi.pl!news.tpi.pl!not-for-mail
From: Sławek Mróz <slmroz@_krzak_wp.pl>
Newsgroups: alt.pl.comp.lang.csharp
Subject: Re: SaveFileDialog - exception
Date: Wed, 9 Nov 2005 11:49:27 +0100
Organization: tp.internet - http://www.tpi.pl/
Lines: 49
Message-ID: <dksk4t$bvp$1@atlantis.news.tpi.pl>
References: <dkqfk6$1h0$1@atlantis.news.tpi.pl> <dkrbrq$4he$1@news.onet.pl>
NNTP-Posting-Host: 213.25.40.130
X-Trace: atlantis.news.tpi.pl 1131533277 12281 213.25.40.130 (9 Nov 2005 10:47:57 GMT)
X-Complaints-To: usenet@tpi.pl
NNTP-Posting-Date: Wed, 9 Nov 2005 10:47:57 +0000 (UTC)
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-RFC2646: Format=Flowed; Original
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit