1 /*************************************************************************
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5 * Copyright 2008 by Sun Microsystems, Inc.
7 * OpenOffice.org - a multi-platform office productivity suite
9 * $RCSfile: shellex.h,v $
12 * This file is part of OpenOffice.org.
14 * OpenOffice.org is free software: you can redistribute it and/or modify
15 * it under the terms of the GNU Lesser General Public License version 3
16 * only, as published by the Free Software Foundation.
18 * OpenOffice.org is distributed in the hope that it will be useful,
19 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21 * GNU Lesser General Public License version 3 for more details
22 * (a copy is included in the LICENSE file that accompanied this code).
24 * You should have received a copy of the GNU Lesser General Public License
25 * version 3 along with OpenOffice.org. If not, see
26 * <http://www.openoffice.org/license.html>
27 * for a copy of the LGPLv3 License.
29 ************************************************************************/
39 #define WINSHELLCALL inline
41 #define WINSHELLCALL static
44 #define SHChangeNotifyRegister_PROC_STR MAKEINTRESOURCE(2)
45 #define SHChangeNotifyDeregister_PROC_STR MAKEINTRESOURCE(4)
47 #define SHCNF_ACCEPT_INTERRUPTS 0x0001
48 #define SHCNF_ACCEPT_NON_INTERRUPTS 0x0002
49 #define SHCNF_NO_PROXY 0x8000
51 #define SHCNF_ACCEPT_ALL (SHCNF_ACCEPT_INTERRUPTS | SHCNF_ACCEPT_NON_INTERRUPTS)
53 typedef struct tagNOTIFYREGISTER
{
54 LPCITEMIDLIST pidlPath
;
58 typedef NOTIFYREGISTER
*LPNOTIFYREGISTER
;
59 typedef NOTIFYREGISTER
const *LPCNOTIFYREGISTER
;
61 typedef HANDLE (WINAPI
*SHChangeNotifyRegister_PROC
)(
67 LPCNOTIFYREGISTER lpItems
);
70 WINSHELLCALL HANDLE WINAPI
SHChangeNotifyRegister(
76 LPCNOTIFYREGISTER lpItems
)
79 HMODULE hModule
= GetModuleHandle( "SHELL32" );
80 HANDLE hNotify
= NULL
;
84 SHChangeNotifyRegister_PROC lpfnSHChangeNotifyRegister
= (SHChangeNotifyRegister_PROC
)GetProcAddress( hModule
, SHChangeNotifyRegister_PROC_STR
);
85 if ( lpfnSHChangeNotifyRegister
)
86 hNotify
= lpfnSHChangeNotifyRegister( hWnd
, dwFlags
, wEventMask
, uMsg
, cItems
, lpItems
);
94 typedef BOOL (WINAPI
*SHChangeNotifyDeregister_PROC
)(
97 WINSHELLCALL BOOL WINAPI
SHChangeNotifyDeregister( HANDLE hNotify
)
99 HMODULE hModule
= GetModuleHandle( "SHELL32" );
100 BOOL fSuccess
= FALSE
;
104 SHChangeNotifyDeregister_PROC lpfnSHChangeNotifyDeregister
= (SHChangeNotifyDeregister_PROC
)GetProcAddress( hModule
, SHChangeNotifyDeregister_PROC_STR
);
105 if ( lpfnSHChangeNotifyDeregister
)
106 fSuccess
= lpfnSHChangeNotifyDeregister( hNotify
);