些有用的Windows Shell对象库(已经封装为用户对象)
本程序是老外所写,有封装好的用户对象及源代码,但没有写调用例程,函数的注解和参数说明还比较详细(英文),自己花点时间写点调用例程吧
1.有move/copy/delete 多个文件(包括目录和子目录)功能
3.可以浏览(目录/打印机/网上邻居) <--这一点本站已经有许多对象可以做到一点,所有的方法都是一致的。
4.可以格式化磁盘。(同样是和Windows出现的效果一样)
程序中用到了下面这些API函数
=== Shell functions
Subroutine SHAddToRecentDocs( ulong uFlags, Ref String pV ) Library "shell32.dll"
Function long SHBrowseForFolder( Ref BROWSEINFO lpBi ) Library "shell32.dll"
Function boolean SHGetPathFromIDList( long pIDL, Ref String pszPath ) Library "shell32.dll" Alias For "SHGetPathFromIDListA"
Function long SHFileOperation( Ref SHFILEOPSTRUCT lpFileOp ) Library "shell32.dll" Alias For "SHFileOperationA"
Function long SHGetSpecialFolderLocation( long hwndOwner, long nFolder, Ref Long ppidl ) Library "shell32.dll"
Function long SHFormatDrive( ulong hWnd, ulong iDrive, ulong iCapacity, ulong iType ) Library "shell32.dll"
=== Memory functions
Function long RtlMoveMemory(REF Char Destination[], long Source, long Size) library "kernel32"
Function long RtlMoveMemory(long Destination, REF Char Source[], long Size) library "kernel32"
Function long LocalAlloc(long Flags, long Bytes) library "kernel32"
Function long LocalFree(long MemHandle) library "kernel32"