Click here to Skip to main content
16,007,885 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Logon Domain and Userid Pin
Chris Meech17-May-01 6:43
Chris Meech17-May-01 6:43 
Generaldetecting IP Pin
17-May-01 5:54
suss17-May-01 5:54 
GeneralRe: detecting IP Pin
Pavlos Touboulidis17-May-01 13:51
Pavlos Touboulidis17-May-01 13:51 
GeneralRe: detecting IP Pin
BLaZe19-May-01 3:24
BLaZe19-May-01 3:24 
GeneralA Black View Pin
Bilal Naveed17-May-01 5:11
Bilal Naveed17-May-01 5:11 
GeneralRe: A Black View Pin
Tomasz Sowinski17-May-01 5:22
Tomasz Sowinski17-May-01 5:22 
GeneralDifferent behaviour WinNT vs Win2000 using Socks... Pin
Carlos Marcão17-May-01 5:11
Carlos Marcão17-May-01 5:11 
General::FindNextChangeNotification Pin
17-May-01 4:41
suss17-May-01 4:41 
HELP! I'm launching a thread (code snippet below) that is supposed to monitor the directory c:\MyFolder for any file creations/deletions using ::FindNextChangeNotification. I'm getting a valid handle from the ::FindFirstChangeNotification but I am _not_ getting a change notification when I move a file into the directory or delete a file form the directory. I thought that the system records the change and the WaitForSingleObject call after the ::FindNextChangeNotification call would detect the change but nothing is happening. Any ideas? THanks.

unsigned __stdcall CEventChange::WatchThread(LPVOID pThis)
{
HANDLE hChange = ::FindFirstChangeNotification("c:\\MyFolder", TRUE, FILE_NOTIFY_CHANGE_FILE_NAME);
if(hChange == INVALID_HANDLE_VALUE)
{
// do error processing
return 1;
}

BOOL bReturn;
while(true)
{
bReturn = ::FindNextChangeNotification(hChange);
// check function status
if(bReturn != 0)
{
dwMessageId = WaitForSingleObject(hChange, 0);
if(dwMessageId == WAIT_OBJECT_0)
{
// process event change;
}
else if(dwMessageId == WAIT_FAILED)
{
// do error processing
}
}
else
{
// do error processing
}

Sleep(pThisObject->m_dwInterval);
}
::FindCloseChangeNotification(hChange);
return 0;
}


GeneralRe: ::FindNextChangeNotification Pin
17-May-01 5:25
suss17-May-01 5:25 
GeneralRe: ::FindNextChangeNotification Pin
17-May-01 11:06
suss17-May-01 11:06 
GeneralMetafiles & RTF Pin
17-May-01 4:31
suss17-May-01 4:31 
GeneralRate of change of Pixel intensity Pin
mr200317-May-01 3:00
mr200317-May-01 3:00 
GeneralRe: Rate of change of Pixel intensity Pin
Christian Graus17-May-01 13:03
protectorChristian Graus17-May-01 13:03 
GeneralRate of change of Pixel intensity Pin
mr200317-May-01 2:48
mr200317-May-01 2:48 
GeneralNT Service Pin
Roger17-May-01 2:42
Roger17-May-01 2:42 
GeneralRe: NT Service Pin
17-May-01 3:21
suss17-May-01 3:21 
GeneralRe: NT Service Pin
Tomasz Sowinski17-May-01 3:35
Tomasz Sowinski17-May-01 3:35 
GeneralRe: NT Service Pin
17-May-01 3:43
suss17-May-01 3:43 
GeneralRegarding notification through events to remote machines Pin
Yamuna17-May-01 2:32
Yamuna17-May-01 2:32 
Generalcasting Pin
hearties16-May-01 23:12
hearties16-May-01 23:12 
GeneralRe: casting Pin
Christian Graus17-May-01 1:13
protectorChristian Graus17-May-01 1:13 
GeneralRe: casting Pin
Tomasz Sowinski17-May-01 1:37
Tomasz Sowinski17-May-01 1:37 
GeneralList of lists Pin
16-May-01 23:10
suss16-May-01 23:10 
GeneralRe: List of lists Pin
markkuk16-May-01 23:35
markkuk16-May-01 23:35 
GeneralRe: List of lists Pin
17-May-01 18:41
suss17-May-01 18:41 

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.