Thread: Destroying windows created by other processes

  1. #16
    Registered User Tonto's Avatar
    Join Date
    Jun 2005
    Location
    New York
    Posts
    1,465
    It has to be a same thread thing, that one's still remote (going through loadlibrary). My idea, was that you actually do a detour style redirect and hook some api that you know would be called with the window you're trying to kill, like createwindowex, begin paint, etc. and then you'll place you're alternate code and have the owning thread call it itself. Good article: http://www.intel.com/cd/ids/develope...865.htm?page=1

  2. #17
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,058
    There's a findfunc.cpp example in the MS Detours library that looks like it can be modified to call the DestroyWindow function in the remote process.

  3. #18
    Registered User Queatrix's Avatar
    Join Date
    Apr 2005
    Posts
    1,342
    Quote Originally Posted by Tonto
    A) Microsoft Windows XP and earlier: The SetWindowLongPtr function fails if the window specified by the hWnd parameter does not belong to the same process as the calling thread.
    In that case, would this work?: Create an child window, in that window you are trying to close, then set it's callback to close the window you want to close. Then send the child the message to do so. So basicly, That threads own window would be telling it to close, you'r just putting it there.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Anyone using Windows 7?
    By Sharke in forum General Discussions
    Replies: 60
    Last Post: 07-12-2009, 08:05 AM
  2. Odd memory leaks
    By VirtualAce in forum C++ Programming
    Replies: 11
    Last Post: 05-25-2006, 12:56 AM
  3. binary tree of processes
    By gregulator in forum C Programming
    Replies: 1
    Last Post: 02-28-2005, 12:59 AM
  4. Menu Item Caption - /a for right aligned Accelerator?
    By JasonD in forum Windows Programming
    Replies: 6
    Last Post: 06-25-2003, 11:14 AM
  5. custom created child windows
    By alandrums in forum Windows Programming
    Replies: 1
    Last Post: 03-07-2002, 06:04 PM