Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

how to use FindFirstChangeNotice() series

Status
Not open for further replies.

kaya17

Programmer
Feb 9, 2004
78
SG
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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top