Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

74 lines
2.0 KiB

/*++
Copyright (c) 1997 Microsoft Corporation
Module Name :
aspdirmon.cpp
Abstract:
This module includes derivation of class supporting change
notification for ASP template cache, from abstract class DIR_MON_ENTRY
Author:
Charles Grant ( cgrant ) June-1997
Revision History:
--*/
#ifndef _CACHEDIRMON_H
#define _CACHEDIRMON_H
// ASP-customized file notification filter
// see Winnt.h for valid flags, only valid for NT
#define FILE_NOTIFY_FILTER (FILE_NOTIFY_CHANGE_FILE_NAME | \
FILE_NOTIFY_CHANGE_DIR_NAME | \
FILE_NOTIFY_CHANGE_ATTRIBUTES | \
FILE_NOTIFY_CHANGE_SIZE | \
FILE_NOTIFY_CHANGE_LAST_WRITE | \
FILE_NOTIFY_CHANGE_SECURITY)
// Number of times we will try to get request notification
#define MAX_NOTIFICATION_FAILURES 3
/************************************************************
* Include Headers
************************************************************/
# include "dirmon.h"
# include "reftrace.h"
class CASPDirMonitorEntry : public CDirMonitorEntry
{
private:
DWORD m_cNotificationFailures;
BOOL ActOnNotification(DWORD dwStatus, DWORD dwBytesWritten);
void FileChanged(const char *pszScriptName, bool fFileWasRemoved);
public:
CASPDirMonitorEntry();
~CASPDirMonitorEntry();
VOID AddRef(VOID);
BOOL Release(VOID);
BOOL FPathMonitored(LPCSTR pszPath);
// Trace Log info
static PTRACE_LOG gm_pTraceLog;
};
BOOL RegisterASPDirMonitorEntry(LPCSTR pszDirectory, CASPDirMonitorEntry **ppDME, BOOL fWatchSubDirs = FALSE);
BOOL ConvertToLongFileName(const char *pszPath, const char *pszName, WIN32_FIND_DATA *pwfd);
/*===================================================================
Globals
===================================================================*/
extern CDirMonitor *g_pDirMonitor;
#endif /* _CACHEDIRMON_H */