From: Steve on
On Dec 23, 7:39 pm, "Bill McCarthy" <B...(a)localhost.com> wrote:
> Hi Steve,
>
> "Steve" <sredm...(a)rfcorp.com> wrote in message
>
> news:af6f1a1e-619f-4378-b9bb-e959d1977ee6(a)o4g2000pra.googlegroups.com
>
> > On Dec 23, 7:19 pm, "mayayana" <mayaXXy...(a)rcXXn.com> wrote:
> >>> Does anyone know how this ispossible?
>
> >> You might check the class name given in Spy++.
> >> Maybe it's notr really a textbox. That's not unusual.
> >> At one point someone was looking to read the URL
> >> in the Firefox address bar and it turned out that none
> >> of that was actually a window. It was all painted.
>
> > As I said in my origianl post.  I did just that and Spy++ says the
> > class is "Edit" hence my confusion.
>
> I just did a quick test. Excuse the .Net code, but it shows the concept
> easiest:
>
> Class TextBoxEx : Inherits TextBox
>
>    Private Const WM_GETTEXT As Int32 = &HD
>
>    Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
>       If m.Msg <> WM_GETTEXT Then
>          MyBase.WndProc(m)
>       End If
>    End Sub
>
> End Class
>
> That's basically subclassing a textbox, and swallowing any WM_GETTEXT
> requests. The textbox works fine, but Spy can't read the text.

Would that method thwart both Sendmessage with WM_GETTEXT and
GetWindowText API (which may simply use the previous method I do not
know)

Thanks,
Steve
From: Steve on
On Dec 23, 7:39 pm, "Bill McCarthy" <B...(a)localhost.com> wrote:
> Hi Steve,
>
> "Steve" <sredm...(a)rfcorp.com> wrote in message
>
> news:af6f1a1e-619f-4378-b9bb-e959d1977ee6(a)o4g2000pra.googlegroups.com
>
> > On Dec 23, 7:19 pm, "mayayana" <mayaXXy...(a)rcXXn.com> wrote:
> >>> Does anyone know how this ispossible?
>
> >> You might check the class name given in Spy++.
> >> Maybe it's notr really a textbox. That's not unusual.
> >> At one point someone was looking to read the URL
> >> in the Firefox address bar and it turned out that none
> >> of that was actually a window. It was all painted.
>
> > As I said in my origianl post.  I did just that and Spy++ says the
> > class is "Edit" hence my confusion.
>
> I just did a quick test. Excuse the .Net code, but it shows the concept
> easiest:
>
> Class TextBoxEx : Inherits TextBox
>
>    Private Const WM_GETTEXT As Int32 = &HD
>
>    Protected Overrides Sub WndProc(ByRef m As System.Windows.Forms.Message)
>       If m.Msg <> WM_GETTEXT Then
>          MyBase.WndProc(m)
>       End If
>    End Sub
>
> End Class
>
> That's basically subclassing a textbox, and swallowing any WM_GETTEXT
> requests. The textbox works fine, but Spy can't read the text.

Further, is there any way to get around this to retreive the text in
the control?

Thanks,
Steve
From: expvb on
"Steve" <sredmyer(a)rfcorp.com> wrote in message
news:1771b856-c901-4acd-9b67-d9e2e231e7c7(a)p2g2000prf.googlegroups.com...
> Would that method thwart both Sendmessage with WM_GETTEXT and
> GetWindowText API (which may simply use the previous method I do not
> know)

Yes, but if you were using GetWindowText(), then try WM_GETTEXT because
GetWindowText() doesn't always work, see the remarks section in the help for
details. In either case, if the control is discarding WM_GETTEXT, then you
may want to try other methods, such as sending EM_SETSEL/WM_COPY. Otherwise,
you may have to do optical character recognition(OCR).


From: Bill McCarthy on
Hi Steve,

"Steve" <sredmyer(a)rfcorp.com> wrote in message
news:4d49cbf5-f563-4d26-acc3-910ad56d4776(a)r37g2000prr.googlegroups.com
>
> Further, is there any way to get around this to retreive the text in
> the control?
>

Possibly, but it really depends on what they have done to protect the code.
You could try doing a select all and copy or EM_GETSELTEXT etc. On a less
practical note you could try to search the processes memory as the string
has to be somewhere, unless they encode it. Start digging there around
EM_GETHANDLE ;)
You could also try some of the acessibility API perhaps

From: Bill McCarthy on
Hi Steve,

"Steve" <sredmyer(a)rfcorp.com> wrote in message
news:1771b856-c901-4acd-9b67-d9e2e231e7c7(a)p2g2000prf.googlegroups.com
> On Dec 23, 7:39 pm, "Bill McCarthy" <B...(a)localhost.com> wrote:
>> Hi Steve,
>>
>> "Steve" <sredm...(a)rfcorp.com> wrote in message
>>
>> news:af6f1a1e-619f-4378-b9bb-e959d1977ee6(a)o4g2000pra.googlegroups.com
>>
>>> On Dec 23, 7:19 pm, "mayayana" <mayaXXy...(a)rcXXn.com> wrote:
>>>>> Does anyone know how this ispossible?
>>
>>>> You might check the class name given in Spy++.
>>>> Maybe it's notr really a textbox. That's not unusual.
>>>> At one point someone was looking to read the URL
>>>> in the Firefox address bar and it turned out that none
>>>> of that was actually a window. It was all painted.
>>
>>> As I said in my origianl post. I did just that and Spy++ says the
>>> class is "Edit" hence my confusion.
>>
>> I just did a quick test. Excuse the .Net code, but it shows the
>> concept easiest:
>>
>> Class TextBoxEx : Inherits TextBox
>>
>> Private Const WM_GETTEXT As Int32 = &HD
>>
>> Protected Overrides Sub WndProc(ByRef m As
>> System.Windows.Forms.Message) If m.Msg <> WM_GETTEXT Then
>> MyBase.WndProc(m)
>> End If
>> End Sub
>>
>> End Class
>>
>> That's basically subclassing a textbox, and swallowing any WM_GETTEXT
>> requests. The textbox works fine, but Spy can't read the text.
>
> Would that method thwart both Sendmessage with WM_GETTEXT and
> GetWindowText API (which may simply use the previous method I do not
> know)
>
> Thanks,
> Steve


Yep.






First  |  Prev  |  Next  |  Last
Pages: 1 2 3 4
Prev: APPDATA folder question
Next: Alternatives