Click here to Skip to main content
15,922,427 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Edit box [modified] Pin
chandu00430-Aug-07 21:18
chandu00430-Aug-07 21:18 
AnswerRe: Edit box Pin
6Qing8830-Aug-07 21:31
6Qing8830-Aug-07 21:31 
GeneralRe: Edit box Pin
Nishad S30-Aug-07 21:34
Nishad S30-Aug-07 21:34 
GeneralRe: Edit box Pin
jhwurmbach30-Aug-07 21:34
jhwurmbach30-Aug-07 21:34 
AnswerRe: Edit box Pin
jhwurmbach30-Aug-07 21:36
jhwurmbach30-Aug-07 21:36 
AnswerRe: Edit box Pin
Anurag Gandhi30-Aug-07 23:41
professionalAnurag Gandhi30-Aug-07 23:41 
AnswerRe: Edit box Pin
Iain Clarke, Warrior Programmer31-Aug-07 0:05
Iain Clarke, Warrior Programmer31-Aug-07 0:05 
QuestionWaitForSingleObject Not working.. Help Plzz Pin
megha_gharote30-Aug-07 20:09
megha_gharote30-Aug-07 20:09 
Dear Friends,

Using a thread i m writting a file and i want to wait untill the file is written.
For this i have used WaitForSingleObject but its not working..
here is the code

MAIN FILE
pApp->m_hEvent = ::CreateEvent(NULL, FALSE, FALSE, "FileEvent");
pSLMDoc->UpdateJobOrderInfo(m_pJobOrderInfo);
WaitForSingleObject(pApp->m_hEvent, INFINITE);
if (file.Open(strFileName, CFile::modeRead, &e) == FALSE)
{
AfxMessageBox(e.m_cause);
}
UINT nRet = file.Read(pFileJobOrder, sizeof(FILE_JOBORDER));

IN THREAD FILE
CBackupFile file;
file.WriteFile(pDBJobOrder);
delete pDBJobOrder;
::SetEvent( ((CSLMApp*) AfxGetApp())->m_hEvent );
return;

It is not wating till the time file writing is going on. And then it will throw an error in file opening..

Can u plz help me.. if u need any more input plzz tell meCry | :((

Megha
Answersome more details required ot solve. Pin
chandu00430-Aug-07 20:19
chandu00430-Aug-07 20:19 
GeneralRe: some more details required ot solve. Pin
megha_gharote30-Aug-07 20:31
megha_gharote30-Aug-07 20:31 
GeneralRe: some more details required ot solve. Pin
chandu00430-Aug-07 20:39
chandu00430-Aug-07 20:39 
GeneralRe: some more details required ot solve. Pin
Mark Salsbery30-Aug-07 20:39
Mark Salsbery30-Aug-07 20:39 
Generalsolution Pin
chandu00430-Aug-07 20:44
chandu00430-Aug-07 20:44 
GeneralRe: solution Pin
megha_gharote30-Aug-07 21:07
megha_gharote30-Aug-07 21:07 
GeneralRe: solution Pin
Nishad S30-Aug-07 21:11
Nishad S30-Aug-07 21:11 
GeneralRe: solution Pin
chandu00430-Aug-07 21:20
chandu00430-Aug-07 21:20 
GeneralRe: some more details required ot solve. Pin
JudyL_MD31-Aug-07 2:12
JudyL_MD31-Aug-07 2:12 
QuestionCFile Pin
Try30-Aug-07 20:08
Try30-Aug-07 20:08 
AnswerRe: CFile Pin
chandu00430-Aug-07 20:15
chandu00430-Aug-07 20:15 
GeneralRe: CFile Pin
Try30-Aug-07 20:21
Try30-Aug-07 20:21 
GeneralRe: CFile Pin
chandu00430-Aug-07 20:48
chandu00430-Aug-07 20:48 
GeneralRe: CFile Pin
Try30-Aug-07 20:53
Try30-Aug-07 20:53 
GeneralRe: CFile Pin
chandu00430-Aug-07 21:02
chandu00430-Aug-07 21:02 
GeneralRe: CFile Pin
Mark Salsbery31-Aug-07 6:20
Mark Salsbery31-Aug-07 6:20 
AnswerRe: CFile Pin
Nishad S30-Aug-07 21:18
Nishad S30-Aug-07 21:18 

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.