Want more features on Pastebin? Sign Up, it's FREE!
Guest

Untitled

By: a guest on Feb 22nd, 2012  |  syntax: C  |  size: 0.41 KB  |  views: 21  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. #include <windows.h>
  2. int main(int argc, char* argv[])
  3. {
  4.         STARTUPINFO si;
  5.         PROCESS_INFORMATION pi;
  6.         ZeroMemory( &si, sizeof(si) );
  7.         si.cb = sizeof(si);
  8.         ZeroMemory( &pi, sizeof(pi) );
  9.         if( !CreateProcess( NULL, "c:/windows/regedit.exe", NULL, NULL, FALSE,
  10.                 0, NULL, NULL, &si, &pi))
  11.                 {system("pause");return 0;}
  12.         //Close process and thread handles.
  13.         CloseHandle( pi.hProcess );
  14.         CloseHandle( pi.hThread );
  15. }
clone this paste RAW Paste Data