作者tree92 (哈哈 真开心)
看板C_and_CPP
标题Re: [问题]使用system call 如何输入之後的资讯?
时间Sat Feb 25 16:41:22 2006
成功了~ 谢谢各位~
int main()
{
STARTUPINFO si;
PROCESS_INFORMATION pi;
ZeroMemory( &si, sizeof(si) );
si.cb = sizeof(si);
ZeroMemory( &pi, sizeof(pi) );
// Start the child process.
CreateProcess( NULL, // No module name (use command line).
"telnet ptt.cc", // Command line.
NULL, // Process handle not inheritable.
NULL, // Thread handle not inheritable.
FALSE, // Set handle inheritance to FALSE.
0, // No creation flags.
NULL, // Use parent's environment block.
NULL, // Use parent's starting directory.
&si, // Pointer to STARTUPINFO structure.
&pi ); // Pointer to PROCESS_INFORMATION structure.
keybd_event( 0x30, 0x48,KEYEVENTF_EXTENDEDKEY | 0, 0 );
这一行模拟键盘输入 0x30是0 ...
}
--
※ 发信站: 批踢踢实业坊(ptt.cc)
◆ From: 140.112.4.240
※ 编辑: tree92 来自: 140.112.4.240 (02/25 17:27)
※ 编辑: tree92 来自: 140.112.230.164 (02/26 08:54)