Ignore:
Timestamp:
Aug 30, 2000, 3:54:57 PM (25 years ago)
Author:
sandervl
Message:

complete merge with shell32 from wine 20000801

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/shell32/pidl.h

    r4032 r4121  
    1 /* $Id: pidl.h,v 1.5 2000-08-18 02:01:18 phaller Exp $ */
    2 
    3 /*
    4  * Win32 SHELL32 for OS/2
    5  *
    6  * Copyright 1999 Patrick Haller (haller@zebra.fh-weingarten.de)
    7  * Project Odin Software License can be found in LICENSE.TXT
    8  *
    9  */
    10 
     1/* $Id: pidl.h,v 1.6 2000-08-30 13:50:55 sandervl Exp $ */
    112/*
    123 * internal pidl functions
     
    167 *
    178 * The contents of a pidl should never used from a application
    18  * directly.
     9 * directly. 
    1910 *
    20  * This stuff is used from SHGetFileAttributes, ShellFolder
    21  * EnumIDList and ShellView.
     11 * Undocumented:
     12 * MS says: the abID of SHITEMID should be treated as binary data and not
     13 * be interpreted by applications. Applies to everyone but MS itself.
     14 * Word95 interprets the contents of abID (Filesize/Date) so we have to go
     15 * for binary compatibility here.
    2216 */
    23 
     17 
    2418#ifndef __WINE_PIDL_H
    2519#define __WINE_PIDL_H
    2620
    27 
    28 /*****************************************************************************
    29  * Includes                                                                  *
    30  *****************************************************************************/
    31 
    3221#include "shlobj.h"
    3322
    34 /*
     23/* 
    3524* the pidl does cache fileattributes to speed up SHGetAttributes when
    3625* displaying a big number of files.
     
    4130* PIDLDATA desribes the type of pidl.
    4231*
    43 *       object        ! first byte /  ! format       ! living space
    44 *                     ! size
    45 *       ----------------------------------------------------------------
    46 *       my computer     0x1F/20         mycomp (2)      (usual)
    47 *       network         0x1F            mycomp
    48 *       bitbucket       0x1F            mycomp
    49 *       drive           0x23/25         drive           (usual)
    50 *       drive           0x25/25         drive           (lnk/persistant)
    51 *       drive           0x29/25         drive
    52 *       shell extension 0x2E            mycomp
    53 *       drive           0x2F            drive           (lnk/persistant)
    54 *       folder/file     0x30            folder/file (1) (lnk/persistant)
    55 *       folder          0x31            folder          (usual)
    56 *       value           0x32            file            (usual)
    57 *       workgroup       0x41            network (3)
    58 *       computer        0x42            network (4)
    59 *       whole network   0x47            network (5)
    60 *       MSITStore       0x61            htmlhlp (7)
    61 *       history/favorites 0xb1          file
    62 *       share           0xc3            network (6)
     32*       object        ! first byte /  ! format       ! living space
     33*                     ! size
     34*       ----------------------------------------------------------------
     35*       my computer     0x1F/20         mycomp (2)      (usual)
     36*       network         0x1F            mycomp
     37*       bitbucket       0x1F            mycomp
     38*       drive           0x23/25         drive           (usual)
     39*       drive           0x25/25         drive           (lnk/persistant)
     40*       drive           0x29/25         drive
     41*       shell extension 0x2E            mycomp
     42*       drive           0x2F            drive           (lnk/persistant)
     43*       folder/file     0x30            folder/file (1) (lnk/persistant)
     44*       folder          0x31            folder          (usual)
     45*       value           0x32            file            (usual)
     46*       workgroup       0x41            network (3)
     47*       computer        0x42            network (4)
     48*       whole network   0x47            network (5)
     49*       MSITStore       0x61            htmlhlp (7)     
     50*       history/favorites 0xb1          file
     51*       share           0xc3            network (6)
    6352*
    6453* guess: the persistant elements are non tracking
     
    6655* (1) dummy byte is used, attributes are empty
    6756* (2) IID_MyComputer = 20D04FE0L-3AEA-1069-A2D8-08002B30309D
    68 * (3) two strings       "workgroup" "microsoft network"
    69 * (4) one string        "\\sirius"
    70 * (5) one string        "whole network"
    71 * (6) one string        "\\sirius\c"
     57* (3) two strings       "workgroup" "microsoft network"
     58* (4) one string        "\\sirius"
     59* (5) one string        "whole network"
     60* (6) one string        "\\sirius\c"
    7261* (7) contains string   "mk:@MSITStore:C:\path\file.chm::/path/filename.htm"
    73 *               GUID    871C5380-42A0-1069-A2EA-08002B30309D
     62*               GUID    871C5380-42A0-1069-A2EA-08002B30309D
    7463*/
    7564
    76 #define PT_DESKTOP      0x00 /* internal */
    77 #define PT_MYCOMP       0x1F
    78 #define PT_DRIVE        0x23
    79 #define PT_DRIVE2       0x25
    80 #define PT_DRIVE3       0x29
    81 #define PT_SPECIAL      0x2E
    82 #define PT_DRIVE1       0x2F
    83 #define PT_FOLDER1      0x30
    84 #define PT_FOLDER       0x31
    85 #define PT_VALUE        0x32
    86 #define PT_WORKGRP      0x41
    87 #define PT_COMP         0x42
    88 #define PT_NETWORK      0x47
    89 #define PT_IESPECIAL    0xb1
    90 #define PT_SHARE        0xc3
     65#define PT_DESKTOP      0x00 /* internal */
     66#define PT_MYCOMP       0x1F
     67#define PT_DRIVE        0x23
     68#define PT_DRIVE2       0x25
     69#define PT_DRIVE3       0x29
     70#define PT_SPECIAL      0x2E
     71#define PT_DRIVE1       0x2F
     72#define PT_FOLDER1      0x30
     73#define PT_FOLDER       0x31
     74#define PT_VALUE        0x32
     75#define PT_WORKGRP      0x41
     76#define PT_COMP         0x42
     77#define PT_NETWORK      0x47
     78#define PT_IESPECIAL    0xb1
     79#define PT_SHARE        0xc3
    9180
    9281#include "pshpack1.h"
     
    9483
    9584typedef struct tagPIDLDATA
    96 {       PIDLTYPE type;                  /*00*/
    97         union
    98         { struct
    99           { BYTE dummy;                 /*01*/
    100             GUID guid;                  /*02*/
    101             BYTE dummy1;                /*18*/
    102           } mycomp;
    103           struct
    104           { CHAR szDriveName[20];       /*01*/
    105             DWORD dwUnknown;            /*21*/
    106             /* the drive seems to be 25 bytes every time */
    107           } drive;
    108           struct
    109           { BYTE dummy;                 /*01 is 0x00 for files or dirs */
    110             DWORD dwFileSize;           /*02*/
    111             WORD uFileDate;             /*06*/
    112             WORD uFileTime;             /*08*/
    113             WORD uFileAttribs;          /*10*/
    114             CHAR szNames[1];            /*12*/
    115             /* Here are comming two strings. The first is the long name.
    116             The second the dos name when needed or just 0x00 */
    117           } file, folder, generic;
    118           struct
    119           { WORD dummy;         /*01*/
    120             CHAR szNames[1];    /*03*/
    121           } network;
    122           struct
    123           { WORD dummy;         /*01*/
    124             DWORD dummy1;       /*02*/
    125             CHAR szName[1];     /*06*/ /* teminated by 0x00 0x00 */
    126           } htmlhelp;
    127         }u;
     85{       PIDLTYPE type;                  /*00*/
     86        union
     87        { struct
     88          { BYTE dummy;                 /*01*/
     89            GUID guid;                  /*02*/
     90            BYTE dummy1;                /*18*/
     91          } mycomp;
     92          struct
     93          { CHAR szDriveName[20];       /*01*/
     94            DWORD dwUnknown;            /*21*/
     95            /* the drive seems to be 25 bytes every time */
     96          } drive;
     97          struct
     98          { BYTE dummy;                 /*01 is 0x00 for files or dirs */
     99            DWORD dwFileSize;           /*02*/
     100            WORD uFileDate;             /*06*/
     101            WORD uFileTime;             /*08*/
     102            WORD uFileAttribs;          /*10*/
     103            CHAR szNames[1];            /*12*/
     104            /* Here are comming two strings. The first is the long name.
     105            The second the dos name when needed or just 0x00 */
     106          } file, folder, generic;
     107          struct
     108          { WORD dummy;         /*01*/
     109            CHAR szNames[1];    /*03*/
     110          } network;
     111          struct
     112          { WORD dummy;         /*01*/
     113            DWORD dummy1;       /*02*/
     114            CHAR szName[1];     /*06*/ /* teminated by 0x00 0x00 */
     115          } htmlhelp;
     116        }u;
    128117} PIDLDATA, *LPPIDLDATA;
    129118#include "poppack.h"
     
    132121 * getting special values from simple pidls
    133122 */
    134 DWORD   WINAPI _ILSimpleGetText         (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
    135 BOOL    WINAPI _ILGetFileDate           (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
    136 DWORD   WINAPI _ILGetFileSize           (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
    137 BOOL    WINAPI _ILGetExtension          (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
    138 void    WINAPI _ILGetFileType           (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
    139 DWORD   WINAPI _ILGetFileAttributes     (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
    140 DWORD   WINAPI _ILGetFileSizeKB         (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
     123DWORD   _ILSimpleGetText        (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
     124BOOL    _ILGetFileDate          (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
     125DWORD   _ILGetFileSize          (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
     126BOOL    _ILGetExtension         (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
     127void    _ILGetFileType          (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
     128DWORD   _ILGetFileAttributes    (LPCITEMIDLIST pidl, LPSTR pOut, UINT uOutSize);
    141129
    142 BOOL    WINAPI _ILGetFileDateTime       (LPCITEMIDLIST pidl, FILETIME *ft);
    143 DWORD   WINAPI _ILGetDrive              (LPCITEMIDLIST, LPSTR, UINT16);
     130BOOL    _ILGetFileDateTime      (LPCITEMIDLIST pidl, FILETIME *ft);
     131DWORD   _ILGetDrive             (LPCITEMIDLIST, LPSTR, UINT16);
    144132
    145133/*
    146134 * testing simple pidls
    147135 */
    148 BOOL    WINAPI _ILIsDesktop             (LPCITEMIDLIST pidl);
    149 BOOL    WINAPI _ILIsMyComputer          (LPCITEMIDLIST pidl);
    150 BOOL    WINAPI _ILIsDrive               (LPCITEMIDLIST pidl);
    151 BOOL    WINAPI _ILIsFolder              (LPCITEMIDLIST pidl);
    152 BOOL    WINAPI _ILIsValue               (LPCITEMIDLIST pidl);
    153 BOOL    WINAPI _ILIsSpecialFolder       (LPCITEMIDLIST pidl);
    154 BOOL    WINAPI _ILIsPidlSimple          (LPCITEMIDLIST pidl);
     136BOOL    _ILIsDesktop            (LPCITEMIDLIST pidl);
     137BOOL    _ILIsMyComputer         (LPCITEMIDLIST pidl);
     138BOOL    _ILIsDrive              (LPCITEMIDLIST pidl);
     139BOOL    _ILIsFolder             (LPCITEMIDLIST pidl);
     140BOOL    _ILIsValue              (LPCITEMIDLIST pidl);
     141BOOL    _ILIsSpecialFolder      (LPCITEMIDLIST pidl);
     142BOOL    _ILIsPidlSimple         (LPCITEMIDLIST pidl);
    155143
    156144/*
    157145 * simple pidls from strings
    158146 */
    159 LPITEMIDLIST    WINAPI _ILCreate        (PIDLTYPE,LPCVOID,UINT16);
     147LPITEMIDLIST    _ILCreate       (PIDLTYPE,LPCVOID,UINT16);
    160148
    161 LPITEMIDLIST    WINAPI _ILCreateDesktop         (void);
    162 LPITEMIDLIST    WINAPI _ILCreateMyComputer      (void);
    163 LPITEMIDLIST    WINAPI _ILCreateIExplore        (void);
    164 LPITEMIDLIST    WINAPI _ILCreateControl         (void);
    165 LPITEMIDLIST    WINAPI _ILCreatePrinter         (void);
    166 LPITEMIDLIST    WINAPI _ILCreateNetwork         (void);
    167 LPITEMIDLIST    WINAPI _ILCreateBitBucket       (void);
    168 LPITEMIDLIST    WINAPI _ILCreateDrive           (LPCSTR);
    169 LPITEMIDLIST    WINAPI _ILCreateFolder          (WIN32_FIND_DATAA * stffile);
    170 LPITEMIDLIST    WINAPI _ILCreateValue           (WIN32_FIND_DATAA * stffile);
    171 LPITEMIDLIST    WINAPI _ILCreateSpecial         (LPCSTR szGUID);
     149LPITEMIDLIST    _ILCreateDesktop        (void);
     150LPITEMIDLIST    _ILCreateMyComputer     (void);
     151LPITEMIDLIST    _ILCreateIExplore       (void);
     152LPITEMIDLIST    _ILCreateControl        (void);
     153LPITEMIDLIST    _ILCreatePrinter        (void);
     154LPITEMIDLIST    _ILCreateNetwork        (void);
     155LPITEMIDLIST    _ILCreateBitBucket      (void);
     156LPITEMIDLIST    _ILCreateDrive          (LPCSTR);
     157LPITEMIDLIST    _ILCreateFolder         (WIN32_FIND_DATAA * stffile);
     158LPITEMIDLIST    _ILCreateValue          (WIN32_FIND_DATAA * stffile);
     159LPITEMIDLIST    _ILCreateSpecial        (LPCSTR szGUID);
    172160
    173161/*
    174162 * helper functions (getting struct-pointer)
    175163 */
    176 LPPIDLDATA      WINAPI _ILGetDataPointer        (LPCITEMIDLIST);
    177 LPSTR           WINAPI _ILGetTextPointer        (PIDLTYPE type, LPPIDLDATA pidldata);
    178 LPSTR           WINAPI _ILGetSTextPointer       (PIDLTYPE type, LPPIDLDATA pidldata);
    179 REFIID          WINAPI _ILGetGUIDPointer        (LPCITEMIDLIST pidl);
     164LPPIDLDATA      _ILGetDataPointer       (LPCITEMIDLIST);
     165LPSTR           _ILGetTextPointer       (LPCITEMIDLIST);
     166LPSTR           _ILGetSTextPointer      (LPCITEMIDLIST);
     167REFIID          _ILGetGUIDPointer       (LPCITEMIDLIST pidl);
    180168
    181 /*
    182  * debug helper
     169/* 
     170 * debug helper 
    183171 */
     172#ifdef __WIN32OS2__
    184173#ifdef DEBUG
    185174void pdump (LPCITEMIDLIST pidl);
     
    189178//CB: needed in release build
    190179BOOL pcheck (LPCITEMIDLIST pidl);
     180#else
     181void    pdump   (LPCITEMIDLIST pidl);
     182BOOL    pcheck  (LPCITEMIDLIST pidl);
     183#endif
    191184
    192185/*
    193186 * aPidl helper
    194187 */
    195 void WINAPI _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl);
    196 LPITEMIDLIST * WINAPI _ILCopyaPidl(LPITEMIDLIST * apidlsrc, UINT cidl);
    197 LPITEMIDLIST * WINAPI _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPCIDA cida);
     188void _ILFreeaPidl(LPITEMIDLIST * apidl, UINT cidl);
     189LPITEMIDLIST * _ILCopyaPidl(LPITEMIDLIST * apidlsrc, UINT cidl);
     190LPITEMIDLIST * _ILCopyCidaToaPidl(LPITEMIDLIST* pidl, LPCIDA cida);
    198191
    199192#endif
Note: See TracChangeset for help on using the changeset viewer.