SHGetInstanceExplorer
Functions

SHGetInstanceExplorer


WINSHELLAPI HRESULT WINAPI SHGetInstanceExplorer(
    IUnknown *ppunk	
);	

Retrieves the address of Windows Explorer's IUnknown interface.

ppunk
Address of an IUnknown interface pointer that receives Windows Explorer's IUnknown interface.

SHGetMalloc

HRESULT SHGetMalloc(
    LPMALLOC *ppMalloc 	
);	

Retrieves a pointer to the shell's IMalloc interface. This interface must be used to free memory that was allocated by the shell or to allocate memory that will be freed by the shell. Applications can also use this interface to allocate and free their own memory.

ppMalloc
Address of a pointer that receives the shell's IMalloc interface pointer.

SHGetPathFromIDList

WINSHELLAPI BOOL WINAPI SHGetPathFromIDList(
    LPCITEMIDLIST pidl, 	
    LPSTR pszPath	
);	

Converts an item identifier list to a file system path.

pidl
Address of an item identifier list that specifies a file or directory location relative to the root of the namespace (the desktop).
pszPath
Address of a buffer to receive the file system path. This buffer must be at least MAX_PATH characters in size.

If the location specified by the pidl parameter is not part of the file system, this function will fail.

SHGetSettings

void WINAPI SHGetSettings(
    LPSHELLFLAGSTATE lpsfs, 
    DWORD dwMask
);

Retrieves the current shell option settings.

lpsfs
Address of a SHELLFLAGSTATE structure that receives the shell option settings.
dwMask
Set of flags that determine which members of lpsfs are being requested. This can be one or more of the following values:
SSF_DESKTOPHTML The fDesktopHTML member is being requested.
SSF_DONTPRETTYPATH The fDontPrettyPath member is being requested.
SSF_DOUBLECLICKINWEBVIEW The fDoubleClickInWebView member is being requested.
SSF_HIDEICONS The fHideIcons member is being requested.
SSF_MAPNETDRVBUTTON The fMapNetDrvBtn member is being requested.
SSF_NOCONFIRMRECYCLE The fNoConfirmRecycle member is being requested.
SSF_NOWEBVIEW The fNoWebView member is being requested.
SSF_SHOWALLOBJECTS The fShowAllObjects member is being requested.
SSF_SHOWATTRIBCOL The fShowAttribCol member is being requested.
SSF_SHOWCOMPCOLOR The fShowCompColor member is being requested.
SSF_SHOWEXTENSIONS The fShowExtensions member is being requested.
SSF_SHOWINFOTIP The fShowInfoTip member is being requested.
SSF_SHOWSYSFILES The fShowSysFiles member is being requested.
SSF_WIN95CLASSIC The fWin95Classic member is being requested.

SHGetSpecialFolderLocation

WINSHELLAPI HRESULT WINAPI SHGetSpecialFolderLocation(
    HWND hwndOwner,
    int nFolder,
    LPITEMIDLIST *ppidl
);	

Retrieves the PIDL of a special folder.

hwndOwner
Handle to the owner window the client should specify if it displays a dialog box or message box.
nFolder
Value specifying the folder for which to retrieve the location. This parameter can be one of the following values:
CSIDL_ALTSTARTUP File system directory that corresponds to the user's nonlocalized Startup program group.
CSIDL_APPDATA File system directory that serves as a common repository for application-specific data.
CSIDL_BITBUCKET File system directory containing file objects in the user's Recycle Bin. The location of this directory is not in the registry; it is marked with the hidden and system attributes to prevent the user from moving or deleting it.
CSIDL_COMMON_ALTSTARTUP File system directory that corresponds to the nonlocalized Startup program group for all users.
CSIDL_COMMON_DESKTOPDIRECTORY File system directory that contains files and folders that appear on the desktop for all users.
CSIDL_COMMON_FAVORITES File system directory that serves as a common repository for all users' favorite items.
CSIDL_COMMON_PROGRAMS File system directory that contains the directories for the common program groups that appear on the Start menu for all users.
CSIDL_COMMON_STARTMENU File system directory that contains the programs and folders that appear on the Start menu for all users.
CSIDL_COMMON_STARTUP File system directory that contains the programs that appear in the Startup folder for all users.
CSIDL_CONTROLS Virtual folder containing icons for the Control Panel applications.
CSIDL_COOKIES File system directory that serves as a common repository for Internet cookies.
CSIDL_DESKTOP Windows Desktop—virtual folder at the root of the namespace.
CSIDL_DESKTOPDIRECTORY File system directory used to physically store file objects on the desktop (not to be confused with the desktop folder itself).
CSIDL_DRIVES My Computer—virtual folder containing everything on the local computer: storage devices, printers, and Control Panel. The folder may also contain mapped network drives.
CSIDL_FAVORITES File system directory that serves as a common repository for the user's favorite items.
CSIDL_FONTS Virtual folder containing fonts.
CSIDL_HISTORY File system directory that serves as a common repository for Internet history items.
CSIDL_INTERNET Virtual folder representing the Internet.
CSIDL_INTERNET_CACHE File system directory that serves as a common repository for temporary Internet files.
CSIDL_NETHOOD File system directory containing objects that appear in the network neighborhood.
CSIDL_NETWORK Network Neighborhood Folder—virtual folder representing the top level of the network hierarchy.
CSIDL_PERSONAL File system directory that serves as a common repository for documents.
CSIDL_PRINTERS Virtual folder containing installed printers.
CSIDL_PRINTHOOD File system directory that serves as a common repository for printer links.
CSIDL_PROGRAMS File system directory that contains the user's program groups (which are also file system directories).
CSIDL_RECENT File system directory that contains the user's most recently used documents.
CSIDL_SENDTO File system directory that contains Send To menu items.
CSIDL_STARTMENU File system directory containing Start menu items.
CSIDL_STARTUP File system directory that corresponds to the user's Startup program group. The system starts these programs whenever any user logs onto Windows NT or starts Windows 95.
CSIDL_TEMPLATES File system directory that serves as a common repository for document templates.
ppidl
Address of a pointer to an item identifier list specifying the folder's location relative to the root of the namespace (the desktop). The calling application is responsible for freeing this pointer with the shell's IMalloc interface (see SHGetMalloc).

See also SHGetSpecialFolderPath

SHGetSpecialFolderPath

WINSHELLAPI HRESULT WINAPI SHGetSpecialFolderPath(
    HWND hwndOwner,
    LPTSTR lpszPath,
    int nFolder,
    BOOL fCreate
);	

Retrieves the path of a special folder.

hwndOwner
Handle to the owner window the client should specify if it displays a dialog box or message box.
lpszPath
Address of a character buffer that receives the drive and path of the specified folder. This buffer must be at least MAX_PATH characters in size.
nFolder
Value specifying the folder for which to retrieve the location. This can be one of the nFolder values described in SHGetSpecialFolderLocation. This argument must specify a real folder and not a virtual folder. If a virtual folder is specified, this function will fail.
fCreate
Indicates if the folder should be created if it does not already exist. If this value is nonzero, the folder will be created. If this value is zero, the folder will not be created.

Version 4.71

SHLoadInProc

WINSHELLAPI HRESULT WINAPI SHLoadInProc(
    REFCLSID rclsid	
);	

Creates an instance of the specified object class from within the context of the shell's process.

rclsid
CLSID of the object class to be created.

SHQueryRecycleBin

SHSTDAPI SHQueryRecycleBin(
    LPCTSTR pszRootPath, 
    LPSHQUERYRBINFO pSHQueryRBInfo
);		

Retrieves the size of the Recycle Bin, and number of items in it, on the specified drive.

pszRootPath
Address of a NULL-terminated string to contain the path of the root drive on which the Recycle Bin is located. This parameter can contain the address of a string formatted with the drive, folder, and subfolder names (c:\windows\system . . .). It can also contain an empty string or NULL. If this value is an empty string or NULL, information is retrieved for all Recycle Bins on all drives.
pSHQueryRBInfo
Address of a SHQUERYRBINFO structure that receives the Recycle Bin information. The cbSize member of the structure must be set to the size of the structure before calling this API.

See also SHEmptyRecycleBin

© 1997 Microsoft Corporation. All rights reserved. Terms of Use.