21 if (s_hwndServer &&
IsWindow(s_hwndServer))
26 if (hwndShell ==
NULL)
28 TRACE(
"GetShellWindow() returned NULL\n");
36 ERR(
"Unable to get server window\n");
41 s_hwndServer = hwndServer;
83 return SHILCombine(pidlPrinters, pidlTemp, ppidl);
97 public CWindowImpl<CChangeNotifyBroker, CWindow, CWorkerTraits>
136 ERR(
"hLock is NULL\n");
141 TRACE(
"broker notifying: %p, 0x%x, %p, 0x%lx\n",
159 ERR(
"Out of memory\n");
164 if (hwndBroker ==
NULL)
166 ERR(
"hwndBroker == NULL\n");
183 DWORD cbPidl1 = 0, cbPidl2 = 0, ibOffset1 = 0, ibOffset2 = 0;
196 DWORD cbSize = ibOffset2 + cbPidl2;
200 ERR(
"Out of memory\n");
208 ERR(
"SHLockSharedEx failed\n");
240 ERR(
"pTicket is invalid\n");
247 if (pHandbag ==
NULL)
249 ERR(
"Out of memory\n");
277 DWORD cbSize = ibPidl + cbPidl;
281 if (hRegEntry ==
NULL)
283 ERR(
"Out of memory\n");
287 if (pRegEntry ==
NULL)
289 ERR(
"SHLockSharedEx failed\n");
296 pRegEntry->
cbSize = cbSize;
297 pRegEntry->
nRegID = nRegID;
299 pRegEntry->
uMsg = wMsg;
307 pRegEntry->
ibPidl = ibPidl;
325 if (hwndServer ==
NULL)
337 TRACE(
"hTicket: %p, 0x%lx\n", hTicket,
pid);
391 apidls[0] = apidls[1] =
NULL;
429 TRACE(
"(%p,0x%08x,0x%08x,0x%08x,%d,%p)\n",
430 hwnd, fSources, wEventMask, uMsg, cItems, lpItems);
433 if (wEventMask == 0 || cItems <= 0 || cItems > 0x7FFF || lpItems ==
NULL ||
441 if (hwndServer ==
NULL)
447 fSources &= ~SHCNRF_RecursiveInterrupt;
461 for (iItem = 0; iItem < cItems; ++iItem)
465 lpItems[iItem].fRecursive, lpItems[iItem].pidl,
466 dwOwnerPID, hwndBroker);
469 TRACE(
"CN_REGISTER: hwnd:%p, hRegEntry:%p, pid:0x%lx\n",
470 hwndServer, hRegEntry, dwOwnerPID);
479 nRegID = pRegEntry->
nRegID;
489 ERR(
"Delivery failed\n");
507 lpItems[iItem].fRecursive, apidlAlias[0],
508 dwOwnerPID, hwndBroker);
511 TRACE(
"CN_REGISTER: hwnd:%p, hRegEntry:%p, pid:0x%lx\n",
512 hwndServer, hRegEntry, dwOwnerPID);
527 lpItems[iItem].fRecursive, apidlAlias[1],
528 dwOwnerPID, hwndBroker);
531 TRACE(
"CN_REGISTER: hwnd:%p, hRegEntry:%p, pid:0x%lx\n",
532 hwndServer, hRegEntry, dwOwnerPID);
555 TRACE(
"(0x%08x)\n", hNotify);
559 if (hwndServer ==
NULL)
565 ERR(
"CN_UNREGISTER failed\n");
577 FIXME(
"(0x%08x, 0x%08x, 0x%08x, 0x%08x)\n",
578 unknown1, unknown2, unknown3, unknown4);
586 return "SHCNE_ALLEVENTS";
587#define DUMPEV(x) ,( event & SHCNE_##x )? #x " " : ""
654 TRACE(
"(0x%08x,0x%08x,%p,%p)\n", wEventId,
uFlags, dwItem1, dwItem2);
682 dwItem1 = (szPath1[0] ? szPath1 :
NULL);
683 dwItem2 = (szPath2[0] ? szPath2 :
NULL);
716 INT iDrive1 = -1, iDrive2 = -1;
724 dwValue |= (1 << iDrive1);
726 dwValue |= (1 << iDrive2);
774 FIXME(
"Unknown type: 0x%X\n", dwType);
810 TRACE(
"%p %08x %p %p\n", hTicket, dwOwnerPID, lppidls, lpwEventId);
816 ERR(
"pHandbag is invalid\n");
822 *lppidls = pHandbag->
pidls;
836 TRACE(
"%p\n", hLock);
842 ERR(
"pHandbag is invalid\n");
858 FIXME(
"(0x%08x):semi stub.\n", hNotify);
872 FIXME(
"SHChangeNotifySuspendResume() stub\n");
struct DELITICKET * LPDELITICKET
#define CN_DELIVER_NOTIFICATION
#define CN_UNREGISTER_PROCESS
struct REGENTRY * LPREGENTRY
#define DWORD_ALIGNMENT(offset)
struct HANDBAG * LPHANDBAG
#define WM_DESKTOP_GET_CNOTIFY_SERVER
#define WM_BROKER_NOTIFICATION
HWND SHCreateDefaultWorkerWindow(VOID)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
EXTERN_C ULONG WINAPI NTSHChangeNotifyRegister(HWND hwnd, INT fSources, LONG fEvents, UINT msg, INT count, SHChangeNotifyEntry *idlist)
EXTERN_C VOID WINAPI SHChangeNotifyTransmit(LONG lEvent, UINT uFlags, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, DWORD dwTick)
static HWND CreateNotificationBroker(HWND hwnd, UINT wMsg)
EXTERN_C HANDLE WINAPI SHChangeNotification_Lock(HANDLE hTicket, DWORD dwOwnerPID, LPITEMIDLIST **lppidls, LPLONG lpwEventId)
static VOID DoInitAliasPIDLs(void)
EXTERN_C ULONG WINAPI SHChangeNotifyRegister(HWND hwnd, INT fSources, LONG wEventMask, UINT uMsg, INT cItems, SHChangeNotifyEntry *lpItems)
EXTERN_C void InitChangeNotifications(void)
EXTERN_C BOOL WINAPI SHChangeRegistrationReceive(LPVOID lpUnknown1, DWORD dwUnknown2)
static void CreateNotificationParamAndSend(LONG wEventId, UINT uFlags, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, DWORD dwTick)
static LPHANDBAG DoGetHandbagFromTicket(HANDLE hTicket, DWORD dwOwnerPID)
static HRESULT Shell_ParsePrinterName(_In_ LPCWSTR pszName, _Out_ LPITEMIDLIST *ppidl, _In_ IBindCtx *pBindCtx)
static ALIAS_PIDL AliasPIDLs[]
static HWND GetNotificationServer(BOOL bCreate)
static BOOL DoGetAliasPIDLs(LPITEMIDLIST apidls[2], PCIDLIST_ABSOLUTE pidl)
EXTERN_C DWORD WINAPI NTSHChangeNotifyDeregister(ULONG hNotify)
EXTERN_C void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID dwItem2)
static HANDLE CreateNotificationParam(LONG wEventId, UINT uFlags, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, DWORD dwOwnerPID, DWORD dwTick)
EXTERN_C VOID WINAPI SHChangeNotifyReceive(LONG lEvent, UINT uFlags, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
EXTERN_C VOID WINAPI SHChangeNotifyReceiveEx(LONG lEvent, UINT uFlags, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2, DWORD dwTick)
static LPCSTR DumpEvent(LONG event)
EXTERN_C BOOL WINAPI SHChangeNotification_Unlock(HANDLE hLock)
EXTERN_C BOOL WINAPI SHChangeNotifySuspendResume(BOOL bSuspend, LPITEMIDLIST pidl, BOOL bRecursive, DWORD dwReserved)
EXTERN_C BOOL WINAPI SHChangeNotifyUpdateEntryList(DWORD unknown1, DWORD unknown2, DWORD unknown3, DWORD unknown4)
CRITICAL_SECTION SHELL32_ChangenotifyCS
EXTERN_C void FreeChangeNotifications(void)
EXTERN_C BOOL WINAPI SHChangeNotifyDeregister(ULONG hNotify)
static HANDLE CreateRegistrationParam(ULONG nRegID, HWND hwnd, UINT wMsg, INT fSources, LONG fEvents, LONG fRecursive, LPCITEMIDLIST pidl, DWORD dwOwnerPID, HWND hwndBroker)
BOOL SubclassWindow(HWND hWnd)
void OnFinalMessage(HWND)
CChangeNotifyBroker(HWND hwndClient, UINT uMsg)
LRESULT OnBrokerNotification(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
BOOL BrokerNotification(HANDLE hTicket, DWORD dwOwnerPID)
_In_ PSCSI_REQUEST_BLOCK _Out_ NTSTATUS _Inout_ BOOLEAN * Retry
const char * wine_dbg_sprintf(const char *format,...)
#define FAILED_UNEXPECTEDLY(hr)
DWORD WINAPI GetTickCount(VOID)
EXTERN_C HRESULT SHBindToObject(_In_opt_ IShellFolder *psf, _In_ LPCITEMIDLIST pidl, _In_ REFIID riid, _Out_ void **ppvObj)
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
HANDLE WINAPI SHAllocShared(LPCVOID lpvData, DWORD dwSize, DWORD dwProcId)
BOOL WINAPI SHFreeShared(HANDLE hShared, DWORD dwProcId)
BOOL WINAPI SHUnlockShared(LPVOID lpView)
int WINAPI PathGetDriveNumberW(const WCHAR *path)
DWORD WINAPI SHAnsiToUnicode(LPCSTR lpSrcStr, LPWSTR lpDstStr, int iLen)
GLuint GLuint GLsizei count
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
HLOCAL NTAPI LocalAlloc(UINT uFlags, SIZE_T dwBytes)
HLOCAL NTAPI LocalFree(HLOCAL hMem)
#define MESSAGE_HANDLER(msg, func)
#define BEGIN_MSG_MAP(theClass)
#define DECLARE_WND_CLASS_EX(WndClassName, style, bkgnd)
#define memcpy(s1, s2, n)
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
void WINAPI ILFree(LPITEMIDLIST pidl)
BOOL WINAPI SHGetPathFromIDListW(LPCITEMIDLIST pidl, LPWSTR pszPath)
LPITEMIDLIST WINAPI SHSimpleIDListFromPathW(LPCWSTR lpszPath)
LPITEMIDLIST WINAPI ILCreateFromPathW(LPCWSTR path)
BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
#define offsetof(TYPE, MEMBER)
#define CSIDL_COMMON_DESKTOPDIRECTORY
_In_ int _In_ BOOL bCreate
#define CSIDL_DESKTOPDIRECTORY
#define SHCNRF_RecursiveInterrupt
#define SHCNRF_NewDelivery
#define SHCNE_ASSOCCHANGED
#define SHCNRF_InterruptLevel
#define SHCNF_FLUSHNOWAIT
#define SHGetPathFromIDList
PVOID WINAPI SHLockSharedEx(HANDLE hData, DWORD dwProcessId, BOOL bWriteAccess)
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
VOID WINAPI InitializeCriticalSection(OUT LPCRITICAL_SECTION lpCriticalSection)
HWND WINAPI GetShellWindow(VOID)
void WINAPI LeaveCriticalSection(LPCRITICAL_SECTION)
DWORD WINAPI GetCurrentProcessId(void)
DWORD WINAPI GetWindowThreadProcessId(HWND hWnd, PDWORD lpdwProcessId)
void WINAPI EnterCriticalSection(LPCRITICAL_SECTION)
void WINAPI DeleteCriticalSection(PCRITICAL_SECTION)
_In_ ULONG_PTR _In_ ULONG _Out_ ULONG_PTR * pid
BOOL WINAPI IsWindow(_In_opt_ HWND)
BOOL WINAPI SendNotifyMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI DestroyWindow(_In_ HWND)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IID_PPV_ARG(Itype, ppType)