Click here to Skip to main content
16,011,608 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to Statically link a DLL Pin
Andrew Walker3-May-04 0:05
Andrew Walker3-May-04 0:05 
GeneralRe: How to Statically link a DLL Pin
Chintoo7233-May-04 3:29
Chintoo7233-May-04 3:29 
GeneralRe: How to Statically link a DLL Pin
Andrew Walker3-May-04 15:54
Andrew Walker3-May-04 15:54 
Generalneed help with arrays Pin
bishead2-May-04 18:29
bishead2-May-04 18:29 
GeneralRe: need help with arrays Pin
Maxwell Chen2-May-04 19:48
Maxwell Chen2-May-04 19:48 
GeneralRe: need help with arrays Pin
bishead2-May-04 20:11
bishead2-May-04 20:11 
GeneralRe: need help with arrays Pin
Maxwell Chen2-May-04 20:23
Maxwell Chen2-May-04 20:23 
GeneralThread & Class Pin
IceBerG712-May-04 18:01
IceBerG712-May-04 18:01 
Hi
I have a problem with the thread and class.

I created a thread from a function and in the thread function, i called and init a class but not using the new and delete method. There is a problem when the thread ended as the class destructor was not activated when i called ExitThread...an example below

main function()
{
CreateThread(.....,ThreadProc,...);
}

ThreadProc()
{
CDB_Database Data(); //Class Init
DWORD dwRecords;
HANDLE hFile; etc

OpenFile();
...
....
...
ExitThread(0);
}

my problem is everytime i called creatThread, the class constructor will be activated but when i called ExitThread, the class destructor was not activated.

So is the resources used by the thread free when i called exitThread as i seems to have sharing violation inside the function

Thank you for ur advise

GeneralRe: Thread & Class Pin
markkuk2-May-04 22:50
markkuk2-May-04 22:50 
GeneralRe: Thread & Class Pin
Blake Miller3-May-04 10:49
Blake Miller3-May-04 10:49 
GeneralHelp: I cannot use getline(...) Pin
GavinWang2-May-04 17:19
GavinWang2-May-04 17:19 
GeneralRe: Help: I cannot use getline(...) Pin
Maxwell Chen2-May-04 18:02
Maxwell Chen2-May-04 18:02 
GeneralRe: Help: I cannot use getline(...) Pin
Henrik Stuart2-May-04 18:47
Henrik Stuart2-May-04 18:47 
GeneralRe: Help: I cannot use getline(...) Pin
Anonymous2-May-04 19:30
Anonymous2-May-04 19:30 
GeneralRe: Help: I cannot use getline(...) Pin
Maxwell Chen2-May-04 19:31
Maxwell Chen2-May-04 19:31 
GeneralRe: Help: I cannot use getline(...) Pin
GavinWang2-May-04 19:35
GavinWang2-May-04 19:35 
GeneralFunction PreSubclassWindow() Pin
ChuThaiDuong2-May-04 17:04
ChuThaiDuong2-May-04 17:04 
Questionhow to do write to a file with a std::string Pin
kfaday2-May-04 16:35
kfaday2-May-04 16:35 
AnswerRe: how to do write to a file with a std::string Pin
Maxwell Chen2-May-04 16:59
Maxwell Chen2-May-04 16:59 
AnswerRe: how to do write to a file with a std::string Pin
Henrik Stuart2-May-04 18:34
Henrik Stuart2-May-04 18:34 
AnswerRe: how to do write to a file with a std::string Pin
David Crow3-May-04 2:33
David Crow3-May-04 2:33 
Generalarrays that are pass Pin
bishead2-May-04 15:53
bishead2-May-04 15:53 
GeneralRe: arrays that are pass Pin
Christian Graus2-May-04 16:17
protectorChristian Graus2-May-04 16:17 
GeneralRe: I need a little more help Pin
bishead2-May-04 17:21
bishead2-May-04 17:21 
GeneralRe: I need a little more help Pin
Paul Ranson3-May-04 1:14
Paul Ranson3-May-04 1:14 

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.