Re: Reading a Wnd structure...
- From: "Scherbina Vladimir" <vladimir.scherbina@xxxxxxxxxxxx>
- Date: Wed, 24 May 2006 10:52:16 +0300
[...]
You are still top-posting.....
But your method is even worse! where is the code to limit you to a
specific version of Windows? how do you know, for certain, that you are
running with the same version of user32.dll that you disassembled
yourself? You may have to use checksums to verify this. If you get any of
those checks wrong you are finished. You are talking about an enormous
amount of additional code to support a method that adds no value
whatsover - and just because you think it is 'clever'. It's not. So my
original code, which is still 5 lines long, is completley stand-alone,
requires no extra support, and works on all current versions of Windows.
Anyone can now download this code from the newsgroup and it will work
instantly for them. I was clear up front that it should not be used for
production code and the original poster has confirmed his intended use.
All you have succeeded in doing is confusing the issue and making it more
complicated than it needs to be.
You can't seriously believe that a hard-coded assembly version is
preferable?
James
--
Microsoft MVP - Windows SDK
www.catch22.net
Free Win32 Source and Tutorials
James, your code will fail if MS change passing parameter using ECX, or if
the first call in GetWindowRect will point to another function. So I can't
be sure it will be working in next SP.
Thus, the only possible way to be sure is to calculate offsets for different
versions of OS. Yes, your code calculates "on fly" the address, but its
*unsafe*.
.
- Follow-Ups:
- Re: Reading a Wnd structure...
- From: Lizzy
- Re: Reading a Wnd structure...
- From: James Brown [MVP]
- Re: Reading a Wnd structure...
- References:
- Reading a Wnd structure...
- From: Jack
- Re: Reading a Wnd structure...
- From: James Brown [MVP]
- Re: Reading a Wnd structure...
- From: James Brown [MVP]
- Re: Reading a Wnd structure...
- From: Scherbina Vladimir
- Re: Reading a Wnd structure...
- From: James Brown [MVP]
- Re: Reading a Wnd structure...
- From: Scherbina Vladimir
- Re: Reading a Wnd structure...
- From: James Brown [MVP]
- Re: Reading a Wnd structure...
- From: Scherbina Vladimir
- Re: Reading a Wnd structure...
- From: James Brown [MVP]
- Reading a Wnd structure...
- Prev by Date: Re: without message queue
- Next by Date: Re: CRITICAL_SECTION & HyperTreading
- Previous by thread: Re: Reading a Wnd structure...
- Next by thread: Re: Reading a Wnd structure...
- Index(es):
Relevant Pages
|
Loading