ApiShell
using System;
using System.Runtime.InteropServices; using HWND = System.IntPtr;
using HANDLE = System.IntPtr; namespace Win32
{ public struct DRAGINFO
{
public int uSize;
public POINT pt;
public int fNC;
public string lpFileList;
public int grfKeyState;
}
public struct APPBARDATA
{
public int cbSize;
public HWND hwnd;
public int uCallbackMessage;
public int uEdge;
public RECT rc;
public int lParam;
}
public struct SHFILEOPSTRUCT
{
public HWND hwnd;
public int wFunc;
public string pFrom;
public string pTo;
public short fFlags;
public int fAnyOperationsAborted;
public HANDLE hNameMappings;
public string lpszProgressTitle;
}
public struct SHNAMEMAPPING
{
public string pszOldPath;
public string pszNewPath;
public int cchOldPath;
public int cchNewPath;
}
public struct SHELLEXECUTEINFO
{
public int cbSize;
public int fMask;
public HWND hwnd;
public string lpVerb;
public string lpFile;
public string lpParameters;
public string lpDirectory;
public int nShow;
public HANDLE hInstApp;
public int lpIDList;
public string lpClass;
public HANDLE hkeyClass;
public int dwHotKey;
public HANDLE hIcon;
public HANDLE hProcess;
}
public struct NOTIFYICONDATA
{
public int cbSize;
public HWND hwnd;
public int uID;
public int uFlags;
public int uCallbackMessage;
public HANDLE hIcon;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = )] public string szTip;
}
public struct SHFILEINFO
{
public HANDLE hIcon;
public int iIcon;
public int dwAttributes;
[MarshalAs(UnmanagedType.ByValArray, SizeConst = Kernel.MAX_PATH)] public string szDisplayName;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = )] public string szTypeName;
} public abstract class Shell
{
[DllImport("shell32")] public static extern int CommandLineToArgv(string lpCmdLine, short pNumArgs);
[DllImport("shell32")] public static extern int DoEnvironmentSubst(string szString, int cbString);
[DllImport("shell32")] public static extern int DragQueryFile(HANDLE hDROP, int UINT, string lpStr, int ch);
[DllImport("shell32")] public static extern int DragQueryPoint(HANDLE hDROP, ref POINT lpPoint);
[DllImport("shell32")] public static extern int DuplicateIcon(HANDLE hInst, HANDLE hIcon);
[DllImport("shell32")] public static extern int ExtractAssociatedIcon(HANDLE hInst, string lpIconPath, ref int lpiIcon);
[DllImport("shell32")] public static extern int ExtractIcon(HANDLE hInst, string lpszExeFileName, int nIconIndex);
[DllImport("shell32")] public static extern int ExtractIconEx(string lpszFile, int nIconIndex, ref int phiconLarge, ref int phiconSmall, int nIcons);
[DllImport("shell32")] public static extern int FindExecutable(string lpFile, string lpDirectory, string lpResult);
[DllImport("shell32")] public static extern int SHAppBarMessage(int dwMessage, ref APPBARDATA pData);
[DllImport("shell32")] public static extern int SHFileOperation(ref SHFILEOPSTRUCT lpFileOp);
[DllImport("shell32")] public static extern int SHGetFileInfo(string pszPath, int dwFileAttributes, ref SHFILEINFO psfi, int cbFileInfo, int uFlags);
[DllImport("shell32")] public static extern int SHGetNewLinkInfo(string pszLinkto, string pszDir, string pszName, ref int pfMustCopy, int uFlags);
[DllImport("shell32")] public static extern int ShellAbout(HWND hwnd, string szApp, string szOtherStuff, HANDLE hIcon);
[DllImport("shell32")] public static extern int ShellExecute(HWND hwnd, string lpOperation, string lpFile, string lpParameters, string lpDirectory, int nShowCmd);
[DllImport("shell32")] public static extern int Shell_NotifyIcon(int dwMessage, ref NOTIFYICONDATA lpData);
[DllImport("shell32")] public static extern void DragAcceptFiles(HWND hwnd, int fAccept);
[DllImport("shell32")] public static extern void DragFinish(HANDLE hDrop);
[DllImport("shell32")] public static extern void SHFreeNameMappings(HANDLE hNameMappings);
[DllImport("shell32")] public static extern void WinExecError(HWND hwnd, int error, string lpstrFileName, string lpstrTitle);
[DllImport("shell32")] public static extern int SHBrowseForFolder(BROWSEINFO lpbi);
[DllImport("shell32")] public static extern int SHGetPathFromIDList(int pidList, string lpBuffer); public const int ABE_BOTTOM = ;
public const int ABE_LEFT = ;
public const int ABE_RIGHT = ;
public const int ABE_TOP = ;
public const int ABM_ACTIVATE = 0x6;
public const int ABM_GETAUTOHIDEBAR = 0x7;
public const int ABM_GETSTATE = 0x4;
public const int ABM_GETTASKBARPOS = 0x5;
public const int ABM_NEW = 0x0;
public const int ABM_QUERYPOS = 0x2;
public const int ABM_REMOVE = 0x1;
public const int ABM_SETAUTOHIDEBAR = 0x8;
public const int ABM_SETPOS = 0x3;
public const int ABM_WINDOWPOSCHANGED = 0x9;
public const int ABN_FULLSCREENAPP = 0x2;
public const int ABN_POSCHANGED = 0x1;
public const int ABN_STATECHANGE = 0x0;
public const int ABN_WINDOWARRANGE = 0x3;
public const int ABS_ALWAYSONTOP = 0x2;
public const int ABS_AUTOHIDE = 0x1;
public const int EIRESID = -;
public const int FOF_ALLOWUNDO = 0x40;
public const int FOF_CONFIRMMOUSE = 0x2;
public const int FOF_FILESONLY = 0x80;
public const int FOF_MULTIDESTFILES = 0x1;
public const int FOF_NOCONFIRMATION = 0x10;
public const int FOF_NOCONFIRMMKDIR = 0x200;
public const int FOF_RENAMEONCOLLISION = 0x8;
public const int FOF_SILENT = 0x4;
public const int FOF_SIMPLEPROGRESS = 0x100;
public const int FOF_WANTMAPPINGHANDLE = 0x20;
public const int FO_COPY = 0x2;
public const int FO_DELETE = 0x3;
public const int FO_MOVE = 0x1;
public const int FO_RENAME = 0x4;
public const int NIF_ICON = 0x2;
public const int NIF_MESSAGE = 0x1;
public const int NIF_TIP = 0x4;
public const int NIM_ADD = 0x0;
public const int NIM_DELETE = 0x2;
public const int NIM_MODIFY = 0x1;
public const int PO_DELETE = 0x13;
public const int PO_PORTCHANGE = 0x20;
public const int PO_RENAME = 0x14;
public const int PO_REN_PORT = 0x34;
public const int SEE_MASK_CLASSKEY = 0x3;
public const int SEE_MASK_CLASSNAME = 0x1;
public const int SEE_MASK_CONNECTNETDRV = 0x80;
public const int SEE_MASK_DOENVSUBST = 0x200;
public const int SEE_MASK_FLAG_DDEWAIT = 0x100;
public const int SEE_MASK_FLAG_NO_UI = 0x400;
public const int SEE_MASK_HOTKEY = 0x20;
public const int SEE_MASK_ICON = 0x10;
public const int SEE_MASK_IDLIST = 0x4;
public const int SEE_MASK_INVOKEIDLIST = 0xC;
public const int SEE_MASK_NOCLOSEPROCESS = 0x40;
public const int SE_ERR_ACCESSDENIED = ;
public const int SE_ERR_ASSOCINCOMPLETE = ;
public const int SE_ERR_DDEBUSY = ;
public const int SE_ERR_DDEFAIL = ;
public const int SE_ERR_DDETIMEOUT = ;
public const int SE_ERR_DLLNOTFOUND = ;
public const int SE_ERR_FNF = ;
public const int SE_ERR_NOASSOC = ;
public const int SE_ERR_OOM = ;
public const int SE_ERR_PNF = ;
public const int SE_ERR_SHARE = ;
public const int SHGFI_ATTRIBUTES = 0x800;
public const int SHGFI_DISPLAYNAME = 0x200;
public const int SHGFI_EXETYPE = 0x2000;
public const int SHGFI_ICON = 0x100;
public const int SHGFI_ICONLOCATION = 0x1000;
public const int SHGFI_LARGEICON = 0x0;
public const int SHGFI_LINKOVERLAY = 0x8000;
public const int SHGFI_OPENICON = 0x2;
public const int SHGFI_PIDL = 0x8;
public const int SHGFI_SELECTED = 0x10000;
public const int SHGFI_SHELLICONSIZE = 0x4;
public const int SHGFI_SMALLICON = 0x1;
public const int SHGFI_SYSICONINDEX = 0x4000;
public const int SHGFI_TYPENAME = 0x400;
public const int SHGFI_USEFILEATTRIBUTES = 0x10;
public const int SHGNLI_PIDL = 0x1;
public const int SHGNLI_PREFIXNAME = 0x2;
}
}
ApiShell的更多相关文章
- Python学习进程
1周第1天 主要是变量的学习(11月8日) 1.1 python安装(win和linux下)1.2 ipython安装及使用1.3 变量的定义1.4 变量赋值1.5 运算符(赋值.算术.关系.逻辑)1 ...
随机推荐
- java学习教程与笔记
一个java学习教程:http://www.jikexueyuan.com/path/java/#stage1 集合类学习: java中结合类很多,但用得比较多的一般有三种,当然,其它语言也是,主要是 ...
- django2.0无法加载外部css和js的问题
解决问题的思路来源于https://www.v2ex.com/t/430192 先是创建static目录,该目录与manage.py同级 然后在项目settings.py文件里添加 STATICFIL ...
- vue 使用swiper的一些问题(页面渲染问题)
//Swiper上下滚动初始化 swiper_init(){ this.$nextTick(function(){ var mySwiper = new Swiper ('.swiper-contai ...
- zoj4027 线性dp!好题
非常好的dp,可是我太菜做不出来.. /* 第i个左括号不可能越过第i+1个左括号 如果第i个左括号到位置j,前提是第i+1个左括号就必须到位置j+1即以后 用dp[i][j]表示把第i个左括号转移到 ...
- python3 基础语法(二)
一.python3的基本数据类型: 和其他语言一样都包含了以下数据类型: 类型 含义 实例 INT 整型(integer) 1 FLOAT 浮点型 1.1 BOOL 布尔值 TRUE/FALSE ST ...
- fire workflow总结
一.Fire WorkFlow核心1.IPersistenceService存储服务.Fire Workflow 缺省情况下使用hibernate 进行数据库存取.如果你的系统不是使用hibernat ...
- ansible的delegate_to、connection、和local_action
由于工作需要,经常需要把目标节点获得的信息写入执行节点文件日志. 所以经常用到delegate_to和connection,而local_action写法难看,基本不用. delegate_to和co ...
- [转]Windows 安装Kafka
来源:https://www.cnblogs.com/liuyuhua/p/5329926.html https://www.cnblogs.com/xinlingyoulan/p/6054361.h ...
- SQL反模式学习笔记21 SQL注入
目标:编写SQL动态查询,防止SQL注入 通常所说的“SQL动态查询”是指将程序中的变量和基本SQL语句拼接成一个完整的查询语句. 反模式:将未经验证的输入作为代码执行 当向SQL查询的字符串中插入别 ...
- stm32位操作详解
stm32位操作详解 STM32位操作原理 思想:把一个比特分成32位,每位都分配一个地址,这样就有32个地址,通过地址直接访问. 位操作基础 位运算 位运算的运算分量只能是整型或字符型数据,位运算把 ...