OWLNext    7.0
Borland's Object Windows Library for the modern age
Loading...
Searching...
No Matches
owl::TShellItem Class Reference

An item in the shell's name space. More...

#include <owl/shellitm.h>

Inheritance diagram for owl::TShellItem:
owl::TComRef< IShellFolder > owl::TComRefBase< T >

Classes

struct  TCreateStruct
 TCreateStruct contains information to construct a TShellItem Typically a TCreateStruct is returned (for example by GetParentFolder) and this TCreateStruct is used to construct a TshellItem Passed in as arguments to: More...
 

Public Types

enum  TDisplayNameKind { Normal = SHGDN_NORMAL , InFolder = SHGDN_INFOLDER , ForParsing = SHGDN_FORPARSING }
 Used by TShelItem::GetDisplayName() and TShellItem::Rename() See MS doc for SHGNO for more information, Programmer's Guide to MS Windows 95, MS Press, p. More...
 
enum  TIconSize { Large = SHGFI_LARGEICON , Small = SHGFI_SMALLICON , Shell = SHGFI_SHELLICONSIZE }
 Used by TShellItem::GetIcon See MS doc for SHGetFileInfo for more information, Programmer's Guide to MS Windows 95, MS Press, pp. More...
 
enum  TIconKind { Link = SHGFI_LINKOVERLAY , Open = SHGFI_OPENICON , Selected = SHGFI_SELECTED }
 Used by TShellItem::GetIcon See MS doc for SHGetFileInfo for more information, Programmer's Guide to MS Windows 95, MS Press, pp. More...
 
enum  TSpecialFolderKind {
  RecycleBin = CSIDL_BITBUCKET , ControlPanel = CSIDL_CONTROLS , Desktop = CSIDL_DESKTOP , DesktopFileDir = CSIDL_DESKTOPDIRECTORY , MyComputer = CSIDL_DRIVES , Fonts = CSIDL_FONTS , NetworkNeighborhoodFileDir = CSIDL_NETHOOD , NetworkNeighborhood = CSIDL_NETWORK , CommonDocuments = CSIDL_PERSONAL , Printers = CSIDL_PRINTERS ,
  Programs = CSIDL_PROGRAMS , RecentDocuments = CSIDL_RECENT , SendTo = CSIDL_SENDTO , StartMenu = CSIDL_STARTMENU , Startup = CSIDL_STARTUP , CommonTemplates = CSIDL_TEMPLATES , Favorites = CSIDL_FAVORITES
}
 Used by TShellItem::TShellItem(const TSpecialFolderKind kind, HWND windowOwner = 0) See MS doc for SHGetSpecialFolderLocation for more information, Programmer's Guide to MS Windows 95, MS Press, pp. More...
 
enum  TAttribute {
  atCapabilityMask = SFGAO_CAPABILITYMASK , atCanBeCopied = SFGAO_CANCOPY , atCanBeDeleted = SFGAO_CANDELETE , atCanCreateShortcut = SFGAO_CANLINK , atCanBeMoved = SFGAO_CANMOVE , atCanBeRenamed = SFGAO_CANRENAME , atIsADropTarget = SFGAO_DROPTARGET , atHasAPropertySheet = SFGAO_HASPROPSHEET , atDisplayAttributeMask = SFGAO_DISPLAYATTRMASK , atDisplayGhosted = SFGAO_GHOSTED ,
  atIsShortcut = SFGAO_LINK , atIsReadOnly = SFGAO_READONLY , atIsShared = SFGAO_SHARE , atContentsMask = SFGAO_CONTENTSMASK , atContainsSubFolder = SFGAO_HASSUBFOLDER , atContainsFileSystemFolder = SFGAO_FILESYSANCESTOR , atIsPartOfFileSystem = SFGAO_FILESYSTEM , atIsFolder = SFGAO_FOLDER , atCanBeRemoved = SFGAO_REMOVABLE
}
 Used by TShellItem::GetAttributes See MS doc for IShellFolder::GetAttributesOf for more information, Programmer's Guide to MS Windows 95, MS Press, pp. More...
 
enum  TFileOpFlags { AllowUndo = FOF_ALLOWUNDO , NoConfirmation = FOF_NOCONFIRMATION , NoConfirmMkDir = FOF_NOCONFIRMMKDIR , RenameOnCollision = FOF_RENAMEONCOLLISION , Silent = FOF_SILENT , SimpleProgress = FOF_SIMPLEPROGRESS }
 Used by TShellItem::Rename,Copy,Move,Delete See MS doc for SHFILEOPSTRUCT for more information, Programmer's Guide to MS Windows 95, MS Press, pp. More...
 
enum  TBrowseFlags { OnlyComputers , OnlyPrinters , NoNetorkFoldersBelowDomain , OnlyFSAncestors , OnlyFSDirs }
 Used by TShellItem::BrowseForFolder See MS doc for BROWSEINFO for more information, Programmer's Guide to MS Windows 95, MS Press, pp. More...
 
enum  TExeKind { NonExecutable , WindowsNE , WindowsPE , MSDOS , Win32Console }
 Returned by TShellItem::GetExeType See MS doc for SHGetFileInfo for more information, Programmer's Guide to MS Windows 95, MS Press, pp. More...
 

Public Member Functions

 TShellItem (const tchar *path, bool throwOnInvalidPath=true, HWND windowOwner=0)
 TShellItem constructor to make a TShellItem for a file or directory in the file system.
 
 TShellItem (const TSpecialFolderKind kind, HWND windowOwner=0)
 TShellItem constructor to make a TShellItem for a special folder.
 
 TShellItem (const TCreateStruct &cs)
 TShellItem constructor to make a TShellItem from a TCreateStruct.
 
 TShellItem (const TPidl &Pidl, const TComRef< IShellFolder > &parentFolder)
 TShellItem constructor to make a TShellItem from a TPidl and a TComRef<IShellFolder> (parent folder)
 
 TShellItem (LPITEMIDLIST pidl=nullptr, const TComRef< IShellFolder > &parentFolder=TComRef< IShellFolder >(nullptr))
 TShellIterm constructor to make a TShellItem from a ITEMIDLIST(pidl) and a TComRef<IShellFolder> (parent folder)
 
 TShellItem (const TShellItem &source)
 TShellItem copy constructor.
 
TShellItemoperator= (const TShellItem &source)
 TShellItem assignment (from another TShellItem)
 
TShellItemoperator= (const TCreateStruct &cs)
 TShellItem assignment (from a TCreateStruct)
 
bool Valid () const
 Determine if TShellItem reprsents a valid item.
 
 operator LPCITEMIDLIST () const
 Allow TShellItems to be used in place of pidls.
 
TExtractIcon GetExtractIcon (HWND windowOwner=0)
 GetExtractIcon returns an interface pointer to this TShellItem's IExtractIcon OLE interface.
 
TContextMenu GetContextMenu (HWND windowOwner=0)
 GetContextMenu returns an interface pointer to this TShellItem's IContextMenu OLE interface.
 
TDataObject GetDataObject (HWND windowOwner=0)
 GetDataObject returns an interface pointer to this TShellItem's IDataObject OLE interface.
 
TDropTarget GetDropTarget (HWND windowOwner=0)
 GetDropTarget returns an interface pointer to this TShellItem's IDropTarget OLE interface.
 
HICON GetIcon (TIconSize size=Shell, uint kind=0)
 GetIcon returns a handle to an icon representing this TShellItem.
 
ulong GetAttributes (const ulong reqAttrib, const bool validateCachedInfo=false) const
 Get Attributes of a TShellItem GetAttributes - Get Capabilities, Display, Contents, & Misc.
 
bool CanBeCopied (const bool validateCachedInfo=false) const
 Return true if the TShellItem represents an item that can be copied.
 
bool CanBeDeleted (const bool validateCachedInfo=false) const
 Return true if the TShellItem represents an item that can be deleted.
 
bool CanCreateShortcut (const bool validateCachedInfo=false) const
 Return true if the TShellItem represents an item for which a shortcut can be created.
 
bool CanBeMoved (const bool validateCachedInfo=false) const
 Return true if the TShellItem represents an item that can be moved.
 
bool CanBeRenamed (const bool validateCachedInfo=false) const
 Return true if the TShellItem represents an item that can be renamed.
 
bool IsADropTarget (const bool validateCachedInfo=false) const
 Return true if the TShellItem represents an item is a drop target.
 
bool HasAPropertySheet (const bool validateCachedInfo=false) const
 Return true if the TShellItem represents an item that has a property sheet.
 
bool DisplayGhosted (const bool validateCachedInfo=false) const
 Return true if the TShellItem represents an item that should be displayed as ghosted.
 
bool IsShortcut (const bool validateCachedInfo=false) const
 Return true if the TShellItem represents an item that is a shortcut.
 
bool IsReadOnly (const bool validateCachedInfo=false) const
 Return true if the TShellItem represents an item that is read only.
 
bool IsShared (const bool validateCachedInfo=false) const
 Return true if the TShellItem represents an item that is shared.
 
bool ContainsSubFolder (const bool validateCachedInfo=false) const
 Return true if the TShellItem represents an item that contains a subfolder.
 
bool ContainsFileSystemFolder (const bool validateCachedInfo=false) const
 Return true if the TShellItem represents an item that contains a file system folder.
 
bool IsPartOfFileSystem (const bool validateCachedInfo=false) const
 Return true if the TShellItem represents an item that is part of the file system.
 
bool IsFolder (const bool validateCachedInfo=false) const
 Return true if the TShellItem represents an item that is a folder.
 
bool CanBeRemoved (const bool validateCachedInfo=false) const
 Return true if the TShellItem represents an item that can be removed.
 
bool IsDesktop () const
 IsDesktop returns true if the TShellItem respresents the shell's desktop.
 
TPidl GetPidl () const
 Get TPidl (relative to parent)
 
TPidl GetFullyQualifiedPidl () const
 Get fully qualified TPidl.
 
TCreateStruct GetParentFolder () const
 Get Parent Folder.
 
TExeKind GetExeType (uint *major=0, uint *minor=0) const
 Get type of executable file (may return NonExecutable)
 
TString GetTypeName () const
 Get type of file (e.g., "Borland C++ Header File", "Notepad File")
 
TString GetDisplayName (const TDisplayNameKind kind=Normal) const
 Get Displayname (for a TShellItem that's part of the filesystem, this is the filename)
 
TString GetPath () const
 Get path (only call if the TShellItem is part of the file system (IsPartOfFileSystem == true)
 
void Rename (const tchar *newName, HWND windowOwner=0, const TDisplayNameKind kind=Normal)
 Rename renames this TShellItem to newName.
 
bool Copy (const tchar *dest, const bool destIsFolder=true, const USHORT flags=0, const tchar *title=0, HWND windowOwner=0) const
 Copy copies this TShellItem to destination path.
 
bool Copy (const TShellItem &dest, const USHORT flags=0, const tchar *title=0, HWND windowOwner=0) const
 Copy copies this TShellItem to destination TShellItem.
 
bool Move (const tchar *destFolder, const USHORT flags=0, const tchar *title=0, HWND windowOwner=0)
 Move moves this TShellItem to destination path (which must be a folder)
 
bool Move (const TShellItem &destFolder, const USHORT flags=0, const tchar *title=0, HWND windowOwner=0)
 Move moves this TShellItem to destination TShellItem (which must be a folder)
 
bool Delete (const USHORT flags=0, const tchar *title=0, HWND windowOwner=0)
 Delete deletes this TShellItem.
 
void AddToRecentDocs () const
 Add to recent docs (Win95 taskbar:Start:Documents)
 
TShellItem ResolveShortcut (HWND windowOwner=0)
 Get the TShellItem that a shortcut points to.
 
TShellItem CreateShortCut (TCHAR *pathLink, TCHAR *description)
 Creates a shortcut to this object.
 
bool operator== (const TShellItem &rhs) const
 Compare sort order of this TShellItem equals another TShellItem.
 
bool operator!= (const TShellItem &rhs) const
 Compare sort order of this TShellItem is not equal to another TShellItem.
 
bool operator< (const TShellItem &rhs) const
 Compare sort order of this TShellItem is less than another TShellItem.
 
bool operator<= (const TShellItem &rhs) const
 Compare sort order of this TShellItem <= another TShellItem.
 
bool operator> (const TShellItem &rhs) const
 Compare sort order of this TShellItem is greater than another TShellItem.
 
bool operator>= (const TShellItem &rhs) const
 Compare sort order of this TShellItem >= another TShellItem.
 
void EnumObjects (IEnumIDList **iface, HWND windowOwner=0, const int kind=-1) const
 EnumObjects is a protected function that returns an IEnumIDList enumerator on a folder.
 
bool BrowseForFolder (TCreateStruct &cs, HWND windowOwner=0, const tchar *title=0, const UINT flags=0, int *image=0, const bool includeStatus=false, BFFCALLBACK func=0, const LPARAM param=0) const
 Select a Foler under this TShellItem.
 
HRESULT ParseDisplayName (TCreateStruct &cs, const tchar *displayName, ulong *eaten=nullptr, HWND windowOwner=nullptr, ulong *attrib=nullptr) const
 Parse a display name into a TShellItem (actually, into a TCreateStruct)
 
- Public Member Functions inherited from owl::TComRef< IShellFolder >
 TComRef ()
 
 TComRef (IShellFolder *iface)
 
 TComRef (const TComRef< IShellFolder > &i)
 
TComRef< IShellFolder > & operator= (IShellFolder *iface)
 
TComRef< IShellFolder > & operator= (const TComRef< IShellFolder > &i)
 
IShellFolderoperator-> ()
 
IShellFolderoperator-> () const
 
- Public Member Functions inherited from owl::TComRefBase< T >
 operator T* ()
 
 operator T** ()
 
int operator! () const
 
void operator delete (void *p)
 

Static Public Member Functions

static HRESULT CreateShortCut (LPCTSTR objPath, TCHAR *pathLink, TCHAR *description)
 Create a shortcut to a file object.
 
static HRESULT CreateShortCut (LPCITEMIDLIST pidl, TCHAR *pathLink, TCHAR *description)
 Create a shortcut to a non-file object.
 

Protected Member Functions

short CompareIDs (const TShellItem &rhs) const
 CompareIDs is a protected function that compares a TShellItem's pidl with another TShellItem's pidl.
 
void EnforceValidity () const
 EnforceValidity is a protected function that checks that a TShellItem is valid before proceeding with an operation that requires the TShellItem to be valid.
 
void RetrieveIShellFolder () const
 RetrieveIShellFolder is a protected function that checks to see if a TShellItem's IShellFolder interface is already assigned a value.
 
bool HaveSameParent (const TShellItem &other) const
 HaveSameParent returns true if this TShellItem and other TShellItem have the same immediate parent folder.
 
bool GetAttribute (const TAttribute at, const bool validateCachedInfo) const
 GetAttribute is a protected function used by all the attribute functions except IsDesktop.
 
- Protected Member Functions inherited from owl::TComRefBase< T >
 TComRefBase (const TComRefBase< T > &i)
 
 TComRefBase (T *i)
 
 TComRefBase ()
 
 ~TComRefBase ()
 
void Clear ()
 

Additional Inherited Members

- Protected Attributes inherited from owl::TComRefBase< T >
T * I
 

Detailed Description

An item in the shell's name space.

All items in the shell's namespace can be identified by a fully qualified pidl. Another way to uniquely identify an item is via it's parent and an item id (i.e., a single item rather than a list). A TShellItem contains a parent (TComRef<IShellFolder> ParentFolder) and the item id (TPidl pidl)

Definition at line 238 of file shellitm.h.

Member Enumeration Documentation

◆ TAttribute

Used by TShellItem::GetAttributes See MS doc for IShellFolder::GetAttributesOf for more information, Programmer's Guide to MS Windows 95, MS Press, pp.

194-196.

Enumerator
atCapabilityMask 

Mask for the capability flags.

atCanBeCopied 

The shell item can be copied.

atCanBeDeleted 

The shell item can be deleted.

atCanCreateShortcut 

Shortcuts can be created for the shell item.

atCanBeMoved 

The shell item can be moved.

atCanBeRenamed 

The shell item can be renamed.

atIsADropTarget 

The shell item is a drop target.

atHasAPropertySheet 

The shell item has a property sheet.

atDisplayAttributeMask 

Mask for the display attributes.

atDisplayGhosted 

The shell item should be displayed using a ghosted icon.

atIsShortcut 

The shell item is a shortcut.

atIsReadOnly 

The shell item is readonly.

atIsShared 

The shell item is shared.

atContentsMask 

Mask for the contents attributes.

atContainsSubFolder 

The shell item has subfolders.

atContainsFileSystemFolder 

The shell item contains one or more system folders.

atIsPartOfFileSystem 

The shell item is part of the file system.

atIsFolder 

The shell item is a folder.

atCanBeRemoved 

The shell item is on removable media.

Definition at line 297 of file shellitm.h.

◆ TBrowseFlags

Used by TShellItem::BrowseForFolder See MS doc for BROWSEINFO for more information, Programmer's Guide to MS Windows 95, MS Press, pp.

211-212.

Enumerator
OnlyComputers 

Returns only computers.

OnlyPrinters 

Returns only printers.

NoNetorkFoldersBelowDomain 

Does not return network folders below the domain.

OnlyFSAncestors 

Returns only file system ancestors.

OnlyFSDirs 

Returns only file system directories.

Definition at line 347 of file shellitm.h.

◆ TDisplayNameKind

Used by TShelItem::GetDisplayName() and TShellItem::Rename() See MS doc for SHGNO for more information, Programmer's Guide to MS Windows 95, MS Press, p.

Enumerator
Normal 

File object displayed by itself.

InFolder 

File object displayed within a folder.

ForParsing 

File object suitable for parsing.

Definition at line 244 of file shellitm.h.

◆ TExeKind

Returned by TShellItem::GetExeType See MS doc for SHGetFileInfo for more information, Programmer's Guide to MS Windows 95, MS Press, pp.

205-207.

Enumerator
NonExecutable 

Nonexecutable file or an error condition.

WindowsNE 

Windows-based application.

WindowsPE 

Windows level (3.0, 3.5, or 4.0)

MSDOS 

MS-DOS .EXE, .COM, or .BAT file.

Win32Console 

Win32-based console application.

Definition at line 359 of file shellitm.h.

◆ TFileOpFlags

Used by TShellItem::Rename,Copy,Move,Delete See MS doc for SHFILEOPSTRUCT for more information, Programmer's Guide to MS Windows 95, MS Press, pp.

214-215.

Enumerator
AllowUndo 

Preserves undo information (if possible)

NoConfirmation 

Responds with "yes to all" for any dialog.

NoConfirmMkDir 

No confirmation on the creation of a new directory.

RenameOnCollision 

Renames the file being operated on if a file of the same name already exists (i.e., Copy #1 of ...)

Silent 

No progess dialog box is displayed.

SimpleProgress 

A simple progress dialog box is diaplayed (no file names)

Definition at line 334 of file shellitm.h.

◆ TIconKind

Used by TShellItem::GetIcon See MS doc for SHGetFileInfo for more information, Programmer's Guide to MS Windows 95, MS Press, pp.

205-207.

Enumerator
Link 

Adds the link overlay to the shell item's icon.

Open 

Retrieves the shell item's open icon.

Selected 

Blends the shell item's icon with the system highlight color.

Definition at line 262 of file shellitm.h.

◆ TIconSize

Used by TShellItem::GetIcon See MS doc for SHGetFileInfo for more information, Programmer's Guide to MS Windows 95, MS Press, pp.

205-207.

Enumerator
Large 

Retrieves the shell item's large icon.

Small 

Retrieves the shell item's small icon.

Shell 

Retrieves the shell-sized icon (if unavailable, the normal icon is sized according to the system metric values)

Definition at line 252 of file shellitm.h.

◆ TSpecialFolderKind

Used by TShellItem::TShellItem(const TSpecialFolderKind kind, HWND windowOwner = 0) See MS doc for SHGetSpecialFolderLocation for more information, Programmer's Guide to MS Windows 95, MS Press, pp.

209-210.

Enumerator
RecycleBin 

Directory containing file objects in the user's recycle bin.

ControlPanel 

Virtual folder containing icons for the Control Panel.

Desktop 

Virtual folder at the root of the namespace.

DesktopFileDir 

Directory used to physically store file objects on the desktop.

MyComputer 

Virtual folder containing everything on the local computer.

Fonts 

Virtual folder containing fonts.

NetworkNeighborhoodFileDir 

Directory containing objects that appeat in the Network Neighborhood.

NetworkNeighborhood 

Virtual folder representing the top level of the network hierarchy.

CommonDocuments 

Directory that serves as a repository for common documents.

Printers 

Virtual folder containing installed printers.

Programs 

Directory containing the user's program groups.

RecentDocuments 

Directory containing the user's most recently used documents.

SendTo 

Directory containing Send To menu items.

StartMenu 

Directory containing Start menu items.

Startup 

Directory that corresponds to the user's Startup program group.

CommonTemplates 

Directory that serves as a repository for document templates.

Favorites 

Definition at line 273 of file shellitm.h.

Constructor & Destructor Documentation

◆ TShellItem() [1/6]

owl::TShellItem::TShellItem ( const tchar * path,
bool throwOnInvalidPath = true,
HWND windowOwner = 0 )

TShellItem constructor to make a TShellItem for a file or directory in the file system.

If the throwOnInvalidPath argument is true, an exception will be raised if the path is not valid or if the file or directory does not exist. If this argument is false, no exception will be raised and the Valid() function should be called to make sure it returns true. If Valid() returns false, the TShellItem does not represent a object in the shell namespace.

Definition at line 405 of file shellitm.cpp.

References _T, owl::TXShell::Check(), Desktop, owl::TXShell::Raise(), REINTERPRET_CAST, STATIC_CAST, and WARNX.

◆ TShellItem() [2/6]

owl::TShellItem::TShellItem ( const TSpecialFolderKind kind,
HWND windowOwner = 0 )

TShellItem constructor to make a TShellItem for a special folder.

Special folders can be any specified in the TSpecialFolderKind enum.

(see MS doc for SHGetSpecialFolderLocation for more information, Programmer's Guide to MS Windows 95, MS Press, p. 209)

Definition at line 446 of file shellitm.cpp.

References _T, owl::TXShell::Check(), Desktop, owl::TComRefBase< T >::I, REINTERPRET_CAST, owl::TShell::SHGetDesktopFolder(), owl::TShell::SHGetSpecialFolderLocation(), STATIC_CAST, and WARNX.

◆ TShellItem() [3/6]

owl::TShellItem::TShellItem ( const TCreateStruct & cs)

TShellItem constructor to make a TShellItem from a TCreateStruct.

TCreateStruct contains a TPidl and a TComRef<IShellFolder>ParentFolder which represents the parent folder

TCreateStructs are returned by TShellItem::GetParentFolder() and by the following TShellItemIterator functions: operator ++(pre- &post-fix), operator – (pre- & post-fix), operator [](), and Current()

TCreateStructs are also returned as out parameters of the following TShellItem functions: BrowseForFolder(), ParseDisplayName()

Definition at line 490 of file shellitm.cpp.

◆ TShellItem() [4/6]

owl::TShellItem::TShellItem ( const TPidl & Pidl,
const TComRef< IShellFolder > & parentFolder )

TShellItem constructor to make a TShellItem from a TPidl and a TComRef<IShellFolder> (parent folder)

Definition at line 510 of file shellitm.cpp.

◆ TShellItem() [5/6]

owl::TShellItem::TShellItem ( LPITEMIDLIST pidl = nullptr,
const TComRef< IShellFolder > & parentFolder = TComRef<IShellFolder>(nullptr) )

TShellIterm constructor to make a TShellItem from a ITEMIDLIST(pidl) and a TComRef<IShellFolder> (parent folder)

Definition at line 501 of file shellitm.cpp.

◆ TShellItem() [6/6]

owl::TShellItem::TShellItem ( const TShellItem & source)

TShellItem copy constructor.

Definition at line 518 of file shellitm.cpp.

Member Function Documentation

◆ AddToRecentDocs()

void owl::TShellItem::AddToRecentDocs ( ) const

Add to recent docs (Win95 taskbar:Start:Documents)

Adds the TShellItem to the taskbar's recent document list (see MS doc for more info on SHAddToRecentDocs, Programmer's Guide to MS Windows 95, MS Press, p.

202)

Definition at line 1380 of file shellitm.cpp.

References EnforceValidity(), GetFullyQualifiedPidl(), owl::TShell::SHAddToRecentDocs(), and STATIC_CAST.

◆ BrowseForFolder()

bool owl::TShellItem::BrowseForFolder ( TCreateStruct & cs,
HWND windowOwner = 0,
const tchar * title = 0,
const UINT flags = 0,
int * image = 0,
const bool includeStatus = false,
BFFCALLBACK func = 0,
const LPARAM param = 0 ) const

Select a Foler under this TShellItem.

BrowseForFolder presents a dialog box to the user in which he can select a subfolder.

The root of the dialog box is this TShellItem folder.

Note
It is only meaningful to call this function if the TShellItem is a folder; consequently, if this function is called on a TShellItem that is not a folder, an exception will be thrown.

Additional Documentation: See MS doc on SHBrowseForFolder for more info, more info, Programmer's Guide to MS Windows 95, MS Press, pp. 202-203.

Definition at line 1489 of file shellitm.cpp.

References _MAX_PATH, _T, owl::TXShell::Check(), Desktop, EnforceValidity(), GetFullyQualifiedPidl(), REINTERPRET_CAST, RetrieveIShellFolder(), owl::TShell::SHBrowseForFolder(), STATIC_CAST, and WARNX.

◆ CanBeCopied()

bool owl::TShellItem::CanBeCopied ( const bool validateCachedInfo = false) const
inline

Return true if the TShellItem represents an item that can be copied.

Definition at line 958 of file shellitm.h.

References atCanBeCopied, and GetAttribute().

◆ CanBeDeleted()

bool owl::TShellItem::CanBeDeleted ( const bool validateCachedInfo = false) const
inline

Return true if the TShellItem represents an item that can be deleted.

Definition at line 965 of file shellitm.h.

References atCanBeDeleted, and GetAttribute().

◆ CanBeMoved()

bool owl::TShellItem::CanBeMoved ( const bool validateCachedInfo = false) const
inline

Return true if the TShellItem represents an item that can be moved.

Definition at line 980 of file shellitm.h.

References atCanBeMoved, and GetAttribute().

◆ CanBeRemoved()

bool owl::TShellItem::CanBeRemoved ( const bool validateCachedInfo = false) const
inline

Return true if the TShellItem represents an item that can be removed.

Definition at line 1071 of file shellitm.h.

References atCanBeRemoved, and GetAttribute().

◆ CanBeRenamed()

bool owl::TShellItem::CanBeRenamed ( const bool validateCachedInfo = false) const
inline

Return true if the TShellItem represents an item that can be renamed.

Definition at line 987 of file shellitm.h.

References atCanBeRenamed, and GetAttribute().

◆ CanCreateShortcut()

bool owl::TShellItem::CanCreateShortcut ( const bool validateCachedInfo = false) const
inline

Return true if the TShellItem represents an item for which a shortcut can be created.

Definition at line 973 of file shellitm.h.

References atCanCreateShortcut, and GetAttribute().

◆ CompareIDs()

short owl::TShellItem::CompareIDs ( const TShellItem & rhs) const
protected

CompareIDs is a protected function that compares a TShellItem's pidl with another TShellItem's pidl.

(see MS doc for more info CompareIDs, Programmer's Guide to MS Windows 95, MS Press, p. 194)

Definition at line 1394 of file shellitm.cpp.

References _T, owl::TXShell::Check(), Desktop, EnforceValidity(), GetFullyQualifiedPidl(), HaveSameParent(), STATIC_CAST, and WARNX.

◆ ContainsFileSystemFolder()

bool owl::TShellItem::ContainsFileSystemFolder ( const bool validateCachedInfo = false) const
inline

Return true if the TShellItem represents an item that contains a file system folder.

Definition at line 1050 of file shellitm.h.

References atContainsFileSystemFolder, and GetAttribute().

◆ ContainsSubFolder()

bool owl::TShellItem::ContainsSubFolder ( const bool validateCachedInfo = false) const
inline

Return true if the TShellItem represents an item that contains a subfolder.

Definition at line 1041 of file shellitm.h.

References atContainsSubFolder, and GetAttribute().

◆ Copy() [1/2]

bool owl::TShellItem::Copy ( const tchar * dest,
const bool destIsFolder = true,
const USHORT flags = 0,
const tchar * title = 0,
HWND windowOwner = 0 ) const

Copy copies this TShellItem to destination path.

destIsFolder must tell whether or not dest is a folder

flags are any combination of TFileOpFlags (see MS doc for SHFILEOPSTRUCT for meanings of these flags, Programmer's Guide to MS Windows 95, MS Press, p. 215)

Title is the title displayed in the progress dialog box

windowOwner should be set to the owner of the progress dialog box

See MS doc for SHFileOperation for more information, Programmer's Guide to MS Windows 95, MS Press, p. 204.

Definition at line 845 of file shellitm.cpp.

References _MAX_PATH, _tcscpy, CanBeCopied(), EnforceValidity(), ForParsing, GetDisplayName(), IsFolder(), owl::TXShell::Raise(), owl::TShell::SHChangeNotify(), owl::TShell::SHFileOperation(), and STATIC_CAST.

◆ Copy() [2/2]

bool owl::TShellItem::Copy ( const TShellItem & dest,
const USHORT flags = 0,
const tchar * title = 0,
HWND windowOwner = 0 ) const

Copy copies this TShellItem to destination TShellItem.

flags are any combination of TFileOpFlags (see MS doc for SHFILEOPSTRUCT for meanings of these flags, Programmer's Guide to MS Windows 95, MS Press, p. 215)

Title is the title displayed in the progress dialog box

windowOwner should be set to the owner of the progress dialog box

See MS doc for SHFileOperation for more information, Programmer's Guide to MS Windows 95, MS Press, p. 204.

Definition at line 900 of file shellitm.cpp.

References Copy(), and ForParsing.

◆ CreateShortCut() [1/3]

HRESULT owl::TShellItem::CreateShortCut ( LPCITEMIDLIST pidl,
TCHAR * pathLink,
TCHAR * description )
static

Create a shortcut to a non-file object.

Note
IMPORTANT: This function calls CoCreateInstance. Therefore an application that uses this function MUST have previously called CoInitialize (or OLEInitialize).

Definition at line 1321 of file shellitm.cpp.

References owl::TXShell::Check(), owl::TOle::CoCreateInstance(), REINTERPRET_CAST, and STATIC_CAST.

◆ CreateShortCut() [2/3]

HRESULT owl::TShellItem::CreateShortCut ( LPCTSTR objPath,
TCHAR * pathLink,
TCHAR * description )
static

Create a shortcut to a file object.

Note
IMPORTANT: This function calls CoCreateInstance. Therefore an application that uses this function MUST have previously called CoInitialize (or OLEInitialize).

Definition at line 1284 of file shellitm.cpp.

References owl::TXShell::Check(), owl::TOle::CoCreateInstance(), REINTERPRET_CAST, and STATIC_CAST.

◆ CreateShortCut() [3/3]

TShellItem owl::TShellItem::CreateShortCut ( TCHAR * linkPath,
TCHAR * description )

Creates a shortcut to this object.

Note
IMPORTANT: This function calls CoCreateInstance. Therefore an application that uses this function MUST have previously called CoInitialize (or OLEInitialize).

Definition at line 1356 of file shellitm.cpp.

References TShellItem(), CreateShortCut(), EnforceValidity(), GetFullyQualifiedPidl(), GetPath(), and IsPartOfFileSystem().

◆ Delete()

bool owl::TShellItem::Delete ( const USHORT flags = 0,
const tchar * title = 0,
HWND windowOwner = 0 )

Delete deletes this TShellItem.

flags are any combination of TFileOpFlags (see MS doc for SHFILEOPSTRUCT for meanings of these flags, Programmer's Guide to MS Windows 95, MS Press, p. 215)

Title is the title displayed in the progress dialog box

windowOwner should be set to the owner of the progress dialog box

See MS doc for SHFileOperation for more information, Programmer's Guide to MS Windows 95, MS Press, p. 204.

Definition at line 1010 of file shellitm.cpp.

References TShellItem(), _MAX_PATH, _tcscpy, CanBeDeleted(), EnforceValidity(), ForParsing, GetDisplayName(), IsFolder(), owl::TComRef< T >::operator=(), owl::TXShell::Raise(), owl::TShell::SHChangeNotify(), and owl::TShell::SHFileOperation().

◆ DisplayGhosted()

bool owl::TShellItem::DisplayGhosted ( const bool validateCachedInfo = false) const
inline

Return true if the TShellItem represents an item that should be displayed as ghosted.

Definition at line 1011 of file shellitm.h.

References atDisplayGhosted, and GetAttribute().

◆ EnforceValidity()

void owl::TShellItem::EnforceValidity ( ) const
protected

EnforceValidity is a protected function that checks that a TShellItem is valid before proceeding with an operation that requires the TShellItem to be valid.

Definition at line 1424 of file shellitm.cpp.

References _T, owl::TXShell::Raise(), Valid(), and WARNX.

◆ EnumObjects()

void owl::TShellItem::EnumObjects ( IEnumIDList ** iface,
HWND windowOwner = 0,
const int kind = -1 ) const

EnumObjects is a protected function that returns an IEnumIDList enumerator on a folder.

Note: This function is only meaningful for folders; consequently, if this function is called on a TShellItem that is not a folder, an exception will be thrown.

Definition at line 1465 of file shellitm.cpp.

References _T, owl::TXShell::Check(), EnforceValidity(), owl::TShellItemIterator::Folders, owl::TComRefBase< T >::I, owl::TShellItemIterator::NonFolders, RetrieveIShellFolder(), and WARNX.

◆ GetAttribute()

bool owl::TShellItem::GetAttribute ( const TAttribute at,
const bool validateCachedInfo ) const
protected

GetAttribute is a protected function used by all the attribute functions except IsDesktop.

Note
GetAttribute gets attributes one at a time. GetAttributes (with the 's') is used to get any number of attributes with one call.

Definition at line 579 of file shellitm.cpp.

References EnforceValidity(), and GetAttributes().

◆ GetAttributes()

ulong owl::TShellItem::GetAttributes ( const ulong reqAttrib,
const bool validateCachedInfo = false ) const

Get Attributes of a TShellItem GetAttributes - Get Capabilities, Display, Contents, & Misc.

GetAttributes gets Capabilities, Display, Contents, & Misc.

Attributes with one call

Attributes with a single call

'validateCachedInfo' defaults to false. If true, the shell will not rely on cached information.

See MS doc for IShellFolder::GetAttributesOf for more information, Programmer's Guide to MS Windows 95, MS Press, pp. 194-195.

Definition at line 559 of file shellitm.cpp.

References _T, owl::TXShell::Check(), CONST_CAST, EnforceValidity(), STATIC_CAST, and WARNX.

◆ GetContextMenu()

TContextMenu owl::TShellItem::GetContextMenu ( HWND windowOwner = 0)

GetContextMenu returns an interface pointer to this TShellItem's IContextMenu OLE interface.

(see MS doc for information on IContextMenu, Programmer's Guide to MS Windows 95, MS Press, pp. 237-240)

Definition at line 1088 of file shellitm.cpp.

References _T, owl::TXShell::Check(), EnforceValidity(), REINTERPRET_CAST, STATIC_CAST, and WARNX.

◆ GetDataObject()

TDataObject owl::TShellItem::GetDataObject ( HWND windowOwner = 0)

GetDataObject returns an interface pointer to this TShellItem's IDataObject OLE interface.

(see MS doc for a very brief description of IDataObject, Programmer's Guide to MS Windows 95, MS Press, p. 113)

Definition at line 1116 of file shellitm.cpp.

References _T, owl::TXShell::Check(), EnforceValidity(), REINTERPRET_CAST, STATIC_CAST, and WARNX.

◆ GetDisplayName()

TString owl::TShellItem::GetDisplayName ( const TDisplayNameKind kind = Normal) const

Get Displayname (for a TShellItem that's part of the filesystem, this is the filename)

GetDisplayName returns a name for this TShellItem that is suitable to display to the user.

The three options are:

  • Normal - Suitable for displaying by itself
  • InFolder - Suitable for displaying within its parent folder
  • ForParsing - Suitable to pass to the ParseDiplayName member function

    See MS doc for IShellFolder::GetDisplayNameOf for more information, Programmer's Guide to MS Windows 95, MS Press, pp. 197-198.

Definition at line 739 of file shellitm.cpp.

References _T, owl::TXShell::Check(), EnforceValidity(), and WARNX.

◆ GetDropTarget()

TDropTarget owl::TShellItem::GetDropTarget ( HWND windowOwner = 0)

GetDropTarget returns an interface pointer to this TShellItem's IDropTarget OLE interface.

Definition at line 1142 of file shellitm.cpp.

References _T, owl::TXShell::Check(), EnforceValidity(), REINTERPRET_CAST, STATIC_CAST, and WARNX.

◆ GetExeType()

TShellItem::TExeKind owl::TShellItem::GetExeType ( uint * major = 0,
uint * minor = 0 ) const

Get type of executable file (may return NonExecutable)

GetExeType returns the type of executable that is contained in the TShellItem Also, the optional major and minor args return version numbers e.g., return = WindowsPE, major = 4, minor = 0.

See MS doc for SHGetFileInfo for more information, Programmer's Guide to MS Windows 95, MS Press, pp. 205-207.

Definition at line 660 of file shellitm.cpp.

References ContainsSubFolder(), EnforceValidity(), GetPath(), IsFolder(), IsPartOfFileSystem(), MSDOS, NonExecutable, owl::TXShell::Raise(), REINTERPRET_CAST, owl::TShell::SHGetFileInfo(), WARNX, Win32Console, WindowsNE, and WindowsPE.

◆ GetExtractIcon()

TExtractIcon owl::TShellItem::GetExtractIcon ( HWND windowOwner = 0)

GetExtractIcon returns an interface pointer to this TShellItem's IExtractIcon OLE interface.

(see MS doc for information on IExtractIcon, Programmer's Guide to MS Windows 95, MS Press, pp. 242-244)

Definition at line 1060 of file shellitm.cpp.

References _T, owl::TXShell::Check(), EnforceValidity(), REINTERPRET_CAST, STATIC_CAST, and WARNX.

◆ GetFullyQualifiedPidl()

TPidl owl::TShellItem::GetFullyQualifiedPidl ( ) const

Get fully qualified TPidl.

GetFullyQualifiedPidl returns a TPidl that is fully qualified (from the desktop).

Definition at line 641 of file shellitm.cpp.

References Desktop, EnforceValidity(), ForParsing, and GetDisplayName().

◆ GetIcon()

HICON owl::TShellItem::GetIcon ( TIconSize size = Shell,
uint kind = 0 )

GetIcon returns a handle to an icon representing this TShellItem.

size can be Large, Small, or Shell kind can be Link, Open, or Selected (see MS doc on SHGetFileInfo for meanings, Programmer's Guide to MS Windows 95, MS Press, pp. 206-207)

Definition at line 1171 of file shellitm.cpp.

References _MAX_PATH, _T, owl::TXShell::Check(), COUNTOF, EnforceValidity(), GetExtractIcon(), IsPartOfFileSystem(), Open, owl::TXShell::Raise(), Shell, owl::TShell::SHGetFileInfo(), Small, and WARNX.

◆ GetParentFolder()

TShellItem::TCreateStruct owl::TShellItem::GetParentFolder ( ) const

Get Parent Folder.

GetParentFolder returns a TCreateStruct representing the folder which contains the TShellItem.

Definition at line 605 of file shellitm.cpp.

References _T, owl::TXShell::Check(), Desktop, EnforceValidity(), GetFullyQualifiedPidl(), IsDesktop(), REINTERPRET_CAST, STATIC_CAST, owl::TPidl::StripLastItem(), and WARNX.

◆ GetPath()

TString owl::TShellItem::GetPath ( ) const

Get path (only call if the TShellItem is part of the file system (IsPartOfFileSystem == true)

GetPath returns the fully qualified path representing this TShellItem.

Definition at line 773 of file shellitm.cpp.

References _MAX_PATH, GetFullyQualifiedPidl(), owl::TXShell::Raise(), owl::TShell::SHGetPathFromIDList(), and WARNX.

◆ GetPidl()

TPidl owl::TShellItem::GetPidl ( ) const
inline

Get TPidl (relative to parent)

Get a TShellItem's TPidl.

Definition at line 1110 of file shellitm.h.

◆ GetTypeName()

TString owl::TShellItem::GetTypeName ( ) const

Get type of file (e.g., "Borland C++ Header File", "Notepad File")

GetTypeName returns the type of item that is represented by this TShellItem examples: application, notepad file, ...

See MS doc for SHGetFileInfo for more information, Programmer's Guide to MS Windows 95, MS Press, pp. 205-207.

Definition at line 708 of file shellitm.cpp.

References _T, EnforceValidity(), GetDisplayName(), GetPidl(), owl::TXShell::Raise(), and WARNX.

◆ HasAPropertySheet()

bool owl::TShellItem::HasAPropertySheet ( const bool validateCachedInfo = false) const
inline

Return true if the TShellItem represents an item that has a property sheet.

Definition at line 1001 of file shellitm.h.

References atHasAPropertySheet, and GetAttribute().

◆ HaveSameParent()

bool owl::TShellItem::HaveSameParent ( const TShellItem & other) const
inlineprotected

HaveSameParent returns true if this TShellItem and other TShellItem have the same immediate parent folder.

Definition at line 1160 of file shellitm.h.

References CONST_CAST, and STATIC_CAST.

◆ IsADropTarget()

bool owl::TShellItem::IsADropTarget ( const bool validateCachedInfo = false) const
inline

Return true if the TShellItem represents an item is a drop target.

Definition at line 994 of file shellitm.h.

References atIsADropTarget, and GetAttribute().

◆ IsDesktop()

bool owl::TShellItem::IsDesktop ( ) const

IsDesktop returns true if the TShellItem respresents the shell's desktop.

Definition at line 593 of file shellitm.cpp.

References Desktop, EnforceValidity(), and owl::TComRefBase< T >::I.

◆ IsFolder()

bool owl::TShellItem::IsFolder ( const bool validateCachedInfo = false) const
inline

Return true if the TShellItem represents an item that is a folder.

Definition at line 1064 of file shellitm.h.

References atIsFolder, and GetAttribute().

◆ IsPartOfFileSystem()

bool owl::TShellItem::IsPartOfFileSystem ( const bool validateCachedInfo = false) const
inline

Return true if the TShellItem represents an item that is part of the file system.

Definition at line 1057 of file shellitm.h.

References atIsPartOfFileSystem, and GetAttribute().

◆ IsReadOnly()

bool owl::TShellItem::IsReadOnly ( const bool validateCachedInfo = false) const
inline

Return true if the TShellItem represents an item that is read only.

Definition at line 1025 of file shellitm.h.

References atIsReadOnly, and GetAttribute().

◆ IsShared()

bool owl::TShellItem::IsShared ( const bool validateCachedInfo = false) const
inline

Return true if the TShellItem represents an item that is shared.

Definition at line 1032 of file shellitm.h.

References atIsShared, and GetAttribute().

◆ IsShortcut()

bool owl::TShellItem::IsShortcut ( const bool validateCachedInfo = false) const
inline

Return true if the TShellItem represents an item that is a shortcut.

Definition at line 1018 of file shellitm.h.

References atIsShortcut, and GetAttribute().

◆ Move() [1/2]

bool owl::TShellItem::Move ( const tchar * destFolder,
const USHORT flags = 0,
const tchar * title = 0,
HWND windowOwner = 0 )

Move moves this TShellItem to destination path (which must be a folder)

flags are any combination of TFileOpFlags (see MS doc for SHFILEOPSTRUCT for meanings of these flags, Programmer's Guide to MS Windows 95, MS Press, p. 215)

Title is the title displayed in the progress dialog box

windowOwner should be set to the owner of the progress dialog box

See MS doc for SHFileOperation for more information, Programmer's Guide to MS Windows 95, MS Press, p. 204.

Definition at line 921 of file shellitm.cpp.

References TShellItem(), _MAX_PATH, _T, _tcscat, _tcscpy, _tcslen, AnsiPrev, CanBeMoved(), EnforceValidity(), ForParsing, GetDisplayName(), IsFolder(), owl::TXShell::Raise(), owl::TShell::SHChangeNotify(), owl::TShell::SHFileOperation(), and STATIC_CAST.

◆ Move() [2/2]

bool owl::TShellItem::Move ( const TShellItem & destFolder,
const USHORT flags = 0,
const tchar * title = 0,
HWND windowOwner = 0 )

Move moves this TShellItem to destination TShellItem (which must be a folder)

flags are any combination of TFileOpFlags (see MS doc for SHFILEOPSTRUCT for meanings of these flags, Programmer's Guide to MS Windows 95, MS Press, p. 215)

Title is the title displayed in the progress dialog box

windowOwner should be set to the owner of the progress dialog box

See MS doc for SHFileOperation for more information, Programmer's Guide to MS Windows 95, MS Press, p. 204.

Definition at line 989 of file shellitm.cpp.

References ForParsing, and Move().

◆ operator LPCITEMIDLIST()

owl::TShellItem::operator LPCITEMIDLIST ( ) const
inline

Allow TShellItems to be used in place of pidls.

use TShellItem in place of an LPITEMIDLIST (pidl)

Definition at line 1103 of file shellitm.h.

◆ operator!=()

bool owl::TShellItem::operator!= ( const TShellItem & rhs) const
inline

Compare sort order of this TShellItem is not equal to another TShellItem.

Definition at line 1138 of file shellitm.h.

References operator==().

◆ operator<()

bool owl::TShellItem::operator< ( const TShellItem & rhs) const
inline

Compare sort order of this TShellItem is less than another TShellItem.

Definition at line 1124 of file shellitm.h.

References CompareIDs().

◆ operator<=()

bool owl::TShellItem::operator<= ( const TShellItem & rhs) const
inline

Compare sort order of this TShellItem <= another TShellItem.

Definition at line 1145 of file shellitm.h.

References operator>().

◆ operator=() [1/2]

TShellItem & owl::TShellItem::operator= ( const TCreateStruct & cs)

TShellItem assignment (from a TCreateStruct)

Definition at line 540 of file shellitm.cpp.

References owl::TComRefBase< T >::Clear().

◆ operator=() [2/2]

TShellItem & owl::TShellItem::operator= ( const TShellItem & source)

TShellItem assignment (from another TShellItem)

Definition at line 527 of file shellitm.cpp.

References owl::TComRef< T >::operator=().

◆ operator==()

bool owl::TShellItem::operator== ( const TShellItem & rhs) const
inline

Compare sort order of this TShellItem equals another TShellItem.

Definition at line 1117 of file shellitm.h.

References CompareIDs().

◆ operator>()

bool owl::TShellItem::operator> ( const TShellItem & rhs) const
inline

Compare sort order of this TShellItem is greater than another TShellItem.

Definition at line 1131 of file shellitm.h.

References CompareIDs().

◆ operator>=()

bool owl::TShellItem::operator>= ( const TShellItem & rhs) const
inline

Compare sort order of this TShellItem >= another TShellItem.

Definition at line 1152 of file shellitm.h.

References operator<().

◆ ParseDisplayName()

HRESULT owl::TShellItem::ParseDisplayName ( TCreateStruct & cs,
const tchar * displayName,
ulong * eaten = nullptr,
HWND windowOwner = nullptr,
ulong * attrib = nullptr ) const

Parse a display name into a TShellItem (actually, into a TCreateStruct)

ParseDisplayName parses a "for parsing" display name into a TCreateStruct (which can be used to create a TShellItem).

In general, it is not necessary to call this function when using OWL's shell classes.

Note
It is only meaningful to call this function if the TShellItem is a folder; consequently, if this function is called on a TShellItem that is not a folder, an exception will be thrown.

Additional Documentation: See MS doc on IShellFolder::ParseDisplayName for more info, Programmer's Guide to MS Windows 95, MS Press, pp. 191-192.

Definition at line 1549 of file shellitm.cpp.

References EnforceValidity(), owl::TComRefBase< T >::I, and RetrieveIShellFolder().

◆ Rename()

void owl::TShellItem::Rename ( const tchar * newName,
HWND windowOwner = 0,
const TDisplayNameKind kind = Normal )

Rename renames this TShellItem to newName.

kind indicates the kind of name being passed (Normal, InFolder, or ForParsing) (see GetDisplayName for description of these)

See MS doc for IShellFolder::SetNameOf for more information, Programmer's Guide to MS Windows 95, MS Press, pp. 198-199.

Definition at line 798 of file shellitm.cpp.

References _MAX_PATH, _T, _tcscat, _tcscpy, CanBeRenamed(), owl::TXShell::Check(), ForParsing, GetDisplayName(), GetParentFolder(), IsFolder(), owl::TXShell::Raise(), owl::TShell::SHChangeNotify(), STATIC_CAST, and WARNX.

◆ ResolveShortcut()

TShellItem owl::TShellItem::ResolveShortcut ( HWND windowOwner = 0)

Get the TShellItem that a shortcut points to.

ResolveShortcut resolves this TShellItem (if it's a shortcut) and returns the underlying TShellItem.

If this TShellItem is not a shortcut, it just returns itself.

Note
IMPORTANT: This function calls CoCreateInstance. Therefore an application that uses this function MUST have previously called CoInitialize (or OLEInitialize).
IMPORTANT: If the shortcut cannot be resolved, this function will return an empty (invalid) item. One MUST check for this by calling IsValid() upon return from this function.

Definition at line 1223 of file shellitm.cpp.

References TShellItem(), owl::TXShell::Check(), owl::TOle::CoCreateInstance(), Desktop, EnforceValidity(), GetPath(), IsShortcut(), REINTERPRET_CAST, and STATIC_CAST.

◆ RetrieveIShellFolder()

void owl::TShellItem::RetrieveIShellFolder ( ) const
protected

RetrieveIShellFolder is a protected function that checks to see if a TShellItem's IShellFolder interface is already assigned a value.

If not, it will BindToObject in order to assign the interface a value. Note: Only TShellItem's that are folders have an IShellFolder interface; consequently, if this function is called on a TShellItem that is not a folder, an exception will be thrown.

Definition at line 1442 of file shellitm.cpp.

References _T, owl::TXShell::Check(), CONST_CAST, EnforceValidity(), owl::TComRefBase< T >::I, REINTERPRET_CAST, STATIC_CAST, and WARNX.

◆ Valid()

bool owl::TShellItem::Valid ( ) const
inline

Determine if TShellItem reprsents a valid item.

Return true if the TShellItem represents an item in the namespace.

Definition at line 949 of file shellitm.h.


The documentation for this class was generated from the following files: