ReactOS  0.4.15-dev-5455-g015cd25
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 2663 of file pidl.c.

2664 {
2665  UINT i;
2666  PITEMID_CHILD *apidldest;
2667 
2668  if (!apidlsrc)
2669  return NULL;
2670 
2671  apidldest = SHAlloc(cidl * sizeof(PITEMID_CHILD));
2672 
2673  for (i = 0; i < cidl; i++)
2674  apidldest[i] = ILClone(apidlsrc[i]);
2675 
2676  return apidldest;
2677 }
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
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
LPVOID WINAPI SHAlloc(SIZE_T len)
Definition: shellole.c:304

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

◆ _ILCopyCidaToaPidl()

LPITEMIDLIST* _ILCopyCidaToaPidl ( LPITEMIDLIST pidl,
const CIDA cida 
)

Definition at line 2684 of file pidl.c.

2685 {
2686  UINT i;
2687  LPITEMIDLIST *dst;
2688 
2689  dst = SHAlloc(cida->cidl * sizeof(LPITEMIDLIST));
2690  if (!dst)
2691  return NULL;
2692 
2693  if (pidl)
2694  *pidl = ILClone((LPCITEMIDLIST)(&((const BYTE*)cida)[cida->aoffset[0]]));
2695 
2696  for (i = 0; i < cida->cidl; i++)
2697  dst[i] = ILClone((LPCITEMIDLIST)(&((const BYTE*)cida)[cida->aoffset[i + 1]]));
2698 
2699  return dst;
2700 }
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
UINT cidl
Definition: shlobj.h:499
unsigned char BYTE
Definition: xxhash.c:193
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
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
GLenum GLenum dst
Definition: glext.h:6340
unsigned int UINT
Definition: ndis.h:50
#define NULL
Definition: types.h:112
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
LPVOID WINAPI SHAlloc(SIZE_T len)
Definition: shellole.c:304

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

◆ _ILCreateBitBucket()

LPITEMIDLIST _ILCreateBitBucket ( void  )

Definition at line 1675 of file pidl.c.

1676 {
1677  TRACE("()\n");
1678  return _ILCreateGuid(PT_GUID, &CLSID_RecycleBin);
1679 }
LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid)
Definition: pidl.c:1687
#define TRACE(s)
Definition: solgame.cpp:4
#define PT_GUID

Referenced by SHGetFolderLocation().

◆ _ILCreateControlPanel()

LPITEMIDLIST _ILCreateControlPanel ( void  )

Definition at line 1631 of file pidl.c.

1632 {
1633  LPITEMIDLIST parent = _ILCreateGuid(PT_GUID, &CLSID_MyComputer), ret = NULL;
1634 
1635  TRACE("()\n");
1636  if (parent)
1637  {
1638  LPITEMIDLIST cpl = _ILCreateGuid(PT_SHELLEXT, &CLSID_ControlPanel);
1639 
1640  if (cpl)
1641  {
1642  ret = ILCombine(parent, cpl);
1643  SHFree(cpl);
1644  }
1645  SHFree(parent);
1646  }
1647  return ret;
1648 }
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:699
LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid)
Definition: pidl.c:1687
#define TRACE(s)
Definition: solgame.cpp:4
r parent
Definition: btrfs.c:3010
int ret
#define NULL
Definition: types.h:112
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:326
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 1602 of file pidl.c.

1603 {
1604  LPITEMIDLIST ret;
1605 
1606  TRACE("()\n");
1607  ret = SHAlloc(2);
1608  if (ret)
1609  ret->mkid.cb = 0;
1610  return ret;
1611 }
#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:304

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

◆ _ILCreateDrive()

LPITEMIDLIST _ILCreateDrive ( LPCWSTR  )

Definition at line 1808 of file pidl.c.

1809 {
1810  LPITEMIDLIST pidlOut;
1811 
1812  TRACE("(%s)\n",debugstr_w(lpszNew));
1813 
1814  pidlOut = _ILAlloc(PT_DRIVE, sizeof(DriveStruct));
1815  if (pidlOut)
1816  {
1817  LPSTR pszDest;
1818 
1819  pszDest = _ILGetTextPointer(pidlOut);
1820  if (pszDest)
1821  {
1822  strcpy(pszDest, "x:\\");
1823  pszDest[0]=toupperW(lpszNew[0]);
1824  TRACE("-- create Drive: %s\n", debugstr_a(pszDest));
1825  }
1826  }
1827  return pidlOut;
1828 }
static LPITEMIDLIST _ILAlloc(PIDLTYPE type, unsigned int size)
Definition: pidl.c:1576
char * LPSTR
Definition: xmlstorage.h:182
#define debugstr_w
Definition: kernel32.h:32
LPSTR _ILGetTextPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2254
#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 1830 of file pidl.c.

1831 {
1832  LPITEMIDLIST pidlOut;
1833 
1834  TRACE("\n");
1835 
1836  pidlOut = _ILAlloc(PT_NETWORK, FIELD_OFFSET(PIDLDATA, u.network.szNames[sizeof("Entire Network")]));
1837  if (pidlOut)
1838  {
1839  LPPIDLDATA pData = _ILGetDataPointer(pidlOut);
1840 
1841  pData->u.network.dummy = 0;
1842  strcpy(pData->u.network.szNames, "Entire Network");
1843  }
1844  return pidlOut;
1845 }
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:2187
static LPITEMIDLIST _ILAlloc(PIDLTYPE type, unsigned int size)
Definition: pidl.c:1576
#define PT_NETWORK
Definition: pidl.h:101
#define TRACE(s)
Definition: solgame.cpp:4
#define FIELD_OFFSET(t, f)
Definition: typedefs.h:255
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 1741 of file pidl.c.

1742 {
1743  char buff[MAX_PATH + 14 +1]; /* see WIN32_FIND_DATA */
1744  DWORD len, len1, wlen, alen;
1745  LPITEMIDLIST pidl;
1746  PIDLTYPE type;
1747 
1748  if (!wfd)
1749  return NULL;
1750 
1751  TRACE("(%s, %s)\n",debugstr_w(wfd->cAlternateFileName), debugstr_w(wfd->cFileName));
1752 
1753  /* prepare buffer with both names */
1754  len = WideCharToMultiByte(CP_ACP,0,wfd->cFileName,-1,buff,MAX_PATH,NULL,NULL);
1755  len1 = WideCharToMultiByte(CP_ACP,0,wfd->cAlternateFileName,-1, buff+len, sizeof(buff)-len, NULL, NULL);
1756  alen = len + len1;
1757 
1758  type = (wfd->dwFileAttributes & FILE_ATTRIBUTE_DIRECTORY) ? PT_FOLDER : PT_VALUE;
1759 
1760  wlen = lstrlenW(wfd->cFileName) + 1;
1761  pidl = _ILAlloc(type, FIELD_OFFSET(FileStruct, szNames[alen + (alen & 1)]) +
1762  FIELD_OFFSET(FileStructW, wszName[wlen]) + sizeof(WORD));
1763  if (pidl)
1764  {
1766  FileStruct *fs = &pData->u.file;
1767  FileStructW *fsw;
1768  WORD *pOffsetW;
1769 
1770  FileTimeToDosDateTime( &wfd->ftLastWriteTime, &fs->uFileDate, &fs->uFileTime);
1771  fs->dwFileSize = wfd->nFileSizeLow;
1772  fs->uFileAttribs = wfd->dwFileAttributes;
1773  memcpy(fs->szNames, buff, alen);
1774 
1775  fsw = (FileStructW*)(pData->u.file.szNames + alen + (alen & 0x1));
1776  fsw->cbLen = FIELD_OFFSET(FileStructW, wszName[wlen]) + sizeof(WORD);
1777  FileTimeToDosDateTime( &wfd->ftCreationTime, &fsw->uCreationDate, &fsw->uCreationTime);
1778  FileTimeToDosDateTime( &wfd->ftLastAccessTime, &fsw->uLastAccessDate, &fsw->uLastAccessTime);
1779  memcpy(fsw->wszName, wfd->cFileName, wlen * sizeof(WCHAR));
1780 
1781  pOffsetW = (WORD*)((LPBYTE)pidl + pidl->mkid.cb - sizeof(WORD));
1782  *pOffsetW = (LPBYTE)fsw - (LPBYTE)pidl;
1783  TRACE("-- Set Value: %s\n",debugstr_w(fsw->wszName));
1784  }
1785  return pidl;
1786 
1787 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2187
#define WideCharToMultiByte
Definition: compat.h:111
static LPITEMIDLIST _ILAlloc(PIDLTYPE type, unsigned int size)
Definition: pidl.c:1576
#define CP_ACP
Definition: compat.h:109
WCHAR wszName[1]
Definition: shlfolder.c:1555
_In_ CLIPOBJ _In_ BRUSHOBJ _In_ LONG x1
Definition: winddi.h:3706
Definition: ffs.h:70
#define lstrlenW
Definition: compat.h:750
unsigned char * LPBYTE
Definition: typedefs.h:53
#define debugstr_w
Definition: kernel32.h:32
#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:34
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:255
#define NULL
Definition: types.h:112
#define PT_VALUE
Definition: pidl.h:95
#define PT_FOLDER
Definition: pidl.h:94
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
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 1789 of file pidl.c.

1790 {
1791  HANDLE hFile;
1792  WIN32_FIND_DATAW stffile;
1793 
1794  if (!ppidl)
1795  return E_INVALIDARG;
1796 
1797  hFile = FindFirstFileW(szPath, &stffile);
1798  if (hFile == INVALID_HANDLE_VALUE)
1800 
1801  FindClose(hFile);
1802 
1803  *ppidl = _ILCreateFromFindDataW(&stffile);
1804 
1805  return *ppidl ? S_OK : E_OUTOFMEMORY;
1806 }
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define INVALID_HANDLE_VALUE
Definition: compat.h:731
#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:52
LPCWSTR szPath
Definition: env.c:37
LPITEMIDLIST _ILCreateFromFindDataW(const WIN32_FIND_DATAW *wfd)
Definition: pidl.c:1741
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 1687 of file pidl.c.

1688 {
1689  LPITEMIDLIST pidlOut;
1690 
1691  if (type == PT_SHELLEXT || type == PT_GUID || type == PT_YAGUID)
1692  {
1693  pidlOut = _ILAlloc(type, sizeof(GUIDStruct));
1694  if (pidlOut)
1695  {
1696  LPPIDLDATA pData = _ILGetDataPointer(pidlOut);
1697 
1698  pData->u.guid.guid = *guid;
1699  TRACE("-- create GUID-pidl %s\n",
1700  debugstr_guid(&(pData->u.guid.guid)));
1701  }
1702  }
1703  else
1704  {
1705  WARN("%d: invalid type for GUID\n", type);
1706  pidlOut = NULL;
1707  }
1708  return pidlOut;
1709 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2187
static LPITEMIDLIST _ILAlloc(PIDLTYPE type, unsigned int size)
Definition: pidl.c:1576
#define WARN(fmt,...)
Definition: debug.h:112
const GUID * guid
#define debugstr_guid
Definition: kernel32.h:35
#define PT_YAGUID
#define TRACE(s)
Definition: solgame.cpp:4
#define NULL
Definition: types.h:112
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
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 1712 of file pidl.c.

1713 {
1714  IID iid;
1715 
1716  if (FAILED(SHCLSIDFromStringA(szGUID, &iid)))
1717  {
1718  ERR("%s is not a GUID\n", szGUID);
1719  return NULL;
1720  }
1721  return _ILCreateGuid(PT_GUID, &iid);
1722 }
DWORD WINAPI SHCLSIDFromStringA(LPCSTR clsid, CLSID *id)
Definition: shellole.c:248
LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid)
Definition: pidl.c:1687
#define ERR(fmt,...)
Definition: debug.h:110
#define NULL
Definition: types.h:112
#define PT_GUID

◆ _ILCreateGuidFromStrW()

LPITEMIDLIST _ILCreateGuidFromStrW ( LPCWSTR  szGUID)

Definition at line 1725 of file pidl.c.

1726 {
1727  IID iid;
1728 
1729 #ifndef __REACTOS__
1730  if (FAILED(SHCLSIDFromStringW(szGUID, &iid)))
1731 #else
1732  if (!GUIDFromStringW(szGUID, &iid))
1733 #endif
1734  {
1735  ERR("%s is not a GUID\n", debugstr_w(szGUID));
1736  return NULL;
1737  }
1738  return _ILCreateGuid(PT_GUID, &iid);
1739 }
LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid)
Definition: pidl.c:1687
#define debugstr_w
Definition: kernel32.h:32
BOOL WINAPI GUIDFromStringW(_In_ PCWSTR psz, _Out_ LPGUID pguid)
DWORD WINAPI SHCLSIDFromStringW(LPCWSTR clsid, CLSID *id)
Definition: shellole.c:256
#define ERR(fmt,...)
Definition: debug.h:110
#define NULL
Definition: types.h:112
#define PT_GUID

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

◆ _ILCreateIExplore()

LPITEMIDLIST _ILCreateIExplore ( void  )

Definition at line 1625 of file pidl.c.

1626 {
1627  TRACE("()\n");
1628  return _ILCreateGuid(PT_GUID, &CLSID_Internet);
1629 }
LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid)
Definition: pidl.c:1687
#define TRACE(s)
Definition: solgame.cpp:4
#define PT_GUID

Referenced by SHGetFolderLocation().

◆ _ILCreateMyComputer()

LPITEMIDLIST _ILCreateMyComputer ( void  )

Definition at line 1613 of file pidl.c.

1614 {
1615  TRACE("()\n");
1616  return _ILCreateGuid(PT_GUID, &CLSID_MyComputer);
1617 }
LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid)
Definition: pidl.c:1687
#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 1619 of file pidl.c.

1620 {
1621  TRACE("()\n");
1622  return _ILCreateGuid(PT_GUID, &CLSID_MyDocuments);
1623 }
LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid)
Definition: pidl.c:1687
#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 1669 of file pidl.c.

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

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

◆ _ILCreatePrinters()

LPITEMIDLIST _ILCreatePrinters ( void  )

Definition at line 1650 of file pidl.c.

1651 {
1652  LPITEMIDLIST parent = _ILCreateGuid(PT_GUID, &CLSID_MyComputer), ret = NULL;
1653 
1654  TRACE("()\n");
1655  if (parent)
1656  {
1657  LPITEMIDLIST printers = _ILCreateGuid(PT_YAGUID, &CLSID_Printers);
1658 
1659  if (printers)
1660  {
1661  ret = ILCombine(parent, printers);
1662  SHFree(printers);
1663  }
1664  SHFree(parent);
1665  }
1666  return ret;
1667 }
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:699
LPITEMIDLIST _ILCreateGuid(PIDLTYPE type, REFIID guid)
Definition: pidl.c:1687
#define PT_YAGUID
#define TRACE(s)
Definition: solgame.cpp:4
r parent
Definition: btrfs.c:3010
int ret
#define NULL
Definition: types.h:112
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:326
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
#define PT_GUID

Referenced by SHGetFolderLocation().

◆ _ILFreeaPidl()

void _ILFreeaPidl ( LPITEMIDLIST apidl,
UINT  cidl 
)

Definition at line 2646 of file pidl.c.

2647 {
2648  UINT i;
2649 
2650  if (apidl)
2651  {
2652  for (i = 0; i < cidl; i++)
2653  SHFree(apidl[i]);
2654  SHFree(apidl);
2655  }
2656 }
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:326

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

◆ _ILGetDataPointer()

◆ _ILGetDrive()

DWORD _ILGetDrive ( LPCITEMIDLIST  ,
LPSTR  ,
UINT   
)

Definition at line 1855 of file pidl.c.

1856 {
1857  TRACE("(%p,%p,%u)\n",pidl,pOut,uSize);
1858 
1859  if(_ILIsMyComputer(pidl))
1860  pidl = ILGetNext(pidl);
1861 
1862  if (pidl && _ILIsDrive(pidl))
1863  return _ILSimpleGetText(pidl, pOut, uSize);
1864 
1865  return 0;
1866 }
BOOL _ILIsMyComputer(LPCITEMIDLIST pidl)
Definition: pidl.c:1931
LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl)
Definition: pidl.c:851
#define TRACE(s)
Definition: solgame.cpp:4
BOOL _ILIsDrive(LPCITEMIDLIST pidl)
Definition: pidl.c:1964
DWORD _ILSimpleGetText(LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
Definition: pidl.c:2035

Referenced by DrivesContextMenuCallback().

◆ _ILGetExtension()

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

Definition at line 2487 of file pidl.c.

2488 {
2489  char szTemp[MAX_PATH];
2490  const char * pPoint;
2491  LPCITEMIDLIST pidlTemp=pidl;
2492 
2493  TRACE("pidl=%p\n",pidl);
2494 
2495  if (!pidl)
2496  return FALSE;
2497 
2498  pidlTemp = ILFindLastID(pidl);
2499 
2500  if (!_ILIsValue(pidlTemp))
2501  return FALSE;
2502  if (!_ILSimpleGetText(pidlTemp, szTemp, MAX_PATH))
2503  return FALSE;
2504 
2505  pPoint = PathFindExtensionA(szTemp);
2506 
2507  if (!*pPoint)
2508  return FALSE;
2509 
2510  pPoint++;
2511  lstrcpynA(pOut, pPoint, uOutSize);
2512  TRACE("%s\n",pOut);
2513 
2514  return TRUE;
2515 }
#define TRUE
Definition: types.h:120
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
#define FALSE
Definition: types.h:117
LPITEMIDLIST WINAPI ILFindLastID(LPCITEMIDLIST pidl)
Definition: pidl.c:189
#define TRACE(s)
Definition: solgame.cpp:4
#define MAX_PATH
Definition: compat.h:34
BOOL _ILIsValue(LPCITEMIDLIST pidl)
Definition: pidl.c:1985
DWORD _ILSimpleGetText(LPCITEMIDLIST pidl, LPSTR szOut, UINT uOutSize)
Definition: pidl.c:2035
LPSTR WINAPI PathFindExtensionA(LPCSTR lpszPath)
Definition: path.c:422
#define lstrcpynA
Definition: compat.h:751

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

◆ _ILGetFileAttributes()

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

Definition at line 2606 of file pidl.c.

2607 {
2609  WORD wAttrib = 0;
2610  int i;
2611 
2612  if (!pData)
2613  return 0;
2614 
2615  switch(pData->type)
2616  {
2617  case PT_FOLDER:
2618  case PT_VALUE:
2619  wAttrib = pData->u.file.uFileAttribs;
2620  break;
2621  }
2622 
2623  if(uOutSize >= 6)
2624  {
2625  i=0;
2626  if(wAttrib & FILE_ATTRIBUTE_READONLY)
2627  pOut[i++] = 'R';
2628  if(wAttrib & FILE_ATTRIBUTE_HIDDEN)
2629  pOut[i++] = 'H';
2630  if(wAttrib & FILE_ATTRIBUTE_SYSTEM)
2631  pOut[i++] = 'S';
2632  if(wAttrib & FILE_ATTRIBUTE_ARCHIVE)
2633  pOut[i++] = 'A';
2634  if(wAttrib & FILE_ATTRIBUTE_COMPRESSED)
2635  pOut[i++] = 'C';
2636  pOut[i] = 0x00;
2637  }
2638  return wAttrib;
2639 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2187
#define FILE_ATTRIBUTE_SYSTEM
Definition: nt_native.h:704
#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
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_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 2422 of file pidl.c.

2423 {
2424  FILETIME ft,lft;
2425  SYSTEMTIME time;
2426  BOOL ret;
2427 
2428  if (_ILGetFileDateTime( pidl, &ft ))
2429  {
2430  FileTimeToLocalFileTime(&ft, &lft);
2431  FileTimeToSystemTime (&lft, &time);
2432 
2434  if (ret)
2435  {
2436  /* Append space + time without seconds */
2437  pOut[ret-1] = ' ';
2439  }
2440  }
2441  else
2442  {
2443  pOut[0] = '\0';
2444  ret = FALSE;
2445  }
2446  return ret;
2447 }
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:196
__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
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
BOOL _ILGetFileDateTime(LPCITEMIDLIST pidl, FILETIME *pFt)
Definition: pidl.c:2403
BOOL WINAPI FileTimeToSystemTime(IN CONST FILETIME *lpFileTime, OUT LPSYSTEMTIME lpSystemTime)
Definition: time.c:188
int ret
#define NULL
Definition: types.h:112
#define TIME_NOSECONDS
Definition: winnls.h:278

Referenced by CFSFolder::GetDetailsOf().

◆ _ILGetFileDateTime()

BOOL _ILGetFileDateTime ( LPCITEMIDLIST  pidl,
FILETIME ft 
)

Definition at line 2403 of file pidl.c.

2404 {
2406 
2407  if (!pdata)
2408  return FALSE;
2409 
2410  switch (pdata->type)
2411  {
2412  case PT_FOLDER:
2413  case PT_VALUE:
2414  DosDateTimeToFileTime(pdata->u.file.uFileDate, pdata->u.file.uFileTime, pFt);
2415  break;
2416  default:
2417  return FALSE;
2418  }
2419  return TRUE;
2420 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2187
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
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 2466 of file pidl.c.

2467 {
2469  DWORD dwSize;
2470 
2471  if (!pdata)
2472  return 0;
2473 
2474  switch (pdata->type)
2475  {
2476  case PT_VALUE:
2477  dwSize = pdata->u.file.dwFileSize;
2478  if (pOut)
2479  StrFormatKBSizeA(dwSize, pOut, uOutSize);
2480  return dwSize;
2481  }
2482  if (pOut)
2483  *pOut = 0x00;
2484  return 0;
2485 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2187
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:56

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

◆ _ILGetFileStructW()

FileStructW* _ILGetFileStructW ( LPCITEMIDLIST  pidl)

Definition at line 2361 of file pidl.c.

2361  {
2362  FileStructW *pFileStructW;
2363  WORD cbOffset;
2364 
2365  if (!(_ILIsValue(pidl) || _ILIsFolder(pidl)))
2366  return NULL;
2367 
2368  cbOffset = *(const WORD *)((const BYTE *)pidl + pidl->mkid.cb - sizeof(WORD));
2369  pFileStructW = (FileStructW*)((LPBYTE)pidl + cbOffset);
2370 
2371  /* Currently I don't see a fool prove way to figure out if a pidl is for sure of WinXP
2372  * style with a FileStructW member. If we switch all our shellfolder-implementations to
2373  * the new format, this won't be a problem. For now, we do as many sanity checks as possible. */
2374  if ((cbOffset & 0x1) || /* FileStructW member is word aligned in the pidl */
2375  /* FileStructW is positioned after FileStruct */
2376  cbOffset < sizeof(pidl->mkid.cb) + sizeof(PIDLTYPE) + sizeof(FileStruct) ||
2377  /* There has to be enough space at cbOffset in the pidl to hold FileStructW and cbOffset */
2378  cbOffset > pidl->mkid.cb - sizeof(cbOffset) - sizeof(FileStructW) ||
2379  pidl->mkid.cb != cbOffset + pFileStructW->cbLen)
2380  {
2381  WARN("Invalid pidl format (cbOffset = %d)!\n", cbOffset);
2382  return NULL;
2383  }
2384 
2385  return pFileStructW;
2386 }
_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:1976
BYTE PIDLTYPE
Definition: pidl.h:108
unsigned short WORD
Definition: ntddk_ex.h:93
struct tagFileStructW FileStructW
BOOL _ILIsValue(LPCITEMIDLIST pidl)
Definition: pidl.c:1985
unsigned char BYTE
Definition: xxhash.c:193
#define NULL
Definition: types.h:112
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 2533 of file pidl.c.

2534 {
2535 #ifdef __REACTOS__ /* r32966 */
2536  char sType[64];
2537 #endif
2538 
2539  if(_ILIsValue(pidl))
2540  {
2541  char sTemp[64];
2542 
2543  if(uOutSize > 0)
2544  pOut[0] = 0;
2545 #ifdef __REACTOS__ /* r32966 */
2546  if (_ILGetExtension (pidl, sType, 64))
2547  {
2548  if (HCR_MapTypeToValueA(sType, sTemp, 64, TRUE))
2549  {
2550  /* retrieve description */
2551  if(HCR_MapTypeToValueA(sTemp, pOut, uOutSize, FALSE ))
2552  return;
2553  }
2554  /* display Ext-file as description */
2555  _strupr(sType);
2556  /* load localized file string */
2557  sTemp[0] = '\0';
2558  if(LoadStringA(shell32_hInstance, IDS_ANY_FILE, sTemp, 64))
2559  {
2560  sTemp[63] = '\0';
2561  StringCchPrintfA(pOut, uOutSize, sTemp, sType);
2562  }
2563  }
2564 #else
2565  if (_ILGetExtension (pidl, sTemp, 64))
2566  {
2567  if (!( HCR_MapTypeToValueA(sTemp, sTemp, 64, TRUE)
2568  && HCR_MapTypeToValueA(sTemp, pOut, uOutSize, FALSE )))
2569  {
2570  lstrcpynA (pOut, sTemp, uOutSize - 6);
2571  strcat (pOut, "-file");
2572  }
2573  }
2574 #endif
2575  }
2576  else
2577 #ifdef __REACTOS__ /* r32966 */
2578  {
2579  pOut[0] = '\0';
2580  LoadStringA(shell32_hInstance, IDS_DIRECTORY, pOut, uOutSize);
2581  /* make sure its null terminated */
2582  pOut[uOutSize-1] = '\0';
2583  }
2584 #else
2585  lstrcpynA(pOut, "Folder", uOutSize);
2586 #endif
2587 }
char * strcat(char *DstString, const char *SrcString)
Definition: utclib.c:568
#define TRUE
Definition: types.h:120
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:154
#define FALSE
Definition: types.h:117
STRSAFEAPI StringCchPrintfA(STRSAFE_LPSTR pszDest, size_t cchDest, STRSAFE_LPCSTR pszFormat,...)
Definition: strsafe.h:520
#define IDS_ANY_FILE
Definition: shresdef.h:180
BOOL _ILGetExtension(LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize)
Definition: pidl.c:2487
BOOL HCR_MapTypeToValueA(LPCSTR szExtension, LPSTR szFileType, LONG len, BOOL bPrependDot)
Definition: classes.c:88
BOOL _ILIsValue(LPCITEMIDLIST pidl)
Definition: pidl.c:1985
#define shell32_hInstance
_CRTIMP char *__cdecl _strupr(_Inout_z_ char *_String)
#define lstrcpynA
Definition: compat.h:751

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

◆ _ILGetGUIDPointer()

IID* _ILGetGUIDPointer ( LPCITEMIDLIST  pidl)

Definition at line 2325 of file pidl.c.

2326 {
2328 
2329  TRACE("%p\n", pidl);
2330 
2331  if (!pdata)
2332  return NULL;
2333 
2334  TRACE("pdata->type 0x%04x\n", pdata->type);
2335  switch (pdata->type)
2336  {
2337  case PT_SHELLEXT:
2338  case PT_GUID:
2339  case PT_YAGUID:
2340  return &(pdata->u.guid.guid);
2341 
2342  default:
2343  TRACE("Unknown pidl type 0x%04x\n", pdata->type);
2344  break;
2345  }
2346  return NULL;
2347 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2187
static PROTOCOLDATA * pdata
Definition: protocol.c:158
#define PT_YAGUID
#define TRACE(s)
Definition: solgame.cpp:4
#define NULL
Definition: types.h:112
#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 2254 of file pidl.c.

2255 {
2256  /* TRACE(pidl,"(pidl%p)\n", pidl);*/
2257 
2259 
2260  if (!pdata)
2261  return NULL;
2262 
2263  switch (pdata->type)
2264  {
2265  case PT_GUID:
2266  case PT_SHELLEXT:
2267  case PT_YAGUID:
2268  return NULL;
2269 
2270  case PT_DRIVE:
2271  case PT_DRIVE1:
2272  case PT_DRIVE2:
2273  case PT_DRIVE3:
2274  return pdata->u.drive.szDriveName;
2275 
2276  case PT_FOLDER:
2277  case PT_FOLDER1:
2278  case PT_VALUE:
2279  case PT_IESPECIAL1:
2280  case PT_IESPECIAL2:
2281  return pdata->u.file.szNames;
2282 
2283  case PT_WORKGRP:
2284  case PT_COMP:
2285  case PT_NETWORK:
2286  case PT_NETPROVIDER:
2287  case PT_SHARE:
2288  return pdata->u.network.szNames;
2289  }
2290  return NULL;
2291 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2187
#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
#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 NULL
Definition: types.h:112
#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 1994 of file pidl.c.

1995 {
1996  LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
1997 
1998  TRACE("(%p)\n",pidl);
1999 
2000  return (pidl && lpPData && (lpPData->type == 0));
2001 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2187
#define TRACE(s)
Definition: solgame.cpp:4

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

◆ _ILIsDesktop()

◆ _ILIsDrive()

BOOL _ILIsDrive ( LPCITEMIDLIST  pidl)

Definition at line 1964 of file pidl.c.

1965 {
1966  LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
1967 
1968  TRACE("(%p)\n",pidl);
1969 
1970  return (pidl && lpPData && (PT_DRIVE == lpPData->type ||
1971  PT_DRIVE1 == lpPData->type ||
1972  PT_DRIVE2 == lpPData->type ||
1973  PT_DRIVE3 == lpPData->type));
1974 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2187
#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(), SH_ShowPropertiesDialog(), SHGetDataFromIDListA(), and SHGetDataFromIDListW().

◆ _ILIsEmpty()

static BOOL _ILIsEmpty ( LPCITEMIDLIST  pidl)
inlinestatic

Definition at line 257 of file pidl.h.

257 { 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 251 of file pidl.h.

252 {
253  return (pidlA->mkid.cb > 0 && !memcmp(pidlA, pidlB, pidlA->mkid.cb)) ||
254  (!pidlA->mkid.cb && !pidlB->mkid.cb);
255 }
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 1976 of file pidl.c.

1977 {
1978  LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
1979 
1980  TRACE("(%p)\n",pidl);
1981 
1982  return (pidl && lpPData && (PT_FOLDER == lpPData->type || PT_FOLDER1 == lpPData->type));
1983 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2187
#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(), SHELL32_GetFSItemAttributes(), and CDefView::UpdateStatusbar().

◆ _ILIsMyComputer()

BOOL _ILIsMyComputer ( LPCITEMIDLIST  pidl)

Definition at line 1931 of file pidl.c.

1932 {
1933  REFIID iid = _ILGetGUIDPointer(pidl);
1934 
1935  TRACE("(%p)\n",pidl);
1936 
1937  if (iid)
1938  return IsEqualIID(iid, &CLSID_MyComputer);
1939  return FALSE;
1940 }
#define REFIID
Definition: guiddef.h:118
#define FALSE
Definition: types.h:117
#define TRACE(s)
Definition: solgame.cpp:4
IID * _ILGetGUIDPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2325
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95

Referenced by _ILGetDrive(), BrsFolder_Treeview_Expand(), CRegFolder::CompareIDs(), 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
#define FALSE
Definition: types.h:117
unsigned int BOOL
Definition: ntddk_ex.h:94
GLenum GLuint GLenum GLsizei length
Definition: glext.h:5579
BOOL _ILIsDesktop(LPCITEMIDLIST pidl)
Definition: CBandSite.h:24
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 1953 of file pidl.c.

1954 {
1955  LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
1956 
1957  TRACE("(%p)\n",pidl);
1958 
1959  return (pidl && ( (lpPData && (PT_GUID== lpPData->type || PT_SHELLEXT== lpPData->type || PT_YAGUID == lpPData->type)) ||
1960  (pidl && pidl->mkid.cb == 0x00)
1961  ));
1962 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2187
#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 1882 of file pidl.c.

1883 {
1884  LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
1885 
1886  TRACE("(%p)\n",pidl);
1887 
1888  return (pidl && lpPData && PT_VALUEW == lpPData->type);
1889 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2187
#define TRACE(s)
Definition: solgame.cpp:4
#define PT_VALUEW
Definition: pidl.h:96

Referenced by pdump_impl().

◆ _ILIsValue()

BOOL _ILIsValue ( LPCITEMIDLIST  pidl)

Definition at line 1985 of file pidl.c.

1986 {
1987  LPPIDLDATA lpPData = _ILGetDataPointer(pidl);
1988 
1989  TRACE("(%p)\n",pidl);
1990 
1991  return (pidl && lpPData && PT_VALUE == lpPData->type);
1992 }
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2187
#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 2035 of file pidl.c.

2036 {
2037  DWORD dwReturn=0;
2038  LPSTR szSrc;
2039  LPWSTR szSrcW;
2040  GUID const * riid;
2041  char szTemp[MAX_PATH];
2042 
2043  TRACE("(%p %p %x)\n",pidl,szOut,uOutSize);
2044 
2045  if (!pidl)
2046  return 0;
2047 
2048  if (szOut)
2049  *szOut = 0;
2050 
2051  if (_ILIsDesktop(pidl))
2052  {
2053  /* desktop */
2054  if (HCR_GetClassNameA(&CLSID_ShellDesktop, szTemp, MAX_PATH))
2055  {
2056  if (szOut)
2057  lstrcpynA(szOut, szTemp, uOutSize);
2058 
2059  dwReturn = strlen (szTemp);
2060  }
2061  }
2062  else if (( szSrc = _ILGetTextPointer(pidl) ))
2063  {
2064  /* filesystem */
2065  if (szOut)
2066  lstrcpynA(szOut, szSrc, uOutSize);
2067 
2068  dwReturn = strlen(szSrc);
2069  }
2070  else if (( szSrcW = _ILGetTextPointerW(pidl) ))
2071  {
2072  /* unicode filesystem */
2073  WideCharToMultiByte(CP_ACP,0,szSrcW, -1, szTemp, MAX_PATH, NULL, NULL);
2074 
2075  if (szOut)
2076  lstrcpynA(szOut, szTemp, uOutSize);
2077 
2078  dwReturn = strlen (szTemp);
2079  }
2080  else if (( riid = _ILGetGUIDPointer(pidl) ))
2081  {
2082  /* special folder */
2083  if ( HCR_GetClassNameA(riid, szTemp, MAX_PATH) )
2084  {
2085  if (szOut)
2086  lstrcpynA(szOut, szTemp, uOutSize);
2087 
2088  dwReturn = strlen (szTemp);
2089  }
2090  }
2091  else
2092  {
2093  ERR("-- no text\n");
2094  }
2095 
2096  TRACE("-- (%p=%s 0x%08x)\n",szOut,debugstr_a(szOut),dwReturn);
2097  return dwReturn;
2098 }
#define WideCharToMultiByte
Definition: compat.h:111
ACPI_SIZE strlen(const char *String)
Definition: utclib.c:269
REFIID riid
Definition: precomp.h:44
#define CP_ACP
Definition: compat.h:109
static LPWSTR _ILGetTextPointerW(LPCITEMIDLIST pidl)
Definition: pidl.c:2198
char * LPSTR
Definition: xmlstorage.h:182
LPSTR _ILGetTextPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2254
#define TRACE(s)
Definition: solgame.cpp:4
#define debugstr_a
Definition: kernel32.h:31
IID * _ILGetGUIDPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2325
#define MAX_PATH
Definition: compat.h:34
BOOL HCR_GetClassNameA(REFIID riid, LPSTR szDest, DWORD len)
Definition: classes.c:417
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL _ILIsDesktop(LPCITEMIDLIST pidl)
Definition: pidl.c:1891
#define ERR(fmt,...)
Definition: debug.h:110
#define NULL
Definition: types.h:112
#define lstrcpynA
Definition: compat.h:751
WCHAR * LPWSTR
Definition: xmlstorage.h:184

Referenced by _ILGetDrive(), and _ILGetExtension().

◆ _ILSimpleGetTextW()

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

Definition at line 2107 of file pidl.c.

2108 {
2109  DWORD dwReturn;
2110  FileStructW *pFileStructW = _ILGetFileStructW(pidl);
2111 
2112  TRACE("(%p %p %x)\n",pidl,szOut,uOutSize);
2113 
2114  if (pFileStructW) {
2115  lstrcpynW(szOut, pFileStructW->wszName, uOutSize);
2116  dwReturn = lstrlenW(pFileStructW->wszName);
2117  } else {
2118  GUID const * riid;
2119  WCHAR szTemp[MAX_PATH];
2120  LPSTR szSrc;
2121  LPWSTR szSrcW;
2122  dwReturn=0;
2123 
2124  if (!pidl)
2125  return 0;
2126 
2127  if (szOut)
2128  *szOut = 0;
2129 
2130  if (_ILIsDesktop(pidl))
2131  {
2132  /* desktop */
2133  if (HCR_GetClassNameW(&CLSID_ShellDesktop, szTemp, MAX_PATH))
2134  {
2135  if (szOut)
2136  lstrcpynW(szOut, szTemp, uOutSize);
2137 
2138  dwReturn = lstrlenW (szTemp);
2139  }
2140  }
2141  else if (( szSrcW = _ILGetTextPointerW(pidl) ))
2142  {
2143  /* unicode filesystem */
2144  if (szOut)
2145  lstrcpynW(szOut, szSrcW, uOutSize);
2146 
2147  dwReturn = lstrlenW(szSrcW);
2148  }
2149  else if (( szSrc = _ILGetTextPointer(pidl) ))
2150  {
2151  /* filesystem */
2152  MultiByteToWideChar(CP_ACP, 0, szSrc, -1, szTemp, MAX_PATH);
2153 
2154  if (szOut)
2155  lstrcpynW(szOut, szTemp, uOutSize);
2156 
2157  dwReturn = lstrlenW (szTemp);
2158  }
2159  else if (( riid = _ILGetGUIDPointer(pidl) ))
2160  {
2161  /* special folder */
2162  if ( HCR_GetClassNameW(riid, szTemp, MAX_PATH) )
2163  {
2164  if (szOut)
2165  lstrcpynW(szOut, szTemp, uOutSize);
2166 
2167  dwReturn = lstrlenW (szTemp);
2168  }
2169  }
2170  else
2171  {
2172  ERR("-- no text\n");
2173  }
2174  }
2175 
2176  TRACE("-- (%p=%s 0x%08x)\n",szOut,debugstr_w(szOut),dwReturn);
2177  return dwReturn;
2178 }
REFIID riid
Definition: precomp.h:44
#define CP_ACP
Definition: compat.h:109
WCHAR wszName[1]
Definition: shlfolder.c:1555
static LPWSTR _ILGetTextPointerW(LPCITEMIDLIST pidl)
Definition: pidl.c:2198
char * LPSTR
Definition: xmlstorage.h:182
#define lstrlenW
Definition: compat.h:750
#define lstrcpynW
Definition: compat.h:738
#define debugstr_w
Definition: kernel32.h:32
LPSTR _ILGetTextPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2254
#define TRACE(s)
Definition: solgame.cpp:4
__wchar_t WCHAR
Definition: xmlstorage.h:180
IID * _ILGetGUIDPointer(LPCITEMIDLIST pidl)
Definition: pidl.c:2325
#define MAX_PATH
Definition: compat.h:34
unsigned long DWORD
Definition: ntddk_ex.h:95
BOOL _ILIsDesktop(LPCITEMIDLIST pidl)
Definition: pidl.c:1891
#define ERR(fmt,...)
Definition: debug.h:110
FileStructW * _ILGetFileStructW(LPCITEMIDLIST pidl)
Definition: pidl.c:2361
#define MultiByteToWideChar
Definition: compat.h:110
WCHAR * LPWSTR
Definition: xmlstorage.h:184
BOOL HCR_GetClassNameW(REFIID riid, LPWSTR szDest, DWORD len)
Definition: classes.c:342

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
#define NO_ERROR
Definition: dderror.h:5
#define E_FAIL
Definition: ddrawi.h:102
#define ILGDN_FORPARSING
Definition: undocshell.h:68
#define FALSE
Definition: types.h:117
if SUCCEEDED(hr)
#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:79
#define MAX_PATH
Definition: compat.h:34
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:1337
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
BOOL WINAPI StrRetToStrNW(LPWSTR dest, DWORD len, LPSTRRET src, const ITEMIDLIST *pidl)
Definition: shellstring.c:85

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

◆ pcheck()

BOOL pcheck ( LPCITEMIDLIST  pidl)

Definition at line 349 of file debughlp.cpp.

350 {
351  DWORD type;
352  LPCITEMIDLIST pidltemp = pidl;
353 
354  while( pidltemp && pidltemp->mkid.cb )
355  {
356  LPPIDLDATA pidlData = _dbg_ILGetDataPointer(pidltemp);
357 
358  if (pidlData)
359  {
360  type = pidlData->type;
361  switch( type )
362  {
363  case PT_CPLAPPLET:
364  case PT_GUID:
365  case PT_SHELLEXT:
366  case PT_DRIVE:
367  case PT_DRIVE1:
368  case PT_DRIVE2:
369  case PT_DRIVE3:
370  case PT_FOLDER:
371  case PT_VALUE:
372  case PT_VALUEW:
373  case PT_FOLDER1:
374  case PT_WORKGRP:
375  case PT_COMP:
376  case PT_NETPROVIDER:
377  case PT_NETWORK:
378  case PT_IESPECIAL1:
379  case PT_YAGUID:
380  case PT_IESPECIAL2:
381  case PT_SHARE:
382  break;
383  default:
384  ERR("unknown IDLIST %p [%p] size=%u type=%x\n",
385  pidl, pidltemp, pidltemp->mkid.cb,type );
386  dump_pidl_hex( pidltemp );
387  return FALSE;
388  }
389  pidltemp = _dbg_ILGetNext(pidltemp);
390  }
391  else
392  {
393  return FALSE;
394  }
395  }
396  return TRUE;
397 }
static LPPIDLDATA _dbg_ILGetDataPointer(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:48
#define PT_DRIVE3
Definition: pidl.h:90
#define TRUE
Definition: types.h:120
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
#define PT_WORKGRP
Definition: pidl.h:98
#define PT_IESPECIAL2
Definition: pidl.h:104
#define PT_NETWORK
Definition: pidl.h:101
#define FALSE
Definition: types.h:117
#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
GLuint GLuint GLsizei GLenum type
Definition: gl.h:1545
#define PT_GUID
#define PT_VALUEW
Definition: pidl.h:96
#define PT_SHELLEXT
static void dump_pidl_hex(LPCITEMIDLIST pidl)
Definition: debughlp.cpp:325

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

◆ pdump()