Re: [問題]使用system call 如何輸入之後的資訊?
成功了~  謝謝各位~
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)
C_and_CPP 近期熱門文章
PTT數位生活區 即時熱門文章