Click here to Skip to main content
15,902,198 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: How to detect whether a COM port is available or not ? Pin
Rolf Kristensen9-Nov-08 1:29
Rolf Kristensen9-Nov-08 1:29 
QuestionHow can I create a working thread in a MFC regular dll Pin
W.Kim 19878-Nov-08 20:51
W.Kim 19878-Nov-08 20:51 
AnswerRe: How can I create a working thread in a MFC regular dll Pin
Mark Salsbery9-Nov-08 6:30
Mark Salsbery9-Nov-08 6:30 
GeneralRe: How can I create a working thread in a MFC regular dll Pin
W.Kim 19879-Nov-08 14:07
W.Kim 19879-Nov-08 14:07 
GeneralRe: How can I create a working thread in a MFC regular dll Pin
Mark Salsbery9-Nov-08 14:10
Mark Salsbery9-Nov-08 14:10 
GeneralRe: How can I create a working thread in a MFC regular dll [modified] Pin
W.Kim 19879-Nov-08 18:04
W.Kim 19879-Nov-08 18:04 
GeneralRe: How can I create a working thread in a MFC regular dll Pin
Iain Clarke, Warrior Programmer9-Nov-08 22:25
Iain Clarke, Warrior Programmer9-Nov-08 22:25 
GeneralRe: How can I create a working thread in a MFC regular dll Pin
W.Kim 198710-Nov-08 3:06
W.Kim 198710-Nov-08 3:06 
thanks Iain.I have solved the problem.
The fact that you are right!

void CMainFrame::OnBeginthread() 
{
	// TODO: Add your command handler code here
	//when I click the menu context..the application frame will call the function
	typedef void (*Pdllfun)();
	HINSTANCE hdll=LoadLibrary("thread.dll");
	if(hdll==NULL)
		::MessageBox(NULL,"can not laod the dll","",MB_OK);
	Pdllfun pdllfun=NULL;
	pdllfun=(Pdllfun)::GetProcAddress(hdll,"dllext");
		if(pdllfun==NULL)
		::MessageBox(NULL,"can not laod the dll funion","",MB_OK);
		pdllfun();

::MessageBox(NULL,"hold the dll","",MB_OK);//when I add a MessageBox here to let the dll remains in the 
                                            //memory,the problem will not exist any more.  

FreeLibrary(hdll);
	
}

so..thanks Iain again!! Smile | :)

Never Change My Goal!

GeneralRe: How can I create a working thread in a MFC regular dll Pin
Mark Salsbery10-Nov-08 4:53
Mark Salsbery10-Nov-08 4:53 
GeneralRe: How can I create a working thread in a MFC regular dll Pin
Mark Salsbery10-Nov-08 5:00
Mark Salsbery10-Nov-08 5:00 
QuestionPointer symbol position and constant member functions Pin
Christian Flutcher8-Nov-08 16:55
Christian Flutcher8-Nov-08 16:55 
AnswerRe: Pointer symbol position and constant member functions Pin
Saurabh.Garg8-Nov-08 18:55
Saurabh.Garg8-Nov-08 18:55 
GeneralRe: Pointer symbol position and constant member functions Pin
Christian Flutcher9-Nov-08 5:35
Christian Flutcher9-Nov-08 5:35 
AnswerRe: Pointer symbol position and constant member functions Pin
toxcct9-Nov-08 3:05
toxcct9-Nov-08 3:05 
GeneralRe: Pointer symbol position and constant member functions Pin
Christian Flutcher9-Nov-08 5:30
Christian Flutcher9-Nov-08 5:30 
AnswerRe: Pointer symbol position and constant member functions Pin
Iain Clarke, Warrior Programmer9-Nov-08 4:04
Iain Clarke, Warrior Programmer9-Nov-08 4:04 
GeneralRe: Pointer symbol position and constant member functions Pin
Christian Flutcher9-Nov-08 5:32
Christian Flutcher9-Nov-08 5:32 
QuestionHow to format like this 123,456,789.00? Pin
followait8-Nov-08 16:05
followait8-Nov-08 16:05 
AnswerRe: How to format like this 123,456,789.00? Pin
Saurabh.Garg8-Nov-08 18:57
Saurabh.Garg8-Nov-08 18:57 
GeneralRe: How to format like this 123,456,789.00? Pin
followait8-Nov-08 19:41
followait8-Nov-08 19:41 
AnswerRe: How to format like this 123,456,789.00? Pin
Randor 8-Nov-08 19:00
professional Randor 8-Nov-08 19:00 
AnswerRe: How to format like this 123,456,789.00? Pin
Hamid_RT8-Nov-08 20:22
Hamid_RT8-Nov-08 20:22 
QuestionWhy dosen't ShellExecute run some of commands? Pin
Joseph Marzbani8-Nov-08 9:26
Joseph Marzbani8-Nov-08 9:26 
AnswerRe: Why dosen't ShellExecute run some of commands? Pin
Mark Salsbery8-Nov-08 13:43
Mark Salsbery8-Nov-08 13:43 
AnswerRe: Why dosen't ShellExecute run some of commands? Pin
Joseph Marzbani8-Nov-08 16:56
Joseph Marzbani8-Nov-08 16:56 

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.