ReactOS  0.4.15-dev-440-g5f37b68
pidl.h File Reference
#include "pshpack1.h"
#include "poppack.h"
Include dependency graph for pidl.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  tagPIDLCPanelStruct
 
struct  tagGUIDStruct
 
struct  tagDriveStruct
 
struct  tagFileStruct
 
struct  tagFileStructW
 
struct  tagValueW
 
struct  tagPIDLDATA
 

Macros

#define PT_CPLAPPLET   0x00
 
#define PT_GUID   0x1F
 
#define PT_DRIVE   0x23
 
#define PT_DRIVE2   0x25
 
#define PT_DRIVE3   0x29
 
#define PT_SHELLEXT   0x2E
 
#define PT_DRIVE1   0x2F
 
#define PT_FOLDER1   0x30
 
#define PT_FOLDER   0x31
 
#define PT_VALUE   0x32
 
#define PT_VALUEW   0x34
 
#define PT_FOLDERW   0x35
 
#define PT_WORKGRP   0x41
 
#define PT_COMP   0x42
 
#define PT_NETPROVIDER   0x46
 
#define PT_NETWORK   0x47
 
#define PT_IESPECIAL1   0x61
 
#define PT_YAGUID   0x70 /* yet another guid.. */
 
#define PT_IESPECIAL2   0xb1
 
#define PT_SHARE   0xc3
 

Typedefs

typedef BYTE PIDLTYPE
 
typedef struct tagPIDLCPanelStruct PIDLCPanelStruct
 
typedef struct tagGUIDStruct GUIDStruct
 
typedef struct tagDriveStruct DriveStruct
 
typedef struct tagFileStruct FileStruct
 
typedef struct tagFileStructW FileStructW
 
typedef struct tagValueW ValueWStruct
 
typedef struct tagPIDLDATA PIDLDATA
 
typedef struct tagPIDLDATALPPIDLDATA
 

Functions

DWORD _ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) DECLSPEC_HIDDEN
 
DWORD _ILSimpleGetTextW (LPCITEMIDLIST pidl, LPWSTR pOut, UINT uOutSize) DECLSPEC_HIDDEN
 
BOOL _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) DECLSPEC_HIDDEN
 
DWORD _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) DECLSPEC_HIDDEN
 
BOOL _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) DECLSPEC_HIDDEN
 
void _ILGetFileType (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) DECLSPEC_HIDDEN
 
DWORD _ILGetFileAttributes (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize) DECLSPEC_HIDDEN
 
BOOL _ILGetFileDateTime (LPCITEMIDLIST pidl, FILETIME *ft) DECLSPEC_HIDDEN
 
DWORD _ILGetDrive (LPCITEMIDLIST, LPSTR, UINT) DECLSPEC_HIDDEN
 
BOOL _ILIsUnicode (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN
 
BOOL _ILIsDesktop (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN
 
BOOL _ILIsMyComputer (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN
 
BOOL _ILIsDrive (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN
 
BOOL _ILIsFolder (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN
 
BOOL _ILIsValue (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN
 
BOOL _ILIsSpecialFolder (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN
 
BOOL _ILIsPidlSimple (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN
 
BOOL _ILIsCPanelStruct (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN
 
static BOOL _ILIsEqualSimple (LPCITEMIDLIST pidlA, LPCITEMIDLIST pidlB)
 
static BOOL _ILIsEmpty (LPCITEMIDLIST pidl)
 
LPITEMIDLIST _ILCreateGuid (PIDLTYPE type, REFIID guid) DECLSPEC_HIDDEN
 
LPITEMIDLIST _ILCreateGuidFromStrA (LPCSTR szGUID) DECLSPEC_HIDDEN
 
LPITEMIDLIST _ILCreateGuidFromStrW (LPCWSTR szGUID) DECLSPEC_HIDDEN
 
LPITEMIDLIST _ILCreateDesktop (void) DECLSPEC_HIDDEN
 
LPITEMIDLIST _ILCreateFromFindDataW (const WIN32_FIND_DATAW *stffile) DECLSPEC_HIDDEN
 
HRESULT _ILCreateFromPathW (LPCWSTR szPath, LPITEMIDLIST *ppidl) DECLSPEC_HIDDEN
 
LPITEMIDLIST _ILCreateMyComputer (void) DECLSPEC_HIDDEN
 
LPITEMIDLIST _ILCreateMyDocuments (void) DECLSPEC_HIDDEN
 
LPITEMIDLIST _ILCreateIExplore (void) DECLSPEC_HIDDEN
 
LPITEMIDLIST _ILCreateControlPanel (void) DECLSPEC_HIDDEN
 
LPITEMIDLIST _ILCreatePrinters (void) DECLSPEC_HIDDEN
 
LPITEMIDLIST _ILCreateNetwork (void) DECLSPEC_HIDDEN
 
LPITEMIDLIST _ILCreateNetHood (void) DECLSPEC_HIDDEN
 
LPITEMIDLIST _ILCreateBitBucket (void) DECLSPEC_HIDDEN
 
LPITEMIDLIST _ILCreateDrive (LPCWSTR) DECLSPEC_HIDDEN
 
LPITEMIDLIST _ILCreateEntireNetwork (void) DECLSPEC_HIDDEN
 
LPPIDLDATA _ILGetDataPointer (LPCITEMIDLIST) DECLSPEC_HIDDEN
 
LPSTR _ILGetTextPointer (LPCITEMIDLIST) DECLSPEC_HIDDEN
 
IID_ILGetGUIDPointer (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN
 
FileStructW_ILGetFileStructW (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN
 
void pdump (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN
 
BOOL pcheck (LPCITEMIDLIST pidl) DECLSPEC_HIDDEN
 
void _ILFreeaPidl (LPITEMIDLIST *apidl, UINT cidl) DECLSPEC_HIDDEN
 
PITEMID_CHILD_ILCopyaPidl (PCUITEMID_CHILD_ARRAY apidlsrc, UINT cidl) DECLSPEC_HIDDEN
 
LPITEMIDLIST_ILCopyCidaToaPidl (LPITEMIDLIST *pidl, const CIDA *cida) DECLSPEC_HIDDEN
 
BOOL ILGetDisplayNameExW (LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPWSTR path, DWORD type) DECLSPEC_HIDDEN
 

Macro Definition Documentation

◆ PT_COMP

#define PT_COMP   0x42

Definition at line 99 of file pidl.h.

◆ PT_CPLAPPLET

#define PT_CPLAPPLET   0x00

Definition at line 86 of file pidl.h.

◆ PT_DRIVE

#define PT_DRIVE   0x23

Definition at line 88 of file pidl.h.

◆ PT_DRIVE1

#define PT_DRIVE1   0x2F

Definition at line 92 of file pidl.h.

◆ PT_DRIVE2

#define PT_DRIVE2   0x25

Definition at line 89 of file pidl.h.

◆ PT_DRIVE3

#define PT_DRIVE3   0x29

Definition at line 90 of file pidl.h.

◆ PT_FOLDER

#define PT_FOLDER   0x31

Definition at line 94 of file pidl.h.

◆ PT_FOLDER1

#define PT_FOLDER1   0x30

Definition at line 93 of file pidl.h.

◆ PT_FOLDERW

#define PT_FOLDERW   0x35

Definition at line 97 of file pidl.h.

◆ PT_GUID

#define PT_GUID   0x1F

Definition at line 87 of file pidl.h.

◆ PT_IESPECIAL1

#define PT_IESPECIAL1   0x61

Definition at line 102 of file pidl.h.

◆ PT_IESPECIAL2

#define PT_IESPECIAL2   0xb1

Definition at line 104 of file pidl.h.

◆ PT_NETPROVIDER

#define PT_NETPROVIDER   0x46

Definition at line 100 of file pidl.h.

◆ PT_NETWORK

#define PT_NETWORK   0x47

Definition at line 101 of file pidl.h.

◆ PT_SHARE

#define PT_SHARE   0xc3

Definition at line 105 of file pidl.h.

◆ PT_SHELLEXT

#define PT_SHELLEXT   0x2E

Definition at line 91 of file pidl.h.

◆ PT_VALUE

#define PT_VALUE   0x32

Definition at line 95 of file pidl.h.

◆ PT_VALUEW

#define PT_VALUEW   0x34

Definition at line 96 of file pidl.h.

◆ PT_WORKGRP

#define PT_WORKGRP   0x41

Definition at line 98 of file pidl.h.

◆ PT_YAGUID

#define PT_YAGUID   0x70 /* yet another guid.. */

Definition at line 103 of file pidl.h.

Typedef Documentation

◆ DriveStruct

◆ FileStruct

◆ FileStructW

◆ GUIDStruct

◆ LPPIDLDATA

◆ PIDLCPanelStruct

◆ PIDLDATA

◆ PIDLTYPE

typedef BYTE PIDLTYPE

Definition at line 108 of file pidl.h.

◆ ValueWStruct

Function Documentation

◆ _ILCopyaPidl()

PITEMID_CHILD* _ILCopyaPidl ( PCUITEMID_CHILD_ARRAY  apidlsrc,
UINT  cidl 
)

Definition at line 2646 of file pidl.c.

2647 {
2648  UINT i;
2649  PITEMID_CHILD *apidldest;
2650 
2651  if (!apidlsrc)
2652  return NULL;
2653 
2654  apidldest = SHAlloc(cidl * sizeof(PITEMID_CHILD));
2655 
2656  for (i = 0; i < cidl; i++)
2657  apidldest[i] = ILClone(apidlsrc[i]);
2658 
2659  return apidldest;
2660 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
unsigned int UINT
Definition: ndis.h:50
LPVOID WINAPI SHAlloc(SIZE_T len)
Definition: shellole.c:309

Referenced by CCPLItemMenu::Initialize(), and CDefaultContextMenu::Initialize().

◆ _ILCopyCidaToaPidl()

LPITEMIDLIST* _ILCopyCidaToaPidl ( LPITEMIDLIST pidl,
const CIDA cida 
)

Definition at line 2667 of file pidl.c.

2668 {
2669  UINT i;
2670  LPITEMIDLIST *dst;
2671 
2672  dst = SHAlloc(cida->cidl * sizeof(LPITEMIDLIST));
2673  if (!dst)
2674  return NULL;
2675 
2676  if (pidl)
2677  *pidl = ILClone((LPCITEMIDLIST)(&((const BYTE*)cida)[cida->aoffset[0]]));
2678 
2679  for (i = 0; i < cida->cidl; i++)
2680  dst[i] = ILClone((LPCITEMIDLIST)(&((const BYTE*)cida)[cida->aoffset[i + 1]]));
2681 
2682  return dst;
2683 }
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
smooth NULL
Definition: ftsmooth.c:416
UINT cidl
Definition: shlobj.h:499
unsigned char BYTE
Definition: xxhash.c:193
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
GLenum GLenum dst
Definition: glext.h:6340
unsigned int UINT
Definition: ndis.h:50
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
LPVOID WINAPI SHAlloc(SIZE_T len)
Definition: shellole.c:309

Referenced by CFSDropTarget::_DoDrop(), and SH_GetApidlFromDataObject().

◆ _ILCreateBitBucket()

LPITEMIDLIST _ILCreateBitBucket ( void  )

Definition at line 1669 of file pidl.c.

1670 {
1671  TRACE("()\n");
1672  return _ILCreateGuid(PT_GUID, &CLSID_RecycleBin);
1673 }
LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid)
Definition: pidl.c:1681
#define TRACE(s)
Definition: solgame.cpp:4
#define PT_GUID

Referenced by SHGetFolderLocation().

◆ _ILCreateControlPanel()

LPITEMIDLIST _ILCreateControlPanel ( void  )

Definition at line 1625 of file pidl.c.

1626 {
1627  LPITEMIDLIST parent = _ILCreateGuid(PT_GUID, &CLSID_MyComputer), ret = NULL;
1628 
1629  TRACE("()\n");
1630  if (parent)
1631  {
1632  LPITEMIDLIST cpl = _ILCreateGuid(PT_SHELLEXT, &CLSID_ControlPanel);
1633 
1634  if (cpl)
1635  {
1636  ret = ILCombine(parent, cpl);
1637  SHFree(cpl);
1638  }
1639  SHFree(parent);
1640  }
1641  return ret;
1642 }
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:699
LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid)
Definition: pidl.c:1681
smooth NULL
Definition: ftsmooth.c:416
#define TRACE(s)
Definition: solgame.cpp:4
r parent
Definition: btrfs.c:2944
int ret
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:331
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
#define PT_GUID
#define PT_SHELLEXT

Referenced by CCPLItemMenu::InvokeCommand(), and SHGetFolderLocation().

◆ _ILCreateDesktop()

LPITEMIDLIST _ILCreateDesktop ( void  )

Definition at line 1596 of file pidl.c.

1597 {
1598  LPITEMIDLIST ret;
1599 
1600  TRACE("()\n");
1601  ret = SHAlloc(2);
1602  if (ret)
1603  ret->mkid.cb = 0;
1604  return ret;
1605 }
#define TRACE(s)
Definition: solgame.cpp:4
int ret
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
LPVOID WINAPI SHAlloc(SIZE_T len)
Definition: shellole.c:309

Referenced by BrsFolder_OnCommand(), CDesktopFolder::FinalConstruct(), GetNormalAndSelectedIcons(), and SHGetFolderLocation().

◆ _ILCreateDrive()

LPITEMIDLIST _ILCreateDrive ( LPCWSTR  )

Definition at line 1802 of file pidl.c.

1803 {
1804  LPITEMIDLIST pidlOut;
1805 
1806  TRACE("(%s)\n",debugstr_w(lpszNew));
1807 
1808  pidlOut = _ILAlloc(PT_DRIVE, sizeof(DriveStruct));
1809  if (pidlOut)
1810  {
1811  LPSTR pszDest;
1812 
1813  pszDest = _ILGetTextPointer(pidlOut);
1814  if (pszDest)
1815  {
1816  strcpy(pszDest, "x:\\");
1817  pszDest[0]=toupperW(lpszNew[0]);
1818  TRACE("-- create Drive: %s\n", debugstr_a(pszDest));
1819  }
1820  }
1821  return pidlOut;
1822 }
static LPITEMIDLIST _ILAlloc(PIDLTYPE type, unsigned int size)
Definition: pidl.c:1570
char * LPSTR
Definition: xmlstorage.h:182
#define debugstr_w
Definition: kernel32.h:32
LPSTR _ILGetTextPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2237
#define PT_DRIVE
Definition: pidl.h:88
WINE_UNICODE_INLINE WCHAR toupperW(WCHAR ch)
Definition: unicode.h:141
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41

Referenced by CDrivesFolderEnum::Initialize(), CDrivesFolder::ParseDisplayName(), and CDrivesFolder::SetNameOf().

◆ _ILCreateEntireNetwork()

LPITEMIDLIST _ILCreateEntireNetwork ( void  )

Definition at line 1824 of file pidl.c.

1825 {
1826  LPITEMIDLIST pidlOut;
1827 
1828  TRACE("\n");
1829 
1830  pidlOut = _ILAlloc(PT_NETWORK, FIELD_OFFSET(PIDLDATA, u.network.szNames[sizeof("Entire Network")]));
1831  if (pidlOut)
1832  {
1833  LPPIDLDATA pData = _ILGetDataPointer(pidlOut);
1834 
1835  pData->u.network.dummy = 0;
1836  strcpy(pData->u.network.szNames, "Entire Network");
1837  }
1838  return pidlOut;
1839 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble * u
Definition: glfuncs.h:240
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2170
static LPITEMIDLIST _ILAlloc(PIDLTYPE type, unsigned int size)
Definition: pidl.c:1570
#define PT_NETWORK
Definition: pidl.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
char * strcpy(char *DstString, const char *SrcString)
Definition: utclib.c:388
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41

◆ _ILCreateFromFindDataW()

LPITEMIDLIST _ILCreateFromFindDataW ( const WIN32_FIND_DATAW stffile)

Definition at line 1735 of file pidl.c.

1736 {
1737  char buff[MAX_PATH + 14 +1]; /* see WIN32_FIND_DATA */
1738  DWORD len, len1, wlen, alen;
1739  LPITEMIDLIST pidl;
1740  PIDLTYPE type;
1741 
1742  if (!wfd)
1743  return NULL;
1744 
1745  TRACE("(%s, %s)\n",debugstr_w(wfd->cAlternateFileName), debugstr_w(wfd->cFileName));
1746 
1747  /* prepare buffer with both names */
1748  len = WideCharToMultiByte(CP_ACP,0,wfd->cFileName,-1,buff,MAX_PATH,NULL,NULL);
1749  len1 = WideCharToMultiByte(CP_ACP,0,wfd->cAlternateFileName,-1, buff+len, sizeof(buff)-len, NULL, NULL);
1750  alen = len + len1;
1751 
1752  type = (wfd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? PT_FOLDER : PT_VALUE;
1753 
1754  wlen = lstrlenW(wfd->cFileName) + 1;
1755  pidl = _ILAlloc(type, FIELD_OFFSET(FileStruct, szNames[alen + (alen & 1)]) +
1756  FIELD_OFFSET(FileStructW, wszName[wlen]) + sizeof(WORD));
1757  if (pidl)
1758  {
1760  FileStruct *fs = &pData->u.file;
1761  FileStructW *fsw;
1762  WORD *pOffsetW;
1763 
1764  FileTimeToDosDateTime( &wfd->ftLastWriteTime, &fs->uFileDate, &fs->uFileTime);
1765  fs->dwFileSize = wfd->nFileSizeLow;
1766  fs->uFileAttribs = wfd->dwFileAttributes;
1767  memcpy(fs->szNames, buff, alen);
1768 
1769  fsw = (FileStructW*)(pData->u.file.szNames + alen + (alen & 0x1));
1770  fsw->cbLen = FIELD_OFFSET(FileStructW, wszName[wlen]) + sizeof(WORD);
1771  FileTimeToDosDateTime( &wfd->ftCreationTime, &fsw->uCreationDate, &fsw->uCreationTime);
1772  FileTimeToDosDateTime( &wfd->ftLastAccessTime, &fsw->uLastAccessDate, &fsw->uLastAccessTime);
1773  memcpy(fsw->wszName, wfd->cFileName, wlen * sizeof(WCHAR));
1774 
1775  pOffsetW = (WORD*)((LPBYTE)pidl + pidl->mkid.cb - sizeof(WORD));
1776  *pOffsetW = (LPBYTE)fsw - (LPBYTE)pidl;
1777  TRACE("-- Set Value: %s\n",debugstr_w(fsw->wszName));
1778  }
1779  return pidl;
1780 
1781 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2170
#define WideCharToMultiByte
Definition: compat.h:101
static LPITEMIDLIST _ILAlloc(PIDLTYPE type, unsigned int size)
Definition: pidl.c:1570
#define CP_ACP
Definition: compat.h:99
WCHAR wszName[1]
Definition: shlfolder.c:1555
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3706
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
Definition: fs.h:235
#define lstrlenW
Definition: compat.h:416
unsigned char * LPBYTE
Definition: typedefs.h:53
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
#define FILE_ATTRIBUTE_DIRECTORY
Definition: nt_native.h:705
BYTE PIDLTYPE
Definition: pidl.h:108
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
#define memcpy(s1, s2, n)
Definition: mkisofs.h:878
GLenum GLsizei len
Definition: glext.h:6722
BOOL WINAPI FileTimeToDosDateTime(IN CONST FILETIME *lpFileTime, OUT LPWORD lpFatDate, OUT LPWORD lpFatTime)
Definition: time.c:37
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:254
#define PT_VALUE
Definition: pidl.h:95
#define PT_FOLDER
Definition: pidl.h:94
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
static unsigned char buff[32768]
Definition: fatten.c:17

Referenced by CFileSysEnum::_AddFindResult(), _ILCreateFromPathW(), and SHELL32_CreatePidlFromBindCtx().

◆ _ILCreateFromPathW()

HRESULT _ILCreateFromPathW ( LPCWSTR  szPath,
LPITEMIDLIST ppidl 
)

Definition at line 1783 of file pidl.c.

1784 {
1785  HANDLE hFile;
1786  WIN32_FIND_DATAW stffile;
1787 
1788  if (!ppidl)
1789  return E_INVALIDARG;
1790 
1791  hFile = FindFirstFileW(szPath, &stffile);
1792  if (hFile == INVALID_HANDLE_VALUE)
1794 
1795  FindClose(hFile);
1796 
1797  *ppidl = _ILCreateFromFindDataW(&stffile);
1798 
1799  return *ppidl ? S_OK : E_OUTOFMEMORY;
1800 }
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define INVALID_HANDLE_VALUE
Definition: compat.h:400
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
_In_ HANDLE hFile
Definition: mswsock.h:90
#define S_OK
Definition: intsafe.h:59
LPCWSTR szPath
Definition: env.c:35
LPITEMIDLIST _ILCreateFromFindDataW(const WIN32_FIND_DATAW *wfd)
Definition: pidl.c:1735
HANDLE WINAPI FindFirstFileW(IN LPCWSTR lpFileName, OUT LPWIN32_FIND_DATAW lpFindFileData)
Definition: find.c:320
BOOL WINAPI FindClose(HANDLE hFindFile)
Definition: find.c:502

Referenced by CFSFolder::ParseDisplayName(), and CFSFolder::SetNameOf().

◆ _ILCreateGuid()

LPITEMIDLIST _ILCreateGuid ( PIDLTYPE  type,
REFIID  guid 
)

Definition at line 1681 of file pidl.c.

1682 {
1683  LPITEMIDLIST pidlOut;
1684 
1685  if (type == PT_SHELLEXT || type == PT_GUID || type == PT_YAGUID)
1686  {
1687  pidlOut = _ILAlloc(type, sizeof(GUIDStruct));
1688  if (pidlOut)
1689  {
1690  LPPIDLDATA pData = _ILGetDataPointer(pidlOut);
1691 
1692  pData->u.guid.guid = *guid;
1693  TRACE("-- create GUID-pidl %s\n",
1694  debugstr_guid(&(pData->u.guid.guid)));
1695  }
1696  }
1697  else
1698  {
1699  WARN("%d: invalid type for GUID\n", type);
1700  pidlOut = NULL;
1701  }
1702  return pidlOut;
1703 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2170
static LPITEMIDLIST _ILAlloc(PIDLTYPE type, unsigned int size)
Definition: pidl.c:1570
#define WARN(fmt,...)
Definition: debug.h:112
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
const GUID * guid
smooth NULL
Definition: ftsmooth.c:416
#define debugstr_guid
Definition: kernel32.h:35
#define PT_YAGUID
#define TRACE(s)
Definition: solgame.cpp:4
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
#define PT_GUID
#define PT_SHELLEXT

Referenced by _ILCreateAdminTools(), _ILCreateBitBucket(), _ILCreateControlPanel(), _ILCreateGuidFromStrA(), _ILCreateGuidFromStrW(), _ILCreateIExplore(), _ILCreateMyComputer(), _ILCreateMyDocuments(), _ILCreateNetwork(), and _ILCreatePrinters().

◆ _ILCreateGuidFromStrA()

LPITEMIDLIST _ILCreateGuidFromStrA ( LPCSTR  szGUID)

Definition at line 1706 of file pidl.c.

1707 {
1708  IID iid;
1709 
1710  if (FAILED(SHCLSIDFromStringA(szGUID, &iid)))
1711  {
1712  ERR("%s is not a GUID\n", szGUID);
1713  return NULL;
1714  }
1715  return _ILCreateGuid(PT_GUID, &iid);
1716 }
DWORD WINAPI SHCLSIDFromStringA(LPCSTR clsid, CLSID *id)
Definition: shellole.c:253
LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid)
Definition: pidl.c:1681
smooth NULL
Definition: ftsmooth.c:416
#define ERR(fmt,...)
Definition: debug.h:110
#define PT_GUID

◆ _ILCreateGuidFromStrW()

LPITEMIDLIST _ILCreateGuidFromStrW ( LPCWSTR  szGUID)

Definition at line 1719 of file pidl.c.

1720 {
1721  IID iid;
1722 
1723 #ifndef __REACTOS__
1724  if (FAILED(SHCLSIDFromStringW(szGUID, &iid)))
1725 #else
1726  if (!GUIDFromStringW(szGUID, &iid))
1727 #endif
1728  {
1729  ERR("%s is not a GUID\n", debugstr_w(szGUID));
1730  return NULL;
1731  }
1732  return _ILCreateGuid(PT_GUID, &iid);
1733 }
LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid)
Definition: pidl.c:1681
#define debugstr_w
Definition: kernel32.h:32
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI GUIDFromStringW(_In_ PCWSTR psz, _Out_ LPGUID pguid)
DWORD WINAPI SHCLSIDFromStringW(LPCWSTR clsid, CLSID *id)
Definition: shellole.c:261
#define ERR(fmt,...)
Definition: debug.h:110
#define PT_GUID

Referenced by CDesktopFolderEnum::AddItemsFromClassicStartMenuKey(), CRegFolderEnum::AddItemsFromKey(), CDesktopFolder::ParseDisplayName(), and CRegFolder::ParseDisplayName().

◆ _ILCreateIExplore()

LPITEMIDLIST _ILCreateIExplore ( void  )

Definition at line 1619 of file pidl.c.

1620 {
1621  TRACE("()\n");
1622  return _ILCreateGuid(PT_GUID, &CLSID_Internet);
1623 }
LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid)
Definition: pidl.c:1681
#define TRACE(s)
Definition: solgame.cpp:4
#define PT_GUID

Referenced by SHGetFolderLocation().

◆ _ILCreateMyComputer()

LPITEMIDLIST _ILCreateMyComputer ( void  )

Definition at line 1607 of file pidl.c.

1608 {
1609  TRACE("()\n");
1610  return _ILCreateGuid(PT_GUID, &CLSID_MyComputer);
1611 }
LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid)
Definition: pidl.c:1681
#define TRACE(s)
Definition: solgame.cpp:4
#define PT_GUID

Referenced by CDrivesFolder::FinalConstruct(), CDesktopFolderEnum::Initialize(), CDesktopFolder::ParseDisplayName(), and SHGetFolderLocation().

◆ _ILCreateMyDocuments()

LPITEMIDLIST _ILCreateMyDocuments ( void  )

Definition at line 1613 of file pidl.c.

1614 {
1615  TRACE("()\n");
1616  return _ILCreateGuid(PT_GUID, &CLSID_MyDocuments);
1617 }
LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid)
Definition: pidl.c:1681
#define TRACE(s)
Definition: solgame.cpp:4
#define PT_GUID

Referenced by CMyDocsFolder::FinalConstruct(), CDesktopFolderEnum::Initialize(), and SHGetFolderLocation().

◆ _ILCreateNetHood()

LPITEMIDLIST _ILCreateNetHood ( void  )

◆ _ILCreateNetwork()

LPITEMIDLIST _ILCreateNetwork ( void  )

Definition at line 1663 of file pidl.c.

1664 {
1665  TRACE("()\n");
1666  return _ILCreateGuid(PT_GUID, &CLSID_NetworkPlaces);
1667 }
LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid)
Definition: pidl.c:1681
#define TRACE(s)
Definition: solgame.cpp:4
#define PT_GUID

Referenced by CDesktopFolder::ParseDisplayName(), and SHGetFolderLocation().

◆ _ILCreatePrinters()

LPITEMIDLIST _ILCreatePrinters ( void  )

Definition at line 1644 of file pidl.c.

1645 {
1646  LPITEMIDLIST parent = _ILCreateGuid(PT_GUID, &CLSID_MyComputer), ret = NULL;
1647 
1648  TRACE("()\n");
1649  if (parent)
1650  {
1651  LPITEMIDLIST printers = _ILCreateGuid(PT_YAGUID, &CLSID_Printers);
1652 
1653  if (printers)
1654  {
1655  ret = ILCombine(parent, printers);
1656  SHFree(printers);
1657  }
1658  SHFree(parent);
1659  }
1660  return ret;
1661 }
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:699
LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid)
Definition: pidl.c:1681
smooth NULL
Definition: ftsmooth.c:416
#define PT_YAGUID
#define TRACE(s)
Definition: solgame.cpp:4
r parent
Definition: btrfs.c:2944
int ret
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:331
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
#define PT_GUID

Referenced by SHGetFolderLocation().

◆ _ILFreeaPidl()

void _ILFreeaPidl ( LPITEMIDLIST apidl,
UINT  cidl 
)

Definition at line 2629 of file pidl.c.

2630 {
2631  UINT i;
2632 
2633  if (apidl)
2634  {
2635  for (i = 0; i < cidl; i++)
2636  SHFree(apidl[i]);
2637  SHFree(apidl);
2638  }
2639 }
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
unsigned int UINT
Definition: ndis.h:50
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:331

Referenced by CFSDropTarget::_DoDrop(), CFSDropTarget::_RepositionItems(), DrivesContextMenuCallback(), RegFolderContextMenuCallback(), Shell_DefaultContextMenuCallBack(), CCPLItemMenu::~CCPLItemMenu(), and CDefaultContextMenu::~CDefaultContextMenu().

◆ _ILGetDataPointer()

◆ _ILGetDrive()

DWORD _ILGetDrive ( LPCITEMIDLIST  ,
LPSTR  ,
UINT   
)

Definition at line 1849 of file pidl.c.

1850 {
1851  TRACE("(%p,%p,%u)\n",pidl,pOut,uSize);
1852 
1853  if(_ILIsMyComputer(pidl))
1854  pidl = ILGetNext(pidl);
1855 
1856  if (pidl && _ILIsDrive(pidl))
1857  return _ILSimpleGetText(pidl, pOut, uSize);
1858 
1859  return 0;
1860 }
BOOL _ILIsMyComputer(LPCITEMIDLIST pidl)
Definition: pidl.c:1914
LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl)
Definition: pidl.c:851
#define TRACE(s)
Definition: solgame.cpp:4
BOOL _ILIsDrive(LPCITEMIDLIST pidl)
Definition: pidl.c:1947
DWORD _ILSimpleGetText(LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
Definition: pidl.c:2018

Referenced by DrivesContextMenuCallback().

◆ _ILGetExtension()

BOOL _ILGetExtension ( LPCITEMIDLIST  pidl,
LPSTR  pOut,
UINT  uOutSize 
)

Definition at line 2470 of file pidl.c.

2471 {
2472  char szTemp[MAX_PATH];
2473  const char * pPoint;
2474  LPCITEMIDLIST pidlTemp=pidl;
2475 
2476  TRACE("pidl=%p\n",pidl);
2477 
2478  if (!pidl)
2479  return FALSE;
2480 
2481  pidlTemp = ILFindLastID(pidl);
2482 
2483  if (!_ILIsValue(pidlTemp))
2484  return FALSE;
2485  if (!_ILSimpleGetText(pidlTemp, szTemp, MAX_PATH))
2486  return FALSE;
2487 
2488  pPoint = PathFindExtensionA(szTemp);
2489 
2490  if (!*pPoint)
2491  return FALSE;
2492 
2493  pPoint++;
2494  lstrcpynA(pOut, pPoint, uOutSize);
2495  TRACE("%s\n",pOut);
2496 
2497  return TRUE;
2498 }
#define TRUE
Definition: types.h:120
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST pidl)
Definition: pidl.c:189
#define TRACE(s)
Definition: solgame.cpp:4
#define MAX_PATH
Definition: compat.h:26
BOOL _ILIsValue(LPCITEMIDLIST pidl)
Definition: pidl.c:1968
DWORD _ILSimpleGetText(LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
Definition: pidl.c:2018
LPSTR WINAPI PathFindExtensionA(LPCSTR lpszPath)
Definition: path.c:417
#define lstrcpynA
Definition: compat.h:417

Referenced by _ILGetFileType(), SHELL32_GetFSItemAttributes(), and SHELL_IsShortcut().

◆ _ILGetFileAttributes()

DWORD _ILGetFileAttributes ( LPCITEMIDLIST  pidl,
LPSTR  pOut,
UINT  uOutSize 
)

Definition at line 2589 of file pidl.c.

2590 {
2592  WORD wAttrib = 0;
2593  int i;
2594 
2595  if (!pData)
2596  return 0;
2597 
2598  switch(pData->type)
2599  {
2600  case PT_FOLDER:
2601  case PT_VALUE:
2602  wAttrib = pData->u.file.uFileAttribs;
2603  break;
2604  }
2605 
2606  if(uOutSize >= 6)
2607  {
2608  i=0;
2609  if(wAttrib & FILE_ATTRIBUTE_READONLY)
2610  pOut[i++] = 'R';
2611  if(wAttrib & FILE_ATTRIBUTE_HIDDEN)
2612  pOut[i++] = 'H';
2613  if(wAttrib & FILE_ATTRIBUTE_SYSTEM)
2614  pOut[i++] = 'S';
2615  if(wAttrib & FILE_ATTRIBUTE_ARCHIVE)
2616  pOut[i++] = 'A';
2617  if(wAttrib & FILE_ATTRIBUTE_COMPRESSED)
2618  pOut[i++] = 'C';
2619  pOut[i] = 0x00;
2620  }
2621  return wAttrib;
2622 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2170
#define FILE_ATTRIBUTE_SYSTEM
Definition: nt_native.h:704
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define FILE_ATTRIBUTE_READONLY
Definition: nt_native.h:702
unsigned short WORD
Definition: ntddk_ex.h:93
#define FILE_ATTRIBUTE_COMPRESSED
Definition: nt_native.h:711
#define FILE_ATTRIBUTE_ARCHIVE
Definition: nt_native.h:706
#define FILE_ATTRIBUTE_HIDDEN
Definition: nt_native.h:703
#define PT_VALUE
Definition: pidl.h:95
#define PT_FOLDER
Definition: pidl.h:94
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827

Referenced by CFSFolder::CreateViewObject(), CFSFolder::GetDetailsOf(), getIconLocationForFolder(), SHELL32_GetFSItemAttributes(), SHGetDataFromIDListA(), and SHGetDataFromIDListW().

◆ _ILGetFileDate()

BOOL _ILGetFileDate ( LPCITEMIDLIST  pidl,
LPSTR  pOut,
UINT  uOutSize 
)

Definition at line 2405 of file pidl.c.

2406 {
2407  FILETIME ft,lft;
2408  SYSTEMTIME time;
2409  BOOL ret;
2410 
2411  if (_ILGetFileDateTime( pidl, &ft ))
2412  {
2413  FileTimeToLocalFileTime(&ft, &lft);
2414  FileTimeToSystemTime (&lft, &time);
2415 
2417  if (ret)
2418  {
2419  /* Append space + time without seconds */
2420  pOut[ret-1] = ' ';
2422  }
2423  }
2424  else
2425  {
2426  pOut[0] = '\0';
2427  ret = FALSE;
2428  }
2429  return ret;
2430 }
INT WINAPI GetDateFormatA(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCSTR lpFormat, LPSTR lpDateStr, INT cchOut)
Definition: lcformat.c:922
#define LOCALE_USER_DEFAULT
#define DATE_SHORTDATE
Definition: winnls.h:193
__u16 time
Definition: mkdosfs.c:366
BOOL WINAPI FileTimeToLocalFileTime(IN CONST FILETIME *lpFileTime, OUT LPFILETIME lpLocalFileTime)
Definition: time.c:221
INT WINAPI GetTimeFormatA(LCID lcid, DWORD dwFlags, const SYSTEMTIME *lpTime, LPCSTR lpFormat, LPSTR lpTimeStr, INT cchOut)
Definition: lcformat.c:1030
unsigned int BOOL
Definition: ntddk_ex.h:94
smooth NULL
Definition: ftsmooth.c:416
BOOL _ILGetFileDateTime(LPCITEMIDLIST pidl, FILETIME *pFt)
Definition: pidl.c:2386
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:188
int ret
#define TIME_NOSECONDS
Definition: winnls.h:275

Referenced by CFSFolder::GetDetailsOf().

◆ _ILGetFileDateTime()

BOOL _ILGetFileDateTime ( LPCITEMIDLIST  pidl,
FILETIME ft 
)

Definition at line 2386 of file pidl.c.

2387 {
2389 
2390  if (!pdata)
2391  return FALSE;
2392 
2393  switch (pdata->type)
2394  {
2395  case PT_FOLDER:
2396  case PT_VALUE:
2397  DosDateTimeToFileTime(pdata->u.file.uFileDate, pdata->u.file.uFileTime, pFt);
2398  break;
2399  default:
2400  return FALSE;
2401  }
2402  return TRUE;
2403 }
#define TRUE
Definition: types.h:120
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2170
static PROTOCOLDATA * pdata
Definition: protocol.c:158
BOOL WINAPI DosDateTimeToFileTime(IN WORD wFatDate, IN WORD wFatTime, OUT LPFILETIME lpFileTime)
Definition: time.c:75
#define PT_VALUE
Definition: pidl.h:95
#define PT_FOLDER
Definition: pidl.h:94

Referenced by _ILGetFileDate(), SHGetDataFromIDListA(), and SHGetDataFromIDListW().

◆ _ILGetFileSize()

DWORD _ILGetFileSize ( LPCITEMIDLIST  pidl,
LPSTR  pOut,
UINT  uOutSize 
)

Definition at line 2449 of file pidl.c.

2450 {
2452  DWORD dwSize;
2453 
2454  if (!pdata)
2455  return 0;
2456 
2457  switch (pdata->type)
2458  {
2459  case PT_VALUE:
2460  dwSize = pdata->u.file.dwFileSize;
2461  if (pOut)
2462  StrFormatKBSizeA(dwSize, pOut, uOutSize);
2463  return dwSize;
2464  }
2465  if (pOut)
2466  *pOut = 0x00;
2467  return 0;
2468 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2170
LPSTR WINAPI StrFormatKBSizeA(LONGLONG llBytes, LPSTR lpszDest, UINT cchMax)
Definition: string.c:1727
static PROTOCOLDATA * pdata
Definition: protocol.c:158
unsigned long DWORD
Definition: ntddk_ex.h:95
#define PT_VALUE
Definition: pidl.h:95
PSDBQUERYRESULT_VISTA PVOID DWORD * dwSize
Definition: env.c:54

Referenced by CFSFolder::GetDetailsOf(), SHGetDataFromIDListA(), and SHGetDataFromIDListW().

◆ _ILGetFileStructW()

FileStructW* _ILGetFileStructW ( LPCITEMIDLIST  pidl)

Definition at line 2344 of file pidl.c.

2344  {
2345  FileStructW *pFileStructW;
2346  WORD cbOffset;
2347 
2348  if (!(_ILIsValue(pidl) || _ILIsFolder(pidl)))
2349  return NULL;
2350 
2351  cbOffset = *(const WORD *)((const BYTE *)pidl + pidl->mkid.cb - sizeof(WORD));
2352  pFileStructW = (FileStructW*)((LPBYTE)pidl + cbOffset);
2353 
2354  /* Currently I don't see a fool prove way to figure out if a pidl is for sure of WinXP
2355  * style with a FileStructW member. If we switch all our shellfolder-implementations to
2356  * the new format, this won't be a problem. For now, we do as many sanity checks as possible. */
2357  if ((cbOffset & 0x1) || /* FileStructW member is word aligned in the pidl */
2358  /* FileStructW is positioned after FileStruct */
2359  cbOffset < sizeof(pidl->mkid.cb) + sizeof(PIDLTYPE) + sizeof(FileStruct) ||
2360  /* There has to be enough space at cbOffset in the pidl to hold FileStructW and cbOffset */
2361  cbOffset > pidl->mkid.cb - sizeof(cbOffset) - sizeof(FileStructW) ||
2362  pidl->mkid.cb != cbOffset + pFileStructW->cbLen)
2363  {
2364  WARN("Invalid pidl format (cbOffset = %d)!\n", cbOffset);
2365  return NULL;
2366  }
2367 
2368  return pFileStructW;
2369 }
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3706
#define WARN(fmt,...)
Definition: debug.h:112
unsigned char * LPBYTE
Definition: typedefs.h:53
BOOL _ILIsFolder(LPCITEMIDLIST pidl)
Definition: pidl.c:1959
smooth NULL
Definition: ftsmooth.c:416
BYTE PIDLTYPE
Definition: pidl.h:108
unsigned short WORD
Definition: ntddk_ex.h:93
struct tagFileStructW FileStructW
BOOL _ILIsValue(LPCITEMIDLIST pidl)
Definition: pidl.c:1968
unsigned char BYTE
Definition: xxhash.c:193
struct tagFileStruct FileStruct

Referenced by CFSFolder::_CreateShellExtInstance(), _ILHACKCompareSimpleIds(), _ILSimpleGetTextW(), AddFSClassKeysToArray(), CFSFolder::BindToObject(), BuildPathsList(), CFSFolder::CompareIDs(), ExtensionFromPidl(), and CFSFolder::SetNameOf().

◆ _ILGetFileType()

void _ILGetFileType ( LPCITEMIDLIST  pidl,
LPSTR  pOut,
UINT  uOutSize 
)

Definition at line 2516 of file pidl.c.

2517 {
2518 #ifdef __REACTOS__ /* r32966 */
2519  char sType[64];
2520 #endif
2521 
2522  if(_ILIsValue(pidl))
2523  {
2524  char sTemp[64];
2525 
2526  if(uOutSize > 0)
2527  pOut[0] = 0;
2528 #ifdef __REACTOS__ /* r32966 */
2529  if (_ILGetExtension (pidl, sType, 64))
2530  {
2531  if (HCR_MapTypeToValueA(sType, sTemp, 64, TRUE))
2532  {
2533  /* retrieve description */
2534  if(HCR_MapTypeToValueA(sTemp, pOut, uOutSize, FALSE ))
2535  return;
2536  }
2537  /* display Ext-file as description */
2538  _strupr(sType);
2539  /* load localized file string */
2540  sTemp[0] = '\0';
2541  if(LoadStringA(shell32_hInstance, IDS_ANY_FILE, sTemp, 64))
2542  {
2543  sTemp[63] = '\0';
2544  StringCchPrintfA(pOut, uOutSize, sTemp, sType);
2545  }
2546  }
2547 #else
2548  if (_ILGetExtension (pidl, sTemp, 64))
2549  {
2550  if (!( HCR_MapTypeToValueA(sTemp, sTemp, 64, TRUE)
2551  && HCR_MapTypeToValueA(sTemp, pOut, uOutSize, FALSE )))
2552  {
2553  lstrcpynA (pOut, sTemp, uOutSize - 6);
2554  strcat (pOut, "-file");
2555  }
2556  }
2557 #endif
2558  }
2559  else
2560 #ifdef __REACTOS__ /* r32966 */
2561  {
2562  pOut[0] = '\0';
2563  LoadStringA(shell32_hInstance, IDS_DIRECTORY, pOut, uOutSize);
2564  /* make sure its null terminated */
2565  pOut[uOutSize-1] = '\0';
2566  }
2567 #else
2568  lstrcpynA(pOut, "Folder", uOutSize);
2569 #endif
2570 }
#define TRUE
Definition: types.h:120
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
int WINAPI LoadStringA(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPSTR lpBuffer, _In_ int cchBufferMax)
#define IDS_DIRECTORY
Definition: shresdef.h:146
HINSTANCE shell32_hInstance
Definition: misc.cpp:82
STRSAFEAPI StringCchPrintfA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPCSTR pszFormat,...)
Definition: strsafe.h:520
#define IDS_ANY_FILE
Definition: shresdef.h:172
BOOL _ILGetExtension(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
Definition: pidl.c:2470
BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, LONG len, BOOL bPrependDot)
Definition: classes.c:88
BOOL _ILIsValue(LPCITEMIDLIST pidl)
Definition: pidl.c:1968
_CRTIMP char *__cdecl _strupr(_Inout_z_ char *_String)
#define lstrcpynA
Definition: compat.h:417

Referenced by CFSFolder::GetDetailsOf(), and SHGetFileInfoW().

◆ _ILGetGUIDPointer()

IID* _ILGetGUIDPointer ( LPCITEMIDLIST  pidl)

Definition at line 2308 of file pidl.c.

2309 {
2311 
2312  TRACE("%p\n", pidl);
2313 
2314  if (!pdata)
2315  return NULL;
2316 
2317  TRACE("pdata->type 0x%04x\n", pdata->type);
2318  switch (pdata->type)
2319  {
2320  case PT_SHELLEXT:
2321  case PT_GUID:
2322  case PT_YAGUID:
2323  return &(pdata->u.guid.guid);
2324 
2325  default:
2326  TRACE("Unknown pidl type 0x%04x\n", pdata->type);
2327  break;
2328  }
2329  return NULL;
2330 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2170
smooth NULL
Definition: ftsmooth.c:416
static PROTOCOLDATA * pdata
Definition: protocol.c:158
#define PT_YAGUID
#define TRACE(s)
Definition: solgame.cpp:4
#define PT_GUID
#define PT_SHELLEXT

Referenced by _ILHACKCompareSimpleIds(), _ILIsBitBucket(), _ILIsControlPanel(), _ILIsMyComputer(), _ILIsMyDocuments(), _ILIsNetHood(), _ILSimpleGetText(), _ILSimpleGetTextW(), CRegFolder::BindToObject(), CGuidItemContextMenu_CreateInstance(), CGuidItemExtractIcon_CreateInstance(), CRegFolder::CompareIDs(), CRegFolder::GetDetailsOf(), CRegFolder::GetDisplayNameOf(), CRegFolder::GetUIObjectOf(), CEnumIDListBase::HasItemWithCLSID(), HCR_GetFolderAttributes(), IsNamespaceExtensionHidden(), and CRegFolder::SetNameOf().

◆ _ILGetTextPointer()

LPSTR _ILGetTextPointer ( LPCITEMIDLIST  )

Definition at line 2237 of file pidl.c.

2238 {
2239  /* TRACE(pidl,"(pidl%p)\n", pidl);*/
2240 
2242 
2243  if (!pdata)
2244  return NULL;
2245 
2246  switch (pdata->type)
2247  {
2248  case PT_GUID:
2249  case PT_SHELLEXT:
2250  case PT_YAGUID:
2251  return NULL;
2252 
2253  case PT_DRIVE:
2254  case PT_DRIVE1:
2255  case PT_DRIVE2:
2256  case PT_DRIVE3:
2257  return pdata->u.drive.szDriveName;
2258 
2259  case PT_FOLDER:
2260  case PT_FOLDER1:
2261  case PT_VALUE:
2262  case PT_IESPECIAL1:
2263  case PT_IESPECIAL2:
2264  return pdata->u.file.szNames;
2265 
2266  case PT_WORKGRP:
2267  case PT_COMP:
2268  case PT_NETWORK:
2269  case PT_NETPROVIDER:
2270  case PT_SHARE:
2271  return pdata->u.network.szNames;
2272  }
2273  return NULL;
2274 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2170
#define PT_DRIVE3
Definition: pidl.h:90
#define PT_WORKGRP
Definition: pidl.h:98
#define PT_IESPECIAL2
Definition: pidl.h:104
#define PT_NETWORK
Definition: pidl.h:101
smooth NULL
Definition: ftsmooth.c:416
#define PT_DRIVE2
Definition: pidl.h:89
static PROTOCOLDATA * pdata
Definition: protocol.c:158
#define PT_DRIVE
Definition: pidl.h:88
#define PT_YAGUID
#define PT_FOLDER1
Definition: pidl.h:93
#define PT_IESPECIAL1
Definition: pidl.h:102
#define PT_COMP
Definition: pidl.h:99
#define PT_DRIVE1
Definition: pidl.h:92
#define PT_VALUE
Definition: pidl.h:95
#define PT_NETPROVIDER
Definition: pidl.h:100
#define PT_FOLDER
Definition: pidl.h:94
#define PT_SHARE
Definition: pidl.h:105
#define PT_GUID
#define PT_SHELLEXT

Referenced by _ILCreateDrive(), _ILSimpleGetText(), _ILSimpleGetTextW(), SHGetDataFromIDListA(), and SHGetDataFromIDListW().

◆ _ILIsCPanelStruct()

BOOL _ILIsCPanelStruct ( LPCITEMIDLIST  pidl)

Definition at line 1977 of file pidl.c.

1978 {
1979  LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
1980 
1981  TRACE("(%p)\n",pidl);
1982 
1983  return (pidl && lpPData && (lpPData->type == 0));
1984 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2170
#define TRACE(s)
Definition: solgame.cpp:4

Referenced by CControlPanelFolder::GetAttributesOf(), and CControlPanelFolder::GetUIObjectOf().

◆ _ILIsDesktop()

◆ _ILIsDrive()

BOOL _ILIsDrive ( LPCITEMIDLIST  pidl)

Definition at line 1947 of file pidl.c.

1948 {
1949  LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
1950 
1951  TRACE("(%p)\n",pidl);
1952 
1953  return (pidl && lpPData && (PT_DRIVE == lpPData->type ||
1954  PT_DRIVE1 == lpPData->type ||
1955  PT_DRIVE2 == lpPData->type ||
1956  PT_DRIVE3 == lpPData->type));
1957 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2170
#define PT_DRIVE3
Definition: pidl.h:90
#define PT_DRIVE2
Definition: pidl.h:89
#define PT_DRIVE
Definition: pidl.h:88
#define TRACE(s)
Definition: solgame.cpp:4
#define PT_DRIVE1
Definition: pidl.h:92

Referenced by _ILGetDrive(), _ILHACKCompareSimpleIds(), CDrivesFolder::CompareIDs(), CFSFolder::GetAttributesOf(), CDrivesFolder::GetAttributesOf(), CDrivesFolder::GetDetailsOf(), CDrivesFolder::GetDisplayNameOf(), CDrivesFolder::GetUIObjectOf(), CDrivesFolder::ParseDisplayName(), CDrivesFolder::SetNameOf(), SHGetDataFromIDListA(), and SHGetDataFromIDListW().

◆ _ILIsEmpty()

static BOOL _ILIsEmpty ( LPCITEMIDLIST  pidl)
inlinestatic

Definition at line 256 of file pidl.h.

256 { return _ILIsDesktop(pidl); }
BOOL _ILIsDesktop(LPCITEMIDLIST pidl) DECLSPEC_HIDDEN
Definition: CBandSite.h:24

Referenced by _ILGetDataPointer(), BrsFolder_OnSetExpanded(), BrsFolder_Treeview_Expand(), ILRemoveLastID(), and InitializeTreeView().

◆ _ILIsEqualSimple()

static BOOL _ILIsEqualSimple ( LPCITEMIDLIST  pidlA,
LPCITEMIDLIST  pidlB 
)
inlinestatic

Definition at line 250 of file pidl.h.

251 {
252  return (pidlA->mkid.cb > 0 && !memcmp(pidlA, pidlB, pidlA->mkid.cb)) ||
253  (!pidlA->mkid.cb && !pidlB->mkid.cb);
254 }
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
Definition: utclib.c:112

Referenced by BrsFolder_OnSetExpanded().

◆ _ILIsFolder()

BOOL _ILIsFolder ( LPCITEMIDLIST  pidl)

Definition at line 1959 of file pidl.c.

1960 {
1961  LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
1962 
1963  TRACE("(%p)\n",pidl);
1964 
1965  return (pidl && lpPData && (PT_FOLDER == lpPData->type || PT_FOLDER1 == lpPData->type));
1966 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2170
#define TRACE(s)
Definition: solgame.cpp:4
#define PT_FOLDER1
Definition: pidl.h:93
#define PT_FOLDER
Definition: pidl.h:94

Referenced by CFSFolder::_GetDropTarget(), _ILGetFileStructW(), _ILHACKCompareSimpleIds(), AddFSClassKeysToArray(), CFSFolder::BindToObject(), CFSExtractIcon_CreateInstance(), CFSFolder::CompareIDs(), CFSFolder::GetAttributesOf(), CDesktopFolder::GetAttributesOf(), CFSFolder::GetDisplayNameOf(), CFSFolder::SetNameOf(), and SHELL32_GetFSItemAttributes().

◆ _ILIsMyComputer()

BOOL _ILIsMyComputer ( LPCITEMIDLIST  pidl)

Definition at line 1914 of file pidl.c.

1915 {
1916  REFIID iid = _ILGetGUIDPointer(pidl);
1917 
1918  TRACE("(%p)\n",pidl);
1919 
1920  if (iid)
1921  return IsEqualIID(iid, &CLSID_MyComputer);
1922  return FALSE;
1923 }
#define REFIID
Definition: guiddef.h:118
#define TRACE(s)
Definition: solgame.cpp:4
IID * _ILGetGUIDPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2308
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

Referenced by _ILGetDrive(), BrsFolder_Treeview_Expand(), CDesktopFolder::GetAttributesOf(), and RegFolderContextMenuCallback().

◆ _ILIsPidlSimple()

BOOL _ILIsPidlSimple ( LPCITEMIDLIST  pidl)

Definition at line 820 of file shellbrowser.cpp.

821 {
822  LPCITEMIDLIST pidlnext;
823  WORD length;
824  BOOL ret;
825 
826  ret = TRUE;
827  if (! _ILIsDesktop(pidl))
828  {
829  length = pidl->mkid.cb;
830  pidlnext =
831  reinterpret_cast<LPCITEMIDLIST>(
832  reinterpret_cast<const BYTE *>(pidl) + length);
833  if (pidlnext->mkid.cb != 0)
834  ret = FALSE;
835  }
836  return ret;
837 }
#define TRUE
Definition: types.h:120
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL _ILIsDesktop(LPCITEMIDLIST pidl)
Definition: CBandSite.h:24
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
unsigned short WORD
Definition: ntddk_ex.h:93
int ret

Referenced by CFSFolder::GetDisplayNameOf(), CDrivesFolder::GetDisplayNameOf(), CDesktopFolder::GetDisplayNameOf(), HCR_GetFolderAttributes(), SHBindToFolderIDListParent(), SHBindToParent(), and SHELL32_BindToSF().

◆ _ILIsSpecialFolder()

BOOL _ILIsSpecialFolder ( LPCITEMIDLIST  pidl)

Definition at line 1936 of file pidl.c.

1937 {
1938  LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
1939 
1940  TRACE("(%p)\n",pidl);
1941 
1942  return (pidl && ( (lpPData && (PT_GUID== lpPData->type || PT_SHELLEXT== lpPData->type || PT_YAGUID == lpPData->type)) ||
1943  (pidl && pidl->mkid.cb == 0x00)
1944  ));
1945 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2170
#define PT_YAGUID
#define TRACE(s)
Definition: solgame.cpp:4
#define PT_GUID
#define PT_SHELLEXT

Referenced by SHGetDataFromIDListA().

◆ _ILIsUnicode()

BOOL _ILIsUnicode ( LPCITEMIDLIST  pidl)

Definition at line 1876 of file pidl.c.

1877 {
1878  LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
1879 
1880  TRACE("(%p)\n",pidl);
1881 
1882  return (pidl && lpPData && PT_VALUEW == lpPData->type);
1883 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2170
#define TRACE(s)
Definition: solgame.cpp:4
#define PT_VALUEW
Definition: pidl.h:96

Referenced by pdump().

◆ _ILIsValue()

BOOL _ILIsValue ( LPCITEMIDLIST  pidl)

Definition at line 1968 of file pidl.c.

1969 {
1970  LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
1971 
1972  TRACE("(%p)\n",pidl);
1973 
1974  return (pidl && lpPData && PT_VALUE == lpPData->type);
1975 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2170
#define TRACE(s)
Definition: solgame.cpp:4
#define PT_VALUE
Definition: pidl.h:95

Referenced by _ILGetExtension(), _ILGetFileStructW(), _ILGetFileType(), _ILHACKCompareSimpleIds(), AddFSClassKeysToArray(), ExtensionFromPidl(), CFSFolder::GetAttributesOf(), CDesktopFolder::GetAttributesOf(), CFSFolder::GetUIObjectOf(), COpenWithMenu::Initialize(), and SHELL32_GetFSItemAttributes().

◆ _ILSimpleGetText()

DWORD _ILSimpleGetText ( LPCITEMIDLIST  pidl,
LPSTR  pOut,
UINT  uOutSize 
)

Definition at line 2018 of file pidl.c.

2019 {
2020  DWORD dwReturn=0;
2021  LPSTR szSrc;
2022  LPWSTR szSrcW;
2023  GUID const * riid;
2024  char szTemp[MAX_PATH];
2025 
2026  TRACE("(%p %p %x)\n",pidl,szOut,uOutSize);
2027 
2028  if (!pidl)
2029  return 0;
2030 
2031  if (szOut)
2032  *szOut = 0;
2033 
2034  if (_ILIsDesktop(pidl))
2035  {
2036  /* desktop */
2037  if (HCR_GetClassNameA(&CLSID_ShellDesktop, szTemp, MAX_PATH))
2038  {
2039  if (szOut)
2040  lstrcpynA(szOut, szTemp, uOutSize);
2041 
2042  dwReturn = strlen (szTemp);
2043  }
2044  }
2045  else if (( szSrc = _ILGetTextPointer(pidl) ))
2046  {
2047  /* filesystem */
2048  if (szOut)
2049  lstrcpynA(szOut, szSrc, uOutSize);
2050 
2051  dwReturn = strlen(szSrc);
2052  }
2053  else if (( szSrcW = _ILGetTextPointerW(pidl) ))
2054  {
2055  /* unicode filesystem */
2056  WideCharToMultiByte(CP_ACP,0,szSrcW, -1, szTemp, MAX_PATH, NULL, NULL);
2057 
2058  if (szOut)
2059  lstrcpynA(szOut, szTemp, uOutSize);
2060 
2061  dwReturn = strlen (szTemp);
2062  }
2063  else if (( riid = _ILGetGUIDPointer(pidl) ))
2064  {
2065  /* special folder */
2066  if ( HCR_GetClassNameA(riid, szTemp, MAX_PATH) )
2067  {
2068  if (szOut)
2069  lstrcpynA(szOut, szTemp, uOutSize);
2070 
2071  dwReturn = strlen (szTemp);
2072  }
2073  }
2074  else
2075  {
2076  ERR("-- no text\n");
2077  }
2078 
2079  TRACE("-- (%p=%s 0x%08x)\n",szOut,debugstr_a(szOut),dwReturn);
2080  return dwReturn;
2081 }
#define WideCharToMultiByte
Definition: compat.h:101
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
REFIID riid
Definition: precomp.h:44
#define CP_ACP
Definition: compat.h:99
static LPWSTR _ILGetTextPointerW(LPCITEMIDLIST pidl)
Definition: pidl.c:2181
char * LPSTR
Definition: xmlstorage.h:182
smooth NULL
Definition: ftsmooth.c:416
LPSTR _ILGetTextPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2237
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
IID * _ILGetGUIDPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2308
#define MAX_PATH
Definition: compat.h:26
BOOL HCR_GetClassNameA(REFIID riid, LPSTR szDest, DWORD len)
Definition: classes.c:428
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL _ILIsDesktop(LPCITEMIDLIST pidl)
Definition: pidl.c:1885
#define ERR(fmt,...)
Definition: debug.h:110
#define lstrcpynA
Definition: compat.h:417
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by _ILGetDrive(), and _ILGetExtension().

◆ _ILSimpleGetTextW()

DWORD _ILSimpleGetTextW ( LPCITEMIDLIST  pidl,
LPWSTR  pOut,
UINT  uOutSize 
)

Definition at line 2090 of file pidl.c.

2091 {
2092  DWORD dwReturn;
2093  FileStructW *pFileStructW = _ILGetFileStructW(pidl);
2094 
2095  TRACE("(%p %p %x)\n",pidl,szOut,uOutSize);
2096 
2097  if (pFileStructW) {
2098  lstrcpynW(szOut, pFileStructW->wszName, uOutSize);
2099  dwReturn = lstrlenW(pFileStructW->wszName);
2100  } else {
2101  GUID const * riid;
2102  WCHAR szTemp[MAX_PATH];
2103  LPSTR szSrc;
2104  LPWSTR szSrcW;
2105  dwReturn=0;
2106 
2107  if (!pidl)
2108  return 0;
2109 
2110  if (szOut)
2111  *szOut = 0;
2112 
2113  if (_ILIsDesktop(pidl))
2114  {
2115  /* desktop */
2116  if (HCR_GetClassNameW(&CLSID_ShellDesktop, szTemp, MAX_PATH))
2117  {
2118  if (szOut)
2119  lstrcpynW(szOut, szTemp, uOutSize);
2120 
2121  dwReturn = lstrlenW (szTemp);
2122  }
2123  }
2124  else if (( szSrcW = _ILGetTextPointerW(pidl) ))
2125  {
2126  /* unicode filesystem */
2127  if (szOut)
2128  lstrcpynW(szOut, szSrcW, uOutSize);
2129 
2130  dwReturn = lstrlenW(szSrcW);
2131  }
2132  else if (( szSrc = _ILGetTextPointer(pidl) ))
2133  {
2134  /* filesystem */
2135  MultiByteToWideChar(CP_ACP, 0, szSrc, -1, szTemp, MAX_PATH);
2136 
2137  if (szOut)
2138  lstrcpynW(szOut, szTemp, uOutSize);
2139 
2140  dwReturn = lstrlenW (szTemp);
2141  }
2142  else if (( riid = _ILGetGUIDPointer(pidl) ))
2143  {
2144  /* special folder */
2145  if ( HCR_GetClassNameW(riid, szTemp, MAX_PATH) )
2146  {
2147  if (szOut)
2148  lstrcpynW(szOut, szTemp, uOutSize);
2149 
2150  dwReturn = lstrlenW (szTemp);
2151  }
2152  }
2153  else
2154  {
2155  ERR("-- no text\n");
2156  }
2157  }
2158 
2159  TRACE("-- (%p=%s 0x%08x)\n",szOut,debugstr_w(szOut),dwReturn);
2160  return dwReturn;
2161 }
REFIID riid
Definition: precomp.h:44
#define CP_ACP
Definition: compat.h:99
WCHAR wszName[1]
Definition: shlfolder.c:1555
static LPWSTR _ILGetTextPointerW(LPCITEMIDLIST pidl)
Definition: pidl.c:2181
char * LPSTR
Definition: xmlstorage.h:182
#define lstrlenW
Definition: compat.h:416
#define lstrcpynW
Definition: compat.h:406
#define debugstr_w
Definition: kernel32.h:32
LPSTR _ILGetTextPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2237
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
IID * _ILGetGUIDPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2308
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL _ILIsDesktop(LPCITEMIDLIST pidl)
Definition: pidl.c:1885
#define ERR(fmt,...)
Definition: debug.h:110
FileStructW * _ILGetFileStructW(LPCITEMIDLIST pidl)
Definition: pidl.c:2344
#define MultiByteToWideChar
Definition: compat.h:100
WCHAR * LPWSTR
Definition: xmlstorage.h:184
BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len)
Definition: classes.c:351

Referenced by CDesktopFolder::_GetSFFromPidl(), CFSFolder::GetDisplayNameOf(), CDrivesFolder::GetDisplayNameOf(), RenderHDROP(), CDrivesFolder::SetNameOf(), and SHELL32_GetFSItemAttributes().

◆ ILGetDisplayNameExW()

BOOL ILGetDisplayNameExW ( LPSHELLFOLDER  psf,
LPCITEMIDLIST  pidl,
LPWSTR  path,
DWORD  type 
)

Definition at line 91 of file pidl.c.

92 {
93  LPSHELLFOLDER psfParent, lsf = psf;
95  LPCITEMIDLIST pidllast;
96  STRRET strret;
97  DWORD flag;
98 
99  TRACE("%p %p %p %x\n", psf, pidl, path, type);
100 
101  if (!pidl || !path)
102  return FALSE;
103 
104  if (!lsf)
105  {
106  ret = SHGetDesktopFolder(&lsf);
107  if (FAILED(ret))
108  return FALSE;
109  }
110 
111  switch (type)
112  {
113  case ILGDN_FORPARSING:
114  flag = SHGDN_FORPARSING | SHGDN_FORADDRESSBAR;
115  break;
116  case ILGDN_NORMAL:
117  flag = SHGDN_NORMAL;
118  break;
119  case ILGDN_INFOLDER:
120  flag = SHGDN_INFOLDER;
121  break;
122  default:
123  FIXME("Unknown type parameter = %x\n", type);
124  flag = SHGDN_FORPARSING | SHGDN_FORADDRESSBAR;
125  break;
126  }
127 
128  if (!*(const WORD*)pidl || type == ILGDN_FORPARSING)
129  {
130  ret = IShellFolder_GetDisplayNameOf(lsf, pidl, flag, &strret);
131  if (SUCCEEDED(ret))
132  {
133  if(!StrRetToStrNW(path, MAX_PATH, &strret, pidl))
134  ret = E_FAIL;
135  }
136  }
137  else
138  {
139  ret = SHBindToParent(pidl, &IID_IShellFolder, (LPVOID*)&psfParent, &pidllast);
140  if (SUCCEEDED(ret))
141  {
142  ret = IShellFolder_GetDisplayNameOf(psfParent, pidllast, flag, &strret);
143  if (SUCCEEDED(ret))
144  {
145  if(!StrRetToStrNW(path, MAX_PATH, &strret, pidllast))
146  ret = E_FAIL;
147  }
148  IShellFolder_Release(psfParent);
149  }
150  }
151 
152  TRACE("%p %p %s\n", psf, pidl, debugstr_w(path));
153 
154  if (!psf)
155  IShellFolder_Release(lsf);
156  return SUCCEEDED(ret);
157 }
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define NO_ERROR
Definition: dderror.h:5
#define E_FAIL
Definition: ddrawi.h:102
#define ILGDN_FORPARSING
Definition: undocshell.h:68
#define debugstr_w
Definition: kernel32.h:32
#define FIXME(fmt,...)
Definition: debug.h:111
#define ILGDN_NORMAL
Definition: undocshell.h:69
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
LONG HRESULT
Definition: typedefs.h:78
#define MAX_PATH
Definition: compat.h:26
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
int ret
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean flag
Definition: glfuncs.h:52
#define ILGDN_INFOLDER
Definition: undocshell.h:70
HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast)
Definition: pidl.c:1331
BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)
Definition: shellstring.c:85
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by CFSExtractIcon_CreateInstance(), FM_InitMenuPopup(), CFolder::get_Title(), getIconLocationForDrive(), getIconLocationForFolder(), ILGetDisplayName(), ILGetDisplayNameEx(), ILGetDisplayNameExA(), IShellLink_ConstructFromFile(), and SH_ShowDriveProperties().

◆ pcheck()

BOOL pcheck ( LPCITEMIDLIST  pidl)

Definition at line 336 of file debughlp.cpp.

337 {
338  DWORD type;
339  LPCITEMIDLIST pidltemp = pidl;
340 
341  while( pidltemp && pidltemp->mkid.cb )
342  {
343  LPPIDLDATA pidlData = _dbg_ILGetDataPointer(pidltemp);
344 
345  if (pidlData)
346  {
347  type = pidlData->type;
348  switch( type )
349  {
350  case PT_CPLAPPLET:
351  case PT_GUID:
352  case PT_SHELLEXT:
353  case PT_DRIVE:
354  case PT_DRIVE1:
355  case PT_DRIVE2:
356  case PT_DRIVE3:
357  case PT_FOLDER:
358  case PT_VALUE:
359  case PT_VALUEW:
360  case PT_FOLDER1:
361  case PT_WORKGRP:
362  case PT_COMP:
363  case PT_NETPROVIDER:
364  case PT_NETWORK:
365  case PT_IESPECIAL1:
366  case PT_YAGUID:
367  case PT_IESPECIAL2:
368  case PT_SHARE:
369  break;
370  default:
371  ERR("unknown IDLIST %p [%p] size=%u type=%x\n",
372  pidl, pidltemp, pidltemp->mkid.cb,type );
373  dump_pidl_hex( pidltemp );
374  return FALSE;
375  }
376  pidltemp = _dbg_ILGetNext(pidltemp);
377  }
378  else
379  {
380  return FALSE;
381  }
382  }
383  return TRUE;
384 }
static LPPIDLDATA _dbg_ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:48
#define TRUE
Definition: types.h:120
#define PT_DRIVE3
Definition: pidl.h:90
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define PT_WORKGRP
Definition: pidl.h:98
#define PT_IESPECIAL2
Definition: pidl.h:104
#define PT_NETWORK
Definition: pidl.h:101
#define PT_DRIVE2
Definition: pidl.h:89
#define PT_DRIVE
Definition: pidl.h:88
#define PT_YAGUID
unsigned long DWORD
Definition: ntddk_ex.h:95
static LPITEMIDLIST _dbg_ILGetNext(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:26
#define PT_FOLDER1
Definition: pidl.h:93
#define PT_IESPECIAL1
Definition: pidl.h:102
#define ERR(fmt,...)
Definition: debug.h:110
#define PT_COMP
Definition: pidl.h:99
#define PT_DRIVE1
Definition: pidl.h:92
#define PT_VALUE
Definition: pidl.h:95
#define PT_NETPROVIDER
Definition: pidl.h:100
#define PT_FOLDER
Definition: pidl.h:94
#define PT_SHARE
Definition: pidl.h:105
#define PT_CPLAPPLET
Definition: pidl.h:86
#define PT_GUID
#define PT_VALUEW
Definition: pidl.h:96
#define PT_SHELLEXT
static void dump_pidl_hex(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:312

Referenced by _ILCreateCPanelApplet(), ILFindChild(), ILIsEqual(), ILLoadFromStream(), and pdump().

◆ pdump()

void pdump ( LPCITEMIDLIST  pidl)

Definition at line 248 of file debughlp.cpp.

249 {
250  LPCITEMIDLIST pidltemp = pidl;
251 
252  if (!TRACE_ON(pidl)) return;
253 
254  if (! pidltemp)
255  {
256  MESSAGE ("-------- pidl=NULL (Desktop)\n");
257  }
258  else
259  {
260  MESSAGE ("-------- pidl=%p\n", pidl);
261  if (pidltemp->mkid.cb)
262  {
263  do
264  {
265  if (_ILIsUnicode(pidltemp))
266  {
267  DWORD dwAttrib = 0;
269  DWORD type = pData ? pData->type : 0;
270  LPWSTR szLongName = _dbg_ILGetTextPointerW(pidltemp);
271  LPWSTR szShortName = _dbg_ILGetSTextPointerW(pidltemp);
272  char szName[MAX_PATH];
273 
275  if ( pData && (PT_FOLDER == type || PT_VALUE == type) )
276  dwAttrib = pData->u.file.uFileAttribs;
277 
278  MESSAGE ("[%p] size=%04u type=%x attr=0x%08x name=%s (%s,%s)\n",
279  pidltemp, pidltemp->mkid.cb, type, dwAttrib,
280  debugstr_a(szName), debugstr_w(szLongName), debugstr_w(szShortName));
281  }
282  else
283  {
284  DWORD dwAttrib = 0;
286  DWORD type = pData ? pData->type : 0;
287  LPSTR szLongName = _dbg_ILGetTextPointer(pidltemp);
288  LPSTR szShortName = _dbg_ILGetSTextPointer(pidltemp);
289  char szName[MAX_PATH];
290 
292  if ( pData && (PT_FOLDER == type || PT_VALUE == type) )
293  dwAttrib = pData->u.file.uFileAttribs;
294 
295  MESSAGE ("[%p] size=%04u type=%x attr=0x%08x name=%s (%s,%s)\n",
296  pidltemp, pidltemp->mkid.cb, type, dwAttrib,
297  debugstr_a(szName), debugstr_a(szLongName), debugstr_a(szShortName));
298  }
299 
300  pidltemp = _dbg_ILGetNext(pidltemp);
301 
302  } while (pidltemp && pidltemp->mkid.cb);
303  }
304  else
305  {
306  MESSAGE ("empty pidl (Desktop)\n");
307  }
308  pcheck(pidl);
309  }
310 }
static LPPIDLDATA _dbg_ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:48
#define MESSAGE
Definition: options.h:86
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
char * LPSTR
Definition: xmlstorage.h:182
static LPWSTR _dbg_ILGetTextPointerW(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:94
#define debugstr_w
Definition: kernel32.h:32
BOOL _ILIsUnicode(LPCITEMIDLIST pidl)
Definition: pidl.c:1876
static void _dbg_ILSimpleGetText(LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
Definition: debughlp.cpp:207
#define debugstr_a
Definition: kernel32.h:31
#define MAX_PATH
Definition: compat.h:26
unsigned long DWORD
Definition: ntddk_ex.h:95
static LPITEMIDLIST _dbg_ILGetNext(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:26
static LPSTR _dbg_ILGetTextPointer(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:56
BOOL pcheck(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:336
static LPSTR _dbg_ILGetSTextPointer(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:139
#define PT_VALUE
Definition: pidl.h:95
static const WCHAR szName[]
Definition: msipriv.h:1194
static LPWSTR _dbg_ILGetSTextPointerW(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:161
#define PT_FOLDER
Definition: pidl.h:94
WCHAR * LPWSTR
Definition: xmlstorage.h:184
TW_UINT32 TW_UINT16 TW_UINT16 TW_MEMREF pData
Definition: twain.h:1827
#define TRACE_ON(x)
Definition: compat.h:65

Referenced by BrsFolder_OnCommand(), CIDLData_CreateFromIDArray(), FileMenu_InsertUsingPidl(), CFSFolder::GetAttributesOf(), CControlPanelFolder::GetAttributesOf(), CDesktopFolder::GetAttributesOf(), CPrinterFolder::GetDisplayNameOf(), CDrivesFolder::GetDisplayNameOf(), CDesktopFolder::GetDisplayNameOf(), ILAppendID(), ILClone(), ILCloneFirst(), ILCombine(), ILFindChild(), ILGlobalClone(), ILIsEqual(), CFSFolder::InitializeEx(), CShellLink::Load(), SHBindToParent(), SHGetDataFromIDListA(), SHGetDataFromIDListW(), SHGetPathFromIDListW(), SHLogILFromFSIL(), and SHMapPIDLToSystemImageListIndex().