|
What is the best way to communicate between Threads?
---
With best regards,
A Manchester United Fan
The Genius of a true fool is that he can mess up a foolproof plan!
|
|
|
|
|
threads share the same memory amounts, so there no need to build communication between them (such as pipe, locked tmp files, etc...).
TOXCCT >>> GEII power
[VisualCalc 3.0 updated ][Flags Beginner's Guide new! ]
|
|
|
|
|
PostThreadMessage or SendMessageTimeout according to your ease.
Regards,
FarPointer
Blog:FARPOINTER
|
|
|
|
|
What's the best way to build a house?
There are many ways, ranging from thread messages (PostThreadMessage etc...) through shared memory, mailslots, pipes and shared variables (with appropriate mutexes/critical sections). Read up on them all and pick the one most suited to your application.
Ryan "Punctuality is only a virtue for those who aren't smart enough to think of good excuses for being late" John Nichol "Point Of Impact"
|
|
|
|
|
Can anyone tell me how to find out whether a disectory with a given path exits on the local disk or not?
Thanks and Regards,
Anil
|
|
|
|
|
if (access("c:\\tmp"), 0) != 0)
{
}
|
|
|
|
|
|
Try pathisdirectory/getfileattributes apis
|
|
|
|
|
See Here[^] maybe it is some helpful to you
whitesky
|
|
|
|
|
i am using a dialog based mfc win app. how can i retrive the value of the edit box in the cpp of another dialog box.
prashant jain malviya national institute of technology
|
|
|
|
|
You can use GetParent() and from the pointer returned from this function access the edit box contents in another dialog.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
thnx for reply but both the dialog box are child dialo box.
prashant jain
|
|
|
|
|
Still you can move on with the same procedure.
Another method is that say you have two classes CFirst and CSecond associated to the two dialogs. Then you can declare a pointer of the CFirst class in the CSecond class and then access the variable in the CSecond class.
Ex: When you are calling the second dialog
CSecond* mySecond=new CSecond();
mySecond->myFirst=this;
mySecond->DoModal(); // ShowWindow with Create if modeless dialog.
In the header file of CSecond dialog declare
CFirst *myFirst;
// DO not forget to include header files for both dialogs respectively.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
mySecond->myFirst=this;
in this line it is showing type conversion error.
prashant jain malviya national institute of technology
|
|
|
|
|
I think that you are creating the pointer in Second.h for the class CSecond itself.Check this out.
// Include Second.h in the file where you are calling this code.
CSecond *mySecond=new CSecond ();
mySecond->myFirst =this;
mySecond->DoModal ();
Open the Second.h file and in the public section declare a pointer as
// Include the header file for First.h
CFirst* myFirst;
// Delete the memory occupied to prevent memory leeks.
Somethings seem HARD to do, until we know how to do them.
_AnShUmAn_
|
|
|
|
|
maybe it is some helpful to you
Main Class is CMain and one child dialog CLocal now you declare this code in child dialog CMain* m_Main = (CMain* )GetParent(); and ues m_Main->(variable)(function)...
whitesky
|
|
|
|
|
thnx for reply but both the dialog box are child dialo box.
prashant jain
|
|
|
|
|
you try this and answer to me ,please
whitesky
|
|
|
|
|
CMain* m_Main = (CMain* )GetParent();
its showing error on using get parent function
prashant
|
|
|
|
|
|
Hi Guys
here ihave a problem in SMPPLIBTEST file parameter passing
so plz send me the solution to solve
#sankar#
|
|
|
|
|
What is the problem specifically? What error are you receiving? You have some code that can be shown that outlines the issue?
Have you read this:
http://www.codeproject.com/library/smpplib.asp
|
|
|
|
|
iam alredy read the SMPPLIB in code project,BUt while executing the ClientTest ,I gave the parameters of smpp.Activexperts-lab.com and port numbers but it cant connect to Server .
This is my problem,plz kindely help me how to achieve that problem
#sankar#
|
|
|
|
|
Dear all friends
i would like to get a extension is .mdb file. i am a beginner, how to do this or how to get a sample first, who have this sample, send me here, first let me use it. thank you very much. urgent!!!!!!
Li Zhiyuan
22/06/2006
|
|
|
|
|