Fetch the repository succeeded.
This action will force synchronization from 精易科技/eapi, which will overwrite any changes that you have made since you forked the repository, and can not be recovered!!!
Synchronous operation will process in the background and will refresh the page when finishing processing. Please be patient.
#include "..\include_eapi_header.h"
#include<shlobj_core.h>
#pragma comment(lib,"shlwapi.lib")
inline BOOL DeleteProgramItem(const char* GroupName, const char* ItemName, int position)
{
BOOL result = FALSE;
char pszPath[MAX_PATH] = { 0 };
SHGetSpecialFolderPathA(0, pszPath, position, 0);
wsprintfA(pszPath, "%s\\%s\\%s.lnk", pszPath, GroupName, ItemName);
result = DeleteFileA(pszPath);
if (result)
{
auto notifyShell = [](LONG wEventId, CHAR* szPath)
{
SHChangeNotify(wEventId, SHCNF_FLUSH | SHCNF_PATH, szPath, 0);
CHAR* p;
for (p = szPath + strlen(szPath) - 1; *p != '\\'; p--)
*p = '\0';
SHChangeNotify(SHCNE_UPDATEDIR | SHCNE_INTERRUPT, SHCNF_FLUSH | SHCNF_PATH, szPath, 0);
};
notifyShell(SHCNE_DELETE | SHCNE_INTERRUPT, pszPath);
}
return result;
}
// 调用格式: SDT_BOOL 删除程序项, 命令说明: "删除指定的特殊位置程序组文件夹中的文件夹快捷方式。成功返回真,失败返回假。"
// 参数<1>: 程序组文件夹 SDT_TEXT, 参数说明: "要创建的快捷方式的程序组文件夹名称,非路径。"
// 参数<2>: 程序项文件夹 SDT_TEXT, 参数说明: "要创建的快捷方式名称"
// 参数<3>: [特殊目录位置 SDT_INT], 参数说明: "程序组的起始位置。可以为以下常量值之一:0、#接口常量.开始菜单;1、#接口常量.开始菜单程序;2、#接口常量.桌面。"
EAPI_EXTERN_C void eapi_DeleteProgramItem_40_eapi(PMDATA_INF pRetData, INT nArgCount, PMDATA_INF pArgInf)
{
//开始菜单
int pos = CSIDL_STARTMENU;
if (pArgInf[2].m_dtDataType && pArgInf[2].m_int) {
if (pArgInf[2].m_int == 2)
{
//桌面
pos = CSIDL_DESKTOPDIRECTORY;
}
else if (pArgInf[2].m_int == 2)
{
//程序组
pos = CSIDL_PROGRAMS;
}
}
pRetData->m_bool = DeleteProgramItem(pArgInf->m_pText, pArgInf[1].m_pText, pos);
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。