hi, i got a problem as below:
an application is launched by using shellexecute(), and the application will save a file in a directory say d:\output.
what i need to do next is to detect immediately after the new file is generated, and import the file to a clistctrl object. my code is as below:
while(TRUE)
{
dwWaitStatus = waitforsingleobject(dwchangehandle,INFINITE);
if(dwWaitStatus ==WAIT_OBJECT_0)
{
fileflag = true;
break;}
}
loadFile(filename);
the loadfile function is to read the file and load it to the clistctrl.
but when i running the program, it generated an error saying:"a sharing violation occurred while accessing d:\ouput\newfilename.csv"
i guess i need to use the findnextchangenotification () or findclosechangenotification(). but i have no idea how to use them.
could anyone help me with this?
thanks!
regards,
kaya
an application is launched by using shellexecute(), and the application will save a file in a directory say d:\output.
what i need to do next is to detect immediately after the new file is generated, and import the file to a clistctrl object. my code is as below:
while(TRUE)
{
dwWaitStatus = waitforsingleobject(dwchangehandle,INFINITE);
if(dwWaitStatus ==WAIT_OBJECT_0)
{
fileflag = true;
break;}
}
loadFile(filename);
the loadfile function is to read the file and load it to the clistctrl.
but when i running the program, it generated an error saying:"a sharing violation occurred while accessing d:\ouput\newfilename.csv"
i guess i need to use the findnextchangenotification () or findclosechangenotification(). but i have no idea how to use them.
could anyone help me with this?
thanks!
regards,
kaya