Results 1 to 3 of 3

Thread: Closing programs using TerminateProcess...

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Posts
    109

    Closing programs using TerminateProcess...

    handle = OpenProcess(PROCESS_ALL_ACCESS, False, uProcess.th32ProcessID)
    GetExitCodeProcess handle, lpExitCode
    TerminateProcess handle, lpExitCode
    CloseHandle handle



    is that all i need?

  2. #2

    Thread Starter
    Lively Member
    Join Date
    Aug 2001
    Posts
    109
    ive shortened it to...

    handle = OpenProcess(PROCESS_ALL_ACCESS, 0&, uProcess.th32ProcessID)
    TerminateProcess handle, 0&
    CloseHandle handle

    ... it works for every program cept 1....

    the program that it doesnt work on uses hook.dll, and does some sublassing... not sure if that would be the prob....

    but the prob is, is when it attempts to close it, windows o/s starts popping up all these illegal operation errors, of all the programs running in memory... this only happens when i try to terminate that ONE program... the rest are fine...

    anyone know why this is?

  3. #3
    Registered User Nucleus's Avatar
    Join Date
    Apr 2001
    Location
    So that's what you are up to ;)
    Posts
    2,530

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width