Click here to Skip to main content
15,919,132 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Using a C++ dll in C++ project and a C# project... C# requires __stdcall c++ does not... is there a way the dll can determine who is using him? Pin
Cedric Moonen28-Oct-09 4:33
Cedric Moonen28-Oct-09 4:33 
GeneralRe: Using a C++ dll in C++ project and a C# project... C# requires __stdcall c++ does not... is there a way the dll can determine who is using him? Pin
Greg Mort28-Oct-09 4:42
Greg Mort28-Oct-09 4:42 
GeneralRe: Using a C++ dll in C++ project and a C# project... C# requires __stdcall c++ does not... is there a way the dll can determine who is using him? Pin
Cedric Moonen28-Oct-09 4:48
Cedric Moonen28-Oct-09 4:48 
GeneralRe: Using a C++ dll in C++ project and a C# project... C# requires __stdcall c++ does not... is there a way the dll can determine who is using him? Pin
Member 419459328-Oct-09 18:22
Member 419459328-Oct-09 18:22 
GeneralRe: Using a C++ dll in C++ project and a C# project... C# requires __stdcall c++ does not... is there a way the dll can determine who is using him? Pin
Cedric Moonen28-Oct-09 21:13
Cedric Moonen28-Oct-09 21:13 
GeneralRe: Using a C++ dll in C++ project and a C# project... C# requires __stdcall c++ does not... is there a way the dll can determine who is using him? [modified] Pin
Member 419459329-Oct-09 5:13
Member 419459329-Oct-09 5:13 
AnswerRe: Using a C++ dll in C++ project and a C# project... C# requires __stdcall c++ does not... is there a way the dll can determine who is using him? Pin
«_Superman_»28-Oct-09 7:22
professional«_Superman_»28-Oct-09 7:22 
QuestionCFileDialog in an own thread -> Access violation Pin
slaindevil28-Oct-09 2:36
slaindevil28-Oct-09 2:36 
Hey guys,

I got a weird problem with a CFileDialog in an own thread.

It looks like the following:

static UINT Thread(LPVOID pParam)
{
    CFileDialog dlg(true);
    dlg.DoModal();
    return 0;
}

...

AfxBeginThread(Thread, this);


When I c+p files or delete files in the file dialog I will get an Access Violation, as soon as the thread ends.

I told the debugger to break on Access Violations and this is the position where he stops:

At the file "threadex.c" in the function "void __cdecl _endthreadex (unsigned retcode)" at
ExitThread(retcode);
} // Here he the debugger breaks


Anybody there, who can help me? ^^

There is nothing else in the code. Just a single dialog box with a button, which starts the thread in its OnButtonPressed() routine.

I am using VS2k8 SP1. I also already tried to use a gui thread instead of a worker thread, no changes.

Greets,
AnswerRe: CFileDialog in an own thread -> Access violation Pin
Cedric Moonen28-Oct-09 2:42
Cedric Moonen28-Oct-09 2:42 
GeneralRe: CFileDialog in an own thread -> Access violation Pin
slaindevil28-Oct-09 3:25
slaindevil28-Oct-09 3:25 
QuestionRe: CFileDialog in an own thread -> Access violation Pin
Randor 28-Oct-09 4:05
professional Randor 28-Oct-09 4:05 
AnswerRe: CFileDialog in an own thread -> Access violation Pin
slaindevil1-Nov-09 20:53
slaindevil1-Nov-09 20:53 
GeneralRe: CFileDialog in an own thread -> Access violation Pin
Randor 2-Nov-09 9:36
professional Randor 2-Nov-09 9:36 
AnswerRe: CFileDialog in an own thread -> Access violation Pin
Roger Stoltz28-Oct-09 6:52
Roger Stoltz28-Oct-09 6:52 
GeneralRe: CFileDialog in an own thread -> Access violation Pin
slaindevil1-Nov-09 21:02
slaindevil1-Nov-09 21:02 
QuestionGDI+ Bitmap::FromHICON problem Pin
Evil.Ghost28-Oct-09 0:42
Evil.Ghost28-Oct-09 0:42 
AnswerRe: GDI+ Bitmap::FromHICON problem Pin
CPallini28-Oct-09 1:02
mveCPallini28-Oct-09 1:02 
QuestionGuidelines say avoid standard integer types Pin
RedSonja27-Oct-09 23:31
RedSonja27-Oct-09 23:31 
AnswerRe: Guidelines say avoid standard integer types Pin
CPallini27-Oct-09 23:51
mveCPallini27-Oct-09 23:51 
GeneralRe: Guidelines say avoid standard integer types Pin
RedSonja28-Oct-09 1:23
RedSonja28-Oct-09 1:23 
QuestionRe: Guidelines say avoid standard integer types Pin
CPallini28-Oct-09 1:44
mveCPallini28-Oct-09 1:44 
AnswerRe: Guidelines say avoid standard integer types Pin
RedSonja28-Oct-09 2:13
RedSonja28-Oct-09 2:13 
GeneralRe: Guidelines say avoid standard integer types Pin
Richard MacCutchan28-Oct-09 2:31
mveRichard MacCutchan28-Oct-09 2:31 
GeneralRe: Guidelines say avoid standard integer types Pin
codedgn28-Oct-09 3:06
codedgn28-Oct-09 3:06 
GeneralRe: Guidelines say avoid standard integer types Pin
CPallini28-Oct-09 3:26
mveCPallini28-Oct-09 3:26 

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.