ReactOS  0.4.15-dev-994-ga9f6032
changenotify.cpp File Reference
#include "precomp.h"
Include dependency graph for changenotify.cpp:

Go to the source code of this file.

Classes

class  CChangeNotifyBroker
 
struct  ALIAS_PIDL
 

Macros

#define DUMPEV(x)   ,( event & SHCNE_##x )? #x " " : ""
 

Typedefs

typedef CWinTraits< WS_POPUP|WS_CLIPSIBLINGS|WS_CLIPCHILDREN, WS_EX_TOOLWINDOWCBrokerTraits
 

Functions

 WINE_DEFAULT_DEBUG_CHANNEL (shcn)
 
static HWND GetNotificationServer (BOOL bCreate)
 
EXTERN_C void InitChangeNotifications (void)
 
EXTERN_C void FreeChangeNotifications (void)
 
static HWND CreateNotificationBroker (HWND hwnd, UINT wMsg)
 
static HANDLE CreateNotificationParam (LONG wEventId, UINT uFlags, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, DWORD dwOwnerPID, DWORD dwTick)
 
static LPHANDBAG DoGetHandbagFromTicket (HANDLE hTicket, DWORD dwOwnerPID)
 
static HANDLE CreateRegistrationParam (ULONG nRegID, HWND hwnd, UINT wMsg, INT fSources, LONG fEvents, LONG fRecursive, LPCITEMIDLIST pidl, DWORD dwOwnerPID, HWND hwndBroker)
 
static void CreateNotificationParamAndSend (LONG wEventId, UINT uFlags, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, DWORD dwTick)
 
static VOID DoInitAliasPIDLs (void)
 
static BOOL DoGetAliasPIDLs (LPITEMIDLIST apidls[2], PCIDLIST_ABSOLUTE pidl)
 
EXTERN_C ULONG WINAPI SHChangeNotifyRegister (HWND hwnd, INT fSources, LONG wEventMask, UINT uMsg, INT cItems, SHChangeNotifyEntry *lpItems)
 
EXTERN_C BOOL WINAPI SHChangeNotifyDeregister (ULONG hNotify)
 
EXTERN_C BOOL WINAPI SHChangeNotifyUpdateEntryList (DWORD unknown1, DWORD unknown2, DWORD unknown3, DWORD unknown4)
 
static LPCSTR DumpEvent (LONG event)
 
EXTERN_C BOOL WINAPI SHChangeRegistrationReceive (LPVOID lpUnknown1, DWORD dwUnknown2)
 
EXTERN_C VOID WINAPI SHChangeNotifyReceiveEx (LONG lEvent, UINT uFlags, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, DWORD dwTick)
 
EXTERN_C VOID WINAPI SHChangeNotifyReceive (LONG lEvent, UINT uFlags, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
 
EXTERN_C VOID WINAPI SHChangeNotifyTransmit (LONG lEvent, UINT uFlags, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, DWORD dwTick)
 
EXTERN_C void WINAPI SHChangeNotify (LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
 
EXTERN_C ULONG WINAPI NTSHChangeNotifyRegister (HWND hwnd, INT fSources, LONG fEvents, UINT msg, INT count, SHChangeNotifyEntry *idlist)
 
EXTERN_C HANDLE WINAPI SHChangeNotification_Lock (HANDLE hTicket, DWORD dwOwnerPID, LPITEMIDLIST **lppidls, LPLONG lpwEventId)
 
EXTERN_C BOOL WINAPI SHChangeNotification_Unlock (HANDLE hLock)
 
EXTERN_C DWORD WINAPI NTSHChangeNotifyDeregister (ULONG hNotify)
 
EXTERN_C BOOL WINAPI SHChangeNotifySuspendResume (BOOL bSuspend, LPITEMIDLIST pidl, BOOL bRecursive, DWORD dwReserved)
 

Variables

CRITICAL_SECTION SHELL32_ChangenotifyCS
 
static ALIAS_PIDL AliasPIDLs []
 

Macro Definition Documentation

◆ DUMPEV

#define DUMPEV (   x)    ,( event & SHCNE_##x )? #x " " : ""

Typedef Documentation

◆ CBrokerTraits

Function Documentation

◆ CreateNotificationBroker()

static HWND CreateNotificationBroker ( HWND  hwnd,
UINT  wMsg 
)
static

Definition at line 132 of file changenotify.cpp.

133 {
134  // Create a new broker. It will be freed when the window gets destroyed
135  CChangeNotifyBroker* pBroker = new CChangeNotifyBroker(hwnd, wMsg);
136  if (pBroker == NULL)
137  {
138  ERR("Out of memory\n");
139  return NULL;
140  }
141 
142  HWND hwndBroker = pBroker->Create(0);
143  if (hwndBroker == NULL)
144  {
145  ERR("hwndBroker == NULL\n");
146  delete pBroker;
147  }
148 
149  return hwndBroker;
150 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
HWND Create(HWND hWndParent, _U_RECT rect=NULL, LPCTSTR szWindowName=NULL, DWORD dwStyle=0, DWORD dwExStyle=0, _U_MENUorID MenuOrID=0U, LPVOID lpCreateParam=NULL)
Definition: atlwin.h:1637
smooth NULL
Definition: ftsmooth.c:416
#define ERR(fmt,...)
Definition: debug.h:110

Referenced by SHChangeNotifyRegister().

◆ CreateNotificationParam()

static HANDLE CreateNotificationParam ( LONG  wEventId,
UINT  uFlags,
LPCITEMIDLIST  pidl1,
LPCITEMIDLIST  pidl2,
DWORD  dwOwnerPID,
DWORD  dwTick 
)
static

Definition at line 155 of file changenotify.cpp.

157 {
158  // pidl1 and pidl2 have variable length. To store them into the delivery ticket,
159  // we have to consider the offsets and the sizes of pidl1 and pidl2.
160  DWORD cbPidl1 = 0, cbPidl2 = 0, ibOffset1 = 0, ibOffset2 = 0;
161  if (pidl1)
162  {
163  cbPidl1 = ILGetSize(pidl1);
164  ibOffset1 = DWORD_ALIGNMENT(sizeof(DELITICKET));
165  }
166  if (pidl2)
167  {
168  cbPidl2 = ILGetSize(pidl2);
169  ibOffset2 = DWORD_ALIGNMENT(ibOffset1 + cbPidl1);
170  }
171 
172  // allocate the delivery ticket
173  DWORD cbSize = ibOffset2 + cbPidl2;
174  HANDLE hTicket = SHAllocShared(NULL, cbSize, dwOwnerPID);
175  if (hTicket == NULL)
176  {
177  ERR("Out of memory\n");
178  return NULL;
179  }
180 
181  // lock the ticket
182  LPDELITICKET pTicket = (LPDELITICKET)SHLockSharedEx(hTicket, dwOwnerPID, TRUE);
183  if (pTicket == NULL)
184  {
185  ERR("SHLockSharedEx failed\n");
186  SHFreeShared(hTicket, dwOwnerPID);
187  return NULL;
188  }
189 
190  // populate the ticket
191  pTicket->dwMagic = DELITICKET_MAGIC;
192  pTicket->wEventId = wEventId;
193  pTicket->uFlags = uFlags;
194  pTicket->ibOffset1 = ibOffset1;
195  pTicket->ibOffset2 = ibOffset2;
196  if (pidl1)
197  memcpy((LPBYTE)pTicket + ibOffset1, pidl1, cbPidl1);
198  if (pidl2)
199  memcpy((LPBYTE)pTicket + ibOffset2, pidl2, cbPidl2);
200 
201  // unlock the ticket and return
202  SHUnlockShared(pTicket);
203  return hTicket;
204 }
PVOID WINAPI SHLockSharedEx(HANDLE hData, DWORD dwProcessId, BOOL bWriteAccess)
#define TRUE
Definition: types.h:120
#define DELITICKET_MAGIC
UINT uFlags
Definition: api.c:59
unsigned char * LPBYTE
Definition: typedefs.h:53
smooth NULL
Definition: ftsmooth.c:416
HANDLE WINAPI SHAllocShared(LPCVOID lpvData, DWORD dwSize, DWORD dwProcId)
Definition: ordinal.c:162
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL WINAPI SHFreeShared(HANDLE hShared, DWORD dwProcId)
Definition: ordinal.c:308
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define ERR(fmt,...)
Definition: debug.h:110
struct DELITICKET * LPDELITICKET
#define ILGetSize
Definition: shellclasses.h:638
BOOL WINAPI SHUnlockShared(LPVOID lpView)
Definition: ordinal.c:288
#define DWORD_ALIGNMENT(offset)

Referenced by CreateNotificationParamAndSend().

◆ CreateNotificationParamAndSend()

static void CreateNotificationParamAndSend ( LONG  wEventId,
UINT  uFlags,
LPCITEMIDLIST  pidl1,
LPCITEMIDLIST  pidl2,
DWORD  dwTick 
)
static

Definition at line 297 of file changenotify.cpp.

299 {
300  // get server window
301  HWND hwndServer = GetNotificationServer(FALSE);
302  if (hwndServer == NULL)
303  return;
304 
305  // the ticket owner is the process of the notification server
306  DWORD pid;
307  GetWindowThreadProcessId(hwndServer, &pid);
308 
309  // create a delivery ticket
310  HANDLE hTicket = CreateNotificationParam(wEventId, uFlags, pidl1, pidl2, pid, dwTick);
311  if (hTicket == NULL)
312  return;
313 
314  TRACE("hTicket: %p, 0x%lx\n", hTicket, pid);
315 
316  // send the ticket by using CN_DELIVER_NOTIFICATION
317  if (pid != GetCurrentProcessId() ||
319  {
320  SendMessageW(hwndServer, CN_DELIVER_NOTIFICATION, (WPARAM)hTicket, pid);
321  }
322  else
323  {
324  SendNotifyMessageW(hwndServer, CN_DELIVER_NOTIFICATION, (WPARAM)hTicket, pid);
325  }
326 }
static HWND GetNotificationServer(BOOL bCreate)
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
Definition: winddi.h:3835
UINT_PTR WPARAM
Definition: windef.h:207
UINT uFlags
Definition: api.c:59
BOOL WINAPI SendNotifyMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define FALSE
Definition: types.h:117
DWORD WINAPI GetWindowThreadProcessId(HWND, PDWORD)
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SHCNF_FLUSH
Definition: shlobj.h:1767
#define CN_DELIVER_NOTIFICATION
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define SHCNF_FLUSHNOWAIT
Definition: shlobj.h:1768
DWORD WINAPI GetCurrentProcessId(VOID)
Definition: proc.c:1158
static HANDLE CreateNotificationParam(LONG wEventId, UINT uFlags, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, DWORD dwOwnerPID, DWORD dwTick)

Referenced by SHChangeNotifyReceiveEx().

◆ CreateRegistrationParam()

static HANDLE CreateRegistrationParam ( ULONG  nRegID,
HWND  hwnd,
UINT  wMsg,
INT  fSources,
LONG  fEvents,
LONG  fRecursive,
LPCITEMIDLIST  pidl,
DWORD  dwOwnerPID,
HWND  hwndBroker 
)
static

Definition at line 246 of file changenotify.cpp.

249 {
250  // pidl has variable length. To store it into the registration entry,
251  // we have to consider the length of pidl.
252  DWORD cbPidl = ILGetSize(pidl);
253  DWORD ibPidl = DWORD_ALIGNMENT(sizeof(REGENTRY));
254  DWORD cbSize = ibPidl + cbPidl;
255 
256  // create the registration entry and lock it
257  HANDLE hRegEntry = SHAllocShared(NULL, cbSize, dwOwnerPID);
258  if (hRegEntry == NULL)
259  {
260  ERR("Out of memory\n");
261  return NULL;
262  }
263  LPREGENTRY pRegEntry = (LPREGENTRY)SHLockSharedEx(hRegEntry, dwOwnerPID, TRUE);
264  if (pRegEntry == NULL)
265  {
266  ERR("SHLockSharedEx failed\n");
267  SHFreeShared(hRegEntry, dwOwnerPID);
268  return NULL;
269  }
270 
271  // populate the registration entry
272  pRegEntry->dwMagic = REGENTRY_MAGIC;
273  pRegEntry->cbSize = cbSize;
274  pRegEntry->nRegID = nRegID;
275  pRegEntry->hwnd = hwnd;
276  pRegEntry->uMsg = wMsg;
277  pRegEntry->fSources = fSources;
278  pRegEntry->fEvents = fEvents;
279  pRegEntry->fRecursive = fRecursive;
280  pRegEntry->hwndBroker = hwndBroker;
281  pRegEntry->ibPidl = 0;
282  if (pidl)
283  {
284  pRegEntry->ibPidl = ibPidl;
285  memcpy((LPBYTE)pRegEntry + ibPidl, pidl, cbPidl);
286  }
287 
288  // unlock and return
289  SHUnlockShared(pRegEntry);
290  return hRegEntry;
291 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
PVOID WINAPI SHLockSharedEx(HANDLE hData, DWORD dwProcessId, BOOL bWriteAccess)
#define TRUE
Definition: types.h:120
#define REGENTRY_MAGIC
unsigned char * LPBYTE
Definition: typedefs.h:53
smooth NULL
Definition: ftsmooth.c:416
HANDLE WINAPI SHAllocShared(LPCVOID lpvData, DWORD dwSize, DWORD dwProcId)
Definition: ordinal.c:162
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL WINAPI SHFreeShared(HANDLE hShared, DWORD dwProcId)
Definition: ordinal.c:308
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
#define ERR(fmt,...)
Definition: debug.h:110
#define ILGetSize
Definition: shellclasses.h:638
BOOL WINAPI SHUnlockShared(LPVOID lpView)
Definition: ordinal.c:288
struct REGENTRY * LPREGENTRY
#define DWORD_ALIGNMENT(offset)

Referenced by SHChangeNotifyRegister().

◆ DoGetAliasPIDLs()

static BOOL DoGetAliasPIDLs ( LPITEMIDLIST  apidls[2],
PCIDLIST_ABSOLUTE  pidl 
)
static

Definition at line 364 of file changenotify.cpp.

365 {
367 
368  apidls[0] = apidls[1] = NULL;
369 
370  INT k = 0;
371  for (SIZE_T i = 0; i < _countof(AliasPIDLs); ++i)
372  {
373  const ALIAS_PIDL *alias = &AliasPIDLs[i];
374  if (ILIsEqual(pidl, alias->pidl1))
375  {
376  if (alias->csidl1 == alias->csidl2)
377  {
378  apidls[k++] = ILCreateFromPathW(alias->szPath2);
379  }
380  else
381  {
382  apidls[k++] = ILClone(alias->pidl2);
383  }
384  if (k >= 2)
385  break;
386  }
387  }
388 
389  return k > 0;
390 }
static ALIAS_PIDL AliasPIDLs[]
BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:535
int32_t INT
Definition: typedefs.h:58
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define _countof(array)
Definition: sndvol32.h:68
static VOID DoInitAliasPIDLs(void)
const WCHAR * alias
Definition: main.c:67
ULONG_PTR SIZE_T
Definition: typedefs.h:80
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path)
Definition: pidl.c:982
int k
Definition: mpi.c:3369

Referenced by SHChangeNotifyRegister().

◆ DoGetHandbagFromTicket()

static LPHANDBAG DoGetHandbagFromTicket ( HANDLE  hTicket,
DWORD  dwOwnerPID 
)
static

Definition at line 211 of file changenotify.cpp.

212 {
213  // lock and validate the delivery ticket
214  LPDELITICKET pTicket = (LPDELITICKET)SHLockSharedEx(hTicket, dwOwnerPID, FALSE);
215  if (pTicket == NULL || pTicket->dwMagic != DELITICKET_MAGIC)
216  {
217  ERR("pTicket is invalid\n");
218  SHUnlockShared(pTicket);
219  return NULL;
220  }
221 
222  // allocate the handbag
223  LPHANDBAG pHandbag = (LPHANDBAG)LocalAlloc(LMEM_FIXED, sizeof(HANDBAG));
224  if (pHandbag == NULL)
225  {
226  ERR("Out of memory\n");
227  SHUnlockShared(pTicket);
228  return NULL;
229  }
230 
231  // populate the handbag
232  pHandbag->dwMagic = HANDBAG_MAGIC;
233  pHandbag->pTicket = pTicket;
234 
235  pHandbag->pidls[0] = pHandbag->pidls[1] = NULL;
236  if (pTicket->ibOffset1)
237  pHandbag->pidls[0] = (LPITEMIDLIST)((LPBYTE)pTicket + pTicket->ibOffset1);
238  if (pTicket->ibOffset2)
239  pHandbag->pidls[1] = (LPITEMIDLIST)((LPBYTE)pTicket + pTicket->ibOffset2);
240 
241  return pHandbag;
242 }
#define HANDBAG_MAGIC
PVOID WINAPI SHLockSharedEx(HANDLE hData, DWORD dwProcessId, BOOL bWriteAccess)
#define DELITICKET_MAGIC
unsigned char * LPBYTE
Definition: typedefs.h:53
#define FALSE
Definition: types.h:117
LPDELITICKET pTicket
smooth NULL
Definition: ftsmooth.c:416
LPITEMIDLIST pidls[2]
#define LMEM_FIXED
Definition: winbase.h:349
struct HANDBAG * LPHANDBAG
#define ERR(fmt,...)
Definition: debug.h:110
struct DELITICKET * LPDELITICKET
BOOL WINAPI SHUnlockShared(LPVOID lpView)
Definition: ordinal.c:288
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
Definition: heapmem.c:1373
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41

Referenced by SHChangeNotification_Lock().

◆ DoInitAliasPIDLs()

static VOID DoInitAliasPIDLs ( void  )
static

Definition at line 345 of file changenotify.cpp.

346 {
347  static BOOL s_bInit = FALSE;
348  if (!s_bInit)
349  {
350  for (SIZE_T i = 0; i < _countof(AliasPIDLs); ++i)
351  {
353 
354  SHGetSpecialFolderLocation(NULL, alias->csidl1, &alias->pidl1);
355  SHGetPathFromIDListW(alias->pidl1, alias->szPath1);
356 
357  SHGetSpecialFolderLocation(NULL, alias->csidl2, &alias->pidl2);
358  SHGetPathFromIDListW(alias->pidl2, alias->szPath2);
359  }
360  s_bInit = TRUE;
361  }
362 }
static ALIAS_PIDL AliasPIDLs[]
#define TRUE
Definition: types.h:120
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
Definition: pidl.c:1294
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
Definition: shellpath.c:2830
#define _countof(array)
Definition: sndvol32.h:68
const WCHAR * alias
Definition: main.c:67
ULONG_PTR SIZE_T
Definition: typedefs.h:80

Referenced by DoGetAliasPIDLs().

◆ DumpEvent()

static LPCSTR DumpEvent ( LONG  event)
static

Definition at line 560 of file changenotify.cpp.

561 {
562  if (event == SHCNE_ALLEVENTS)
563  return "SHCNE_ALLEVENTS";
564 #define DUMPEV(x) ,( event & SHCNE_##x )? #x " " : ""
565  return wine_dbg_sprintf( "%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s%s"
566  DUMPEV(RENAMEITEM)
567  DUMPEV(CREATE)
568  DUMPEV(DELETE)
569  DUMPEV(MKDIR)
570  DUMPEV(RMDIR)
571  DUMPEV(MEDIAINSERTED)
572  DUMPEV(MEDIAREMOVED)
573  DUMPEV(DRIVEREMOVED)
574  DUMPEV(DRIVEADD)
575  DUMPEV(NETSHARE)
576  DUMPEV(NETUNSHARE)
577  DUMPEV(ATTRIBUTES)
578  DUMPEV(UPDATEDIR)
579  DUMPEV(UPDATEITEM)
580  DUMPEV(SERVERDISCONNECT)
581  DUMPEV(UPDATEIMAGE)
582  DUMPEV(DRIVEADDGUI)
583  DUMPEV(RENAMEFOLDER)
584  DUMPEV(FREESPACE)
585  DUMPEV(EXTENDED_EVENT)
586  DUMPEV(ASSOCCHANGED)
587  DUMPEV(INTERRUPT)
588  );
589 #undef DUMPEV
590 }
#define DUMPEV(x)
const char * wine_dbg_sprintf(const char *format,...)
Definition: compat.c:296
#define SHCNE_ALLEVENTS
Definition: shlobj.h:1753
#define MKDIR(d)
Definition: compat.h:23
struct _cl_event * event
Definition: glext.h:7739
#define DELETE
Definition: nt_native.h:57

Referenced by SHChangeNotify().

◆ FreeChangeNotifications()

EXTERN_C void FreeChangeNotifications ( void  )

Definition at line 52 of file changenotify.cpp.

53 {
54  HWND hwndServer = GetNotificationServer(FALSE);
55  if (hwndServer)
58 }
static HWND GetNotificationServer(BOOL bCreate)
CRITICAL_SECTION SHELL32_ChangenotifyCS
#define FALSE
Definition: types.h:117
#define CN_UNREGISTER_PROCESS
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
DWORD WINAPI GetCurrentProcessId(VOID)
Definition: proc.c:1158

◆ GetNotificationServer()

static HWND GetNotificationServer ( BOOL  bCreate)
static

Definition at line 16 of file changenotify.cpp.

17 {
18  static HWND s_hwndServer = NULL;
19 
20  // use cache if any
21  if (s_hwndServer && IsWindow(s_hwndServer))
22  return s_hwndServer;
23 
24  // get the shell window
25  HWND hwndShell = GetShellWindow();
26  if (hwndShell == NULL)
27  {
28  TRACE("GetShellWindow() returned NULL\n");
29  return NULL;
30  }
31 
32  // Get the window of the notification server that runs in explorer
33  HWND hwndServer = (HWND)SendMessageW(hwndShell, WM_DESKTOP_GET_CNOTIFY_SERVER, bCreate, 0);
34  if (!IsWindow(hwndServer))
35  {
36  ERR("Unable to get server window\n");
37  hwndServer = NULL;
38  }
39 
40  // save and return
41  s_hwndServer = hwndServer;
42  return hwndServer;
43 }
HWND WINAPI GetShellWindow(VOID)
Definition: desktop.c:651
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define WM_DESKTOP_GET_CNOTIFY_SERVER
HANDLE HWND
Definition: compat.h:19
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
#define ERR(fmt,...)
Definition: debug.h:110
_In_ int _In_ BOOL bCreate
Definition: shlobj.h:1444
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by CreateNotificationParamAndSend(), FreeChangeNotifications(), SHChangeNotifyDeregister(), and SHChangeNotifyRegister().

◆ InitChangeNotifications()

EXTERN_C void InitChangeNotifications ( void  )

Definition at line 46 of file changenotify.cpp.

47 {
49 }
CRITICAL_SECTION SHELL32_ChangenotifyCS
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
Definition: synch.c:751

Referenced by if().

◆ NTSHChangeNotifyDeregister()

EXTERN_C DWORD WINAPI NTSHChangeNotifyDeregister ( ULONG  hNotify)

Definition at line 758 of file changenotify.cpp.

759 {
760  FIXME("(0x%08x):semi stub.\n", hNotify);
761  return SHChangeNotifyDeregister(hNotify);
762 }
#define FIXME(fmt,...)
Definition: debug.h:111
EXTERN_C BOOL WINAPI SHChangeNotifyDeregister(ULONG hNotify)

◆ NTSHChangeNotifyRegister()

EXTERN_C ULONG WINAPI NTSHChangeNotifyRegister ( HWND  hwnd,
INT  fSources,
LONG  fEvents,
UINT  msg,
INT  count,
SHChangeNotifyEntry idlist 
)

Definition at line 698 of file changenotify.cpp.

700 {
702  fEvents, msg, count, idlist);
703 }
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
GLuint GLuint GLsizei count
Definition: gl.h:1545
#define SHCNRF_NewDelivery
Definition: shlobj.h:1777
#define msg(x)
Definition: auth_time.c:54
EXTERN_C ULONG WINAPI SHChangeNotifyRegister(HWND hwnd, INT fSources, LONG wEventMask, UINT uMsg, INT cItems, SHChangeNotifyEntry *lpItems)

◆ SHChangeNotification_Lock()

EXTERN_C HANDLE WINAPI SHChangeNotification_Lock ( HANDLE  hTicket,
DWORD  dwOwnerPID,
LPITEMIDLIST **  lppidls,
LPLONG  lpwEventId 
)

Definition at line 709 of file changenotify.cpp.

711 {
712  TRACE("%p %08x %p %p\n", hTicket, dwOwnerPID, lppidls, lpwEventId);
713 
714  // create a handbag from the ticket
715  LPHANDBAG pHandbag = DoGetHandbagFromTicket(hTicket, dwOwnerPID);
716  if (pHandbag == NULL || pHandbag->dwMagic != HANDBAG_MAGIC)
717  {
718  ERR("pHandbag is invalid\n");
719  return NULL;
720  }
721 
722  // populate parameters from the handbag
723  if (lppidls)
724  *lppidls = pHandbag->pidls;
725  if (lpwEventId)
726  *lpwEventId = (pHandbag->pTicket->wEventId & ~SHCNE_INTERRUPT);
727 
728  // return the handbag
729  return pHandbag;
730 }
#define HANDBAG_MAGIC
#define SHCNE_INTERRUPT
Definition: shlobj.h:1754
LPDELITICKET pTicket
smooth NULL
Definition: ftsmooth.c:416
LPITEMIDLIST pidls[2]
#define TRACE(s)
Definition: solgame.cpp:4
#define ERR(fmt,...)
Definition: debug.h:110
static LPHANDBAG DoGetHandbagFromTicket(HANDLE hTicket, DWORD dwOwnerPID)

Referenced by CChangeNotifyBroker::BrokerNotification(), CDefView::OnChangeNotify(), OnShellNotify(), and testwindow_wndproc().

◆ SHChangeNotification_Unlock()

EXTERN_C BOOL WINAPI SHChangeNotification_Unlock ( HANDLE  hLock)

Definition at line 736 of file changenotify.cpp.

737 {
738  TRACE("%p\n", hLock);
739 
740  // validate the handbag
741  LPHANDBAG pHandbag = (LPHANDBAG)hLock;
742  if (pHandbag == NULL || pHandbag->dwMagic != HANDBAG_MAGIC)
743  {
744  ERR("pHandbag is invalid\n");
745  return FALSE;
746  }
747 
748  // free the handbag
749  BOOL ret = SHUnlockShared(pHandbag->pTicket);
750  LocalFree(hLock);
751  return ret;
752 }
#define HANDBAG_MAGIC
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
LPDELITICKET pTicket
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
int ret
struct HANDBAG * LPHANDBAG
#define ERR(fmt,...)
Definition: debug.h:110
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
BOOL WINAPI SHUnlockShared(LPVOID lpView)
Definition: ordinal.c:288

Referenced by CChangeNotifyBroker::BrokerNotification(), CDefView::OnChangeNotify(), OnShellNotify(), and testwindow_wndproc().

◆ SHChangeNotify()

EXTERN_C void WINAPI SHChangeNotify ( LONG  wEventId,
UINT  uFlags,
LPCVOID  dwItem1,
LPCVOID  dwItem2 
)

Definition at line 629 of file changenotify.cpp.

630 {
631  LPITEMIDLIST pidl1 = NULL, pidl2 = NULL, pidlTemp1 = NULL, pidlTemp2 = NULL;
632  DWORD dwTick = GetTickCount();
633  WCHAR szPath1[MAX_PATH], szPath2[MAX_PATH];
634  LPWSTR psz1, psz2;
635  TRACE("(0x%08x,0x%08x,%p,%p)\n", wEventId, uFlags, dwItem1, dwItem2);
636 
637  switch (uFlags & SHCNF_TYPE)
638  {
639  case SHCNF_IDLIST:
640  pidl1 = (LPITEMIDLIST)dwItem1;
641  pidl2 = (LPITEMIDLIST)dwItem2;
642  break;
643 
644  case SHCNF_PATHA:
645  psz1 = psz2 = NULL;
646  if (dwItem1)
647  {
648  SHAnsiToUnicode((LPCSTR)dwItem1, szPath1, _countof(szPath1));
649  psz1 = szPath1;
650  }
651  if (dwItem2)
652  {
653  SHAnsiToUnicode((LPCSTR)dwItem2, szPath2, _countof(szPath2));
654  psz2 = szPath2;
655  }
656  uFlags &= ~SHCNF_TYPE;
657  uFlags |= SHCNF_PATHW;
658  SHChangeNotify(wEventId, uFlags, psz1, psz2);
659  return;
660 
661  case SHCNF_PATHW:
662  if (dwItem1)
663  {
664  pidl1 = pidlTemp1 = SHSimpleIDListFromPathW((LPCWSTR)dwItem1);
665  }
666  if (dwItem2)
667  {
668  pidl2 = pidlTemp2 = SHSimpleIDListFromPathW((LPCWSTR)dwItem2);
669  }
670  break;
671 
672  case SHCNF_PRINTERA:
673  case SHCNF_PRINTERW:
674  FIXME("SHChangeNotify with (uFlags & SHCNF_PRINTER)\n");
675  return;
676 
677  default:
678  FIXME("unknown type %08x\n", uFlags & SHCNF_TYPE);
679  return;
680  }
681 
682  if (wEventId == 0 || (wEventId & SHCNE_ASSOCCHANGED) || pidl1 != NULL)
683  {
684  TRACE("notifying event %s(%x)\n", DumpEvent(wEventId), wEventId);
685  SHChangeNotifyTransmit(wEventId, uFlags, pidl1, pidl2, dwTick);
686  }
687 
688  if (pidlTemp1)
689  ILFree(pidlTemp1);
690  if (pidlTemp2)
691  ILFree(pidlTemp2);
692 }
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
UINT uFlags
Definition: api.c:59
#define FIXME(fmt,...)
Definition: debug.h:111
static LPCSTR DumpEvent(LONG event)
smooth NULL
Definition: ftsmooth.c:416
const char * LPCSTR
Definition: xmlstorage.h:183
#define SHCNF_PRINTERW
Definition: shlobj.h:1765
#define TRACE(s)
Definition: solgame.cpp:4
LPITEMIDLIST WINAPI SHSimpleIDListFromPathW(LPCWSTR lpszPath)
Definition: pidl.c:1120
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define _countof(array)
Definition: sndvol32.h:68
#define SHCNF_IDLIST
Definition: shlobj.h:1760
#define MAX_PATH
Definition: compat.h:34
DWORD WINAPI SHAnsiToUnicode(LPCSTR lpSrcStr, LPWSTR lpDstStr, int iLen)
Definition: string.c:2659
unsigned long DWORD
Definition: ntddk_ex.h:95
#define SHCNF_PRINTERA
Definition: shlobj.h:1762
EXTERN_C void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
#define SHCNF_TYPE
Definition: shlobj.h:1766
EXTERN_C VOID WINAPI SHChangeNotifyTransmit(LONG lEvent, UINT uFlags, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, DWORD dwTick)
#define SHCNF_PATHW
Definition: shlobj.h:1764
WCHAR * LPWSTR
Definition: xmlstorage.h:184
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
#define SHCNF_PATHA
Definition: shlobj.h:1761
#define SHCNE_ASSOCCHANGED
Definition: shlobj.h:1750

Referenced by CFSDropTarget::_DoDrop(), delete_files(), CDefaultContextMenu::DoCreateNewFolder(), DoTestEntry(), DrivesContextMenuCallback(), EditTypeDlg_OnOK(), FinishDlgProc(), CZipCreatorImpl::JustDoIt(), JustDoIt(), NotifyFileSystemChange(), CLayerUIPropPage::OnApply(), CShellLink::OnNotify(), CShellLink::Save(), CNewMenu::SelectNewItem(), CFSFolder::SetNameOf(), SHChangeNotify(), SHChangeNotifyWrap(), SHNotifyCopyFileW(), SHNotifyCreateDirectoryW(), SHNotifyDeleteFileW(), SHNotifyMoveFileW(), SHNotifyRemoveDirectoryW(), test_SHChangeNotify(), VfdCloseImage(), VfdOpenImage(), and WelcomeDlgProc().

◆ SHChangeNotifyDeregister()

EXTERN_C BOOL WINAPI SHChangeNotifyDeregister ( ULONG  hNotify)

Definition at line 530 of file changenotify.cpp.

531 {
532  TRACE("(0x%08x)\n", hNotify);
533 
534  // get the server window
535  HWND hwndServer = GetNotificationServer(FALSE);
536  if (hwndServer == NULL)
537  return FALSE;
538 
539  // send CN_UNREGISTER message and try to unregister
540  BOOL ret = (BOOL)SendMessageW(hwndServer, CN_UNREGISTER, hNotify, 0);
541  if (!ret)
542  ERR("CN_UNREGISTER failed\n");
543 
544  return ret;
545 }
static HWND GetNotificationServer(BOOL bCreate)
#define BOOL
Definition: nt_native.h:43
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
int ret
#define ERR(fmt,...)
Definition: debug.h:110
#define CN_UNREGISTER
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by BrsFolder_OnDestroy(), NTSHChangeNotifyDeregister(), OnDestroy(), CDefView::OnDestroy(), and test_SHChangeNotify().

◆ SHChangeNotifyReceive()

EXTERN_C VOID WINAPI SHChangeNotifyReceive ( LONG  lEvent,
UINT  uFlags,
LPCITEMIDLIST  pidl1,
LPCITEMIDLIST  pidl2 
)

Definition at line 614 of file changenotify.cpp.

615 {
617 }
DWORD WINAPI GetTickCount(VOID)
Definition: time.c:455
UINT uFlags
Definition: api.c:59
HANDLE lEvent
Definition: tftpd.cpp:56
EXTERN_C VOID WINAPI SHChangeNotifyReceiveEx(LONG lEvent, UINT uFlags, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, DWORD dwTick)

◆ SHChangeNotifyReceiveEx()

EXTERN_C VOID WINAPI SHChangeNotifyReceiveEx ( LONG  lEvent,
UINT  uFlags,
LPCITEMIDLIST  pidl1,
LPCITEMIDLIST  pidl2,
DWORD  dwTick 
)

Definition at line 603 of file changenotify.cpp.

605 {
606  // TODO: Queueing notifications
607  CreateNotificationParamAndSend(lEvent, uFlags, pidl1, pidl2, dwTick);
608 }
UINT uFlags
Definition: api.c:59
static void CreateNotificationParamAndSend(LONG wEventId, UINT uFlags, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, DWORD dwTick)
HANDLE lEvent
Definition: tftpd.cpp:56

Referenced by SHChangeNotifyReceive(), and SHChangeNotifyTransmit().

◆ SHChangeNotifyRegister()

EXTERN_C ULONG WINAPI SHChangeNotifyRegister ( HWND  hwnd,
INT  fSources,
LONG  wEventMask,
UINT  uMsg,
INT  cItems,
SHChangeNotifyEntry lpItems 
)

Definition at line 396 of file changenotify.cpp.

398 {
399  HWND hwndServer, hwndBroker = NULL;
400  HANDLE hRegEntry;
401  INT iItem;
402  ULONG nRegID = INVALID_REG_ID;
403  DWORD dwOwnerPID;
404  LPREGENTRY pRegEntry;
405 
406  TRACE("(%p,0x%08x,0x%08x,0x%08x,%d,%p)\n",
407  hwnd, fSources, wEventMask, uMsg, cItems, lpItems);
408 
409  // sanity check
410  if (wEventMask == 0 || cItems <= 0 || cItems > 0x7FFF || lpItems == NULL ||
411  hwnd == NULL || !IsWindow(hwnd))
412  {
413  return INVALID_REG_ID;
414  }
415 
416  // request the window of the server
417  hwndServer = GetNotificationServer(TRUE);
418  if (hwndServer == NULL)
419  return INVALID_REG_ID;
420 
421  // disable recursive interrupt in specific condition
422  if ((fSources & SHCNRF_RecursiveInterrupt) && !(fSources & SHCNRF_InterruptLevel))
423  {
424  fSources &= ~SHCNRF_RecursiveInterrupt;
425  }
426 
427  // if it is old delivery method, then create a broker window
428  if ((fSources & SHCNRF_NewDelivery) == 0)
429  {
430  hwndBroker = hwnd = CreateNotificationBroker(hwnd, uMsg);
431  uMsg = WM_BROKER_NOTIFICATION;
432  }
433 
434  // The owner PID is the process ID of the server
435  GetWindowThreadProcessId(hwndServer, &dwOwnerPID);
436 
438  for (iItem = 0; iItem < cItems; ++iItem)
439  {
440  // create a registration entry
441  hRegEntry = CreateRegistrationParam(nRegID, hwnd, uMsg, fSources, wEventMask,
442  lpItems[iItem].fRecursive, lpItems[iItem].pidl,
443  dwOwnerPID, hwndBroker);
444  if (hRegEntry)
445  {
446  TRACE("CN_REGISTER: hwnd:%p, hRegEntry:%p, pid:0x%lx\n",
447  hwndServer, hRegEntry, dwOwnerPID);
448 
449  // send CN_REGISTER to the server
450  SendMessageW(hwndServer, CN_REGISTER, (WPARAM)hRegEntry, dwOwnerPID);
451 
452  // update nRegID
453  pRegEntry = (LPREGENTRY)SHLockSharedEx(hRegEntry, dwOwnerPID, FALSE);
454  if (pRegEntry)
455  {
456  nRegID = pRegEntry->nRegID;
457  SHUnlockShared(pRegEntry);
458  }
459 
460  // free registration entry
461  SHFreeShared(hRegEntry, dwOwnerPID);
462  }
463 
464  if (nRegID == INVALID_REG_ID)
465  {
466  ERR("Delivery failed\n");
467 
468  if (hwndBroker)
469  {
470  // destroy the broker
471  DestroyWindow(hwndBroker);
472  }
473  break;
474  }
475 
476  // PIDL alias
477  LPITEMIDLIST apidlAlias[2];
478  if (DoGetAliasPIDLs(apidlAlias, lpItems[iItem].pidl))
479  {
480  if (apidlAlias[0])
481  {
482  // create another registration entry
483  hRegEntry = CreateRegistrationParam(nRegID, hwnd, uMsg, fSources, wEventMask,
484  lpItems[iItem].fRecursive, apidlAlias[0],
485  dwOwnerPID, hwndBroker);
486  if (hRegEntry)
487  {
488  TRACE("CN_REGISTER: hwnd:%p, hRegEntry:%p, pid:0x%lx\n",
489  hwndServer, hRegEntry, dwOwnerPID);
490 
491  // send CN_REGISTER to the server
492  SendMessageW(hwndServer, CN_REGISTER, (WPARAM)hRegEntry, dwOwnerPID);
493 
494  // free registration entry
495  SHFreeShared(hRegEntry, dwOwnerPID);
496  }
497  ILFree(apidlAlias[0]);
498  }
499 
500  if (apidlAlias[1])
501  {
502  // create another registration entry
503  hRegEntry = CreateRegistrationParam(nRegID, hwnd, uMsg, fSources, wEventMask,
504  lpItems[iItem].fRecursive, apidlAlias[1],
505  dwOwnerPID, hwndBroker);
506  if (hRegEntry)
507  {
508  TRACE("CN_REGISTER: hwnd:%p, hRegEntry:%p, pid:0x%lx\n",
509  hwndServer, hRegEntry, dwOwnerPID);
510 
511  // send CN_REGISTER to the server
512  SendMessageW(hwndServer, CN_REGISTER, (WPARAM)hRegEntry, dwOwnerPID);
513 
514  // free registration entry
515  SHFreeShared(hRegEntry, dwOwnerPID);
516  }
517  ILFree(apidlAlias[1]);
518  }
519  }
520  }
522 
523  return nRegID;
524 }
static HWND GetNotificationServer(BOOL bCreate)
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
static HWND CreateNotificationBroker(HWND hwnd, UINT wMsg)
PVOID WINAPI SHLockSharedEx(HANDLE hData, DWORD dwProcessId, BOOL bWriteAccess)
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
CRITICAL_SECTION SHELL32_ChangenotifyCS
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define TRUE
Definition: types.h:120
#define SHCNRF_RecursiveInterrupt
Definition: shlobj.h:1776
UINT_PTR WPARAM
Definition: windef.h:207
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
BOOL WINAPI DestroyWindow(_In_ HWND)
int32_t INT
Definition: typedefs.h:58
#define INVALID_REG_ID
#define CN_REGISTER
#define FALSE
Definition: types.h:117
DWORD WINAPI GetWindowThreadProcessId(HWND, PDWORD)
#define SHCNRF_InterruptLevel
Definition: shlobj.h:1774
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
unsigned long DWORD
Definition: ntddk_ex.h:95
#define WM_BROKER_NOTIFICATION
BOOL WINAPI SHFreeShared(HANDLE hShared, DWORD dwProcId)
Definition: ordinal.c:308
#define SHCNRF_NewDelivery
Definition: shlobj.h:1777
#define ERR(fmt,...)
Definition: debug.h:110
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
static HANDLE CreateRegistrationParam(ULONG nRegID, HWND hwnd, UINT wMsg, INT fSources, LONG fEvents, LONG fRecursive, LPCITEMIDLIST pidl, DWORD dwOwnerPID, HWND hwndBroker)
BOOL WINAPI SHUnlockShared(LPVOID lpView)
Definition: ordinal.c:288
unsigned int ULONG
Definition: retypes.h:1
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
struct REGENTRY * LPREGENTRY
static BOOL DoGetAliasPIDLs(LPITEMIDLIST apidls[2], PCIDLIST_ABSOLUTE pidl)

Referenced by BrsFolder_OnCreate(), CExplorerBand::InitializeExplorerBand(), NTSHChangeNotifyRegister(), OnCreate(), CDefView::OnCreate(), and test_SHChangeNotify().

◆ SHChangeNotifySuspendResume()

EXTERN_C BOOL WINAPI SHChangeNotifySuspendResume ( BOOL  bSuspend,
LPITEMIDLIST  pidl,
BOOL  bRecursive,
DWORD  dwReserved 
)

Definition at line 769 of file changenotify.cpp.

773 {
774  FIXME("SHChangeNotifySuspendResume() stub\n");
775  return FALSE;
776 }
#define FALSE
Definition: types.h:117
#define FIXME(fmt,...)
Definition: debug.h:111

◆ SHChangeNotifyTransmit()

EXTERN_C VOID WINAPI SHChangeNotifyTransmit ( LONG  lEvent,
UINT  uFlags,
LPCITEMIDLIST  pidl1,
LPCITEMIDLIST  pidl2,
DWORD  dwTick 
)

Definition at line 620 of file changenotify.cpp.

621 {
622  SHChangeNotifyReceiveEx(lEvent, uFlags, pidl1, pidl2, dwTick);
623 }
UINT uFlags
Definition: api.c:59
HANDLE lEvent
Definition: tftpd.cpp:56
EXTERN_C VOID WINAPI SHChangeNotifyReceiveEx(LONG lEvent, UINT uFlags, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, DWORD dwTick)

Referenced by SHChangeNotify().

◆ SHChangeNotifyUpdateEntryList()

EXTERN_C BOOL WINAPI SHChangeNotifyUpdateEntryList ( DWORD  unknown1,
DWORD  unknown2,
DWORD  unknown3,
DWORD  unknown4 
)

Definition at line 551 of file changenotify.cpp.

553 {
554  FIXME("(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
555  unknown1, unknown2, unknown3, unknown4);
556  return TRUE;
557 }
#define TRUE
Definition: types.h:120
#define FIXME(fmt,...)
Definition: debug.h:111

◆ SHChangeRegistrationReceive()

EXTERN_C BOOL WINAPI SHChangeRegistrationReceive ( LPVOID  lpUnknown1,
DWORD  dwUnknown2 
)

Definition at line 596 of file changenotify.cpp.

597 {
598  FIXME("SHChangeRegistrationReceive() stub\n");
599  return FALSE;
600 }
#define FALSE
Definition: types.h:117
#define FIXME(fmt,...)
Definition: debug.h:111

◆ WINE_DEFAULT_DEBUG_CHANNEL()

WINE_DEFAULT_DEBUG_CHANNEL ( shcn  )

Variable Documentation

◆ AliasPIDLs

ALIAS_PIDL AliasPIDLs[]
static
Initial value:
=
{
}
#define CSIDL_COMMON_DESKTOPDIRECTORY
Definition: shlobj.h:2036
#define CSIDL_DESKTOP
Definition: shlobj.h:2012
#define CSIDL_PERSONAL
Definition: shlobj.h:2017
#define CSIDL_DESKTOPDIRECTORY
Definition: shlobj.h:2027

Definition at line 338 of file changenotify.cpp.

Referenced by DoGetAliasPIDLs(), and DoInitAliasPIDLs().

◆ SHELL32_ChangenotifyCS

CRITICAL_SECTION SHELL32_ChangenotifyCS