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的更多相关文章

  1. Python学习进程

    1周第1天 主要是变量的学习(11月8日) 1.1 python安装(win和linux下)1.2 ipython安装及使用1.3 变量的定义1.4 变量赋值1.5 运算符(赋值.算术.关系.逻辑)1 ...

随机推荐

  1. 网络学习day02_OSI七层模型及数据的传输过程

    title: 2018.9.2 OSI七层模型及数据的传输过程 tags: 计算机网络, OSI七层模型, 数据传输, 数据解封装 --- OSI七层模型和TCP/IP五层模型 OSI七层模型 我们说 ...

  2. 整理一下C++语言中的头文件

    对于每一个像我一样的蒟蒻来说,C++最重要的东西就是头文件的使用了.由于初学,直到现在我打代码还是靠一些事先写好的的头文件,仍然不能做到使用自己需要的.最近看了几位大佬打代码,心中突然闪过要把自己冗长 ...

  3. 使用SSH的scp命令行传输文件到远程服务器

    使用方式如下: 1.上传本地文件到服务器 scp /path/filename username@servername:/path/例如scp /var/www/test.php root@192.1 ...

  4. 关于git 远程仓库密码一直输错的问题

    解决方法, git 换地方使用后需要重新配置秘钥,一个钥匙开一个地方的门: 如果还不行, 在控制面板-用户账户-凭据管理-加添凭证,输入正确的账号密码:因为Windows的凭据管理器里面可能保存了你刚 ...

  5. LVS原理详解(3种工作方式8种调度算法)--老男孩

    一.LVS原理详解(4种工作方式8种调度算法) 集群简介 集群就是一组独立的计算机,协同工作,对外提供服务.对客户端来说像是一台服务器提供服务. LVS在企业架构中的位置: 以上的架构只是众多企业里面 ...

  6. Source Code Review

    1.berfore we talking abnout the Source Code review,here's what we want to know about the most popula ...

  7. Java中多线程服务中遇到的Redis并发问题?

    背景: 一个中小型H5游戏 核心错误信息: (1): java.lang.ClassCastException: [B cannot be cast to java.lang.Long at redi ...

  8. python安装多版本

    39.107.96.81 root 123123 pyenv#可以实现python多版本控制与切换 pyenv local 3.5.1 ipython#更方便的编写python,可以补全命令彩色显示等 ...

  9. 连接慢的主要原因是DNS解析导致

    连接慢的主要原因是DNS解析导致解决方法: 1.在ssh服务端上更改/etc/ssh/sshd_config文件中的配置为如下内容:UseDNS no# GSSAPI optionsGSSAPIAut ...

  10. html+css+js整体布局——[防止浏览器扩大,界面排版混乱]

    1,body——>width:100% body { background-color: rgb(238, 238, 238); color: rgb(51, 51, 51); display: ...