40#define COLUMN_DOCUMENTS 1
41#define COLUMN_STATUS 2
42#define COLUMN_COMMENTS 3
43#define COLUMN_LOCATION 4
46#define PrinterSHELLVIEWCOLUMNS (6)
55 CComPtr<IDefaultExtractIconInit> initIcon;
102 PIDLPrinterStruct *
p;
103 int size0 = (
char*)&tmp.
u.cprinter.
szName - (
char*)&tmp.
u.cprinter;
105 SIZE_T cchPrinterName = 0;
108 if (
pi->pPrinterName)
109 cchPrinterName =
wcslen(
pi->pPrinterName);
111 cchServerName =
wcslen(
pi->pServerName);
112 if ((cchPrinterName + cchServerName) > (
MAXUSHORT - 2))
118 tmp.
u.cprinter.
dummy = 0xFF;
119 if (
pi->pPrinterName)
120 tmp.
u.cprinter.offsServer = cchPrinterName + 1;
122 tmp.
u.cprinter.offsServer = 1;
124 size += tmp.
u.cprinter.offsServer *
sizeof(
WCHAR);
126 size += (cchServerName + 1) *
sizeof(
WCHAR);
134 pidl->mkid.cb =
size + 2;
135 memcpy(pidl->mkid.abID, &tmp, 2 + size0);
137 p = &((
PIDLDATA*)pidl->mkid.abID)->u.cprinter;
139 p->Attributes =
pi->Attributes;
140 if (
pi->pPrinterName)
143 p->szName[0] =
L'\0';
146 wcscpy(
p->szName +
p->offsServer,
pi->pServerName);
148 p->szName[
p->offsServer] =
L'\0';
150 *(
WORD*)((
char*)pidl + (
size + 2)) = 0;
164 if (
dwFlags & SHCONTF_NONFOLDERS)
179 for(
i = 0;
i <
num;
i++) {
201 TRACE(
"-- destroying IShellFolder(%p)\n",
this);
214 TRACE(
"(%p)->(HWND=%p,%p,%p=%s,%p,pidl=%p,%p)\n",
215 this, hwndOwner, pbc, lpszDisplayName,
debugstr_w(lpszDisplayName),
216 pchEaten, ppidl, pdwAttributes);
230 return (PIDLPrinterStruct*) & (
pdata->u.cfont);
256 FIXME (
"(%p)->(pidl=%p,%p,%s,%p) stub\n",
276 CComPtr<IShellView> pShellView;
279 TRACE(
"(%p)->(hwnd=%p,%s,%p)\n",
this,
289 WARN(
"IDropTarget not implemented\n");
294 WARN(
"IContextMenu not implemented\n");
302 TRACE (
"-- (%p)->(interface=%p)\n",
this, ppvOut);
311 static const DWORD dwPrintersAttributes =
312 SFGAO_HASPROPSHEET | SFGAO_STORAGEANCESTOR | SFGAO_FILESYSANCESTOR | SFGAO_FOLDER | SFGAO_CANRENAME | SFGAO_CANDELETE;
315 FIXME (
"(%p)->(cidl=%d apidl=%p mask=0x%08lx): stub\n",
316 this, cidl, apidl, *rgfInOut);
318 *rgfInOut &= dwPrintersAttributes;
320 *rgfInOut &= ~SFGAO_VALIDATE;
322 TRACE (
"-- result=0x%08x\n", *rgfInOut);
344 TRACE (
"(%p)->(%p,%u,apidl=%p,%s,%p,%p)\n",
361 TRACE (
"(%p)->hr=0x%08lx\n",
this,
hr);
371 PIDLPrinterStruct *
p;
373 TRACE (
"(%p)->(pidl=%p,0x%08lx,%p)\n",
this, pidl,
dwFlags, strRet);
385 ERR(
"no printer struct\n");
389 return SHSetStrRet(strRet,
p->szName);
407 FIXME(
"(%p)->(%p,pidl=%p,%s,%lu,%p)\n",
this, hwndOwner, pidl,
415 FIXME(
"(%p)\n",
this);
421 FIXME(
"(%p)\n",
this);
446 FIXME(
"(%p): stub\n",
this);
453 TRACE(
"(%p)->(%p %i %p): stub\n",
this, pidl, iColumn, psd);
474 FIXME (
"(%p): stub\n",
this);
483 TRACE (
"(%p)\n",
this);
485 *lpClassId = CLSID_Printers;
507 TRACE (
"(%p)->(%p)\n",
this, pidl);
HRESULT WINAPI SHCreateShellFolderView(const SFV_CREATE *pcsfv, IShellView **ppsv)
static PIDLPrinterStruct * _ILGetPrinterStruct(LPCITEMIDLIST pidl)
#define PrinterSHELLVIEWCOLUMNS
HRESULT WINAPI CPrintersExtractIconW_CreateInstane(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv)
static shvheader PrinterSFHeader[]
static LPITEMIDLIST _ILCreatePrinterItem(PRINTER_INFO_4W *pi)
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
void shell(int argc, const char *argv[])
BOOL AddToEnumList(LPITEMIDLIST pidl)
STDMETHOD() EnumObjects(HWND hwndOwner, DWORD dwFlags, LPENUMIDLIST *ppEnumIDList) override
STDMETHOD() GetDetailsEx(PCUITEMID_CHILD pidl, const SHCOLUMNID *pscid, VARIANT *pv) override
STDMETHOD() GetDisplayNameOf(PCUITEMID_CHILD pidl, DWORD dwFlags, LPSTRRET strRet) override
STDMETHOD() GetDetailsOf(PCUITEMID_CHILD pidl, UINT iColumn, SHELLDETAILS *psd) override
STDMETHOD() MapColumnToSCID(UINT column, SHCOLUMNID *pscid) override
STDMETHOD() GetAttributesOf(UINT cidl, PCUITEMID_CHILD_ARRAY apidl, DWORD *rgfInOut) override
STDMETHOD() ParseDisplayName(HWND hwndOwner, LPBC pbc, LPOLESTR lpszDisplayName, DWORD *pchEaten, PIDLIST_RELATIVE *ppidl, DWORD *pdwAttributes) override
STDMETHOD() CreateViewObject(HWND hwndOwner, REFIID riid, LPVOID *ppvOut) override
STDMETHOD() EnumSearches(IEnumExtraSearch **ppenum) override
STDMETHOD() Initialize(PCIDLIST_ABSOLUTE pidl) override
STDMETHOD() SetNameOf(HWND hwndOwner, PCUITEMID_CHILD pidl, LPCOLESTR lpName, DWORD dwFlags, PITEMID_CHILD *pPidlOut) override
STDMETHOD() BindToStorage(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override
STDMETHOD() BindToObject(PCUIDLIST_RELATIVE pidl, LPBC pbcReserved, REFIID riid, LPVOID *ppvOut) override
STDMETHOD() GetCurFolder(PIDLIST_ABSOLUTE *pidl) override
STDMETHOD() CompareIDs(LPARAM lParam, PCUIDLIST_RELATIVE pidl1, PCUIDLIST_RELATIVE pidl2) override
STDMETHOD() GetClassID(CLSID *lpClassId) override
STDMETHOD() GetDefaultColumn(DWORD dwRes, ULONG *pSort, ULONG *pDisplay) override
STDMETHOD() GetUIObjectOf(HWND hwndOwner, UINT cidl, PCUITEMID_CHILD_ARRAY apidl, REFIID riid, UINT *prgfInOut, LPVOID *ppvOut) override
STDMETHOD() GetDefaultSearchGUID(GUID *pguid) override
STDMETHOD() GetDefaultColumnState(UINT iColumn, DWORD *pcsFlags) override
HRESULT WINAPI Initialize(HWND hwndOwner, DWORD dwFlags)
BOOL CreatePrintersEnumList(DWORD dwFlags)
void pdump(LPCITEMIDLIST pidl)
const char * shdebugstr_guid(const struct _GUID *id)
#define IDS_SHV_COLUMN_NAME
#define HeapFree(x, y, z)
#define FAILED_UNEXPECTEDLY(hr)
void WINAPI SHFree(LPVOID pv)
LPVOID WINAPI SHAlloc(SIZE_T len)
WCHAR swShell32Name[MAX_PATH]
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
_CRTIMP size_t __cdecl wcslen(_In_z_ const wchar_t *_Str)
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define COM_INTERFACE_ENTRY_IID(iid, x)
#define memcpy(s1, s2, n)
static PROTOCOLDATA * pdata
interface IBindCtx * LPBC
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
LPPIDLDATA _ILGetDataPointer(LPCITEMIDLIST pidl)
#define IsEqualIID(riid1, riid2)
_CRTIMP wchar_t *__cdecl wcscpy(_Out_writes_z_(_String_length_(_Source)+1) wchar_t *_Dest, _In_z_ const wchar_t *_Source)
HRESULT SHELL32_CompareDetails(IShellFolder2 *isf, LPARAM lParam, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
struct _SFV_CREATE SFV_CREATE
#define IDS_SHV_COLUMN_DOCUMENTS
#define IDI_SHELL_PRINTER
#define IDS_SHV_COLUMN_STATUS
#define IDS_SHV_COLUMN_LOCATION
#define IDS_SHV_COLUMN_COMMENTS
#define IDS_SHV_COLUMN_MODEL
ITEMIDLIST UNALIGNED * LPITEMIDLIST
const PCUITEMID_CHILD * PCUITEMID_CHILD_ARRAY
const ITEMID_CHILD UNALIGNED * PCUITEMID_CHILD
const ITEMIDLIST_RELATIVE UNALIGNED * PCUIDLIST_RELATIVE
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
union tagPIDLDATA::@557 u
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
#define PRINTER_ENUM_LOCAL
WINBOOL WINAPI EnumPrintersW(DWORD Flags, LPWSTR Name, DWORD Level, LPBYTE pPrinterEnum, DWORD cbBuf, LPDWORD pcbNeeded, LPDWORD pcReturned)
#define IID_PPV_ARG(Itype, ppType)