Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
58c0561b
Commit
58c0561b
authored
Sep 22, 2003
by
Rolf Kalbermatter
Committed by
Alexandre Julliard
Sep 22, 2003
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added declarations for newly documented SHChangeNotify API and fixed
some prototypes.
parent
f42bc61b
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
98 additions
and
70 deletions
+98
-70
changenotify.c
dlls/shell32/changenotify.c
+31
-25
pidl.c
dlls/shell32/pidl.c
+3
-3
shlview.c
dlls/shell32/shlview.c
+5
-5
undocshell.h
dlls/shell32/undocshell.h
+0
-33
shlobj.h
include/shlobj.h
+59
-4
No files found.
dlls/shell32/changenotify.c
View file @
58c0561b
...
...
@@ -18,10 +18,14 @@
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*/
#include <stdarg.h>
#include <string.h>
#include "wine/debug.h"
#define NONAMELESSUNION
#define NONAMELESSSTRUCT
#include "windef.h"
#include "winbase.h"
#include "wine/debug.h"
#include "wingdi.h"
#include "pidl.h"
#include "shell32_main.h"
...
...
@@ -38,6 +42,8 @@ static CRITICAL_SECTION_DEBUG critsect_debug =
};
static
CRITICAL_SECTION
SHELL32_ChangenotifyCS
=
{
&
critsect_debug
,
-
1
,
0
,
0
,
0
,
0
};
typedef
SHChangeNotifyEntry
*
LPNOTIFYREGISTER
;
/* internal list of notification clients (internal) */
typedef
struct
_NOTIFICATIONLIST
{
...
...
@@ -107,7 +113,7 @@ static const char * NodeName(LPNOTIFICATIONLIST item)
const
char
*
str
;
WCHAR
path
[
MAX_PATH
];
if
(
SHGetPathFromIDListW
(
item
->
apidl
[
0
].
pidl
Path
,
path
))
if
(
SHGetPathFromIDListW
(
item
->
apidl
[
0
].
pidl
,
path
))
str
=
wine_dbg_sprintf
(
"%s"
,
debugstr_w
(
path
));
else
str
=
wine_dbg_sprintf
(
"<not a disk file>"
);
...
...
@@ -155,7 +161,7 @@ static void DeleteNode(LPNOTIFICATIONLIST item)
/* free the item */
for
(
i
=
0
;
i
<
item
->
cidl
;
i
++
)
SHFree
(
item
->
apidl
[
i
].
pidlPath
);
SHFree
(
(
LPITEMIDLIST
)
item
->
apidl
[
i
].
pidl
);
SHFree
(
item
->
apidl
);
SHFree
(
item
);
}
...
...
@@ -182,37 +188,37 @@ void FreeChangeNotifications(void)
* SHChangeNotifyRegister [SHELL32.2]
*
*/
HANDLE
WINAPI
ULONG
WINAPI
SHChangeNotifyRegister
(
HWND
hwnd
,
LONG
dwFlag
s
,
int
fSource
s
,
LONG
wEventMask
,
UINT
uMsg
,
int
cItems
,
LPCNOTIFYREGISTER
lpItems
)
SHChangeNotifyEntry
*
lpItems
)
{
LPNOTIFICATIONLIST
item
;
int
i
;
item
=
SHAlloc
(
sizeof
(
NOTIFICATIONLIST
));
TRACE
(
"(%p,0x%08
lx,0x%08lx,0x%08x,0x%08x
,%p) item=%p
\n
"
,
hwnd
,
dwFlag
s
,
wEventMask
,
uMsg
,
cItems
,
lpItems
,
item
);
TRACE
(
"(%p,0x%08
x,0x%08lx,0x%08x,%d
,%p) item=%p
\n
"
,
hwnd
,
fSource
s
,
wEventMask
,
uMsg
,
cItems
,
lpItems
,
item
);
item
->
next
=
NULL
;
item
->
prev
=
NULL
;
item
->
cidl
=
cItems
;
item
->
apidl
=
SHAlloc
(
sizeof
(
NOTIFYREGISTER
)
*
cItems
);
item
->
apidl
=
SHAlloc
(
sizeof
(
SHChangeNotifyEntry
)
*
cItems
);
for
(
i
=
0
;
i
<
cItems
;
i
++
)
{
item
->
apidl
[
i
].
pidl
Path
=
ILClone
(
lpItems
[
i
].
pidlPath
);
item
->
apidl
[
i
].
bWatchSubtree
=
lpItems
[
i
].
bWatchSubtre
e
;
item
->
apidl
[
i
].
pidl
=
ILClone
(
lpItems
[
i
].
pidl
);
item
->
apidl
[
i
].
fRecursive
=
lpItems
[
i
].
fRecursiv
e
;
}
item
->
hwnd
=
hwnd
;
item
->
uMsg
=
uMsg
;
item
->
wEventMask
=
wEventMask
;
item
->
wSignalledEvent
=
0
;
item
->
dwFlags
=
dwFlag
s
;
item
->
dwFlags
=
fSource
s
;
TRACE
(
"new node: %s
\n
"
,
NodeName
(
item
));
...
...
@@ -222,21 +228,21 @@ SHChangeNotifyRegister(
LeaveCriticalSection
(
&
SHELL32_ChangenotifyCS
);
return
(
HANDLE
)
item
;
return
(
ULONG
)
item
;
}
/*************************************************************************
* SHChangeNotifyDeregister [SHELL32.4]
*/
BOOL
WINAPI
SHChangeNotifyDeregister
(
HANDLE
hNotify
)
BOOL
WINAPI
SHChangeNotifyDeregister
(
ULONG
hNotify
)
{
LPNOTIFICATIONLIST
node
;
TRACE
(
"(
%p)
\n
"
,
hNotify
);
TRACE
(
"(
0x%08lx)
\n
"
,
hNotify
);
EnterCriticalSection
(
&
SHELL32_ChangenotifyCS
);
node
=
FindNode
(
hNotify
);
node
=
FindNode
(
(
HANDLE
)
hNotify
);
if
(
node
)
DeleteNode
(
node
);
...
...
@@ -257,7 +263,7 @@ BOOL WINAPI SHChangeNotifyUpdateEntryList(DWORD unknown1, DWORD unknown2,
return
-
1
;
}
static
BOOL
should_notify
(
LPITEMIDLIST
changed
,
LPITEMIDLIST
watched
,
BOOL
sub
)
static
BOOL
should_notify
(
LPITEMIDLIST
changed
,
LP
C
ITEMIDLIST
watched
,
BOOL
sub
)
{
TRACE
(
"%p %p %d
\n
"
,
changed
,
watched
,
sub
);
if
(
!
watched
)
...
...
@@ -357,8 +363,8 @@ void WINAPI SHChangeNotify(LONG wEventId, UINT uFlags, LPCVOID dwItem1, LPCVOID
for
(
i
=
0
;
(
i
<
ptr
->
cidl
)
&&
!
notify
;
i
++
)
{
LP
ITEMIDLIST
pidl
=
ptr
->
apidl
[
i
].
pidlPath
;
BOOL
subtree
=
ptr
->
apidl
[
i
].
bWatchSubtre
e
;
LP
CITEMIDLIST
pidl
=
ptr
->
apidl
[
i
].
pidl
;
BOOL
subtree
=
ptr
->
apidl
[
i
].
fRecursiv
e
;
if
(
wEventId
&
ptr
->
wEventMask
)
{
...
...
@@ -411,7 +417,7 @@ DWORD WINAPI NTSHChangeNotifyRegister(
LONG
events2
,
DWORD
msg
,
int
count
,
LPCNOTIFYREGISTER
idlist
)
SHChangeNotifyEntry
*
idlist
)
{
FIXME
(
"(%p,0x%08lx,0x%08lx,0x%08lx,0x%08x,%p):semi stub.
\n
"
,
hwnd
,
events1
,
events2
,
msg
,
count
,
idlist
);
...
...
@@ -425,12 +431,12 @@ DWORD WINAPI NTSHChangeNotifyRegister(
HANDLE
WINAPI
SHChangeNotification_Lock
(
HANDLE
hChange
,
DWORD
dwProcessId
,
LP
C
ITEMIDLIST
**
lppidls
,
LPITEMIDLIST
**
lppidls
,
LPLONG
lpwEventId
)
{
DWORD
i
;
LPNOTIFICATIONLIST
node
;
LP
C
ITEMIDLIST
*
idlist
;
LPITEMIDLIST
*
idlist
;
TRACE
(
"%p %08lx %p %p
\n
"
,
hChange
,
dwProcessId
,
lppidls
,
lpwEventId
);
...
...
@@ -441,7 +447,7 @@ HANDLE WINAPI SHChangeNotification_Lock(
{
idlist
=
SHAlloc
(
sizeof
(
LPCITEMIDLIST
*
)
*
node
->
cidl
);
for
(
i
=
0
;
i
<
node
->
cidl
;
i
++
)
idlist
[
i
]
=
node
->
pidlSignaled
;
idlist
[
i
]
=
(
LPITEMIDLIST
)
node
->
pidlSignaled
;
*
lpwEventId
=
node
->
wSignalledEvent
;
*
lppidls
=
idlist
;
node
->
wSignalledEvent
=
0
;
...
...
@@ -466,9 +472,9 @@ BOOL WINAPI SHChangeNotification_Unlock ( HANDLE hLock)
/*************************************************************************
* NTSHChangeNotifyDeregister [SHELL32.641]
*/
DWORD
WINAPI
NTSHChangeNotifyDeregister
(
LONG
x1
)
DWORD
WINAPI
NTSHChangeNotifyDeregister
(
U
LONG
x1
)
{
FIXME
(
"(0x%08lx):semi stub.
\n
"
,
x1
);
return
SHChangeNotifyDeregister
(
(
HANDLE
)
x1
);
return
SHChangeNotifyDeregister
(
x1
);
}
dlls/shell32/pidl.c
View file @
58c0561b
...
...
@@ -629,11 +629,11 @@ LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2)
*
* NOTES
*/
LPITEMIDLIST
WINAPI
SHGetRealIDL
(
LPSHELLFOLDER
lpsf
,
LPITEMIDLIST
pidl
,
DWORD
z
)
HRESULT
WINAPI
SHGetRealIDL
(
LPSHELLFOLDER
lpsf
,
LPCITEMIDLIST
pidlSimple
,
LPITEMIDLIST
*
pidlReal
)
{
FIXME
(
"sf=%p pidl
=%p 0x%04lx
\n
"
,
lpsf
,
pidl
,
z
);
FIXME
(
"sf=%p pidl
Simple=%p pidlReal=%p
\n
"
,
lpsf
,
pidlSimple
,
pidlReal
);
pdump
(
pidl
);
pdump
(
pidl
Simple
);
return
0
;
}
...
...
dlls/shell32/shlview.c
View file @
58c0561b
...
...
@@ -89,7 +89,7 @@ typedef struct
UINT
cidl
;
LPITEMIDLIST
*
apidl
;
LISTVIEW_SORT_INFO
ListViewSortInfo
;
HANDLE
hNotify
;
/* change notification handle */
ULONG
hNotify
;
/* change notification handle */
HANDLE
hAccel
;
}
IShellViewImpl
;
...
...
@@ -630,7 +630,7 @@ static HRESULT ShellView_FillList(IShellViewImpl * This)
static
LRESULT
ShellView_OnCreate
(
IShellViewImpl
*
This
)
{
IDropTarget
*
pdt
;
NOTIFYREGISTER
ntreg
;
SHChangeNotifyEntry
ntreg
;
IPersistFolder2
*
ppf2
=
NULL
;
TRACE
(
"%p
\n
"
,
This
);
...
...
@@ -656,10 +656,10 @@ static LRESULT ShellView_OnCreate(IShellViewImpl * This)
IShellFolder_QueryInterface
(
This
->
pSFParent
,
&
IID_IPersistFolder2
,
(
LPVOID
*
)
&
ppf2
);
if
(
ppf2
)
{
IPersistFolder2_GetCurFolder
(
ppf2
,
&
ntreg
.
pidlPath
);
ntreg
.
bWatchSubtre
e
=
FALSE
;
IPersistFolder2_GetCurFolder
(
ppf2
,
(
LPITEMIDLIST
*
)
&
ntreg
.
pidl
);
ntreg
.
fRecursiv
e
=
FALSE
;
This
->
hNotify
=
SHChangeNotifyRegister
(
This
->
hWnd
,
SHCNF_IDLIST
,
SHCNE_ALLEVENTS
,
SHV_CHANGE_NOTIFY
,
1
,
&
ntreg
);
SHFree
(
ntreg
.
pidlPath
);
SHFree
(
(
LPITEMIDLIST
)
ntreg
.
pidl
);
IPersistFolder2_Release
(
ppf2
);
}
...
...
dlls/shell32/undocshell.h
View file @
58c0561b
...
...
@@ -148,39 +148,6 @@ HRESULT WINAPI StrRetToStrNAW (
#define SHCNRF_RecursiveInterrupt 0x1000
/* Must be combined with SHCNRF_InterruptLevel */
#define SHCNRF_NewDelivery 0x8000
/* Messages use shared memory */
typedef
struct
{
LPITEMIDLIST
pidlPath
;
BOOL
bWatchSubtree
;
}
NOTIFYREGISTER
,
*
LPNOTIFYREGISTER
;
typedef
const
LPNOTIFYREGISTER
LPCNOTIFYREGISTER
;
typedef
struct
{
USHORT
cb
;
DWORD
dwItem1
;
DWORD
dwItem2
;
}
DWORDITEMID
;
HANDLE
WINAPI
SHChangeNotifyRegister
(
HWND
hwnd
,
LONG
dwFlags
,
LONG
wEventMask
,
UINT
uMsg
,
int
cItems
,
LPNOTIFYREGISTER
lpItems
);
BOOL
WINAPI
SHChangeNotifyDeregister
(
HANDLE
hNotify
);
HANDLE
WINAPI
SHChangeNotification_Lock
(
HANDLE
hMemoryMap
,
DWORD
dwProcessId
,
LPCITEMIDLIST
**
lppidls
,
LPLONG
lpwEventId
);
BOOL
WINAPI
SHChangeNotification_Unlock
(
HANDLE
hLock
);
/****************************************************************************
* Shell Common Dialogs
*/
...
...
include/shlobj.h
View file @
58c0561b
...
...
@@ -495,9 +495,15 @@ VOID WINAPI SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask);
#define SSF_NOCONFIRMRECYCLE 0x8000
#define SSF_HIDEICONS 0x4000
/**********************************************************************
* SHChangeNotify
*/
/****************************************************************************
* SHChangeNotify API
*/
typedef
struct
_SHChangeNotifyEntry
{
LPCITEMIDLIST
pidl
;
BOOL
fRecursive
;
}
SHChangeNotifyEntry
;
#define SHCNE_RENAMEITEM 0x00000001
#define SHCNE_CREATE 0x00000002
#define SHCNE_DELETE 0x00000004
...
...
@@ -525,7 +531,9 @@ VOID WINAPI SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask);
#define SHCNE_ALLEVENTS 0x7FFFFFFF
#define SHCNE_INTERRUPT 0x80000000
#define SHCNEE_ORDERCHANGED 0x00000002
#define SHCNEE_ORDERCHANGED 0x0002L
#define SHCNEE_MSI_CHANGE 0x0004L
#define SHCNEE_MSI_UNINSTALL 0x0005L
#define SHCNF_IDLIST 0x0000
#define SHCNF_PATHA 0x0001
...
...
@@ -537,8 +545,55 @@ VOID WINAPI SHGetSettings(LPSHELLFLAGSTATE lpsfs, DWORD dwMask);
#define SHCNF_FLUSH 0x1000
#define SHCNF_FLUSHNOWAIT 0x2000
#define SHCNF_PATH WINELIB_NAME_AW(SHCNF_PATH)
#define SHCNF_PRINTER WINELIB_NAME_AW(SHCNF_PRINTER)
void
WINAPI
SHChangeNotify
(
LONG
wEventId
,
UINT
uFlags
,
LPCVOID
dwItem1
,
LPCVOID
dwItem2
);
/*
* IShellChangeNotify
*/
typedef
struct
IShellChangeNotify
IShellChangeNotify
,
*
LPSHELLCHANGENOTIFY
;
#define INTERFACE IShellChangeNotify
#define IShellChangeNotify_METHODS \
IUnknown_METHODS \
STDMETHOD(OnChange)(THIS_ LONG lEvent, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2) PURE;
ICOM_DEFINE
(
IShellChangeNotify
,
IUnknown
)
#undef INTERFACE
#ifdef COBJMACROS
/*** IUnknown methods ***/
#define IShellChangeNotify_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
#define IShellChangeNotify_AddRef(p) (p)->lpVtbl->AddRef(p)
#define IShellChangeNotify_Release(p) (p)->lpVtbl->Release(p)
/*** IShellChangeNotify methods ***/
#define IShellChangeNotify_OnChange(p,a,b,c) (p)->lpVtbl->OnChange(p,a,b,c)
#endif
typedef
struct
_SHChangeDWORDAsIDList
{
USHORT
cb
;
DWORD
dwItem1
;
DWORD
dwItem2
;
USHORT
cbZero
;
}
SHChangeDWORDAsIDList
,
*
LPSHChangeDWORDAsIDList
;
typedef
struct
_SHChangeProductKeyAsIDList
{
USHORT
cb
;
WCHAR
wszProductKey
[
39
];
USHORT
cbZero
;
}
SHChangeProductKeyAsIDList
,
*
LPSHChangeProductKeyAsIDList
;
ULONG
WINAPI
SHChangeNotifyRegister
(
HWND
hwnd
,
int
fSources
,
LONG
fEvents
,
UINT
wMsg
,
int
cEntries
,
SHChangeNotifyEntry
*
pshcne
);
BOOL
WINAPI
SHChangeNotifyDeregister
(
ULONG
ulID
);
HANDLE
WINAPI
SHChangeNotification_Lock
(
HANDLE
hChangeNotification
,
DWORD
dwProcessId
,
LPITEMIDLIST
**
pppidl
,
LONG
*
plEvent
);
BOOL
WINAPI
SHChangeNotification_Unlock
(
HANDLE
hLock
);
HRESULT
WINAPI
SHGetRealIDL
(
IShellFolder
*
psf
,
LPCITEMIDLIST
pidlSimple
,
LPITEMIDLIST
*
ppidlReal
);
/****************************************************************************
* SHCreateDirectory API
*/
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment