Explore Enterprise Education Gitee Premium Gitee AI AI teammates
Fetch the repository succeeded.
Donate
Please sign in before you donate.
Scan WeChat QR to Pay
Cancel
Complete
Prompt
Switch to Alipay.
OK
Cancel
1 Star 0 Fork 4

AlongsCode/eapi

forked from 精易科技/eapi
Create your Gitee Account
Explore and code with more than 14 million developers,Free private repositories !:)
Sign up
Already have an account? Sign in
文件
master
Branches (1)
master
This repository doesn't specify license. Please pay attention to the specific project description and its upstream code dependency when using it.
The license selected for the repository is subject to the license used by the main branch of the repository.
master
Branches (1)
master
Clone or Download
Clone/Download
Prompt
To download the code, please copy the following command and execute it in the terminal
To ensure that your submitted code identity is correctly recognized by Gitee, please execute the following command.
When using the SSH protocol for the first time to clone or push code, follow the prompts below to complete the SSH configuration.
1 Generate RSA keys.
2 Obtain the content of the RSA public key and configure it in SSH Public Keys
To use SVN on Gitee, please visit the usage guide
When using the HTTPS protocol, the command line will prompt for account and password verification as follows. For security reasons, Gitee recommends configure and use personal access tokens instead of login passwords for cloning, pushing, and other operations.
Username for 'https://gitee.com': userName
Password for 'https://userName@gitee.com': # Private Token
master
Branches (1)
master
eapi
/
cppCode
/
eapi_55_OpenSysWindow.cpp
eapi
/
cppCode
/
eapi_55_OpenSysWindow.cpp
eapi_55_OpenSysWindow.cpp 4.07 KB
Copy Edit Raw Blame History
AlongsCode authored 2023年02月09日 00:42 +08:00 . 部分重构
#include "..\include_eapi_header.h"
#include<shlwapi.h>
#pragma comment(lib,"shlwapi.lib")
inline void OpenSysInfoDlg()
{
HKEY hKey;
char pBuff[MAX_PATH] = { 0 };
DWORD pBuffSize = MAX_PATH;
if (!RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Shared Tools\\MSInfo", 0, KEY_EXECUTE, &hKey)) {
DWORD type = REG_NONE;
LSTATUS hLsta = RegQueryValueExA(hKey, "Path", 0, &type, (BYTE*)pBuff, &pBuffSize);
if (hKey)
{
RegCloseKey(hKey);
}
PathFileExistsA(pBuff);
ShellExecuteA(0, "open", pBuff, 0, 0, 1);
}
else if (!RegOpenKeyExA(HKEY_LOCAL_MACHINE, "Software\\Microsoft\\Shared Tools Location", 0, KEY_EXECUTE, &hKey))
{
DWORD type = REG_NONE;
RegQueryValueExA(hKey, "MSInfo", 0, &type, (BYTE*)pBuff, &pBuffSize);//可能会找不到文件
PathAppendA(pBuff, "MSInfo32.exe");
if (hKey)
{
RegCloseKey(hKey);
}
PathFileExistsA(pBuff);
ShellExecuteA(0, "open", pBuff, 0, 0, 1);
}
}
static void OpenSysWindow(int Type, int PageIndex) {
std::string TempCom;
char ComLine[100]{ 0 };
switch (Type)
{
case 0:
TempCom = "rundll32.exe shell32.dll,Control_RunDLL";
break;
case 1:
TempCom = "rundll32.exe shell32.dll,Control_RunDLL sysdm.cpl,," + std::to_string(PageIndex);
break;
case 2:
TempCom = "rundll32.exe shell32.dll,Control_RunDLL desk.cpl,," + std::to_string(PageIndex);
break;
case 3:
TempCom = "rundll32.exe shell32.dll,Control_RunDLL access.cpl,," + std::to_string(PageIndex);
break;
case 4:
TempCom = "rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL AddPrinter";
break;
case 5:
TempCom = "rundll32.exe shell32.dll,Control_RunDLL appwiz.cpl,," + std::to_string(PageIndex);;
break;
case 6:
TempCom = "rundll32.exe shell32.dll,Control_RunDLL timedate.cpl,," + std::to_string(PageIndex);;
break;
case 7:
TempCom = "rundll32.exe shell32.dll,SHHelpShortcuts_RunDLL FontsFolder";
break;
case 8:
TempCom = "rundll32.exe shell32.dll,Control_RunDLL joy.cpl,," + std::to_string(PageIndex);;
break;
case 9:
TempCom = "rundll32.exe shell32.dll,Control_RunDLL main.cpl @0," + std::to_string(PageIndex);;
break;
case 10:
TempCom = "rundll32.exe shell32.dll,Control_RunDLL main.cpl @1," + std::to_string(PageIndex);;
break;
case 11:
TempCom = "rundll32.exe shell32.dll,Control_RunDLL mmsys.cpl,," + std::to_string(PageIndex);;
break;
case 12:
TempCom = "rundll32.exe shell32.dll,Control_RunDLL odbccp32.cpl";
break;
case 13:
TempCom = "rundll32.exe shell32.dll,Control_RunDLL powercfg.cpl";
break;
case 14:
TempCom = "rundll32.exe shell32.dll,Control_RunDLL intl.cpl,," + std::to_string(PageIndex);;
break;
case 15:
TempCom = "rundll32.exe shell32.dll,Control_RunDLL Inetcpl.cpl,," + std::to_string(PageIndex);;
break;
case 16:
TempCom = "Rundll32 netplwiz.dll,UsersRunDll";
break;
case 17:
OpenSysInfoDlg();
break;
default:
break;
}
STARTUPINFOA si = { 0 };
PROCESS_INFORMATION pi;
si.cb = sizeof(si);
CreateProcessA(NULL, const_cast<char*>(TempCom.c_str()), NULL, NULL, FALSE, 0, NULL, NULL, &si, &pi);
CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
}
// 调用格式: _SDT_NULL 打开特殊系统窗口, 命令说明: "打开特殊的系统窗口,如控制面板。"
// 参数<1>: 窗口类型 SDT_INT, 参数说明: "系统窗口类型,为以下常量值之一:0、#接口常量.控制面板;1、#接口常量.系统属性;2、#接口常量.显示属性;3、#接口常量.辅助功能选项;4、#接口常量.添加打印机向导;5、#接口常量.添加或删除程序;6、#接口常量.日期和时间属性;7、#接口常量.字体文件夹;8、#接口常量.游戏控制器;9、#接口常量.鼠标属性;10、#接口常量.键盘属性;11、#接口常量.声音和音频属性;12、#接口常量.ODBC数据源管理器;13、#接口常量.电源选项属性;14、#接口常量.区域和语言选项;15、#接口常量.互联网属性;16、#接口常量.用户帐号;17、#接口常量.系统信息对话框。"
// 参数<2>: [属性页序号 SDT_TEXT], 参数说明: "有多个属性页时,表示要打开属性页的序号(从0开始)。"
EAPI_EXTERN_C void eapi_OpenSysWindow_55_eapi(PMDATA_INF pRetData, INT nArgCount, PMDATA_INF pArgInf)
{
INT Index = 0, Type = 0;
if (pArgInf[0].m_int > 0 && pArgInf[0].m_int <= 17)
{
Type = pArgInf[0].m_int;
}
if (pArgInf[1].m_dtDataType && pArgInf[1].m_int > 0)
{
Index = pArgInf[1].m_int;
}
OpenSysWindow(Type, Index);
}
Loading...
Report
Report success
We will send you the feedback within 2 working days through the letter!
Please fill in the reason for the report carefully. Provide as detailed a description as possible.
Please select a report type
Cancel
Send
误判申诉

此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。

如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。

取消
提交

About

易语言支持库 - 应用接口支持库 欢迎易友fork提交代码完成支持库重构改造。
Cancel

Releases

No release

Contributors

All

Activities

can not load any more
Edit
About
Homepage
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
C++
1
https://gitee.com/alongscode/eapi.git
git@gitee.com:alongscode/eapi.git
alongscode
eapi
eapi
master
Going to Help Center

Search

Comment
Repository Report
Back to the top
Login prompt
This operation requires login to the code cloud account. Please log in before operating.
Go to login
No account. Register

AltStyle によって変換されたページ (->オリジナル) /