1 // Licensed under the Apache License, Version 2.0
2 // <LICENSE-APACHE or http://www.apache.org/licenses/LICENSE-2.0> or the MIT license
3 // <LICENSE-MIT or http://opensource.org/licenses/MIT>, at your option.
4 // All files in the project carrying such notice may not be copied, modified, or distributed
5 // except according to those terms
6 //! SHELL.DLL functions, types, and definitions
7 use ctypes
::{__int64, c_int, c_void}
;
8 use shared
::basetsd
::{DWORD_PTR, UINT_PTR}
;
9 use shared
::guiddef
::{GUID, REFIID}
;
10 use shared
::minwindef
::{
11 BOOL
, DWORD
, FILETIME
, HINSTANCE
, HKEY
, INT
, LPARAM
, LPVOID
, MAX_PATH
, UINT
, ULONG
, WORD
,
13 use shared
::windef
::{HICON, HWND, POINT, RECT}
;
14 use um
::minwinbase
::LPSECURITY_ATTRIBUTES
;
15 use um
::processthreadsapi
::{LPPROCESS_INFORMATION, LPSTARTUPINFOW}
;
17 CHAR
, HANDLE
, HRESULT
, LPCSTR
, LPCWSTR
, LPSTR
, LPWSTR
, PCSTR
, PCWSTR
, PCZZSTR
, PCZZWSTR
, PWSTR
,
18 PZZSTR
, PZZWSTR
, ULARGE_INTEGER
, WCHAR
,
20 use um
::winuser
::WM_USER
;
21 DECLARE_HANDLE
!{HDROP, HDROP__}
23 pub fn DragQueryFileA(
29 pub fn DragQueryFileW(
35 pub fn DragQueryPoint(
42 pub fn DragAcceptFiles(
58 lpParameters
: LPCWSTR
,
62 pub fn FindExecutableA(
67 pub fn FindExecutableW(
72 pub fn CommandLineToArgvW(
85 szOtherStuff
: LPCWSTR
,
92 pub fn ExtractAssociatedIconA(
97 pub fn ExtractAssociatedIconW(
102 pub fn ExtractAssociatedIconExA(
105 piIconIndex
: *mut WORD
,
108 pub fn ExtractAssociatedIconExW(
111 piIconIndex
: *mut WORD
,
116 pszExeFileName
: LPCSTR
,
121 pszExeFileName
: LPCWSTR
,
125 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct DRAGINFOA {
132 pub type LPDRAGINFOA
= *mut DRAGINFOA
;
133 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct DRAGINFOW {
140 pub type LPDRAGINFOW
= *mut DRAGINFOW
;
141 pub const ABM_NEW
: DWORD
= 0x00000000;
142 pub const ABM_REMOVE
: DWORD
= 0x00000001;
143 pub const ABM_QUERYPOS
: DWORD
= 0x00000002;
144 pub const ABM_SETPOS
: DWORD
= 0x00000003;
145 pub const ABM_GETSTATE
: DWORD
= 0x00000004;
146 pub const ABM_GETTASKBARPOS
: DWORD
= 0x00000005;
147 pub const ABM_ACTIVATE
: DWORD
= 0x00000006;
148 pub const ABM_GETAUTOHIDEBAR
: DWORD
= 0x00000007;
149 pub const ABM_SETAUTOHIDEBAR
: DWORD
= 0x00000008;
150 pub const ABM_WINDOWPOSCHANGED
: DWORD
= 0x0000009;
151 pub const ABM_SETSTATE
: DWORD
= 0x0000000a;
152 pub const ABM_GETAUTOHIDEBAREX
: DWORD
= 0x0000000b;
153 pub const ABM_SETAUTOHIDEBAREX
: DWORD
= 0x0000000c;
154 pub const ABN_STATECHANGE
: DWORD
= 0x0000000;
155 pub const ABN_POSCHANGED
: DWORD
= 0x0000001;
156 pub const ABN_FULLSCREENAPP
: DWORD
= 0x0000002;
157 pub const ABN_WINDOWARRANGE
: DWORD
= 0x0000003;
158 pub const ABS_AUTOHIDE
: UINT
= 0x0000001;
159 pub const ABS_ALWAYSONTOP
: UINT
= 0x0000002;
160 pub const ABE_LEFT
: UINT
= 0;
161 pub const ABE_TOP
: UINT
= 1;
162 pub const ABE_RIGHT
: UINT
= 2;
163 pub const ABE_BOTTOM
: UINT
= 3;
164 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct APPBARDATA {
167 uCallbackMessage
: UINT
,
172 pub type PAPPBARDATA
= *mut APPBARDATA
;
174 pub fn SHAppBarMessage(
178 pub fn DoEnvironmentSubstA(
182 pub fn DoEnvironmentSubstW(
186 pub fn ExtractIconExA(
189 phiconLarge
: *mut HICON
,
190 phiconSmall
: *mut HICON
,
193 pub fn ExtractIconExW(
196 phiconLarge
: *mut HICON
,
197 phiconSmall
: *mut HICON
,
201 pub const FO_MOVE
: WORD
= 0x0001;
202 pub const FO_COPY
: WORD
= 0x0002;
203 pub const FO_DELETE
: WORD
= 0x0003;
204 pub const FO_RENAME
: WORD
= 0x0004;
205 pub const FOF_MULTIDESTFILES
: WORD
= 0x0001;
206 pub const FOF_CONFIRMMOUSE
: WORD
= 0x0002;
207 pub const FOF_SILENT
: WORD
= 0x0004;
208 pub const FOF_RENAMEONCOLLISION
: WORD
= 0x0008;
209 pub const FOF_NOCONFIRMATION
: WORD
= 0x0010;
210 pub const FOF_WANTMAPPINGHANDLE
: WORD
= 0x0020;
211 pub const FOF_ALLOWUNDO
: WORD
= 0x0040;
212 pub const FOF_FILESONLY
: WORD
= 0x0080;
213 pub const FOF_SIMPLEPROGRESS
: WORD
= 0x0100;
214 pub const FOF_NOCONFIRMMKDIR
: WORD
= 0x0200;
215 pub const FOF_NOERRORUI
: WORD
= 0x0400;
216 pub const FOF_NOCOPYSECURITYATTRIBS
: WORD
= 0x0800;
217 pub const FOF_NORECURSION
: WORD
= 0x1000;
218 pub const FOF_NO_CONNECTED_ELEMENTS
: WORD
= 0x2000;
219 pub const FOF_WANTNUKEWARNING
: WORD
= 0x4000;
220 pub const FOF_NORECURSEREPARSE
: WORD
= 0x8000;
221 pub const FOF_NO_UI
: WORD
= FOF_SILENT
| FOF_NOCONFIRMATION
| FOF_NOERRORUI
| FOF_NOCONFIRMMKDIR
;
222 pub type FILEOP_FLAGS
= WORD
;
223 pub const PO_DELETE
: WORD
= 0x0013;
224 pub const PO_RENAME
: WORD
= 0x0014;
225 pub const PO_PORTCHANGE
: WORD
= 0x0020;
226 pub const PO_REN_PORT
: WORD
= 0x0034;
227 pub type PRINTEROP_FLAGS
= WORD
;
228 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SHFILEOPSTRUCTA {
233 fFlags
: FILEOP_FLAGS
,
234 fAnyOperationsAborted
: BOOL
,
235 hNameMappings
: LPVOID
,
236 lpszProgressTitle
: PCSTR
,
238 pub type LPSHFILEOPSTRUCTA
= *mut SHFILEOPSTRUCTA
;
239 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SHFILEOPSTRUCTW {
244 fFlags
: FILEOP_FLAGS
,
245 fAnyOperationsAborted
: BOOL
,
246 hNameMappings
: LPVOID
,
247 lpszProgressTitle
: PCWSTR
,
249 pub type LPSHFILEOPSTRUCTW
= *mut SHFILEOPSTRUCTW
;
251 pub fn SHFileOperationA(
252 lpFileOp
: LPSHFILEOPSTRUCTA
,
254 pub fn SHFileOperationW(
255 lpFileOp
: LPSHFILEOPSTRUCTW
,
257 pub fn SHFreeNameMappings(
258 hNameMappings
: HANDLE
,
261 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SHNAMEMAPPINGA {
267 pub type LPSHNAMEMAPPINGA
= *mut SHNAMEMAPPINGA
;
268 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SHNAMEMAPPINGW {
274 pub type LPSHNAMEMAPPINGW
= *mut SHNAMEMAPPINGW
;
275 pub const SE_ERR_FNF
: DWORD
= 2;
276 pub const SE_ERR_PNF
: DWORD
= 3;
277 pub const SE_ERR_ACCESSDENIED
: DWORD
= 5;
278 pub const SE_ERR_OOM
: DWORD
= 8;
279 pub const SE_ERR_DLLNOTFOUND
: DWORD
= 32;
280 pub const SE_ERR_SHARE
: DWORD
= 26;
281 pub const SE_ERR_ASSOCINCOMPLETE
: DWORD
= 27;
282 pub const SE_ERR_DDETIMEOUT
: DWORD
= 28;
283 pub const SE_ERR_DDEFAIL
: DWORD
= 29;
284 pub const SE_ERR_DDEBUSY
: DWORD
= 30;
285 pub const SE_ERR_NOASSOC
: DWORD
= 31;
286 pub const SEE_MASK_DEFAULT
: DWORD
= 0x00000000;
287 pub const SEE_MASK_CLASSNAME
: DWORD
= 0x00000001;
288 pub const SEE_MASK_CLASSKEY
: DWORD
= 0x00000003;
289 pub const SEE_MASK_IDLIST
: DWORD
= 0x00000004;
290 pub const SEE_MASK_INVOKEIDLIST
: DWORD
= 0x0000000c;
291 pub const SEE_MASK_ICON
: DWORD
= 0x00000010;
292 pub const SEE_MASK_HOTKEY
: DWORD
= 0x00000020;
293 pub const SEE_MASK_NOCLOSEPROCESS
: DWORD
= 0x00000040;
294 pub const SEE_MASK_CONNECTNETDRV
: DWORD
= 0x00000080;
295 pub const SEE_MASK_NOASYNC
: DWORD
= 0x00000100;
296 pub const SEE_MASK_FLAG_DDEWAIT
: DWORD
= SEE_MASK_NOASYNC
;
297 pub const SEE_MASK_DOENVSUBST
: DWORD
= 0x00000200;
298 pub const SEE_MASK_FLAG_NO_UI
: DWORD
= 0x00000400;
299 pub const SEE_MASK_UNICODE
: DWORD
= 0x00004000;
300 pub const SEE_MASK_NO_CONSOLE
: DWORD
= 0x00008000;
301 pub const SEE_MASK_ASYNCOK
: DWORD
= 0x00100000;
302 pub const SEE_MASK_HMONITOR
: DWORD
= 0x00200000;
303 pub const SEE_MASK_NOZONECHECKS
: DWORD
= 0x00800000;
304 pub const SEE_MASK_NOQUERYCLASSSTORE
: DWORD
= 0x01000000;
305 pub const SEE_MASK_WAITFORINPUTIDLE
: DWORD
= 0x02000000;
306 pub const SEE_MASK_FLAG_LOG_USAGE
: DWORD
= 0x04000000;
307 pub const SEE_MASK_FLAG_HINST_IS_SITE
: DWORD
= 0x08000000;
308 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SHELLEXECUTEINFOA {
314 lpParameters
: LPCSTR
,
318 lpIDList
: *mut c_void
,
325 pub type LPSHELLEXECUTEINFOA
= *mut SHELLEXECUTEINFOA
;
326 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SHELLEXECUTEINFOW {
332 lpParameters
: LPCWSTR
,
333 lpDirectory
: LPCWSTR
,
336 lpIDList
: *mut c_void
,
343 pub type LPSHELLEXECUTEINFOW
= *mut SHELLEXECUTEINFOW
;
345 pub fn ShellExecuteExA(
346 pExecInfo
: *mut SHELLEXECUTEINFOA
,
348 pub fn ShellExecuteExW(
349 pExecInfo
: *mut SHELLEXECUTEINFOW
,
352 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SHCREATEPROCESSINFOW {
357 pszParameters
: LPCWSTR
,
358 pszCurrentDirectory
: LPCWSTR
,
360 lpProcessAttributes
: LPSECURITY_ATTRIBUTES
,
361 lpThreadAttributes
: LPSECURITY_ATTRIBUTES
,
362 bInheritHandles
: BOOL
,
363 dwCreationFlags
: DWORD
,
364 lpStartupInfo
: LPSTARTUPINFOW
,
365 lpProcessInformation
: LPPROCESS_INFORMATION
,
367 pub type PSHCREATEPROCESSINFOW
= *mut SHCREATEPROCESSINFOW
;
369 pub fn SHCreateProcessAsUserW(
370 pscpi
: PSHCREATEPROCESSINFOW
,
372 pub fn SHEvaluateSystemCommandTemplate(
373 pszCmdTemplate
: PCWSTR
,
374 ppszApplication
: *mut PWSTR
,
375 ppszCommandLine
: *mut PWSTR
,
376 ppszParameters
: *mut PWSTR
,
379 ENUM
!{enum ASSOCCLASS
{
380 ASSOCCLASS_SHELL_KEY
= 0,
381 ASSOCCLASS_PROGID_KEY
,
382 ASSOCCLASS_PROGID_STR
,
383 ASSOCCLASS_CLSID_KEY
,
384 ASSOCCLASS_CLSID_STR
,
387 ASSOCCLASS_SYSTEM_STR
,
390 ASSOCCLASS_FIXED_PROGID_STR
,
391 ASSOCCLASS_PROTOCOL_STR
,
393 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct ASSOCIATIONELEMENT {
399 pub fn AssocCreateForClasses(
400 rgClasses
: *const ASSOCIATIONELEMENT
,
403 ppv
: *mut *mut c_void
,
406 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SHQUERYRBINFO {
409 i64NumItems
: __int64
,
411 pub type LPSHQUERYRBINFO
= *mut SHQUERYRBINFO
;
412 pub const SHERB_NOCONFIRMATION
: DWORD
= 0x00000001;
413 pub const SHERB_NOPROGRESSUI
: DWORD
= 0x00000002;
414 pub const SHERB_NOSOUND
: DWORD
= 0x00000004;
416 pub fn SHQueryRecycleBinA(
418 pSHQueryRBInfo
: LPSHQUERYRBINFO
,
420 pub fn SHQueryRecycleBinW(
421 pszRootPath
: LPCWSTR
,
422 pSHQueryRBInfo
: LPSHQUERYRBINFO
,
424 pub fn SHEmptyRecycleBinA(
429 pub fn SHEmptyRecycleBinW(
431 pszRootPath
: LPCWSTR
,
435 ENUM
!{enum QUERY_USER_NOTIFICATION_STATE
{
436 QUNS_NOT_PRESENT
= 1,
438 QUNS_RUNNING_D3D_FULL_SCREEN
= 3,
439 QUNS_PRESENTATION_MODE
= 4,
440 QUNS_ACCEPTS_NOTIFICATIONS
= 5,
445 pub fn SHQueryUserNotificationState(
446 pquns
: *mut QUERY_USER_NOTIFICATION_STATE
,
448 pub fn SHGetPropertyStoreForWindow(
451 ppv
: *mut *mut c_void
,
454 UNION
!{#[cfg_attr(target_arch = "x86", repr(packed))] union NOTIFYICONDATAA_u {
456 uTimeout uTimeout_mut
: UINT
,
457 uVersion uVersion_mut
: UINT
,
459 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct NOTIFYICONDATAA {
464 uCallbackMessage
: UINT
,
470 u
: NOTIFYICONDATAA_u
,
471 szInfoTitle
: [CHAR
; 64],
476 pub type PNOTIFYICONDATAA
= *mut NOTIFYICONDATAA
;
477 UNION
!{#[cfg_attr(target_arch = "x86", repr(packed))] union NOTIFYICONDATAW_u {
479 uTimeout uTimeout_mut
: UINT
,
480 uVersion uVersion_mut
: UINT
,
482 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct NOTIFYICONDATAW {
487 uCallbackMessage
: UINT
,
492 szInfo
: [WCHAR
; 256],
493 u
: NOTIFYICONDATAW_u
,
494 szInfoTitle
: [WCHAR
; 64],
499 pub type PNOTIFYICONDATAW
= *mut NOTIFYICONDATAW
;
500 pub const NIN_SELECT
: DWORD
= WM_USER
+ 0;
501 pub const NINF_KEY
: DWORD
= 0x1;
502 pub const NIN_KEYSELECT
: DWORD
= NIN_SELECT
| NINF_KEY
;
503 pub const NIN_BALLOONSHOW
: DWORD
= WM_USER
+ 2;
504 pub const NIN_BALLOONHIDE
: DWORD
= WM_USER
+ 3;
505 pub const NIN_BALLOONTIMEOUT
: DWORD
= WM_USER
+ 4;
506 pub const NIN_BALLOONUSERCLICK
: DWORD
= WM_USER
+ 5;
507 pub const NIN_POPUPOPEN
: DWORD
= WM_USER
+ 6;
508 pub const NIN_POPUPCLOSE
: DWORD
= WM_USER
+ 7;
509 pub const NIM_ADD
: DWORD
= 0x00000000;
510 pub const NIM_MODIFY
: DWORD
= 0x00000001;
511 pub const NIM_DELETE
: DWORD
= 0x00000002;
512 pub const NIM_SETFOCUS
: DWORD
= 0x00000003;
513 pub const NIM_SETVERSION
: DWORD
= 0x00000004;
514 pub const NOTIFYICON_VERSION
: DWORD
= 3;
515 pub const NOTIFYICON_VERSION_4
: DWORD
= 4;
516 pub const NIF_MESSAGE
: DWORD
= 0x00000001;
517 pub const NIF_ICON
: DWORD
= 0x00000002;
518 pub const NIF_TIP
: DWORD
= 0x00000004;
519 pub const NIF_STATE
: DWORD
= 0x00000008;
520 pub const NIF_INFO
: DWORD
= 0x00000010;
521 pub const NIF_GUID
: DWORD
= 0x00000020;
522 pub const NIF_REALTIME
: DWORD
= 0x00000040;
523 pub const NIF_SHOWTIP
: DWORD
= 0x00000080;
524 pub const NIS_HIDDEN
: DWORD
= 0x00000001;
525 pub const NIS_SHAREDICON
: DWORD
= 0x00000002;
526 pub const NIIF_NONE
: DWORD
= 0x00000000;
527 pub const NIIF_INFO
: DWORD
= 0x00000001;
528 pub const NIIF_WARNING
: DWORD
= 0x00000002;
529 pub const NIIF_ERROR
: DWORD
= 0x00000003;
530 pub const NIIF_USER
: DWORD
= 0x00000004;
531 pub const NIIF_ICON_MASK
: DWORD
= 0x0000000F;
532 pub const NIIF_NOSOUND
: DWORD
= 0x00000010;
533 pub const NIIF_LARGE_ICON
: DWORD
= 0x00000020;
534 pub const NIIF_RESPECT_QUIET_TIME
: DWORD
= 0x00000080;
535 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct NOTIFYICONIDENTIFIER {
541 pub type PNOTIFYICONIDENTIFIER
= *mut NOTIFYICONIDENTIFIER
;
543 pub fn Shell_NotifyIconA(
545 lpData
: PNOTIFYICONDATAA
,
547 pub fn Shell_NotifyIconW(
549 lpData
: PNOTIFYICONDATAW
,
551 pub fn Shell_NotifyIconGetRect(
552 identifier
: *const NOTIFYICONIDENTIFIER
,
553 iconLocation
: *mut RECT
,
556 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SHFILEINFOA {
560 szDisplayName
: [CHAR
; MAX_PATH
],
561 szTypeName
: [CHAR
; 80],
563 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SHFILEINFOW {
567 szDisplayName
: [WCHAR
; MAX_PATH
],
568 szTypeName
: [WCHAR
; 80],
570 pub const SHGFI_ICON
: DWORD
= 0x000000100;
571 pub const SHGFI_DISPLAYNAME
: DWORD
= 0x000000200;
572 pub const SHGFI_TYPENAME
: DWORD
= 0x000000400;
573 pub const SHGFI_ATTRIBUTES
: DWORD
= 0x000000800;
574 pub const SHGFI_ICONLOCATION
: DWORD
= 0x000001000;
575 pub const SHGFI_EXETYPE
: DWORD
= 0x000002000;
576 pub const SHGFI_SYSICONINDEX
: DWORD
= 0x000004000;
577 pub const SHGFI_LINKOVERLAY
: DWORD
= 0x000008000;
578 pub const SHGFI_SELECTED
: DWORD
= 0x000010000;
579 pub const SHGFI_ATTR_SPECIFIED
: DWORD
= 0x000020000;
580 pub const SHGFI_LARGEICON
: DWORD
= 0x000000000;
581 pub const SHGFI_SMALLICON
: DWORD
= 0x000000001;
582 pub const SHGFI_OPENICON
: DWORD
= 0x000000002;
583 pub const SHGFI_SHELLICONSIZE
: DWORD
= 0x000000004;
584 pub const SHGFI_PIDL
: DWORD
= 0x000000008;
585 pub const SHGFI_USEFILEATTRIBUTES
: DWORD
= 0x000000010;
586 pub const SHGFI_ADDOVERLAYS
: DWORD
= 0x000000020;
587 pub const SHGFI_OVERLAYINDEX
: DWORD
= 0x000000040;
589 pub fn SHGetFileInfoA(
591 dwFileAttributes
: DWORD
,
592 psfi
: *mut SHFILEINFOA
,
596 pub fn SHGetFileInfoW(
598 dwFileAttributes
: DWORD
,
599 psfi
: *mut SHFILEINFOW
,
604 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct SHSTOCKICONINFO {
607 iSysImageIndex
: c_int
,
609 szPath
: [WCHAR
; MAX_PATH
],
611 pub const SHGSI_ICONLOCATION
: DWORD
= 0;
612 pub const SHGSI_ICON
: DWORD
= SHGFI_ICON
;
613 pub const SHGSI_SYSICONINDEX
: DWORD
= SHGFI_SYSICONINDEX
;
614 pub const SHGSI_LINKOVERLAY
: DWORD
= SHGFI_LINKOVERLAY
;
615 pub const SHGSI_SELECTED
: DWORD
= SHGFI_SELECTED
;
616 pub const SHGSI_LARGEICON
: DWORD
= SHGFI_LARGEICON
;
617 pub const SHGSI_SMALLICON
: DWORD
= SHGFI_SMALLICON
;
618 pub const SHGSI_SHELLICONSIZE
: DWORD
= SHGFI_SHELLICONSIZE
;
619 ENUM
!{enum SHSTOCKICONID
{
622 SIID_APPLICATION
= 2,
627 SIID_DRIVEREMOVE
= 7,
630 SIID_DRIVENETDISABLED
= 10,
643 SIID_RECYCLERFULL
= 32,
644 SIID_MEDIACDAUDIO
= 40,
647 SIID_PRINTERNET
= 50,
648 SIID_SERVERSHARE
= 51,
649 SIID_PRINTERFAX
= 52,
650 SIID_PRINTERFAXNET
= 53,
651 SIID_PRINTERFILE
= 54,
654 SIID_STUFFEDFOLDER
= 57,
655 SIID_DRIVEUNKNOWN
= 58,
658 SIID_MEDIADVDRAM
= 61,
659 SIID_MEDIADVDRW
= 62,
661 SIID_MEDIADVDROM
= 64,
662 SIID_MEDIACDAUDIOPLUS
= 65,
665 SIID_MEDIACDBURN
= 68,
666 SIID_MEDIABLANKCD
= 69,
667 SIID_MEDIACDROM
= 70,
668 SIID_AUDIOFILES
= 71,
669 SIID_IMAGEFILES
= 72,
670 SIID_VIDEOFILES
= 73,
671 SIID_MIXEDFILES
= 74,
672 SIID_FOLDERBACK
= 75,
673 SIID_FOLDERFRONT
= 76,
682 SIID_MEDIAAUDIODVD
= 85,
683 SIID_MEDIAMOVIEDVD
= 86,
684 SIID_MEDIAENHANCEDCD
= 87,
685 SIID_MEDIAENHANCEDDVD
= 88,
686 SIID_MEDIAHDDVD
= 89,
687 SIID_MEDIABLURAY
= 90,
689 SIID_MEDIADVDPLUSR
= 92,
690 SIID_MEDIADVDPLUSRW
= 93,
694 SIID_MEDIASMARTMEDIA
= 97,
695 SIID_MEDIACOMPACTFLASH
= 98,
696 SIID_DEVICECELLPHONE
= 99,
697 SIID_DEVICECAMERA
= 100,
698 SIID_DEVICEVIDEOCAMERA
= 101,
699 SIID_DEVICEAUDIOPLAYER
= 102,
700 SIID_NETWORKCONNECT
= 103,
704 SIID_DRIVEHDDVD
= 132,
706 SIID_MEDIAHDDVDROM
= 134,
707 SIID_MEDIAHDDVDR
= 135,
708 SIID_MEDIAHDDVDRAM
= 136,
709 SIID_MEDIABDROM
= 137,
711 SIID_MEDIABDRE
= 139,
712 SIID_CLUSTEREDDRIVE
= 140,
713 SIID_MAX_ICONS
= 181,
715 pub const SIID_INVALID
: SHSTOCKICONID
= -1i32 as u32;
717 pub fn SHGetStockIconInfo(
720 psii
: *mut SHSTOCKICONINFO
,
722 pub fn SHGetDiskFreeSpaceExA(
723 pszDirectoryName
: LPCSTR
,
724 pulFreeBytesAvailableToCaller
: *mut ULARGE_INTEGER
,
725 pulTotalNumberOfBytes
: *mut ULARGE_INTEGER
,
726 pulTotalNumberOfFreeBytes
: *mut ULARGE_INTEGER
,
728 pub fn SHGetDiskFreeSpaceExW(
729 pszDirectoryName
: LPCWSTR
,
730 pulFreeBytesAvailableToCaller
: *mut ULARGE_INTEGER
,
731 pulTotalNumberOfBytes
: *mut ULARGE_INTEGER
,
732 pulTotalNumberOfFreeBytes
: *mut ULARGE_INTEGER
,
734 pub fn SHGetNewLinkInfoA(
738 pfMustCopy
: *mut BOOL
,
741 pub fn SHGetNewLinkInfoW(
745 pfMustCopy
: *mut BOOL
,
749 pub const SHGNLI_PIDL
: DWORD
= 0x000000001;
750 pub const SHGNLI_PREFIXNAME
: DWORD
= 0x000000002;
751 pub const SHGNLI_NOUNIQUE
: DWORD
= 0x000000004;
752 pub const SHGNLI_NOLNK
: DWORD
= 0x000000008;
753 pub const SHGNLI_NOLOCNAME
: DWORD
= 0x000000010;
754 pub const SHGNLI_USEURLEXT
: DWORD
= 0x000000020;
755 pub const PRINTACTION_OPEN
: DWORD
= 0;
756 pub const PRINTACTION_PROPERTIES
: DWORD
= 1;
757 pub const PRINTACTION_NETINSTALL
: DWORD
= 2;
758 pub const PRINTACTION_NETINSTALLLINK
: DWORD
= 3;
759 pub const PRINTACTION_TESTPAGE
: DWORD
= 4;
760 pub const PRINTACTION_OPENNETPRN
: DWORD
= 5;
761 pub const PRINTACTION_DOCUMENTDEFAULTS
: DWORD
= 6;
762 pub const PRINTACTION_SERVERPROPERTIES
: DWORD
= 7;
764 pub fn SHInvokePrinterCommandA(
771 pub fn SHInvokePrinterCommandW(
779 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct OPEN_PRINTER_PROPS_INFOA {
786 pub type POPEN_PRINTER_PROPS_INFOA
= *mut OPEN_PRINTER_PROPS_INFOA
;
787 STRUCT
!{#[cfg_attr(target_arch = "x86", repr(packed))] struct OPEN_PRINTER_PROPS_INFOW {
789 pszSheetName
: LPWSTR
,
794 pub type POPEN_PRINTER_PROPS_INFOW
= *mut OPEN_PRINTER_PROPS_INFOW
;
795 pub const PRINT_PROP_FORCE_NAME
: DWORD
= 0x01;
797 pub fn SHLoadNonloadedIconOverlayIdentifiers() -> HRESULT
;
798 pub fn SHIsFileAvailableOffline(
800 pdwStatus
: *mut DWORD
,
803 pub const OFFLINE_STATUS_LOCAL
: DWORD
= 0x0001;
804 pub const OFFLINE_STATUS_REMOTE
: DWORD
= 0x0002;
805 pub const OFFLINE_STATUS_INCOMPLETE
: DWORD
= 0x0004;
807 pub fn SHSetLocalizedName(
809 pszResModule
: PCWSTR
,
812 pub fn SHRemoveLocalizedName(
815 pub fn SHGetLocalizedName(
823 pub fn ShellMessageBoxA(
831 pub fn ShellMessageBoxW(
847 pub fn SHEnumerateUnreadMailAccountsA(
850 pszMailAddress
: LPSTR
,
851 cchMailAddress
: c_int
,
853 pub fn SHEnumerateUnreadMailAccountsW(
856 pszMailAddress
: LPWSTR
,
857 cchMailAddress
: c_int
,
859 pub fn SHGetUnreadMailCountA(
861 pszMailAddress
: LPCSTR
,
862 pdwCount
: *mut DWORD
,
863 pFileTime
: *mut FILETIME
,
864 pszShellExecuteCommand
: LPSTR
,
865 cchShellExecuteCommand
: c_int
,
867 pub fn SHGetUnreadMailCountW(
869 pszMailAddress
: LPCWSTR
,
870 pdwCount
: *mut DWORD
,
871 pFileTime
: *mut FILETIME
,
872 pszShellExecuteCommand
: LPWSTR
,
873 cchShellExecuteCommand
: c_int
,
875 pub fn SHSetUnreadMailCountA(
876 pszMailAddress
: LPCSTR
,
878 pszShellExecuteCommand
: LPCSTR
,
880 pub fn SHSetUnreadMailCountW(
881 pszMailAddress
: LPCWSTR
,
883 pszShellExecuteCommand
: LPCWSTR
,
885 pub fn SHTestTokenMembership(
889 pub fn SHGetImageList(
892 ppvObj
: *mut *mut c_void
,
895 pub const SHIL_LARGE
: DWORD
= 0;
896 pub const SHIL_SMALL
: DWORD
= 1;
897 pub const SHIL_EXTRALARGE
: DWORD
= 2;
898 pub const SHIL_SYSSMALL
: DWORD
= 3;
899 pub const SHIL_JUMBO
: DWORD
= 4;
900 pub const SHIL_LAST
: DWORD
= SHIL_JUMBO
;
901 FN
!{stdcall
PFNCANSHAREFOLDERW(
904 FN
!{stdcall
PFNSHOWSHAREFOLDERUIW(
908 pub const WC_NETADDRESS
: &'
static str = "msctls_netaddress";
910 pub fn InitNetworkAddressControl() -> BOOL
;
912 // STRUCT!{struct NC_ADDRESS {
913 // pAddrInfo: *mut NET_ADDRESS_INFO,
914 // PortNumber: USHORT,
915 // PrefixLength: BYTE,
917 // pub type PNC_ADDRESS = *mut NC_ADDRESS;
919 pub fn SHGetDriveMedia(
921 pdwMediaContent
: *mut DWORD
,