📄 shell.odl
字号:
LPCSTR pTo;
FILEOP_FLAGS fFlags;
BOOL fAnyOperationsAborted;
LPVOID hNameMappings;
LPCSTR lpszProgressTitle; // only used if FOF_SIMPLEPROGRESS
} SHFILEOPSTRUCTA, FAR *LPSHFILEOPSTRUCTA;
typedef SHFILEOPSTRUCTA SHFILEOPSTRUCT;
typedef LPSHFILEOPSTRUCTA LPSHFILEOPSTRUCT;
*/
// int WINAPI SHFileOperationA(LPSHFILEOPSTRUCTA lpFileOp);
// void WINAPI SHFreeNameMappings(HANDLE hNameMappings);
/*
typedef struct _SHNAMEMAPPINGA
{
LPSTR pszOldPath;
LPSTR pszNewPath;
int cchOldPath;
int cchNewPath;
} SHNAMEMAPPINGA, FAR *LPSHNAMEMAPPINGA;
typedef SHNAMEMAPPINGA SHNAMEMAPPING;
typedef LPSHNAMEMAPPINGA LPSHNAMEMAPPING;
*/
//// #define SHGetNameMappingCount(_hnm)
// DSA_GetItemCount(_hnm)
//// #define SHGetNameMappingPtr(_hnm, _iItem) \
// (LPSHNAMEMAPPING)DSA_GetItemPtr(_hnm, _iItem)
//// End Shell File Operations
#endif // WIN32
// Begin ShellExecuteEx and family
// ShellExecute() and ShellExecuteEx() error codes
// Regular WinExec() codes
const int SE_ERR_FNF = 2; // file not found
const int SE_ERR_PNF = 3; // path not found
const int SE_ERR_ACCESSDENIED = 5; // access denied
const int SE_ERR_OOM = 8; // out of memory
const int SE_ERR_DLLNOTFOUND = 32;
// Error values for ShellExecute() beyond the regular WinExec() codes
const int SE_ERR_SHARE = 26;
const int SE_ERR_ASSOCINCOMPLETE = 27;
const int SE_ERR_DDETIMEOUT = 28;
const int SE_ERR_DDEFAIL = 29;
const int SE_ERR_DDEBUSY = 30;
const int SE_ERR_NOASSOC = 31;
// Note CLASSKEY overrides CLASSNAME
const DWORD SEE_MASK_CLASSNAME = 0x00000001;
const DWORD SEE_MASK_CLASSKEY = 0x00000003;
// Note INVOKEIDLIST overrides IDLIST
const DWORD SEE_MASK_IDLIST = 0x00000004;
const DWORD SEE_MASK_INVOKEIDLIST = 0x0000000c;
const DWORD SEE_MASK_ICON = 0x00000010;
const DWORD SEE_MASK_HOTKEY = 0x00000020;
const DWORD SEE_MASK_NOCLOSEPROCESS = 0x00000040;
const DWORD SEE_MASK_CONNECTNETDRV = 0x00000080;
const DWORD SEE_MASK_FLAG_DDEWAIT = 0x00000100;
const DWORD SEE_MASK_DOENVSUBST = 0x00000200;
const DWORD SEE_MASK_FLAG_NO_UI = 0x00000400;
const DWORD SEE_MASK_UNICODE = 0x00010000;
/*
typedef struct _SHELLEXECUTEINFOA
{
DWORD cbSize;
ULONG fMask;
HWND hwnd;
LPCSTR lpVerb;
LPCSTR lpFile;
LPCSTR lpParameters;
LPCSTR lpDirectory;
int nShow;
HINSTANCE hInstApp;
// Optional fields
LPVOID lpIDList;
LPCSTR lpClass;
HKEY hkeyClass;
DWORD dwHotKey;
HANDLE hIcon;
HANDLE hProcess;
} SHELLEXECUTEINFOA, FAR *LPSHELLEXECUTEINFOA;
typedef SHELLEXECUTEINFOA SHELLEXECUTEINFO;
typedef LPSHELLEXECUTEINFOA LPSHELLEXECUTEINFO;
*/
// BOOL WINAPI ShellExecuteExA(LPSHELLEXECUTEINFOA lpExecInfo);
// void WINAPI WinExecErrorA(HWND hwnd, int error, LPCSTR lpstrFileName, LPCSTR lpstrTitle);
// End ShellExecuteEx and family
#ifdef WIN32
// Tray notification definitions
/*
typedef struct _NOTIFYICONDATAA {
DWORD cbSize;
HWND hWnd;
UINT uID;
UINT uFlags;
UINT uCallbackMessage;
HICON hIcon;
CHAR szTip[64];
} NOTIFYICONDATAA, *PNOTIFYICONDATAA;
typedef NOTIFYICONDATAA NOTIFYICONDATA;
typedef PNOTIFYICONDATAA PNOTIFYICONDATA;
*/
const DWORD NIM_ADD = 0x00000000;
const DWORD NIM_MODIFY = 0x00000001;
const DWORD NIM_DELETE = 0x00000002;
const DWORD NIF_MESSAGE = 0x00000001;
const DWORD NIF_ICON = 0x00000002;
const DWORD NIF_TIP = 0x00000004;
// BOOL WINAPI Shell_NotifyIconA(DWORD dwMessage, PNOTIFYICONDATAA lpData);
// End Tray Notification Icons
// Begin SHGetFileInfo
/*
* The SHGetFileInfo API provides an easy way to get attributes
* for a file given a pathname.
*
* PARAMETERS
*
* pszPath file name to get info about
* dwFileAttributes file attribs, only used with SHGFI_USEFILEATTRIBUTES
* psfi place to return file info
* cbFileInfo size of structure
* uFlags flags
*
* RETURN
* TRUE if things worked
*/
/*
typedef struct _SHFILEINFOA
{
HICON hIcon; // out: icon
int iIcon; // out: icon index
DWORD dwAttributes; // out: SFGAO_ flags
CHAR szDisplayName[MAX_PATH]; // out: display name (or path)
CHAR szTypeName[80]; // out: type name
} SHFILEINFOA;
typedef SHFILEINFOA SHFILEINFO;
*/
[
usesgetlasterror,
entry("SHGetMalloc"),
helpstring("Returns a pointer to an IMalloc used to allocate LPITEMID"),
]
HRESULT WINAPI SHGetMalloc([in, out] IMalloc ** ppMalloc);
//HRESULT WINAPI SHGetMalloc([out] IUnknown * * MyMalloc);
[ helpstring("SHGetFileInfo: Get icon") ]
const long SHGFI_ICON = 0x00000100;
[ helpstring("SHGetFileInfo: Get display name") ]
const long SHGFI_DISPLAYNAME = 0x00000200;
[ helpstring("SHGetFileInfo: Get type name") ]
const long SHGFI_TYPENAME = 0x00000400;
[ helpstring("SHGetFileInfo: Get attributes") ]
const long SHGFI_ATTRIBUTES = 0x00000800;
[ helpstring("SHGetFileInfo: Get icon location") ]
const long SHGFI_ICONLOCATION = 0x00001000;
[ helpstring("SHGetFileInfo: Get EXE type") ]
const long SHGFI_EXETYPE = 0x00002000;
[ helpstring("SHGetFileInfo: Get system icon index") ]
const long SHGFI_SYSICONINDEX = 0x00004000;
[ helpstring("SHGetFileInfo: Put link overlay on icon") ]
const long SHGFI_LINKOVERLAY = 0x00008000;
[ helpstring("SHGetFileInfo: Show icon in selected state") ]
const long SHGFI_SELECTED = 0x00010000;
[ helpstring("SHGetFileInfo: Get large icon") ]
const long SHGFI_LARGEICON = 0x00000000;
[ helpstring("SHGetFileInfo: Get small icon") ]
const long SHGFI_SMALLICON = 0x00000001;
[ helpstring("SHGetFileInfo: Get open icon") ]
const long SHGFI_OPENICON = 0x00000002;
[ helpstring("SHGetFileInfo: Get shell size icon") ]
const long SHGFI_SHELLICONSIZE = 0x00000004;
[ helpstring("SHGetFileInfo: pszPath is a PIDL") ]
const long SHGFI_PIDL = 0x00000008;
[ helpstring("SHGetFileInfo: Use passed file attributes") ]
const long SHGFI_USEFILEATTRIBUTES = 0x00000010;
/*
DWORD WINAPI SHGetFileInfoA(LPCSTR pszPath,
DWORD dwFileAttributes,
SHFILEINFOA FAR *psfi,
UINT cbFileInfo, UINT uFlags);
BOOL WINAPI SHGetNewLinkInfoA(LPCSTR pszLinkTo, LPCSTR pszDir,
LPSTR pszName, BOOL FAR * pfMustCopy,
UINT uFlags);
*/
//define SHGNLI_PIDL 0x000000001 // pszLinkTo is a pidl
//define SHGNLI_PREFIXNAME 0x000000002 // Make name "Shortcut to xxx"
[
usesgetlasterror,
entry("SHGetSpecialFolderLocation"),
helpstring("Get item ID of special folder location"),
]
HRESULT WINAPI SHGetSpecialFolderLocation([in] HWND hwndOwner,
[in] int nFolder,
/* LPITEMIDLIST * ppidl */
[out] long * ppidl);
[ helpstring("SHGetSpecialFolderLocation: Desktop") ]
const short CSIDL_DESKTOP = 0x0000;
[ helpstring("SHGetSpecialFolderLocation: Programs") ]
const short CSIDL_PROGRAMS = 0x0002;
[ helpstring("SHGetSpecialFolderLocation: Control Panel") ]
const short CSIDL_CONTROLS = 0x0003;
[ helpstring("SHGetSpecialFolderLocation: Printers") ]
const short CSIDL_PRINTERS = 0x0004;
const short CSIDL_PERSONAL = 0x0005;
const short CSIDL_FAVORITES = 0x0006;
[ helpstring("SHGetSpecialFolderLocation: Startup Directory") ]
const short CSIDL_STARTUP = 0x0007;
[ helpstring("SHGetSpecialFolderLocation: Most Recently Used Documents") ]
const short CSIDL_RECENT = 0x0008;
[ helpstring("SHGetSpecialFolderLocation: Send To Menu Items") ]
const short CSIDL_SENDTO = 0x0009;
[ helpstring("SHGetSpecialFolderLocation: Recycle Bin") ]
const short CSIDL_BITBUCKET = 0x000a;
[ helpstring("SHGetSpecialFolderLocation: Start Menu Directory") ]
const short CSIDL_STARTMENU = 0x000b;
[ helpstring("SHGetSpecialFolderLocation: Desktop Directory") ]
const short CSIDL_DESKTOPDIRECTORY = 0x0010;
[ helpstring("SHGetSpecialFolderLocation: My Computer") ]
const short CSIDL_DRIVES = 0x0011;
[ helpstring("SHGetSpecialFolderLocation: Network Neighborhood") ]
const short CSIDL_NETWORK = 0x0012;
[ helpstring("SHGetSpecialFolderLocation: Network Neighborhood Directory") ]
const short CSIDL_NETHOOD = 0x0013;
[ helpstring("SHGetSpecialFolderLocation: Fonts") ]
const short CSIDL_FONTS = 0x0014;
[ helpstring("SHGetSpecialFolderLocation: Templates") ]
const short CSIDL_TEMPLATES = 0x0015;
#endif // WIN32
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -