ReactOS  0.4.14-dev-98-gb0d4763
PIDList Struct Reference

list of PIDLs More...

#include <shellclasses.h>

Collaboration diagram for PIDList:

Public Member Functions

 PIDList ()
 
 ~PIDList ()
 
HRESULT GetData (IDataObject *selection)
 
 operator LPIDA ()
 

Protected Attributes

STGMEDIUM _stgm
 
LPIDA _pIDList
 

Detailed Description

list of PIDLs

Definition at line 1057 of file shellclasses.h.

Constructor & Destructor Documentation

◆ PIDList()

PIDList::PIDList ( )
inline

Definition at line 1059 of file shellclasses.h.

1060  {
1061  memset(&_stgm, 0, sizeof(STGMEDIUM));
1062  }
STGMEDIUM _stgm
#define memset(x, y, z)
Definition: compat.h:39

◆ ~PIDList()

PIDList::~PIDList ( )
inline

Definition at line 1064 of file shellclasses.h.

1065  {
1066  if (_stgm.hGlobal) {
1067  GlobalUnlock(_stgm.hGlobal);
1069  }
1070  }
void WINAPI ReleaseStgMedium(STGMEDIUM *pmedium)
Definition: ole2.c:2036
STGMEDIUM _stgm
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
Definition: heapmem.c:1190

Member Function Documentation

◆ GetData()

HRESULT PIDList::GetData ( IDataObject selection)
inline

Definition at line 1072 of file shellclasses.h.

1073  {
1074  static UINT CF_IDLIST = RegisterClipboardFormat(CFSTR_SHELLIDLIST);
1075 
1076  FORMATETC fetc;
1077  fetc.cfFormat = CF_IDLIST;
1078  fetc.ptd = NULL;
1079  fetc.dwAspect = DVASPECT_CONTENT;
1080  fetc.lindex = -1;
1081  fetc.tymed = TYMED_HGLOBAL;
1082 
1083  HRESULT hr = selection->QueryGetData(&fetc);
1084  if (FAILED(hr))
1085  return hr;
1086 
1087  hr = selection->GetData(&fetc, &_stgm);
1088  if (FAILED(hr))
1089  return hr;
1090 
1091  _pIDList = (LPIDA)GlobalLock(_stgm.hGlobal);
1092 
1093  return hr;
1094  }
#define CFSTR_SHELLIDLIST
Definition: shlobj.h:469
HRESULT hr
Definition: shlfolder.c:183
LPIDA _pIDList
int selection
Definition: ctm.c:92
STGMEDIUM _stgm
smooth NULL
Definition: ftsmooth.c:416
LONG HRESULT
Definition: typedefs.h:77
struct CIDA * LPIDA
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
Definition: heapmem.c:755
#define RegisterClipboardFormat
Definition: winuser.h:5739
unsigned int UINT
Definition: ndis.h:50

Referenced by DesktopShellView::DoContextMenu(), and IShellBrowserImpl::OnDefaultCommand().

◆ operator LPIDA()

Definition at line 1096 of file shellclasses.h.

1096 {return _pIDList;}
LPIDA _pIDList

Member Data Documentation

◆ _pIDList

LPIDA PIDList::_pIDList
protected

Definition at line 1100 of file shellclasses.h.

Referenced by GetData(), and operator LPIDA().

◆ _stgm

STGMEDIUM PIDList::_stgm
protected

Definition at line 1099 of file shellclasses.h.

Referenced by GetData(), PIDList(), and ~PIDList().


The documentation for this struct was generated from the following file: