Destroying windows created by other processes

This is a discussion on Destroying windows created by other processes within the Windows Programming forums, part of the Platform Specific Boards category; It has to be a same thread thing, that one's still remote (going through loadlibrary). My idea, was that you ...

  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

    ╔╗╔╦══╦╗╔╦══╦╗
    ║╚╝║╔╗║╚╝║╔╗║║
    ║╔╗║╠╣║╔╗║╠╣╠╣
    ╚╝╚╩╝╚╩╝╚╩╝╚╩╝

    codez http://code.google.com/p/zxcvbn/

  2. #17
    Registered User
    Join Date
    Mar 2005
    Location
    Mountaintop, Pa
    Posts
    1,059
    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.

Page 2 of 2 FirstFirst 12
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, 09:05 AM
  2. Odd memory leaks
    By VirtualAce in forum C++ Programming
    Replies: 11
    Last Post: 05-25-2006, 01: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, 12:14 PM
  5. custom created child windows
    By alandrums in forum Windows Programming
    Replies: 1
    Last Post: 03-07-2002, 06:04 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21