/*
* internal pidl functions
- * 1998 <juergen.schmied@metronet.de>
+ *
+ * Copyright 1998 Juergen Schmied
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+ *
+ * NOTES:
*
* DO NOT use this definitions outside the shell32.dll !
*
* The contents of a pidl should never used from a application
- * directly.
+ * directly.
*
- * This stuff is used from SHGetFileAttributes, ShellFolder
- * EnumIDList and ShellView.
+ * Undocumented:
+ * MS says: the abID of SHITEMID should be treated as binary data and not
+ * be interpreted by applications. Applies to everyone but MS itself.
+ * Word95 interprets the contents of abID (Filesize/Date) so we have to go
+ * for binary compatibility here.
*/
-
+
#ifndef __WINE_PIDL_H
#define __WINE_PIDL_H
#include "shlobj.h"
-/*
+/*
* the pidl does cache fileattributes to speed up SHGetAttributes when
* displaying a big number of files.
*
* ! size
* ----------------------------------------------------------------
* my computer 0x1F/20 mycomp (2) (usual)
+* network 0x1F mycomp
+* bitbucket 0x1F mycomp
* drive 0x23/25 drive (usual)
* drive 0x25/25 drive (lnk/persistant)
* drive 0x29/25 drive
-* control/printer 0x2E
+* shell extension 0x2E mycomp
* drive 0x2F drive (lnk/persistant)
* folder/file 0x30 folder/file (1) (lnk/persistant)
* folder 0x31 folder (usual)
* workgroup 0x41 network (3)
* computer 0x42 network (4)
* whole network 0x47 network (5)
+* MSITStore 0x61 htmlhlp (7)
* history/favorites 0xb1 file
-* share 0xc3 metwork (6)
+* share 0xc3 network (6)
*
* guess: the persistant elements are non tracking
*
* (2) IID_MyComputer = 20D04FE0L-3AEA-1069-A2D8-08002B30309D
* (3) two strings "workgroup" "microsoft network"
* (4) one string "\\sirius"
-* (5) one string "whole network"
+* (5) one string "whole network"
* (6) one string "\\sirius\c"
+* (7) contains string "mk:@MSITStore:C:\path\file.chm::/path/filename.htm"
+* GUID 871C5380-42A0-1069-A2EA-08002B30309D
*/
#define PT_DESKTOP 0x00 /* internal */
#define PT_WORKGRP 0x41
#define PT_COMP 0x42
#define PT_NETWORK 0x47
-#define PT_IESPECIAL 0xb1
+#define PT_IESPECIAL1 0x61
+#define PT_IESPECIAL2 0xb1
#define PT_SHARE 0xc3
#include "pshpack1.h"
{ PIDLTYPE type; /*00*/
union
{ struct
- { BYTE dummy;
- GUID guid;
+ { BYTE dummy; /*01*/
+ GUID guid; /*02*/
+ BYTE dummy1; /*18*/
} mycomp;
struct
{ CHAR szDriveName[20]; /*01*/
DWORD dwUnknown; /*21*/
/* the drive seems to be 25 bytes every time */
} drive;
- struct
+ struct
{ BYTE dummy; /*01 is 0x00 for files or dirs */
DWORD dwFileSize; /*02*/
WORD uFileDate; /*06*/
WORD uFileTime; /*08*/
WORD uFileAttribs; /*10*/
CHAR szNames[1]; /*12*/
- /* Here are comming two strings. The first is the long name.
+ /* Here are comming two strings. The first is the long name.
The second the dos name when needed or just 0x00 */
- } file, folder, generic;
+ } file, folder, generic;
struct
{ WORD dummy; /*01*/
CHAR szNames[1]; /*03*/
} network;
+ struct
+ { WORD dummy; /*01*/
+ DWORD dummy1; /*02*/
+ CHAR szName[1]; /*06*/ /* teminated by 0x00 0x00 */
+ } htmlhelp;
}u;
} PIDLDATA, *LPPIDLDATA;
#include "poppack.h"
-/*
- * getting string values from pidls
- *
- * return value is strlen()
- */
-DWORD WINAPI _ILGetDrive(LPCITEMIDLIST,LPSTR,UINT16);
-DWORD WINAPI _ILGetItemText(LPCITEMIDLIST,LPSTR,UINT16);
-DWORD WINAPI _ILGetFolderText(LPCITEMIDLIST,LPSTR,DWORD);
-DWORD WINAPI _ILGetValueText(LPCITEMIDLIST,LPSTR,DWORD);
-DWORD WINAPI _ILGetPidlPath(LPCITEMIDLIST,LPSTR,DWORD);
-
/*
* getting special values from simple pidls
*/
-BOOL WINAPI _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
-BOOL WINAPI _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
-BOOL WINAPI _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
+DWORD _ILSimpleGetText (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
+BOOL _ILGetFileDate (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
+DWORD _ILGetFileSize (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
+BOOL _ILGetExtension (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
+void _ILGetFileType (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
+DWORD _ILGetFileAttributes (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
+BOOL _ILGetFileDateTime (LPCITEMIDLIST pidl, FILETIME *ft);
+DWORD _ILGetDrive (LPCITEMIDLIST, LPSTR, UINT);
/*
* testing simple pidls
*/
-BOOL WINAPI _ILIsDesktop(LPCITEMIDLIST);
-BOOL WINAPI _ILIsMyComputer(LPCITEMIDLIST);
-BOOL WINAPI _ILIsDrive(LPCITEMIDLIST);
-BOOL WINAPI _ILIsFolder(LPCITEMIDLIST);
-BOOL WINAPI _ILIsValue(LPCITEMIDLIST);
+BOOL _ILIsDesktop (LPCITEMIDLIST pidl);
+BOOL _ILIsMyComputer (LPCITEMIDLIST pidl);
+BOOL _ILIsDrive (LPCITEMIDLIST pidl);
+BOOL _ILIsFolder (LPCITEMIDLIST pidl);
+BOOL _ILIsValue (LPCITEMIDLIST pidl);
+BOOL _ILIsSpecialFolder (LPCITEMIDLIST pidl);
+BOOL _ILIsPidlSimple (LPCITEMIDLIST pidl);
/*
* simple pidls from strings
*/
-LPITEMIDLIST WINAPI _ILCreateDesktop(void);
-LPITEMIDLIST WINAPI _ILCreateMyComputer(void);
-LPITEMIDLIST WINAPI _ILCreateDrive(LPCSTR);
-LPITEMIDLIST WINAPI _ILCreateFolder(LPCSTR, LPCSTR);
-LPITEMIDLIST WINAPI _ILCreateValue(LPCSTR, LPCSTR);
+LPITEMIDLIST _ILCreate (PIDLTYPE,LPCVOID,UINT);
+
+LPITEMIDLIST _ILCreateDesktop (void);
+LPITEMIDLIST _ILCreateMyComputer (void);
+LPITEMIDLIST _ILCreateIExplore (void);
+LPITEMIDLIST _ILCreateControl (void);
+LPITEMIDLIST _ILCreatePrinter (void);
+LPITEMIDLIST _ILCreateNetwork (void);
+LPITEMIDLIST _ILCreateBitBucket (void);
+LPITEMIDLIST _ILCreateDrive (LPCSTR);
+LPITEMIDLIST _ILCreateFolder (WIN32_FIND_DATAA * stffile);
+LPITEMIDLIST _ILCreateValue (WIN32_FIND_DATAA * stffile);
+LPITEMIDLIST _ILCreateSpecial (LPCSTR szGUID);
/*
- * raw pidl handling (binary)
- *
- * data is binary / sizes are bytes
+ * helper functions (getting struct-pointer)
*/
-DWORD WINAPI _ILGetData(PIDLTYPE,LPCITEMIDLIST,LPVOID,UINT);
-LPITEMIDLIST WINAPI _ILCreate(PIDLTYPE,LPCVOID,UINT16);
+LPPIDLDATA _ILGetDataPointer (LPCITEMIDLIST);
+LPSTR _ILGetTextPointer (LPCITEMIDLIST);
+LPSTR _ILGetSTextPointer (LPCITEMIDLIST);
+REFIID _ILGetGUIDPointer (LPCITEMIDLIST pidl);
/*
- * helper functions (getting struct-pointer)
+ * debug helper
*/
-LPPIDLDATA WINAPI _ILGetDataPointer(LPCITEMIDLIST);
-LPSTR WINAPI _ILGetTextPointer(PIDLTYPE type, LPPIDLDATA pidldata);
-LPSTR WINAPI _ILGetSTextPointer(PIDLTYPE type, LPPIDLDATA pidldata);
+void pdump (LPCITEMIDLIST pidl);
+BOOL pcheck (LPCITEMIDLIST pidl);
-LPITEMIDLIST WINAPI ILFindChild(LPCITEMIDLIST pidl1,LPCITEMIDLIST pidl2);
+/*
+ * aPidl helper
+ */
+void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl);
+LPITEMIDLIST * _ILCopyaPidl(LPITEMIDLIST * apidlsrc, UINT cidl);
+LPITEMIDLIST * _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPCIDA cida);
-void pdump (LPCITEMIDLIST pidl);
-BOOL pcheck (LPCITEMIDLIST pidl);
#endif