Click here to Skip to main content
15,898,734 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Platform SDK Pin
Michael Dunn13-May-07 17:40
sitebuilderMichael Dunn13-May-07 17:40 
GeneralRe: Platform SDK Pin
Sam_c13-May-07 21:58
Sam_c13-May-07 21:58 
QuestionInput from LPT port with inpout32.dll on windows XP Pin
Johpoke13-May-07 6:44
Johpoke13-May-07 6:44 
QuestionWriting/reading to/from CSV files Pin
J_E_D_I13-May-07 6:00
J_E_D_I13-May-07 6:00 
QuestionRe: Writing/reading to/from CSV files Pin
David Crow14-May-07 3:38
David Crow14-May-07 3:38 
AnswerRe: Writing/reading to/from CSV files Pin
J_E_D_I14-May-07 4:18
J_E_D_I14-May-07 4:18 
GeneralRe: Writing/reading to/from CSV files Pin
David Crow14-May-07 4:26
David Crow14-May-07 4:26 
QuestionRuntime error for OpenFileDialog Class in .NET 2005 Pin
priyank_ldce13-May-07 5:45
priyank_ldce13-May-07 5:45 
Hi all,

I am transferring to .NET 2003 to .NET 2005 now. I have one application made in Visual C++.NET 2003. It is compiling fine in .NET 2005 but it gives one run time error at ShowDialog() function of OpenFileDialog Class object. Error is

"An unhandled exception of type 'System.Threading.ThreadStateException' occurred in System.Windows.Forms.dll

Additional information: Current thread must be set to single thread apartment (STA) mode before OLE calls can be made. Ensure that your Main function has STAThreadAttribute marked on it. This exception is only raised if a debugger is attached to the process."


Can I know what is wrong with this? And how can I solve this problem.

Thanks in advance,
Priyank
AnswerRe: Runtime error for OpenFileDialog Class in .NET 2005 Pin
Mark Salsbery13-May-07 5:54
Mark Salsbery13-May-07 5:54 
AnswerRe: Runtime error for OpenFileDialog Class in .NET 2005 Pin
Michael Dunn13-May-07 6:15
sitebuilderMichael Dunn13-May-07 6:15 
GeneralRe: Runtime error for OpenFileDialog Class in .NET 2005 Pin
Stephen Hewitt13-May-07 18:52
Stephen Hewitt13-May-07 18:52 
AnswerRe: Runtime error for OpenFileDialog Class in .NET 2005 Pin
Stephen Hewitt13-May-07 18:57
Stephen Hewitt13-May-07 18:57 
QuestionATL::CImage using HDC ??? Pin
guybour200613-May-07 4:33
guybour200613-May-07 4:33 
AnswerRe: ATL::CImage using HDC ??? Pin
Mark Salsbery13-May-07 5:45
Mark Salsbery13-May-07 5:45 
AnswerRe: ATL::CImage using HDC ??? Pin
bob1697213-May-07 7:46
bob1697213-May-07 7:46 
QuestionStrange strcpy problem Pin
Axonn Echysttas13-May-07 2:17
Axonn Echysttas13-May-07 2:17 
AnswerRe: Strange strcpy problem Pin
Gary R. Wheeler13-May-07 2:31
Gary R. Wheeler13-May-07 2:31 
GeneralRe: Strange strcpy problem Pin
Axonn Echysttas13-May-07 3:09
Axonn Echysttas13-May-07 3:09 
GeneralRe: Strange strcpy problem Pin
Hans Dietrich13-May-07 3:47
mentorHans Dietrich13-May-07 3:47 
GeneralRe: Strange strcpy problem Pin
Axonn Echysttas13-May-07 4:17
Axonn Echysttas13-May-07 4:17 
GeneralRe: Strange strcpy problem Pin
Gary R. Wheeler13-May-07 4:32
Gary R. Wheeler13-May-07 4:32 
AnswerRe: Strange strcpy problem Pin
Michael Dunn13-May-07 6:18
sitebuilderMichael Dunn13-May-07 6:18 
QuestionMapping a drive into memory. Pin
Killer22512-May-07 23:23
Killer22512-May-07 23:23 
AnswerRe: Mapping a drive into memory. Pin
Hans Dietrich13-May-07 0:10
mentorHans Dietrich13-May-07 0:10 
AnswerRe: Mapping a drive into memory. Pin
Michael Dunn13-May-07 6:20
sitebuilderMichael Dunn13-May-07 6:20 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.