Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
pidl.c
Package: shell.rar [view]
Upload User: xhy777
Upload Date: 2007-02-14
Package Size: 24088k
Code Size: 2k
Category:
Windows Kernel
Development Platform:
Visual C++
- /*
- * pidl - PIDLs and diddles
- *
- */
- #include "tweakui.h"
- #pragma BEGIN_CONST_DATA
- #pragma END_CONST_DATA
- /*****************************************************************************
- *
- * pidlFromPath
- *
- * Create a pidl from an psf and a relative path.
- *
- *****************************************************************************/
- PIDL PASCAL
- pidlFromPath(LPSHELLFOLDER psf, LPCTSTR lqn)
- {
- PIDL pidl;
- UnicodeFromPtsz(wsz, lqn);
- if (SUCCEEDED(psf->lpVtbl->ParseDisplayName(psf, 0, 0, wsz, 0, &pidl, 0))) {
- return pidl;
- } else {
- return 0;
- }
- }
- /*****************************************************************************
- *
- * SetNameOfPidl
- *
- * Change a pidl's name.
- *
- *****************************************************************************/
- HRESULT PASCAL
- SetNameOfPidl(PSF psf, PIDL pidl, LPCTSTR ptszName)
- {
- UnicodeFromPtsz(wsz, ptszName);
- return psf->lpVtbl->SetNameOf(psf, 0, pidl, wsz, 0, 0);
- }
- /*****************************************************************************
- *
- * ComparePidls
- *
- * Compare two pidls.
- *
- *****************************************************************************/
- HRESULT PASCAL
- ComparePidls(PIDL pidl1, PIDL pidl2)
- {
- return psfDesktop->lpVtbl->CompareIDs(psfDesktop, 0, pidl1, pidl2);
- }
- /*****************************************************************************
- *
- * GetSystemImageList
- *
- * Get the large or small image list handle.
- *
- * The dword argument is 0 for the large image list, or
- * SHGFI_SMALLICON for the small image list.
- *
- *****************************************************************************/
- HIML PASCAL
- GetSystemImageList(DWORD dw)
- {
- SHFILEINFO sfi;
- return (HIML)SHGetFileInfo(g_tszPathShell32, FILE_ATTRIBUTE_DIRECTORY,
- &sfi, sizeof(sfi), SHGFI_USEFILEATTRIBUTES |
- SHGFI_SYSICONINDEX | dw);
- }