Does anybody know how can this be resolved, preferably without attaching the
window to my process?
Eli,
What are you trying to do that requires you to do this (perhaps
there's an alternative)?
Dave
--
MVP VC++ FAQ: http://www.mvps.org/vcfaq
My address is altered to discourage junk mail.
Please post responses to the newsgroup thread,
there's no need for follow-up email copies.
I would be very suprised if Microsft allowed you do this. Any program
that uses the SetWindowLong usually stores a pointer in the GWL_USERDATA
and if Microsoft allowed this sort of cross application call it would
be so easy to crash any program that used user data.
Jussi Jumppanen
Author of: Zeus for Windows, Win32 (Brief, WordStar, Emacs) Text Editor
"The C/C++, Java, HTML, Pascal, Cobol, Fortran programmer's text editor"
http://www.zeusedit.com
Basically, you need to write a dll which you inject into the foreign
process using a message hook on that application.
By the way, SetWindowLong wont always fail - you can probably
set the GWL_USERDATA and GWL_ID fields OK, but the call
definitely will fail if you try to modify the GWL_WNDPROC to subclass
the window. You need the DLL injection method in this case.
'Ain't no other way, sorry...
James
"Eli Golovinsky" <gtr...@mailandnews.com> wrote in message
news:94v6ei$ipa$1...@news.netvision.net.il...
Sébastien COTON